2 #include "CoreUtils.hxx" 20 _POT_GoodBeamGoodND280 = 0;
29 _Spill_GoodBeamGoodND280 = 0;
40 if (!tree)
return false;
42 double tmp_POT_NoCut, tmp_POT_BadBeam, tmp_POT_BadND280;
43 int tmp_Spill_NoCut, tmp_Spill_BadBeam, tmp_Spill_BadND280;
44 double tmp_POT_GoodBeamGoodND280;
45 int tmp_Spill_GoodBeamGoodND280;
46 double tmp_POT_0KA, tmp_POT_200KA, tmp_POT_250KA, tmp_POT_m250KA, tmp_POT_OtherKA;
47 char tmp_SoftwareVersion[100];
50 if (tree->FindLeaf(
"POT_NoCut")){
51 anaUtils::ConfigureTreeBranch(tree,
"SoftwareVersion", tmp_SoftwareVersion);
52 anaUtils::ConfigureTreeBranch(tree,
"POT_NoCut", &tmp_POT_NoCut);
53 anaUtils::ConfigureTreeBranch(tree,
"POT_BadBeam", &tmp_POT_BadBeam);
54 anaUtils::ConfigureTreeBranch(tree,
"POT_BadND280", &tmp_POT_BadND280);
55 anaUtils::ConfigureTreeBranch(tree,
"POT_GoodBeamGoodND280", &tmp_POT_GoodBeamGoodND280);
56 anaUtils::ConfigureTreeBranch(tree,
"POT_0KA", &tmp_POT_0KA);
57 anaUtils::ConfigureTreeBranch(tree,
"POT_200KA", &tmp_POT_200KA);
58 anaUtils::ConfigureTreeBranch(tree,
"POT_250KA", &tmp_POT_250KA);
59 anaUtils::ConfigureTreeBranch(tree,
"POT_m250KA", &tmp_POT_m250KA);
60 anaUtils::ConfigureTreeBranch(tree,
"POT_OtherKA", &tmp_POT_OtherKA);
61 anaUtils::ConfigureTreeBranch(tree,
"Spill_NoCut", &tmp_Spill_NoCut);
62 anaUtils::ConfigureTreeBranch(tree,
"Spill_BadBeam", &tmp_Spill_BadBeam);
63 anaUtils::ConfigureTreeBranch(tree,
"Spill_BadND280", &tmp_Spill_BadND280);
64 anaUtils::ConfigureTreeBranch(tree,
"Spill_GoodBeamGoodND280", &tmp_Spill_GoodBeamGoodND280);
69 for (
int i = 0; i < tree->GetEntries(); i++) {
73 _POT_NoCut += tmp_POT_NoCut;
74 _POT_BadBeam += tmp_POT_BadBeam;
75 _POT_BadND280 += tmp_POT_BadND280;
76 _POT_GoodBeamGoodND280 += tmp_POT_GoodBeamGoodND280;
77 _POT_0KA += tmp_POT_0KA;
78 _POT_200KA += tmp_POT_200KA;
79 _POT_250KA += tmp_POT_250KA;
80 _POT_m250KA += tmp_POT_m250KA;
81 _POT_OtherKA += tmp_POT_OtherKA;
83 _Spill_BadBeam += tmp_Spill_BadBeam;
84 _Spill_BadND280 += tmp_Spill_BadND280;
85 _Spill_GoodBeamGoodND280 += tmp_Spill_GoodBeamGoodND280;
90 anaUtils::ConfigureTreeBranch(tree,
"POTInfo", &header);
95 for (
int i = 0; i < tree->GetEntries(); i++) {
135 TChain chain(
"header");
136 chain.AddFile(file.c_str());
144 TChain chain(
"header");
145 chain.AddFile(file.c_str());
158 _POT_GoodBeamGoodND280 += pot;
229 std::cout <<
"Initial POT............. " << _POT_NoCut <<
" Spills " <<
_Spill_NoCut << std::endl;
230 std::cout <<
"|-- Bad Beam............ " << _POT_BadBeam <<
" Spills " << _Spill_BadBeam << std::endl;
231 std::cout <<
"|-- Bad ND280........... " << _POT_BadND280 <<
" Spills " << _Spill_BadND280 << std::endl;
232 std::cout <<
"|-- Total Good POT...... " << _POT_GoodBeamGoodND280 <<
" Spills " << _Spill_GoodBeamGoodND280 << std::endl;
233 std::cout <<
" |-- @ 0KA............ " << _POT_0KA << std::endl;
234 std::cout <<
" |-- @ 200KA.......... " << _POT_200KA << std::endl;
235 std::cout <<
" |-- @ 250KA.......... " << _POT_250KA << std::endl;
236 std::cout <<
" |-- @ -250KA.......... " << _POT_m250KA << std::endl;
237 std::cout <<
" |-- @ Other power.... " << _POT_OtherKA << std::endl;
246 std::cout <<
"Header::SetIsMC(). New file with IsMC=" << IsMC <<
" differs from previous with IsMC=" <<
_IsMC <<
". You cannot mix DATA and MC files !!!" << std::endl;
261 std::cout <<
"Header::SetSoftwareVersion(). New version " << ver <<
" differs from previous " <<
_SoftwareVersion << std::endl;