1286 art::ServiceHandle<art::TFileService const>
tfs;
1288 fGenerated[0] = tfs->make<TH1F>(
"fGenerated_necc",
"", 100, 0.0, 20.0);
1289 fGenerated[1] =
tfs->make<TH1F>(
"fGenerated_nebcc",
"", 100, 0.0, 20.0);
1290 fGenerated[2] =
tfs->make<TH1F>(
"fGenerated_nmcc",
"", 100, 0.0, 20.0);
1291 fGenerated[3] =
tfs->make<TH1F>(
"fGenerated_nmbcc",
"", 100, 0.0, 20.0);
1292 fGenerated[4] =
tfs->make<TH1F>(
"fGenerated_nnc",
"", 100, 0.0, 20.0);
1293 fGenerated[5] =
tfs->make<TH1F>(
"fGenerated_nbnc",
"", 100, 0.0, 20.0);
1295 fDCosX =
tfs->make<TH1F>(
"fDCosX",
";dx/ds", 200, -1., 1.);
1296 fDCosY =
tfs->make<TH1F>(
"fDCosY",
";dy/ds", 200, -1., 1.);
1297 fDCosZ =
tfs->make<TH1F>(
"fDCosZ",
";dz/ds", 200, -1., 1.);
1299 fMuMomentum =
tfs->make<TH1F>(
"fMuMomentum",
";p_{#mu} (GeV/c)", 500, 0., 50.);
1300 fMuDCosX =
tfs->make<TH1F>(
"fMuDCosX",
";dx/ds;", 200, -1., 1.);
1301 fMuDCosY =
tfs->make<TH1F>(
"fMuDCosY",
";dy/ds;", 200, -1., 1.);
1302 fMuDCosZ =
tfs->make<TH1F>(
"fMuDCosZ",
";dz/ds;", 200, -1., 1.);
1304 fEMomentum =
tfs->make<TH1F>(
"fEMomentum",
";p_{e} (GeV/c)", 500, 0., 50.);
1305 fEDCosX =
tfs->make<TH1F>(
"fEDCosX",
";dx/ds;", 200, -1., 1.);
1306 fEDCosY =
tfs->make<TH1F>(
"fEDCosY",
";dy/ds;", 200, -1., 1.);
1307 fEDCosZ =
tfs->make<TH1F>(
"fEDCosZ",
";dz/ds;", 200, -1., 1.);
1309 fCCMode =
tfs->make<TH1F>(
"fCCMode",
";CC Interaction Mode;", 5, 0., 5.);
1310 fCCMode->GetXaxis()->SetBinLabel(1,
"QE");
1311 fCCMode->GetXaxis()->SetBinLabel(2,
"Res");
1312 fCCMode->GetXaxis()->SetBinLabel(3,
"DIS");
1313 fCCMode->GetXaxis()->SetBinLabel(4,
"Coh");
1314 fCCMode->GetXaxis()->SetBinLabel(5,
"kInverseMuDecay");
1315 fCCMode->GetXaxis()->CenterLabels();
1317 fNCMode =
tfs->make<TH1F>(
"fNCMode",
";NC Interaction Mode;", 5, 0., 5.);
1318 fNCMode->GetXaxis()->SetBinLabel(1,
"QE");
1319 fNCMode->GetXaxis()->SetBinLabel(2,
"Res");
1320 fNCMode->GetXaxis()->SetBinLabel(3,
"DIS");
1321 fNCMode->GetXaxis()->SetBinLabel(4,
"Coh");
1322 fNCMode->GetXaxis()->SetBinLabel(5,
"kNuElectronElastic");
1323 fNCMode->GetXaxis()->CenterLabels();
1325 fWeight =
tfs->make<TH1F>(
"fWeight",
";Weight1;", 20, 1.E-42, 1.E-38);
1326 fWeightNW =
tfs->make<TH1F>(
"fWeightNW",
";Weight2;", 20, 1.E-42, 1.E-38);
1328 fDyn =
tfs->make<TH1F>(
"fDyn",
";Canonical Interaction Mode;", 13, 0., 13.);
1329 fDyn->GetXaxis()->SetBinLabel(1,
"CCQE");
1330 fDyn->GetXaxis()->SetBinLabel(2,
"NCelastic");
1331 fDyn->GetXaxis()->SetBinLabel(3,
"CCResp2ppi+");
1332 fDyn->GetXaxis()->SetBinLabel(4,
"CCResn2ppi0");
1333 fDyn->GetXaxis()->SetBinLabel(5,
"CCResn2npi+");
1334 fDyn->GetXaxis()->SetBinLabel(6,
"NCResp2ppi0");
1335 fDyn->GetXaxis()->SetBinLabel(7,
"NCResp2npi+");
1336 fDyn->GetXaxis()->SetBinLabel(8,
"NCResn2npi0");
1337 fDyn->GetXaxis()->SetBinLabel(9,
"NCResn2ppi-");
1338 fDyn->GetXaxis()->SetBinLabel(10,
"CC-DIS");
1339 fDyn->GetXaxis()->SetBinLabel(11,
"NC-DIS");
1340 fDyn->GetXaxis()->SetBinLabel(12,
"NC-COH");
1341 fDyn->GetXaxis()->SetBinLabel(13,
"CC-COH");
1342 fDyn->GetXaxis()->CenterLabels();
1344 fDynNew =
tfs->make<TH1F>(
"fDynNew",
";New Style Accounting Mode;", 10, 0., 10.);
1345 fDynNew->GetXaxis()->SetBinLabel(1,
"1mu0p0pi");
1346 fDynNew->GetXaxis()->SetBinLabel(2,
"1mu1p0pi");
1347 fDynNew->GetXaxis()->SetBinLabel(3,
"1muge2p0pi");
1348 fDynNew->GetXaxis()->SetBinLabel(4,
"1mu0p1pi");
1349 fDynNew->GetXaxis()->SetBinLabel(5,
"1mu1p1pi");
1350 fDynNew->GetXaxis()->SetBinLabel(6,
"1muge2p1pi");
1351 fDynNew->GetXaxis()->SetBinLabel(7,
"1mu0p2pi");
1352 fDynNew->GetXaxis()->SetBinLabel(8,
"1muge1p2pi");
1353 fDynNew->GetXaxis()->SetBinLabel(9,
"NC");
1354 fDynNew->GetXaxis()->SetBinLabel(10,
"Other");
1355 fDynNew->GetXaxis()->CenterLabels();
1357 fDynNewThresh =
tfs->make<TH1F>(
"fDynNewThresh",
";New Style Accounting Mode (Tp>50MeV);", 10, 0., 10.);
1370 f2DynNew =
tfs->make<TH2F>(
"f2DynNew",
";Old vs New Style Accounting Mode;", 13, 0.,13., 10,0.,10.);
1372 f2DynNew->GetXaxis()->SetBinLabel(1,
"CCQE");
1373 f2DynNew->GetXaxis()->SetBinLabel(2,
"NCelastic");
1374 f2DynNew->GetXaxis()->SetBinLabel(3,
"CCResp2ppi+");
1375 f2DynNew->GetXaxis()->SetBinLabel(4,
"CCResn2ppi0");
1376 f2DynNew->GetXaxis()->SetBinLabel(5,
"CCResn2npi+");
1377 f2DynNew->GetXaxis()->SetBinLabel(6,
"NCResp2ppi0");
1378 f2DynNew->GetXaxis()->SetBinLabel(7,
"NCResp2npi+");
1379 f2DynNew->GetXaxis()->SetBinLabel(8,
"NCResn2npi0");
1380 f2DynNew->GetXaxis()->SetBinLabel(9,
"NCResn2ppi-");
1381 f2DynNew->GetXaxis()->SetBinLabel(10,
"CC-DIS");
1382 f2DynNew->GetXaxis()->SetBinLabel(11,
"NC-DIS");
1383 f2DynNew->GetXaxis()->SetBinLabel(12,
"NC-COH");
1384 f2DynNew->GetXaxis()->SetBinLabel(13,
"CC-COH");
1385 f2DynNew->GetXaxis()->CenterLabels();
1386 f2DynNew->GetYaxis()->SetBinLabel(1,
"1mu0p0pi");
1387 f2DynNew->GetYaxis()->SetBinLabel(2,
"1mu1p0pi");
1388 f2DynNew->GetYaxis()->SetBinLabel(3,
"1muge2p0pi");
1389 f2DynNew->GetYaxis()->SetBinLabel(4,
"1mu0p1pi");
1390 f2DynNew->GetYaxis()->SetBinLabel(5,
"1mu1p1pi");
1391 f2DynNew->GetYaxis()->SetBinLabel(6,
"1muge2p1pi");
1392 f2DynNew->GetYaxis()->SetBinLabel(7,
"1mu0p2pi");
1393 f2DynNew->GetYaxis()->SetBinLabel(8,
"1muge1p2pi");
1394 f2DynNew->GetYaxis()->SetBinLabel(9,
"NC");
1395 f2DynNew->GetYaxis()->SetBinLabel(10,
"Other");
1396 f2DynNew->GetYaxis()->CenterLabels();
1398 f2DynNewThresh =
tfs->make<TH2F>(
"f2DynNewThresh",
";Old vs New Style Accounting Mode;", 13, 0.,13., 10, 0.,10.);
1427 fECons =
tfs->make<TH1F>(
"fECons",
";#Delta E(#nu,lepton);", 500, -5., 5.);
1429 art::ServiceHandle<geo::Geometry const> geo;
1430 double x = 2.1*geo->DetHalfWidth();
1431 double y = 2.1*geo->DetHalfHeight();
1432 double z = 2.*geo->DetLength();
1433 int xdiv = TMath::Nint(2*x/5.);
1434 int ydiv = TMath::Nint(2*y/5.);
1435 int zdiv = TMath::Nint(2*z/5.);
1437 fVertexX =
tfs->make<TH1F>(
"fVertexX",
";x (cm)", xdiv, -
x,
x);
1438 fVertexY =
tfs->make<TH1F>(
"fVertexY",
";y (cm)", ydiv, -
y,
y);
1439 fVertexZ =
tfs->make<TH1F>(
"fVertexZ",
";z (cm)", zdiv, -0.2*
z,
z);
1441 fVertexXY =
tfs->make<TH2F>(
"fVertexXY",
";x (cm);y (cm)", xdiv, -
x,
x, ydiv, -
y,
y);
1442 fVertexXZ =
tfs->make<TH2F>(
"fVertexXZ",
";z (cm);x (cm)", zdiv, -0.2*
z,
z, xdiv, -
x,
x);
1443 fVertexYZ =
tfs->make<TH2F>(
"fVertexYZ",
";z (cm);y (cm)", zdiv, -0.2*
z,
z, ydiv, -
y,
y);
1446 TClass::GetClass(
"line")->GetStreamerInfo(1);
1451 std::cout <<
" Num entries in TTree is " <<
ch->GetEntries() << std::endl;
1457 std::cout <<
"NuWroGen: Here's the output of the .txt file" << std::endl;
1458 std::ifstream xsecTxtFile((
fFileName+
".txt").c_str());
1459 unsigned int cntline(0);
1461 if (xsecTxtFile.is_open())
1463 while ( xsecTxtFile.good() )
1465 getline (xsecTxtFile,line);
1466 cout << line << endl;
1467 if (cntline==0) { cntline++;
continue;}
1468 stringstream ss(line);
1469 vector<std::string> tokens;
1473 tokens.push_back(buf);
1476 if (tokens.size() && line.length())
1478 else xsecTxtFile.close();
1482 else std::cout <<
"Unable to open file";
TH1F * fEDCosZ
direction cosine of outgoing e in z
process_name opflash particleana ie ie ie z
TH2F * fVertexYZ
vertex location in yz
process_name opflash particleana ie x
TH1F * fCCMode
CC interaction mode.
TH2F * fVertexXY
vertex location in xy
TH1F * fWeightNW
NuWro Wt.
TH1F * fDCosX
direction cosine in x
TH1F * fGenerated[6]
Spectra as generated.
TH2F * fVertexXZ
vertex location in xz
TH1F * fNCMode
CC interaction mode.
TH1F * fEDCosY
direction cosine of outgoing e in y
process_name opflash particleana ie ie y
TH1F * fVertexY
vertex location of generated events in y
TH1F * fVertexZ
vertex location of generated events in z
TH1F * fDCosY
direction cosine in y
TH1F * fECons
histogram to determine if energy is conserved in the event
TH1F * fEDCosX
direction cosine of outgoing e in x
TH1F * fDCosZ
direction cosine in z
std::vector< double > fxsecFluxWtd
TH1F * fMuDCosX
direction cosine of outgoing mu in x
TH1F * fDyn
mode in detail
TH1F * fMuDCosY
direction cosine of outgoing mu in y
art::ServiceHandle< art::TFileService > tfs
TH1F * fEMomentum
momentum of outgoing electrons
TH1F * fMuMomentum
momentum of outgoing muons
TH1F * fVertexX
vertex location of generated events in x
BEGIN_PROLOG could also be cout
TH1F * fMuDCosZ
direction cosine of outgoing mu in z