1 #include "DataClassesIO.hxx" 2 #include "Versioning.hxx" 9 int subdet_enum[NDETECTORS] = {2, 3, 4, 0, 1, 5, 6, 15, 16, 17, 18, 11, 12, 13, 14, 7, 8, 9, 10 };
12 int offset = 1 + TreeVars::subUniqueID - TreeVars::subDetector;
13 unsigned int TreeVars::offsetTPC = 0;
14 unsigned int TreeVars::offsetFGD = offset;
15 unsigned int TreeVars::offsetECAL = offset * 2;
16 unsigned int TreeVars::offsetSMRD = offset * 3;
17 unsigned int TreeVars::offsetP0D = offset * 4;
18 unsigned int TreeVars::offsetTRACKER = offset * 5;
21 void AnaSubTrackIO::Define(
OutputManager& man,
const std::string& counter,
const Int_t size2,
const std::string& prefix){
23 man.
AddMatrixVar( prefix_index+TreeVars::subDetector, prefix+
"Detector",
"I",
"",counter_index,counter,-NMAXPARTICLES,size2);
24 man.
AddMatrixVar( prefix_index+TreeVars::subNNodes, prefix+
"NNodes",
"I",
"",counter_index,counter,-NMAXPARTICLES,size2);
25 man.
AddMatrixVar( prefix_index+TreeVars::subNHits, prefix+
"NHits",
"I",
"",counter_index,counter,-NMAXPARTICLES,size2);
26 man.
AddMatrixVar( prefix_index+TreeVars::subUniqueID, prefix+
"UniqueID",
"I",
"",counter_index,counter,-NMAXPARTICLES,size2);
28 man.
AddMatrixVar( prefix_index+TreeVars::subLength, prefix+
"Length",
"F",
"",counter_index,counter,-NMAXPARTICLES,size2);
30 man.
Add3DMatrixVar(prefix_index+TreeVars::subDirectionStart, prefix+
"DirectionStart",
"F",
"",counter_index,counter,-NMAXPARTICLES,size2,3);
31 man.
Add3DMatrixVar(prefix_index+TreeVars::subPositionStart, prefix+
"PositionStart",
"F",
"",counter_index,counter,-NMAXPARTICLES,size2,4);
32 man.
Add3DMatrixVar(prefix_index+TreeVars::subPositionEnd, prefix+
"PositionEnd",
"F",
"",counter_index,counter,-NMAXPARTICLES,size2,4);
33 man.
Add3DMatrixVar(prefix_index+TreeVars::subDirectionEnd, prefix+
"DirectionEnd",
"F",
"",counter_index,counter,-NMAXPARTICLES,size2,3);
39 void AnaSubTrackIO::Write(
OutputManager& man,
const AnaParticleB& seg,
const std::string& prefix, Int_t indx1, Int_t indx2){
44 if (man.GetCounterValueForVar(prefix_index+TreeVars::subDetector)>= (int)NMAXPARTICLES){
45 std::cout <<
"AnaParticleB:: too many tracks. Maximum is " << NMAXPARTICLES << std::endl;
60 void AnaTPCParticleIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const{
64 prefix_index = TreeVars::offsetTPC;
65 AnaSubTrackIO::Define(man, counter, NMAXTPCS, prefix);
69 man.
AddMatrixVar(prefix_index+TreeVars::tpcCharge, prefix+
"Charge",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
70 man.
AddMatrixVar(prefix_index+TreeVars::tpcMomentum, prefix+
"Momentum",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
71 man.
AddMatrixVar(prefix_index+TreeVars::tpcMomentumError, prefix+
"MomentumError",
"F",
"", counter_index, counter,-NMAXPARTICLES,NMAXTPCS);
74 #if VERSION_HAS_BFIELD_REFIT 75 man.
AddMatrixVar(prefix_index+TreeVars::tpcRefitMomentum, prefix+
"RefitMomentum",
"F",
"", counter_index, counter,-NMAXPARTICLES,NMAXTPCS);
77 #if VERSION_HAS_EFIELD_REFIT 78 man.
AddMatrixVar(prefix_index+TreeVars::tpcEFieldRefitMomentum, prefix+
"EFieldRefitMomentum",
"F",
"", counter_index, counter,-NMAXPARTICLES,NMAXTPCS);
81 man.
AddMatrixVar(prefix_index+TreeVars::tpcdEdxMeas, prefix+
"dEdxMeas",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
83 man.
AddMatrixVar(prefix_index+TreeVars::tpcdEdxExpMu, prefix+
"dEdxExpMu",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
84 man.
AddMatrixVar(prefix_index+TreeVars::tpcdEdxExpEle, prefix+
"dEdxExpEle",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
85 man.
AddMatrixVar(prefix_index+TreeVars::tpcdEdxExpP, prefix+
"dEdxExpP",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
86 man.
AddMatrixVar(prefix_index+TreeVars::tpcdEdxExpPi, prefix+
"dEdxExpPi",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
88 man.
AddMatrixVar(prefix_index+TreeVars::tpcRawdEdxMeas, prefix+
"RawdEdxMeas",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
89 man.
AddMatrixVar(prefix_index+TreeVars::tpcRawdEdxExpMu, prefix+
"RawdEdxExpMu",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
90 man.
AddMatrixVar(prefix_index+TreeVars::tpcRawdEdxExpEle, prefix+
"RawdEdxExpEle",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
91 man.
AddMatrixVar(prefix_index+TreeVars::tpcRawdEdxExpP, prefix+
"RawdEdxExpP",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
92 man.
AddMatrixVar(prefix_index+TreeVars::tpcRawdEdxExpPi, prefix+
"RawdEdxExpPi",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
94 man.
AddMatrixVar(prefix_index+TreeVars::tpcdEdxSigmaMu, prefix+
"dEdxSigmaMu",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
95 man.
AddMatrixVar(prefix_index+TreeVars::tpcdEdxSigmaEle,prefix+
"dEdxSigmaEle",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
96 man.
AddMatrixVar(prefix_index+TreeVars::tpcdEdxSigmaP, prefix+
"dEdxSigmaP",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
97 man.
AddMatrixVar(prefix_index+TreeVars::tpcdEdxSigmaPi, prefix+
"dEdxSigmaPi",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
99 man.
AddMatrixVar(prefix_index+TreeVars::tpcTrueTrackID, prefix+
"TrueTrackID",
"I",
"",counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
103 man.
AddMatrixVar(prefix_index+TreeVars::tpcBackMomentum, prefix+
"BackMomentum",
"F",
"", counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
105 #if VERSION_HAS_BFIELD_REFIT_FULL 106 man.
AddMatrixVar( prefix_index+TreeVars::tpcRefitCharge, prefix+
"RefitCharge",
"F",
"", counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
107 man.
Add3DMatrixVar(prefix_index+TreeVars::tpcRefitPosition, prefix+
"RefitPosition",
"F",
"", counter_index,counter, -NMAXPARTICLES,NMAXTPCS,4);
108 man.
Add3DMatrixVar(prefix_index+TreeVars::tpcRefitDirection, prefix+
"RefitDirection",
"F",
"", counter_index,counter, -NMAXPARTICLES,NMAXTPCS,3);
111 man.
AddMatrixVar(prefix_index+TreeVars::tpcPullmu, prefix+
"Pullmu",
"F",
"", counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
112 man.
AddMatrixVar(prefix_index+TreeVars::tpcPullele, prefix+
"Pullele",
"F",
"", counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
113 man.
AddMatrixVar(prefix_index+TreeVars::tpcPullp, prefix+
"Pullp",
"F",
"", counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
114 man.
AddMatrixVar(prefix_index+TreeVars::tpcPullpi, prefix+
"Pullpi",
"F",
"", counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
115 man.
AddMatrixVar(prefix_index+TreeVars::tpcPullk, prefix+
"Pullk",
"F",
"", counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
117 man.
AddMatrixVar(prefix_index+TreeVars::tpcdEdxExpK, prefix+
"dEdxExpK",
"F",
"", counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
119 man.
AddMatrixVar(prefix_index+TreeVars::tpcRawdEdxExpK, prefix+
"RawdEdxExpK",
"F",
"", counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
121 man.
AddMatrixVar(prefix_index+TreeVars::tpcdEdxSigmaK, prefix+
"dEdxSigmaK",
"F",
"", counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
124 man.
AddMatrixVar(prefix_index+TreeVars::tpcPurity, prefix+
"Purity",
"F",
"", counter_index,counter, -NMAXPARTICLES,NMAXTPCS);
132 void AnaTPCParticleIO::Write(
OutputManager& man,
const std::string& prefix, Int_t indx1, Int_t indx2)
const{
137 if (man.GetCounterValueForVar(TreeVars::offsetTPC+TreeVars::subDetector)>= (int)NMAXPARTICLES){
138 std::cout <<
"AnaTPCParticleB:: too many tracks. Maximum is " << NMAXPARTICLES << std::endl;
152 #if !defined ANATOOLS_FILE_VERSION 153 #warning "No nd280AnalysisTools file version information found, so am \ 154 ASSUMING THAT A PRODUCTION 5 FILE IS BEING USED! \ 155 If compilation fails, please upgrade to nd280AnalysisTools v1r5 or higher." 158 #if VERSION_HAS_BFIELD_REFIT 161 #if VERSION_HAS_EFIELD_REFIT 192 #if !defined ANATOOLS_FILE_VERSION 193 #warning "No nd280AnalysisTools file version information found, so am \ 194 ASSUMING THAT A PRODUCTION 5 FILE IS BEING USED! \ 195 If compilation fails, please upgrade to nd280AnalysisTools v1r5 or higher." 198 #if VERSION_HAS_BFIELD_REFIT_FULL 199 man.
FillMatrixVar(prefix_index+TreeVars::tpcRefitCharge, RefitCharge, indx1, index_old);
222 prefix_index = TreeVars::offsetTPC;
224 AnaSubTrackIO::Write(man,*
this,prefix,indx1,index_old);
226 man.
FillMatrixVar(prefix_index+TreeVars::subDetector, index_old+1, indx1, index_old);
234 void AnaFGDParticleIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const{
236 prefix_index = TreeVars::offsetFGD;
237 AnaSubTrackIO::Define(man, counter,NMAXFGDS,prefix);
241 man.
AddMatrixVar(prefix_index+TreeVars::fgdX, prefix+
"X",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
242 man.
AddMatrixVar(prefix_index+TreeVars::fgdPullmu, prefix+
"Pullmu",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
243 man.
AddMatrixVar(prefix_index+TreeVars::fgdPullp, prefix+
"Pullp",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
244 man.
AddMatrixVar(prefix_index+TreeVars::fgdPullpi, prefix+
"Pullpi",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
245 man.
AddMatrixVar(prefix_index+TreeVars::fgdPullno, prefix+
"Pullno",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
246 man.
AddMatrixVar(prefix_index+TreeVars::fgdContainment, prefix+
"Containment",
"I",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
250 man.
AddMatrixVar(prefix_index+TreeVars::fgdE, prefix+
"E" ,
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
251 man.
AddMatrixVar(prefix_index+TreeVars::fgdAvgTime, prefix+
"AvgTime",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
253 #if VERSION_HAS_FGD_VERTEX_AND_END_ACTIVITY 254 man.
AddMatrixVar(prefix_index+TreeVars::fgdHasFgdVA, prefix+
"HasFgdVA",
"I",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
255 man.
AddMatrixVar(prefix_index+TreeVars::fgdHasFgdVA_fmode, prefix+
"HasFgdVA_fmode",
"I",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
256 man.
AddMatrixVar(prefix_index+TreeVars::fgdTypeVA, prefix+
"TypeVA",
"I",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
259 man.
AddMatrixVar(prefix_index+TreeVars::fgdVertex1x1,prefix+
"Vertex1x1",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
260 man.
AddMatrixVar(prefix_index+TreeVars::fgdVertex3x3,prefix+
"Vertex3x3",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
261 man.
AddMatrixVar(prefix_index+TreeVars::fgdVertex5x5,prefix+
"Vertex5x5",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
262 man.
AddMatrixVar(prefix_index+TreeVars::fgdVertex7x7,prefix+
"Vertex7x7",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
263 man.
AddMatrixVar(prefix_index+TreeVars::fgdVertexLayer,prefix+
"VertexLayer",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
265 #if VERSION_HAS_FGD_VERTEX_AND_END_ACTIVITY 266 man.
AddMatrixVar(prefix_index+TreeVars::fgdHasFgdEA, prefix+
"HasFgdEA",
"I",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
267 man.
AddMatrixVar(prefix_index+TreeVars::fgdHasFgdEA_fmode, prefix+
"HasFgdEA_fmode",
"I",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
268 man.
AddMatrixVar(prefix_index+TreeVars::fgdTypeEA, prefix+
"TypeEA",
"I",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
270 man.
AddMatrixVar(prefix_index+TreeVars::fgdEnd0x0,prefix+
"End0x0",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
271 man.
AddMatrixVar(prefix_index+TreeVars::fgdEnd1x1,prefix+
"End1x1",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
272 man.
AddMatrixVar(prefix_index+TreeVars::fgdEnd3x3,prefix+
"End3x3",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
273 man.
AddMatrixVar(prefix_index+TreeVars::fgdEnd5x5,prefix+
"End5x5",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
274 man.
AddMatrixVar(prefix_index+TreeVars::fgdEnd7x7,prefix+
"End7x7",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXFGDS);
282 void AnaFGDParticleIO::Write(
OutputManager& man,
const std::string& prefix, Int_t indx1, Int_t indx2)
const{
287 if (man.GetCounterValueForVar(TreeVars::offsetFGD+TreeVars::subDetector)>= (int)NMAXPARTICLES){
288 std::cout <<
"AnaFGDParticleB:: too many tracks. Maximum is " << NMAXPARTICLES << std::endl;
299 man.
FillMatrixVar(prefix_index+TreeVars::fgdX, X, indx1, index_old);
303 man.
FillMatrixVar(prefix_index+TreeVars::fgdPullno, Pullno, indx1, index_old);
304 man.
FillMatrixVar(prefix_index+TreeVars::fgdContainment, Containment, indx1, index_old);
307 man.
FillMatrixVar(prefix_index+TreeVars::fgdE, E, indx1, index_old);
308 man.
FillMatrixVar(prefix_index+TreeVars::fgdAvgTime, AvgTime, indx1, index_old);
310 #if VERSION_HAS_FGD_VERTEX_AND_END_ACTIVITY 311 man.
FillMatrixVar(prefix_index+TreeVars::fgdHasFgdVA, HasFgdVA, indx1, index_old);
312 man.
FillMatrixVar(prefix_index+TreeVars::fgdHasFgdVA_fmode, HasFgdVA_fmode, indx1, index_old);
313 man.
FillMatrixVar(prefix_index+TreeVars::fgdTypeVA, TypeVA, indx1, index_old);
316 man.
FillMatrixVar(prefix_index+TreeVars::fgdVertex1x1, Vertex1x1, indx1, index_old);
317 man.
FillMatrixVar(prefix_index+TreeVars::fgdVertex3x3, Vertex3x3, indx1, index_old);
318 man.
FillMatrixVar(prefix_index+TreeVars::fgdVertex5x5, Vertex5x5, indx1, index_old);
319 man.
FillMatrixVar(prefix_index+TreeVars::fgdVertex7x7, Vertex7x7, indx1, index_old);
320 man.
FillMatrixVar(prefix_index+TreeVars::fgdVertexLayer, VertexLayer, indx1, index_old);
322 #if VERSION_HAS_FGD_VERTEX_AND_END_ACTIVITY 323 man.
FillMatrixVar(prefix_index+TreeVars::fgdHasFgdEA, HasFgdEA, indx1, index_old);
324 man.
FillMatrixVar(prefix_index+TreeVars::fgdHasFgdEA_fmode, HasFgdEA_fmode, indx1, index_old);
325 man.
FillMatrixVar(prefix_index+TreeVars::fgdTypeEA, TypeEA, indx1, index_old);
327 man.
FillMatrixVar(prefix_index+TreeVars::fgdEnd0x0, End0x0, indx1, index_old);
328 man.
FillMatrixVar(prefix_index+TreeVars::fgdEnd1x1, End1x1, indx1, index_old);
329 man.
FillMatrixVar(prefix_index+TreeVars::fgdEnd3x3, End3x3, indx1, index_old);
330 man.
FillMatrixVar(prefix_index+TreeVars::fgdEnd5x5, End5x5, indx1, index_old);
331 man.
FillMatrixVar(prefix_index+TreeVars::fgdEnd7x7, End7x7, indx1, index_old);
334 prefix_index = TreeVars::offsetFGD;
335 AnaSubTrackIO::Write(man,*
this,prefix,indx1, index_old);
337 man.
FillMatrixVar(prefix_index+TreeVars::subDetector, index_old+1, indx1, index_old);
344 void AnaECALParticleIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const{
348 prefix_index = TreeVars::offsetECAL;
349 AnaSubTrackIO::Define(man, counter, NECALSUBDETS, prefix);
353 man.
AddMatrixVar(prefix_index+TreeVars::ecalTrShVal, prefix+
"TrShVal",
"F",
"",counter_index,counter, -NMAXPARTICLES, NECALSUBDETS);
354 man.
AddMatrixVar(prefix_index+TreeVars::ecalPIDMipEm, prefix+
"PIDMipEm",
"F",
"",counter_index,counter, -NMAXPARTICLES, NECALSUBDETS);
355 man.
AddMatrixVar(prefix_index+TreeVars::ecalEMEnergy, prefix+
"EMEnergy",
"F",
"",counter_index,counter, -NMAXPARTICLES, NECALSUBDETS);
356 man.
AddMatrixVar(prefix_index+TreeVars::ecalEDeposit, prefix+
"EDeposit",
"F",
"",counter_index,counter, -NMAXPARTICLES, NECALSUBDETS);
357 man.
AddMatrixVar(prefix_index+TreeVars::ecalIsShowerLike, prefix+
"IsShowerLike",
"I",
"",counter_index,counter, -NMAXPARTICLES, NECALSUBDETS);
358 man.
AddMatrixVar(prefix_index+TreeVars::ecalAvgTime, prefix+
"AvgTime",
"F",
"",counter_index,counter, -NMAXPARTICLES, NECALSUBDETS);
359 man.
AddMatrixVar(prefix_index+TreeVars::ecalMostUpStreamLayerHit, prefix+
"MostUpStreamLayerHit",
"I",
"",counter_index,counter, -NMAXPARTICLES, NECALSUBDETS);
360 man.
Add3DMatrixVar(prefix_index+TreeVars::ecalShowerPosition, prefix+
"ShowerPosition",
"F",
"",counter_index,counter, -NMAXPARTICLES, NECALSUBDETS, 3);
363 man.
AddMatrixVar( prefix_index+TreeVars::ecalPIDMipPion, prefix+
"PIDMipPion",
"F",
"", counter_index,counter, -NMAXPARTICLES, NECALSUBDETS);
364 man.
AddMatrixVar( prefix_index+TreeVars::ecalPIDEmHip, prefix+
"PIDEmHip",
"F",
"", counter_index,counter, -NMAXPARTICLES, NECALSUBDETS);
365 man.
AddMatrixVar( prefix_index+TreeVars::ecalContainment, prefix+
"Containment",
"F",
"", counter_index,counter, -NMAXPARTICLES, NECALSUBDETS);
370 void AnaECALParticleIO::Write(
OutputManager& man,
const std::string& prefix, Int_t indx1, Int_t indx2)
const{
375 if (man.GetCounterValueForVar(TreeVars::offsetECAL+TreeVars::subDetector)>= (int)NMAXPARTICLES){
376 std::cout <<
"AnECALParticleB:: too many tracks. Maximum is " << NMAXPARTICLES << std::endl;
387 man.
FillMatrixVar(prefix_index+TreeVars::ecalTrShVal, TrShVal, indx1, index_old);
388 man.
FillMatrixVar(prefix_index+TreeVars::ecalPIDMipEm, PIDMipEm, indx1, index_old);
389 man.
FillMatrixVar(prefix_index+TreeVars::ecalEMEnergy, EMEnergy, indx1, index_old);
390 man.
FillMatrixVar(prefix_index+TreeVars::ecalEDeposit, EDeposit, indx1, index_old);
391 man.
FillMatrixVar(prefix_index+TreeVars::ecalIsShowerLike, IsShowerLike, indx1, index_old);
392 man.
FillMatrixVar(prefix_index+TreeVars::ecalAvgTime, AvgTime, indx1, index_old);
394 man.
FillMatrixVar(prefix_index+TreeVars::ecalMostUpStreamLayerHit, MostUpStreamLayerHit, indx1, index_old);
399 man.
FillMatrixVar(prefix_index+TreeVars::ecalPIDMipPion, PIDMipPion, indx1, index_old);
400 man.
FillMatrixVar(prefix_index+TreeVars::ecalPIDEmHip, PIDEmHip, indx1, index_old);
401 man.
FillMatrixVar(prefix_index+TreeVars::ecalContainment, Containment, indx1, index_old);
404 prefix_index = TreeVars::offsetECAL;
405 AnaSubTrackIO::Write(man,*
this,prefix, indx1, index_old);
407 man.
FillMatrixVar(prefix_index+TreeVars::subDetector, index_old+1, indx1, index_old);
414 void AnaSMRDParticleIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const{
419 prefix_index = TreeVars::offsetSMRD;
420 AnaSubTrackIO::Define(man, counter, NSMRDSUBDETS, prefix);
423 man.
AddMatrixVar(prefix_index+TreeVars::smrdEDeposit, prefix+
"EDeposit",
"F",
"",counter_index,counter, -NMAXPARTICLES, NSMRDSUBDETS);
424 man.
AddMatrixVar(prefix_index+TreeVars::smrdAvgTime, prefix+
"AvgTime",
"F",
"",counter_index,counter, -NMAXPARTICLES, NSMRDSUBDETS);
428 void AnaSMRDParticleIO::Write(
OutputManager& man,
const std::string& prefix, Int_t indx1, Int_t indx2)
const{
433 if (man.GetCounterValueForVar(TreeVars::offsetSMRD+TreeVars::subDetector)>= (int)NMAXPARTICLES){
434 std::cout <<
"AnaSMRDParticleB:: too many tracks. Maximum is " << NMAXPARTICLES << std::endl;
444 man.
FillMatrixVar(prefix_index+TreeVars::smrdAvgTime, AvgTime, indx1, index_old);
446 man.
FillMatrixVar(prefix_index+TreeVars::smrdEDeposit, EDeposit, indx1, index_old);
448 prefix_index = TreeVars::offsetSMRD;
449 AnaSubTrackIO::Write(man,*
this,prefix,indx1,index_old);
451 man.
FillMatrixVar(prefix_index+TreeVars::subDetector, index_old+1, indx1, index_old);
459 void AnaP0DParticleIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const{
461 prefix_index = TreeVars::offsetP0D;
462 AnaSubTrackIO::Define(man, counter,1,prefix);
465 #if VERSION_HAS_P0D_AVERAGED_TIME 466 man.
AddMatrixVar(prefix_index+TreeVars::p0dAvgTime, prefix+
"AvgTime",
"F",
"", counter_index, counter, -NMAXPARTICLES,NMAXP0DS);
473 void AnaP0DParticleIO::Write(
OutputManager& man,
const std::string& prefix, Int_t indx1, Int_t indx2)
const{
478 if (man.GetCounterValueForVar(TreeVars::offsetP0D+TreeVars::subDetector)>= (int)NMAXPARTICLES){
479 std::cout <<
"AnaP0DParticleB too many tracks. Maximum is " << NMAXPARTICLES << std::endl;
485 #if VERSION_HAS_P0D_AVERAGED_TIME 486 man.
FillMatrixVar(prefix_index+TreeVars::p0dAvgTime, AvgTime, indx1, 0);
489 prefix_index = TreeVars::offsetP0D;
490 AnaSubTrackIO::Write(man,*
this,prefix,indx1, 0);
496 void AnaTrackerTrackIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const{
498 prefix_index = TreeVars::offsetTRACKER;
499 AnaSubTrackIO::Define(man, counter,NMAXTRACKERS,prefix);
502 man.
AddMatrixVar(prefix_index+TreeVars::trackerCharge, prefix+
"Charge",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTRACKERS);
503 man.
AddMatrixVar(prefix_index+TreeVars::trackerMomentum, prefix+
"Momentum",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTRACKERS);
504 man.
AddMatrixVar(prefix_index+TreeVars::trackerMomentumEnd, prefix+
"MomentumEnd",
"F",
"",counter_index,counter, -NMAXPARTICLES,NMAXTRACKERS);
510 void AnaTrackerTrackIO::Write(
OutputManager& man,
const std::string& prefix, Int_t indx1, Int_t indx2)
const{
515 if (man.GetCounterValueForVar(TreeVars::offsetTRACKER+TreeVars::subDetector)>= (int)NMAXPARTICLES){
516 std::cout <<
"AnaTrackerTrackB:: too many tracks. Maximum is " << NMAXPARTICLES << std::endl;
520 if (indx2 >=(
int)NMAXTRACKERS){
521 std::cout <<
"too many tracker segments " << indx2 <<
". Maximum is " << NMAXTRACKERS << std::endl;
529 prefix_index = TreeVars::offsetTRACKER;
530 AnaSubTrackIO::Write(man,*
this,prefix,indx1,indx2);
534 man.
FillMatrixVar(prefix_index+TreeVars::subDetector, trackerDet, indx1, indx2);
565 for (Int_t i=0; i<nTPCSegments;i++){
566 TPCSegments[i] = NULL;
568 for (Int_t i=0; i<nFGDSegments;i++){
569 FGDSegments[i] = NULL;
571 for (Int_t i=0; i<nECALSegments;i++){
572 ECALSegments[i] = NULL;
574 for (Int_t i=0; i<nSMRDSegments;i++){
575 SMRDSegments[i] = NULL;
577 for (Int_t i=0; i<nP0DSegments;i++){
578 P0DSegments[i] = NULL;
605 for (
int i=0; i<2; i++) {
607 DownstreamHits_Position[i] = track.DownstreamHits_Position[i];
608 UpstreamHits_Charge[i] = track.UpstreamHits_Charge[i];
609 DownstreamHits_Charge[i] = track.DownstreamHits_Charge[i];
619 #if VERSION_HAS_REVERSED_REFITS 620 anaUtils::CopyArray(track.PositionStartFlip, PositionStartFlip, 4);
621 anaUtils::CopyArray(track.DirectionEndFlip, DirectionEndFlip, 3);
624 #if VERSION_HAS_PRANGE_ESTIMATES 625 RangeMomentumEle = track.RangeMomentumEle;
626 RangeMomentumProton = track.RangeMomentumProton;
627 RangeMomentumMuonFlip = track.RangeMomentumMuonFlip;
628 RangeMomentumProtonFlip = track.RangeMomentumProtonFlip;
634 ReconVertices.clear();
643 #if VERSION_HAS_TIME_FITS 645 for (UInt_t i=0;i<track.TimeNodes.size();i++)
658 void AnaTrackIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const{
662 man.
AddVectorVar(prefix_index+TreeVars::globalUniqueID, prefix+
"UniqueID",
"I",
"", counter_index, counter, -NMAXPARTICLES);
663 man.
AddMatrixVar(prefix_index+TreeVars::globalDetUsed, prefix+
"DetUsed",
"I",
"", counter_index, counter, -NMAXPARTICLES, NDETECTORS);
664 man.
AddVectorVar(prefix_index+TreeVars::globalNTPCs, prefix+
"NTPCs",
"I",
"", counter_index, counter, -NMAXPARTICLES);
665 man.
AddVectorVar(prefix_index+TreeVars::globalNFGDs, prefix+
"NFGDs",
"I",
"", counter_index, counter, -NMAXPARTICLES);
666 man.
AddVectorVar(prefix_index+TreeVars::globalNECALs, prefix+
"NECALs",
"I",
"", counter_index, counter, -NMAXPARTICLES);
667 man.
AddVectorVar(prefix_index+TreeVars::globalNSMRDs, prefix+
"NSMRDs",
"I",
"", counter_index, counter, -NMAXPARTICLES);
668 man.
AddVectorVar(prefix_index+TreeVars::globalNP0Ds, prefix+
"NP0Ds",
"I",
"", counter_index, counter, -NMAXPARTICLES);
669 man.
AddVectorVar(prefix_index+TreeVars::globalNHits, prefix+
"NHits",
"I",
"", counter_index, counter, -NMAXPARTICLES);
670 man.
AddVectorVar(prefix_index+TreeVars::globalCharge, prefix+
"Charge",
"F",
"", counter_index, counter, -NMAXPARTICLES);
671 man.
AddVectorVar(prefix_index+TreeVars::globalMomentum, prefix+
"Momentum",
"F",
"", counter_index, counter, -NMAXPARTICLES);
673 man.
AddVectorVar(prefix_index+TreeVars::globalToFFGD1_FGD2, prefix+
"ToFFGD1_FGD2",
"F",
"", counter_index, counter, -NMAXPARTICLES);
674 man.
AddVectorVar(prefix_index+TreeVars::globalToFP0D_FGD1, prefix+
"ToFP0D_FGD1",
"F",
"", counter_index, counter, -NMAXPARTICLES);
675 man.
AddVectorVar(prefix_index+TreeVars::globalToFECal_FGD1, prefix+
"ToFECal_FGD1",
"F",
"", counter_index, counter, -NMAXPARTICLES);
676 man.
AddVectorVar(prefix_index+TreeVars::globalToFECal_FGD2, prefix+
"ToFECal_FGD2",
"F",
"", counter_index, counter, -NMAXPARTICLES);
677 man.
AddVectorVar(prefix_index+TreeVars::globalToFFlag_FGD1_FGD2, prefix+
"ToFFlag_FGD1_FGD2",
"I",
"", counter_index, counter, -NMAXPARTICLES);
678 man.
AddVectorVar(prefix_index+TreeVars::globalToFFlag_P0D_FGD1, prefix+
"ToFFlag_P0D_FGD1",
"I",
"", counter_index, counter, -NMAXPARTICLES);
679 man.
AddVectorVar(prefix_index+TreeVars::globalToFFlag_ECal_FGD1, prefix+
"ToFFlag_ECal_FGD1",
"I",
"", counter_index, counter, -NMAXPARTICLES);
680 man.
AddVectorVar(prefix_index+TreeVars::globalToFFlag_ECal_FGD2, prefix+
"ToFFlag_ECal_FGD2",
"I",
"", counter_index, counter, -NMAXPARTICLES);
682 man.
AddVectorVar(prefix_index+TreeVars::globalRangeMomentumMuon, prefix+
"RangeMomentumMuon",
"F",
"", counter_index, counter, -NMAXPARTICLES);
683 man.
AddMatrixVar(prefix_index+TreeVars::globalDirectionStart, prefix+
"DirectionStart",
"F",
"", counter_index, counter, -NMAXPARTICLES, 3);
684 man.
AddMatrixVar(prefix_index+TreeVars::globalDirectionEnd, prefix+
"DirectionEnd",
"F",
"", counter_index, counter, -NMAXPARTICLES, 3);
685 man.
AddMatrixVar(prefix_index+TreeVars::globalPositionStart, prefix+
"PositionStart",
"F",
"", counter_index, counter, -NMAXPARTICLES, 4);
686 man.
AddMatrixVar(prefix_index+TreeVars::globalPositionEnd, prefix+
"PositionEnd",
"F",
"", counter_index, counter, -NMAXPARTICLES, 4);
688 man.
AddVectorVar(prefix_index+TreeVars::globalMomentumFlip, prefix+
"MomentumFlip",
"F",
"", counter_index, counter, -NMAXPARTICLES);
689 man.
AddMatrixVar(prefix_index+TreeVars::globalDirectionStartFlip, prefix+
"DirectionStartFlip",
"F",
"", counter_index, counter, -NMAXPARTICLES, 3);
691 man.
AddVectorVar(prefix_index+TreeVars::globalTrueTrackID, prefix+
"TrueTrackID",
"I",
"",counter_index,counter,-NMAXPARTICLES);
695 man.
AddVectorVar(prefix_index+TreeVars::globalStatus, prefix+
"Status",
"I",
"", counter_index,counter,-NMAXPARTICLES);
696 man.
AddVectorVar(prefix_index+TreeVars::globalNNodes, prefix+
"NNodes",
"I",
"", counter_index,counter,-NMAXPARTICLES);
697 man.
AddVectorVar(prefix_index+TreeVars::globalMomentumError, prefix+
"MomentumError",
"F",
"", counter_index,counter,-NMAXPARTICLES);
699 man.
AddVectorVar(prefix_index+TreeVars::globalNTRACKERs, prefix+
"NTRACKERs",
"I",
"", counter_index,counter,-NMAXPARTICLES);
700 man.
AddVectorVar(prefix_index+TreeVars::globalNDOF, prefix+
"NDOF",
"I",
"", counter_index,counter,-NMAXPARTICLES);
701 man.
AddVectorVar(prefix_index+TreeVars::globalChi2, prefix+
"Chi2",
"F",
"", counter_index,counter,-NMAXPARTICLES);
702 man.
AddVectorVar(prefix_index+TreeVars::globalMomentumMuon, prefix+
"MomentumMuon",
"F",
"", counter_index,counter,-NMAXPARTICLES);
703 man.
AddVectorVar(prefix_index+TreeVars::globalMomentumErrorMuon, prefix+
"MomentumErrorMuon",
"F",
"", counter_index,counter,-NMAXPARTICLES);
704 man.
AddVectorVar(prefix_index+TreeVars::globalMomentumProton, prefix+
"MomentumProton",
"F",
"", counter_index,counter,-NMAXPARTICLES);
705 man.
AddVectorVar(prefix_index+TreeVars::globalMomentumErrorProton, prefix+
"MomentumErrorProton",
"F",
"", counter_index,counter,-NMAXPARTICLES);
706 man.
AddVectorVar(prefix_index+TreeVars::globalMomentumEle, prefix+
"MomentumEle",
"F",
"", counter_index,counter,-NMAXPARTICLES);
707 man.
AddVectorVar(prefix_index+TreeVars::globalMomentumErrorEle, prefix+
"MomentumErrorEle",
"F",
"", counter_index,counter,-NMAXPARTICLES);
709 #if VERSION_HAS_REVERSED_REFITS 710 man.
AddMatrixVar(prefix_index+TreeVars::globalPositionStartFlip, prefix+
"PositionStartFlip",
"F",
"", counter_index,counter,-NMAXPARTICLES,4);
711 man.
AddMatrixVar(prefix_index+TreeVars::globalDirectionEndFlip, prefix+
"DirectionEndFlip",
"F",
"", counter_index,counter,-NMAXPARTICLES,3);
714 #if VERSION_HAS_PRANGE_ESTIMATES 715 man.
AddVectorVar(prefix_index+TreeVars::globalRangeMomentumEle, prefix+
"RangeMomentumEle",
"F",
"", counter_index,counter,-NMAXPARTICLES);
716 man.
AddVectorVar(prefix_index+TreeVars::globalRangeMomentumProton, prefix+
"RangeMomentumProton",
"F",
"", counter_index,counter,-NMAXPARTICLES);
717 man.
AddVectorVar(prefix_index+TreeVars::globalRangeMomentumMuonFlip, prefix+
"RangeMomentumMuonFlip",
"F",
"", counter_index,counter,-NMAXPARTICLES);
718 man.
AddVectorVar(prefix_index+TreeVars::globalRangeMomentumProtonFlip, prefix+
"RangeMomentumProtonFlip",
"F",
"", counter_index,counter,-NMAXPARTICLES);
721 man.
AddVectorVar(prefix_index+TreeVars::globalReconPDG, prefix+
"ReconPDG",
"I",
"", counter_index,counter,-NMAXPARTICLES);
722 man.
AddVectorVar(prefix_index+TreeVars::globalBunch, prefix+
"Bunch",
"I",
"", counter_index,counter,-NMAXPARTICLES);
723 man.
AddVectorVar(prefix_index+TreeVars::globalNReconVertices, prefix+
"NReconVertices",
"I",
"", counter_index,counter,-NMAXPARTICLES);
724 man.
AddVectorVar(prefix_index+TreeVars::globalMomentumAtVertex, prefix+
"MomentumAtVertex",
"F",
"", counter_index,counter,-NMAXPARTICLES);
725 man.
AddMatrixVar(prefix_index+TreeVars::globalDirectionAtVertex, prefix+
"DirectionAtVertex",
"F",
"", counter_index,counter,-NMAXPARTICLES,3);
727 #if VERSION_HAS_TIME_FITS 728 man.
AddVectorVar(prefix_index+TreeVars::globalNTimeNodes, prefix+
"NTimeNodes",
"I",
"", counter_index,counter,-NMAXPARTICLES);
730 time.
Define(man, counter, prefix+
"TimeNode");
734 man.
AddVectorVar(prefix_index+TreeVars::globalDetectors, prefix+
"Detectors",
"I",
"", counter_index,counter,-NMAXPARTICLES);
735 man.
AddVectorVar(prefix_index+TreeVars::globalLength, prefix+
"Length",
"F",
"", counter_index,counter,-NMAXPARTICLES);
741 void AnaTrackIO::Write(
OutputManager& man,
const std::string& prefix)
const{
746 if (man.GetCounterValueForVar(prefix_index+TreeVars::globalUniqueID)>= (int)NMAXPARTICLES){
747 std::cout <<
"AnaTrackB:: too many tracks. Maximum is " << NMAXPARTICLES << std::endl;
757 man.
FillVectorVar(prefix_index+TreeVars::globalToFFGD1_FGD2, ToF.FGD1_FGD2);
758 man.
FillVectorVar(prefix_index+TreeVars::globalToFP0D_FGD1, ToF.P0D_FGD1);
759 man.
FillVectorVar(prefix_index+TreeVars::globalToFECal_FGD1, ToF.ECal_FGD1);
760 man.
FillVectorVar(prefix_index+TreeVars::globalToFECal_FGD2, ToF.ECal_FGD2);
761 man.
FillVectorVar(prefix_index+TreeVars::globalToFFlag_FGD1_FGD2, ToF.Flag_FGD1_FGD2);
762 man.
FillVectorVar(prefix_index+TreeVars::globalToFFlag_P0D_FGD1, ToF.Flag_P0D_FGD1);
763 man.
FillVectorVar(prefix_index+TreeVars::globalToFFlag_ECal_FGD1, ToF.Flag_ECal_FGD1);
764 man.
FillVectorVar(prefix_index+TreeVars::globalToFFlag_ECal_FGD2, ToF.Flag_ECal_FGD2);
765 man.
FillVectorVar(prefix_index+TreeVars::globalRangeMomentumMuon, RangeMomentumMuon);
767 for (UInt_t i=0;i<NDETECTORS;i++){
769 man.
FillMatrixVar(prefix_index+TreeVars::globalDetUsed, used, -1, i);
772 man.
FillVectorVar(prefix_index+TreeVars::globalNTPCs, nTPCSegments );
773 man.
FillVectorVar(prefix_index+TreeVars::globalNFGDs, nFGDSegments );
774 man.
FillVectorVar(prefix_index+TreeVars::globalNECALs, nECALSegments);
775 man.
FillVectorVar(prefix_index+TreeVars::globalNP0Ds, nP0DSegments );
776 man.
FillVectorVar(prefix_index+TreeVars::globalNSMRDs, nSMRDSegments);
787 man.
FillVectorVar( prefix_index+TreeVars::globalMomentumFlip, MomentumFlip);
799 man.
FillVectorVar(prefix_index+TreeVars::globalMomentumMuon, MomentumMuon);
800 man.
FillVectorVar(prefix_index+TreeVars::globalMomentumErrorMuon, MomentumErrorMuon);
801 man.
FillVectorVar(prefix_index+TreeVars::globalMomentumProton, MomentumProton);
802 man.
FillVectorVar(prefix_index+TreeVars::globalMomentumErrorProton, MomentumErrorProton);
803 man.
FillVectorVar(prefix_index+TreeVars::globalMomentumEle, MomentumEle);
804 man.
FillVectorVar(prefix_index+TreeVars::globalMomentumErrorEle, MomentumErrorEle);
805 #if VERSION_HAS_REVERSED_REFITS 810 #if VERSION_HAS_PRANGE_ESTIMATES 811 man.
FillVectorVar(prefix_index+TreeVars::globalRangeMomentumEle, RangeMomentumEle);
812 man.
FillVectorVar(prefix_index+TreeVars::globalRangeMomentumProton, RangeMomentumProton);
813 man.
FillVectorVar(prefix_index+TreeVars::globalRangeMomentumMuonFlip, RangeMomentumMuonFlip);
814 man.
FillVectorVar(prefix_index+TreeVars::globalRangeMomentumProtonFlip, RangeMomentumProtonFlip);
818 man.
FillVectorVar(prefix_index+TreeVars::globalNTRACKERs,(
int)TRACKERSegments.size());
819 man.
FillVectorVar(prefix_index+TreeVars::globalReconPDG, ReconPDG);
820 man.
FillVectorVar(prefix_index+TreeVars::globalBunch, Bunch);
821 man.
FillVectorVar(prefix_index+TreeVars::globalNReconVertices, (
int)ReconVertices.size());
822 man.
FillVectorVar(prefix_index+TreeVars::globalMomentumAtVertex, MomentumAtVertex);
826 #if VERSION_HAS_TIME_FITS 827 for (UInt_t i = 0; i < TimeNodes.size(); i++){
828 (
static_cast<AnaTimeNodeIO*
>(TimeNodes[i]))->Write(man,prefix,-1,i);
830 man.
FillVectorVar(prefix_index+TreeVars::globalNTimeNodes,(Int_t)TimeNodes.size());
834 man.
FillVectorVar(prefix_index+TreeVars::globalDetectors, Detectors);
837 man.IncrementCounterForVar(prefix_index+TreeVars::globalUniqueID);
841 void AnaDetCrossingIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const{
843 man.
AddMatrixVar( prefix_index+TreeVars::detCrossInActive, prefix+
"InActive",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES,NMAXCROSSEDDET);
844 man.
AddMatrixVar( prefix_index+TreeVars::detCrossDetector, prefix+
"Detector",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES,NMAXCROSSEDDET);
846 man.
Add3DMatrixVar(prefix_index+TreeVars::detCrossEntrancePosition, prefix+
"EntrancePosition",
"F",
"",counter_index,counter,-NMAXTRUEPARTICLES,NMAXCROSSEDDET,4);
847 man.
Add3DMatrixVar(prefix_index+TreeVars::detCrossExitPosition, prefix+
"ExitPosition",
"F",
"",counter_index,counter,-NMAXTRUEPARTICLES,NMAXCROSSEDDET,4);
849 man.
Add3DMatrixVar(prefix_index+TreeVars::detCrossEntranceMomentum, prefix+
"EntranceMomentum",
"F",
"",counter_index,counter,-NMAXTRUEPARTICLES,NMAXCROSSEDDET,4);
850 man.
Add3DMatrixVar(prefix_index+TreeVars::detCrossExitMomentum, prefix+
"ExitMomentum",
"F",
"",counter_index,counter,-NMAXTRUEPARTICLES,NMAXCROSSEDDET,4);
857 void AnaDetCrossingIO::Write(
OutputManager& man,
const std::string& prefix, Int_t indx1, Int_t indx2)
const{
862 if (man.GetCounterValueForVar(prefix_index+TreeVars::trueTrackPDG)>= (int)NMAXTRUEPARTICLES){
863 std::cout <<
"too many DetCrossingB's. Maximum is " << NMAXTRUEPARTICLES << std::endl;
870 man.
FillMatrixVar(prefix_index+TreeVars::detCrossInActive, (
int)InActive, indx1,indx2);
871 man.
FillMatrixVar(prefix_index+TreeVars::detCrossDetector, trueDet, indx1,indx2);
893 anaUtils::CopyArray(particle.
Position, Position, 4);
895 anaUtils::CopyArray(particle.
Direction, Direction, 3);
913 DetCrossingsVect.clear();
920 Bunch = particle.
Bunch;
924 IsTruePrimaryPi0DecayPhotonChild = particle.IsTruePrimaryPi0DecayPhotonChild;
926 ReconParticles.clear();
930 ReconParticles = std::vector<AnaParticleB*>(particle.
ReconParticles.size(), NULL);
935 void AnaTrueParticleIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const{
939 man.
AddVectorVar(prefix_index+TreeVars::trueTrackID, prefix+
"ID",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES);
940 man.
AddVectorVar(prefix_index+TreeVars::trueTrackPDG, prefix+
"PDG",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES);
941 man.
AddVectorVar(prefix_index+TreeVars::trueTrackParentPDG, prefix+
"ParentPDG",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES);
942 man.
AddVectorVar(prefix_index+TreeVars::trueTrackGParentPDG, prefix+
"GParentPDG",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES);
943 man.
AddVectorVar(prefix_index+TreeVars::trueTrackParentID, prefix+
"ParentID",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES);
944 man.
AddVectorVar(prefix_index+TreeVars::trueTrackMomentum, prefix+
"Momentum",
"F",
"",counter_index,counter,-NMAXTRUEPARTICLES);
945 man.
AddVectorVar(prefix_index+TreeVars::trueTrackCharge, prefix+
"Charge",
"F",
"",counter_index,counter,-NMAXTRUEPARTICLES);
946 man.
AddMatrixVar(prefix_index+TreeVars::trueTrackPosition, prefix+
"Position",
"F",
"",counter_index,counter,-NMAXTRUEPARTICLES,4);
947 man.
AddMatrixVar(prefix_index+TreeVars::trueTrackPositionEnd, prefix+
"PositionEnd",
"F",
"",counter_index,counter,-NMAXTRUEPARTICLES,4);
948 man.
AddMatrixVar(prefix_index+TreeVars::trueTrackDirection, prefix+
"Direction",
"F",
"",counter_index,counter,-NMAXTRUEPARTICLES,3);
949 man.
AddVectorVar(prefix_index+TreeVars::trueTrackTruthVertexID, prefix+
"TruthVertexID",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES);
950 man.
AddVectorVar(prefix_index+TreeVars::trueTrackNDetCrossings, prefix+
"NDetCrossings",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES);
953 cross.Define(man, counter, prefix);
957 man.
AddVectorVar(prefix_index+TreeVars::trueTrackPrimaryID, prefix+
"PrimaryID",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES);
958 man.
AddVectorVar(prefix_index+TreeVars::trueTrackPurity, prefix+
"Purity",
"F",
"",counter_index,counter,-NMAXTRUEPARTICLES);
959 man.
AddVectorVar(prefix_index+TreeVars::trueTrackBunch, prefix+
"Bunch",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES);
960 man.
AddVectorVar(prefix_index+TreeVars::trueTrackNReconTracks, prefix+
"NReconTracks",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES);
961 man.
AddVectorVar(prefix_index+TreeVars::trueTrackVertexIndex, prefix+
"VertexIndex",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES);
963 man.
AddVectorVar(prefix_index+TreeVars::trueTrackIsTruePrimaryPi0DecayPhoton, prefix+
"IsTruePrimaryPi0DecayPhoton",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES);
964 man.
AddVectorVar(prefix_index+TreeVars::trueTrackIsTruePrimaryPi0DecayPhotonChild, prefix+
"IsTruePrimaryPi0DecayPhotonChild",
"I",
"",counter_index,counter,-NMAXTRUEPARTICLES);
971 void AnaTrueParticleIO::Write(
OutputManager& man,
const Int_t trueVertexIndex,
const std::string& prefix)
const{
974 (void)trueVertexIndex;
977 if (man.GetCounterValueForVar(prefix_index+TreeVars::trueTrackPDG)>= (int)NMAXTRUEPARTICLES){
978 std::cout <<
"too many TrueParticle's. Maximum is " << NMAXTRUEPARTICLES << std::endl;
986 man.
FillVectorVar(prefix_index+TreeVars::trueTrackParentPDG, ParentPDG);
987 man.
FillVectorVar(prefix_index+TreeVars::trueTrackGParentPDG, GParentPDG);
988 man.
FillVectorVar(prefix_index+TreeVars::trueTrackParentID, ParentID);
997 man.
FillVectorVar(prefix_index+TreeVars::trueTrackTruthVertexID, VertexID);
1000 for (Int_t i=0;i<nDetCrossings;i++){
1002 static_cast<const AnaDetCrossingIO*
>(DetCrossings[i])->AnaDetCrossingIO::Write(man, prefix, -1, i);
1004 man.
FillVectorVar(prefix_index+TreeVars::trueTrackNDetCrossings, nDetCrossings);
1007 man.
FillVectorVar(prefix_index+TreeVars::trueTrackPrimaryID, PrimaryID);
1009 man.
FillVectorVar(prefix_index+TreeVars::trueTrackBunch, Bunch);
1010 man.
FillVectorVar(prefix_index+TreeVars::trueTrackNReconTracks, (
int)ReconParticles.size());
1012 man.
FillVectorVar(prefix_index+TreeVars::trueTrackIsTruePrimaryPi0DecayPhoton, IsTruePrimaryPi0DecayPhoton);
1013 man.
FillVectorVar(prefix_index+TreeVars::trueTrackIsTruePrimaryPi0DecayPhotonChild,IsTruePrimaryPi0DecayPhoton);
1017 if (trueVertexIndex==-2) man.
FillVectorVar(prefix_index + TreeVars::trueTrackVertexIndex, VertexIndex);
1018 else man.
FillVectorVar(prefix_index + TreeVars::trueTrackVertexIndex,trueVertexIndex);
1022 man.IncrementCounterForVar(prefix_index+TreeVars::trueTrackPDG);
1027 void AnaTrueVertexIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const{
1031 man.
AddVectorVar(prefix_index+TreeVars::trueVertexID, prefix+
"ID",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1032 man.
AddVectorVar(prefix_index+TreeVars::trueVertexNuPDG, prefix+
"NuPDG",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1033 man.
AddVectorVar(prefix_index+TreeVars::trueVertexNuEnergy, prefix+
"NuEnergy",
"F",
"",counter_index,counter,-NMAXTRUEVERTICES);
1034 man.
AddMatrixVar(prefix_index+TreeVars::trueVertexPosition, prefix+
"Position",
"F",
"",counter_index,counter,-NMAXTRUEVERTICES,4);
1035 man.
AddVectorVar(prefix_index+TreeVars::trueVertexNTrueTracks, prefix+
"NTrueTracks",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1036 man.
AddVectorVar(prefix_index+TreeVars::trueVertexBunch, prefix+
"Bunch",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1037 man.
AddVectorVar(prefix_index+TreeVars::trueVertexDetector, prefix+
"Detector",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1040 man.
AddMatrixVar(prefix_index+TreeVars::trueVertexLeptonDir, prefix+
"LeptonDir",
"F",
"",counter_index,counter,-NMAXTRUEVERTICES,3);
1041 man.
AddVectorVar(prefix_index+TreeVars::trueVertexLeptonMom, prefix+
"LeptonMom",
"F",
"",counter_index,counter,-NMAXTRUEVERTICES);
1042 man.
AddVectorVar(prefix_index+TreeVars::trueVertexLeptonPDG, prefix+
"LeptonPDG",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1043 man.
AddVectorVar(prefix_index+TreeVars::trueVertexNBaryons, prefix+
"NBaryons",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1044 man.
AddVectorVar(prefix_index+TreeVars::trueVertexNReconTracks, prefix+
"NReconTracks",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1045 man.
AddVectorVar(prefix_index+TreeVars::trueVertexNReconVertices, prefix+
"NReconVertices",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1046 man.
AddMatrixVar(prefix_index+TreeVars::trueVertexNuDir, prefix+
"NuDir",
"F",
"",counter_index,counter,-NMAXTRUEVERTICES,3);
1047 man.
AddMatrixVar(prefix_index+TreeVars::trueVertexNuParentDecPoint,prefix+
"NuParentDecPoint",
"F",
"",counter_index,counter,-NMAXTRUEVERTICES,4);
1048 man.
AddVectorVar(prefix_index+TreeVars::trueVertexNuParentPDG, prefix+
"NuParentPDG",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1049 man.
AddMatrixVar(prefix_index+TreeVars::trueVertexProtonDir, prefix+
"ProtonDir",
"F",
"",counter_index,counter,-NMAXTRUEVERTICES,3);
1050 man.
AddVectorVar(prefix_index+TreeVars::trueVertexProtonMom, prefix+
"ProtonMom",
"F",
"",counter_index,counter,-NMAXTRUEVERTICES);
1051 man.
AddMatrixVar(prefix_index+TreeVars::trueVertexPionDir, prefix+
"PionDir",
"F",
"",counter_index,counter,-NMAXTRUEVERTICES,3);
1052 man.
AddVectorVar(prefix_index+TreeVars::trueVertexPionMom, prefix+
"PionMom",
"F",
"",counter_index,counter,-NMAXTRUEVERTICES);
1053 man.
AddVectorVar(prefix_index+TreeVars::trueVertexQ2, prefix+
"Q2",
"F",
"",counter_index,counter,-NMAXTRUEVERTICES);
1054 man.
AddVectorVar(prefix_index+TreeVars::trueVertexReacCode, prefix+
"ReacCode",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1055 man.
AddVectorVar(prefix_index+TreeVars::trueVertexRooVtxEntry, prefix+
"RooVtxEntry",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1056 man.
AddVectorVar(prefix_index+TreeVars::trueVertexRooVtxIndex, prefix+
"RooVtxIndex",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1057 man.
AddMatrixVar(prefix_index+TreeVars::trueVertexTargetDir, prefix+
"TargetDir",
"F",
"",counter_index,counter,-NMAXTRUEVERTICES,3);
1058 man.
AddVectorVar(prefix_index+TreeVars::trueVertexTargetMom, prefix+
"TargetMom",
"F",
"",counter_index,counter,-NMAXTRUEVERTICES);
1059 man.
AddVectorVar(prefix_index+TreeVars::trueVertexTargetPDG, prefix+
"TargetPDG",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1060 man.
AddVectorVar(prefix_index+TreeVars::trueVertexIsPauliBlocked, prefix+
"IsPauliBlocked",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1061 man.
AddVectorVar(prefix_index+TreeVars::trueVertexIsCohOnH, prefix+
"IsCohOnH",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES);
1062 man.
AddMatrixVar(prefix_index+TreeVars::trueVertexNPrimaryParticles,prefix+
"NPrimaryParticles",
"I",
"",counter_index,counter,-NMAXTRUEVERTICES,Int_t(ParticleId::kLast)+1);
1067 void AnaTrueVertexIO::Write(
OutputManager& man,
const std::string& prefix)
const{
1072 if (man.GetCounterValueForVar(prefix_index+TreeVars::trueVertexNuPDG)>= (int)NMAXTRUEVERTICES){
1073 std::cout <<
"too many true vertices. Maximum is " << NMAXTRUEVERTICES << std::endl;
1076 man.
FillVectorVar (prefix_index+TreeVars::trueVertexID, ID );
1077 man.
FillVectorVar (prefix_index+TreeVars::trueVertexNuPDG, NuPDG );
1078 man.
FillVectorVar (prefix_index+TreeVars::trueVertexNuEnergy, NuEnergy );
1080 man.
FillVectorVar (prefix_index+TreeVars::trueVertexNTrueTracks, nTrueParticles );
1081 man.
FillVectorVar (prefix_index+TreeVars::trueVertexBunch, Bunch );
1085 man.
FillVectorVar(prefix_index+TreeVars::trueVertexRooVtxIndex,RooVtxIndex);
1086 man.
FillVectorVar(prefix_index+TreeVars::trueVertexRooVtxEntry,RooVtxEntry);
1087 man.
FillVectorVar(prefix_index+TreeVars::trueVertexReacCode, ReacCode);
1089 man.
FillVectorVar(prefix_index+TreeVars::trueVertexTargetPDG, TargetPDG);
1093 man.
FillVectorVar(prefix_index+TreeVars::trueVertexNuParentPDG, NuParentPDG);
1096 man.
FillVectorVar(prefix_index+TreeVars::trueVertexNBaryons, NBaryons);
1097 man.
FillVectorVar(prefix_index+TreeVars::trueVertexLeptonPDG, LeptonPDG);
1105 man.
FillVectorVar(prefix_index+TreeVars::trueVertexTargetMom, TargetMom);
1106 man.
FillVectorVar(prefix_index+TreeVars::trueVertexLeptonMom, LeptonMom);
1107 man.
FillVectorVar(prefix_index+TreeVars::trueVertexProtonMom, ProtonMom);
1108 man.
FillVectorVar(prefix_index+TreeVars::trueVertexPionMom, PionMom);
1110 man.
FillVectorVar(prefix_index+TreeVars::trueVertexNReconTracks, (
int)ReconParticles.size());
1111 man.
FillVectorVar(prefix_index+TreeVars::trueVertexNReconVertices, (
int)ReconVertices.size());
1113 man.
FillVectorVar(prefix_index+TreeVars::trueVertexIsPauliBlocked, (
int)IsPauliBlocked);
1114 man.
FillVectorVar(prefix_index+TreeVars::trueVertexIsCohOnH, (
int)IsCohOnH);
1116 man.
FillMatrixVarFromArray(prefix_index+TreeVars::trueVertexNPrimaryParticles, NPrimaryParticles, -1, Int_t(ParticleId::kLast)+1);
1118 man.IncrementCounterForVar(prefix_index+TreeVars::trueVertexID);
1126 Bunch = bunch.
Bunch;
1131 void AnaBunchIO::Define(
OutputManager& man,
const std::string& prefix)
const{
1134 man.
AddVar(prefix_index+TreeVars::bunchBunch, prefix+
"Bunch",
"I",
"");
1135 man.
AddVar(prefix_index+TreeVars::bunchWeight,prefix+
"Weight",
"F",
"");
1139 void AnaBunchIO::Write(
OutputManager& man,
const std::string& prefix)
const{
1144 man.
FillVar(prefix_index+TreeVars::bunchBunch, Bunch);
1145 man.
FillVar(prefix_index+TreeVars::bunchWeight, Weight);
1149 void AnaFgdTimeBinIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const{
1152 man.
AddVectorVar(prefix_index+TreeVars::fgdBinMinTime, prefix+
"MinTime",
"F",
"",counter_index,counter,-NMAXFGDTIMEBINS);
1153 man.
AddVectorVar(prefix_index+TreeVars::fgdBinNHits1, prefix+
"NHits1",
"I",
"",counter_index,counter,-NMAXFGDTIMEBINS);
1154 man.
AddVectorVar(prefix_index+TreeVars::fgdBinNHits2, prefix+
"NHits2",
"I",
"",counter_index,counter,-NMAXFGDTIMEBINS);
1155 man.
AddVectorVar(prefix_index+TreeVars::fgdBinRawChargeSum1, prefix+
"RawChargeSum1",
"F",
"",counter_index,counter,-NMAXFGDTIMEBINS);
1156 man.
AddVectorVar(prefix_index+TreeVars::fgdBinRawChargeSum2, prefix+
"RawChargeSum2",
"F",
"",counter_index,counter,-NMAXFGDTIMEBINS);
1163 void AnaFgdTimeBinIO::Write(
OutputManager& man,
const std::string& prefix)
const{
1168 if (man.GetCounterValueForVar(prefix_index+TreeVars::fgdBinMinTime)>= (int)NMAXFGDTIMEBINS){
1169 std::cout <<
"too many time bins. Maximum is " << NMAXFGDTIMEBINS << std::endl;
1173 man.
FillVectorVar(prefix_index+TreeVars::fgdBinMinTime, MinTime);
1176 man.
FillVectorVar(prefix_index+TreeVars::fgdBinRawChargeSum1, RawChargeSum[0]);
1177 man.
FillVectorVar(prefix_index+TreeVars::fgdBinRawChargeSum2, RawChargeSum[1]);
1179 man.IncrementCounterForVar(prefix_index+TreeVars::fgdBinMinTime);
1204 Beam =
new AnaBeamIO(*static_cast<const AnaBeam*>(spill.
Beam));
1212 void AnaSpillIO::Define(
OutputManager& man,
const std::string& prefix)
const{
1216 man.
AddVar(prefix_index+TreeVars::spillNBunches, prefix+
"NBunches",
"I",
"");
1217 man.
AddVar(prefix_index+TreeVars::spillNTotalTrueVertices, prefix+
"NTotalTrueVertices",
"I",
"");
1218 man.
AddVar(prefix_index+TreeVars::spillNTotalTrueTracks, prefix+
"NTotalTrueTracks",
"I",
"");
1221 AnaBeamIO b; b.Define(man,prefix+
"Beam");
1226 man.
AddVar(prefix_index+TreeVars::spillRooVtxEntry, prefix+
"RooVtxEntry",
"I",
"");
1227 man.
AddVar(prefix_index+TreeVars::spillInputFileIndex, prefix+
"InputFileIndex",
"I",
"");
1232 void AnaSpillIO::Write(
OutputManager& man,
const std::string& prefix)
const{
1238 man.
FillVar(prefix_index+TreeVars::spillNBunches, (
int)Bunches.size());
1239 man.
FillVar(prefix_index+TreeVars::spillNTotalTrueVertices,(
int)NTotalTrueVertices);
1240 man.
FillVar(prefix_index+TreeVars::spillNTotalTrueTracks, (
int)NTotalTrueParticles);
1243 (
static_cast<const AnaEventInfoIO*
>(EventInfo))->Write(man,prefix);
1244 (
static_cast<const AnaBeamIO*
>(Beam))->Write(man,prefix+
"Beam");
1245 (
static_cast<const AnaDataQualityIO*
>(DataQuality))->Write(man,prefix+
"DQ");
1247 TriggerIO->Write(man, prefix +
"Trigger");
1249 man.
FillVar(prefix_index+TreeVars::spillInputFileIndex, InputFileIndex);
1250 man.
FillVar(prefix_index+TreeVars::spillRooVtxEntry, RooVtxEntry);
1254 void AnaEventInfoIO::Define(
OutputManager& man,
const std::string& prefix)
const{
1258 man.
AddVar(prefix_index+TreeVars::eventInfoIsMC, prefix+
"IsMC",
"I",
"");
1259 man.
AddVar(prefix_index+TreeVars::eventInfoIsSand, prefix+
"IsSand",
"I",
"");
1260 man.
AddVar(prefix_index+TreeVars::eventInfoRun, prefix+
"Run",
"I",
"");
1261 man.
AddVar(prefix_index+TreeVars::eventInfoSubRun, prefix+
"SubRun",
"I",
"");
1262 man.
AddVar(prefix_index+TreeVars::eventInfoEvt, prefix+
"Evt",
"I",
"");
1266 void AnaEventInfoIO::Write(
OutputManager& man,
const std::string& prefix)
const{
1272 man.
FillVar(prefix_index+TreeVars::eventInfoIsMC, (Int_t)IsMC);
1273 man.
FillVar(prefix_index+TreeVars::eventInfoIsSand, (Int_t)IsSand);
1274 man.
FillVar(prefix_index+TreeVars::eventInfoRun, Run);
1275 man.
FillVar(prefix_index+TreeVars::eventInfoSubRun, SubRun);
1276 man.
FillVar(prefix_index+TreeVars::eventInfoEvt, Event);
1280 void AnaDataQualityIO::Define(
OutputManager& man,
const std::string& prefix)
const{
1284 man.
AddVar(prefix_index+TreeVars::dqGoodDaq, prefix+
"GoodDaq",
"I",
"");
1290 void AnaDataQualityIO::Write(
OutputManager& man,
const std::string& prefix)
const{
1296 man.
FillVar(prefix_index+TreeVars::dqGoodDaq, GoodDaq);
1301 void AnaBeamIO::Define(
OutputManager& man,
const std::string& prefix)
const{
1304 man.
AddVar(prefix_index+TreeVars::beamGoodSpill, prefix+
"GoodSpill",
"I",
"");
1308 void AnaBeamIO::Write(
OutputManager& man,
const std::string& prefix)
const{
1313 man.
FillVar(prefix_index+TreeVars::beamGoodSpill, GoodSpill);
1317 void AnaVertexIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const{
1320 man.
AddVectorVar(prefix_index+TreeVars::vertexPrimaryIndex, prefix+
"PrimaryIndex",
"I",
"",counter_index,counter,-NMAXVERTICES);
1321 man.
AddMatrixVar(prefix_index+TreeVars::vertexPosition, prefix+
"Position",
"F",
"",counter_index,counter,-NMAXVERTICES,4);
1322 man.
AddVectorVar(prefix_index+TreeVars::vertexNReconTracks, prefix+
"NReconTracks",
"I",
"",counter_index,counter,-NMAXVERTICES);
1323 man.
AddVectorVar(prefix_index+TreeVars::vertexNTrueVerticesMatch, prefix+
"NTrueVerticesMatch",
"I",
"",counter_index,counter,-NMAXVERTICES);
1324 man.
AddMatrixVar(prefix_index+TreeVars::vertexTracksUniqueID, prefix+
"TracksUniqueID",
"I",
"",counter_index,counter,-NMAXVERTICES,NMAXPARTICLESINVERTEX);
1325 man.
AddMatrixVar(prefix_index+TreeVars::vertexTrueVertexIndex, prefix+
"TrueVertexIndex",
"I",
"",counter_index,counter,-NMAXVERTICES,NMAXTRUEVERTICESMATCH);
1326 man.
AddMatrixVar(prefix_index+TreeVars::vertexTrueVerticesClean, prefix+
"TrueVerticesClean",
"F",
"",counter_index,counter,-NMAXVERTICES,NMAXTRUEVERTICESMATCH);
1327 man.
AddMatrixVar(prefix_index+TreeVars::vertexTrueVerticesCompl, prefix+
"TrueVerticesCompl",
"F",
"",counter_index,counter,-NMAXVERTICES,NMAXTRUEVERTICESMATCH);
1332 void AnaVertexIO::Write(
OutputManager& man,
const std::vector<int> trueVertexIndices,
const std::string& prefix)
const{
1337 if (man.GetCounterValueForVar(prefix_index+TreeVars::vertexPosition)>= (int)NMAXVERTICES){
1338 std::cout <<
"AnaVertex:: too many global Vertices. Maximum is " << NMAXVERTICES << std::endl;
1342 man.
FillVectorVar(prefix_index+TreeVars::vertexPrimaryIndex, PrimaryIndex);
1345 man.
FillVectorVar(prefix_index+TreeVars::vertexNTrueVerticesMatch,(
int)TrueVerticesMatch.size());
1346 man.
FillVectorVar(prefix_index+TreeVars::vertexNReconTracks, nParticles);
1348 for (UInt_t i=0; i<(UInt_t)nParticles; i++){
1349 if(i>=NMAXPARTICLESINVERTEX) {
1350 std::cout <<
"AnaVertex:: too many global Vertex Constituents. Maximum is " << NMAXPARTICLESINVERTEX << std::endl;
1353 if (Particles[i]) man.
FillMatrixVar(prefix_index+TreeVars::vertexTracksUniqueID, Particles[i]->
UniqueID, -1, i);
1356 for (UInt_t i=0; i<TrueVerticesMatch.size(); i++){
1357 if(i>=NMAXTRUEVERTICESMATCH) {
1358 std::cout <<
"AnaVertex:: too many TrueVertices associated to a global Vertex. Maximum is " << NMAXTRUEVERTICESMATCH << std::endl;
1363 man.
FillMatrixVar(prefix_index+TreeVars::vertexTrueVertexIndex, trueVertexIndices[i], -1, i);
1364 man.
FillMatrixVar(prefix_index+TreeVars::vertexTrueVerticesClean, TrueVerticesMatch[i].second.Cleanliness, -1, i);
1365 man.
FillMatrixVar(prefix_index+TreeVars::vertexTrueVerticesCompl, TrueVerticesMatch[i].second.Completeness, -1, i);
1368 man.IncrementCounterForVar(prefix_index+TreeVars::vertexPrimaryIndex);
1372 void AnaEventIO::Define(
OutputManager& man,
const std::string& prefix)
const{
1375 man.
AddVar(prefix_index+TreeVars::eventBunch,prefix+
"Bunch",
"I",
"");
1377 static_cast<const AnaEventInfoIO*
>(&EventInfo)->Define(man,prefix);
1378 static_cast<const AnaBeamIO*
>(Beam)->Define(man,prefix+
"Beam");
1379 static_cast<const AnaDataQualityIO*
>(DataQuality)->Define(man,prefix+
"DQ");
1383 void AnaEventIO::Write(
OutputManager& man,
const std::string& prefix)
const{
1388 man.
FillVar(prefix_index+TreeVars::eventBunch, Bunch);
1390 static_cast<const AnaEventInfoIO*
>(&EventInfo)->Write(man,prefix);
1391 static_cast<const AnaBeamIO*
>(Beam)->Write(man,
"Beam");
1399 man.
AddVar(prefix_index+TreeVars::triggerFGDCosmic, prefix+
"FGDCosmic",
"I",
"");
1400 man.
AddVar(prefix_index+TreeVars::triggerTripTCosmic, prefix+
"TripTCosmic",
"I",
"");
1409 man.
FillVar(prefix_index+TreeVars::triggerFGDCosmic, FGDCosmic);
1410 man.
FillVar(prefix_index+TreeVars::triggerTripTCosmic, TripTCosmic);
1417 man.
AddMatrixVar(prefix_index+TreeVars::globalTimeNodeDetector, prefix+
"Detector",
"I",
"",counter_index, counter, -NMAXPARTICLES,NMAXTIMENODES);
1418 man.
AddMatrixVar(prefix_index+TreeVars::globalTimeNodeTimeStart, prefix+
"TimeStart",
"F",
"",counter_index, counter, -NMAXPARTICLES,NMAXTIMENODES);
1419 man.
AddMatrixVar(prefix_index+TreeVars::globalTimeNodeTimeEnd, prefix+
"TimeEnd",
"F",
"",counter_index, counter, -NMAXPARTICLES,NMAXTIMENODES);
1428 if (man.GetCounterValueForVar(prefix_index+TreeVars::globalStatus)>= (Int_t)NMAXPARTICLES){
1429 std::cout <<
"AnaTrack:: too many tracks. Maximum is " << NMAXPARTICLES << std::endl;
1434 man.
FillMatrixVar(prefix_index+TreeVars::globalTimeNodeTimeStart, TimeStart, indx1,indx2);
1435 man.
FillMatrixVar(prefix_index+TreeVars::globalTimeNodeTimeEnd, TimeEnd, indx1,indx2);
1439 void AnaTECALReconObjectIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const {
1442 man.
AddVectorVar(prefix_index+TreeVars::tecalReconAverageHitTime, prefix+
"AverageHitTime",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1443 man.
AddVectorVar(prefix_index+TreeVars::tecalReconAverageZPos, prefix+
"AverageZPosition",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1444 man.
AddVectorVar(prefix_index+TreeVars::tecalReconContainment, prefix+
"Containment",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1445 man.
AddVectorVar(prefix_index+TreeVars::tecalReconEFitResult, prefix+
"EFitResult",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1446 man.
AddVectorVar(prefix_index+TreeVars::tecalReconEFitUncertainty, prefix+
"EFitUncertainty",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1447 man.
AddVectorVar(prefix_index+TreeVars::tecalReconFirstLayer, prefix+
"FirstLayer",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1448 man.
AddVectorVar(prefix_index+TreeVars::tecalReconIsShowerLike, prefix+
"IsShowerLike",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1449 man.
AddVectorVar(prefix_index+TreeVars::tecalReconIsTrackLike, prefix+
"IsTrackLike",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1450 man.
AddVectorVar(prefix_index+TreeVars::tecalReconLastLayer, prefix+
"LastLayer",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1451 man.
AddVectorVar(prefix_index+TreeVars::tecalReconLikeMIPEM, prefix+
"LikeMIPEM",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1452 man.
AddVectorVar(prefix_index+TreeVars::tecalReconLikeMIPPion, prefix+
"LikeMIPPion",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1453 man.
AddVectorVar(prefix_index+TreeVars::tecalReconLikeEMHIP, prefix+
"LikeEMHIP",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1454 man.
AddVectorVar(prefix_index+TreeVars::tecalReconLikeMIPEMLow, prefix+
"LikeMIPEMLow",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1455 man.
AddVectorVar(prefix_index+TreeVars::tecalReconMatchingLike, prefix+
"MatchingLike",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1456 man.
AddVectorVar(prefix_index+TreeVars::tecalReconMichelTagNDelayedCluster, prefix+
"MichelTagNDelayedCluster",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1457 man.
AddVectorVar(prefix_index+TreeVars::tecalReconModule, prefix+
"Module",
"C",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1458 man.
AddVectorVar(prefix_index+TreeVars::tecalReconMostDownStreamLayerHit, prefix+
"MostDownStreamLayerHit",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1459 man.
AddVectorVar(prefix_index+TreeVars::tecalReconMostUpStreamLayerHit, prefix+
"MostUpStreamLayerHit",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1460 man.
AddVectorVar(prefix_index+TreeVars::tecalReconNHits, prefix+
"NHits",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1461 man.
AddVectorVar(prefix_index+TreeVars::tecalReconNLayersHit, prefix+
"NLayersHit",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1462 man.
AddVectorVar(prefix_index+TreeVars::tecalReconObjectLength, prefix+
"ObjectLength",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1463 man.
AddVectorVar(prefix_index+TreeVars::tecalReconPIDAMR, prefix+
"PIDAMR",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1464 man.
AddVectorVar(prefix_index+TreeVars::tecalReconPIDAngle, prefix+
"PIDAngle",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1465 man.
AddVectorVar(prefix_index+TreeVars::tecalReconPIDAsymmetry, prefix+
"PIDAsymmetry",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1466 man.
AddVectorVar(prefix_index+TreeVars::tecalReconPIDCircularity, prefix+
"PIDCircularity",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1467 man.
AddVectorVar(prefix_index+TreeVars::tecalReconPIDFBR, prefix+
"PIDFBR",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1468 man.
AddVectorVar(prefix_index+TreeVars::tecalReconPIDMaxRatio, prefix+
"PIDMaxRatio",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1469 man.
AddVectorVar(prefix_index+TreeVars::tecalReconPIDMeanPos, prefix+
"PIDMeanPos",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1470 man.
AddVectorVar(prefix_index+TreeVars::tecalReconPIDShowerAngle, prefix+
"PIDShowerAngle",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1471 man.
AddVectorVar(prefix_index+TreeVars::tecalReconPIDShowerWidth, prefix+
"PIDShowerWidth",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1472 man.
AddVectorVar(prefix_index+TreeVars::tecalReconPIDTransverseChargeRatio, prefix+
"PIDTransverseChargeRatio",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1473 man.
AddVectorVar(prefix_index+TreeVars::tecalReconPIDTruncatedMaxRatio, prefix+
"PIDTruncatedMaxRatio",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1474 man.
AddMatrixVar(prefix_index+TreeVars::tecalReconPointing, prefix+
"Pointing",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS, 3);
1475 man.
AddVectorVar(prefix_index+TreeVars::tecalReconThrust, prefix+
"Thrust",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1476 man.
AddMatrixVar(prefix_index+TreeVars::tecalReconThrustAxis, prefix+
"ThrustAxis",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS, 3);
1477 man.
AddMatrixVar(prefix_index+TreeVars::tecalReconThrustOrigin, prefix+
"ThrustOrigin",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS, 3);
1478 man.
AddVectorVar(prefix_index+TreeVars::tecalReconTimeBunch, prefix+
"TimeBunch",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1479 man.
AddVectorVar(prefix_index+TreeVars::tecalReconTotalHitCharge, prefix+
"TotalHitCharge",
"F",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1480 man.
AddVectorVar(prefix_index+TreeVars::tecalReconTrueID, prefix+
"TrueID",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1481 man.
AddVectorVar(prefix_index+TreeVars::tecalReconTrueIDPrimary, prefix+
"TrueIDPrimary",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1482 man.
AddVectorVar(prefix_index+TreeVars::tecalReconTrueIDRecursive, prefix+
"TrueIDRecursive",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1483 man.
AddVectorVar(prefix_index+TreeVars::tecalReconTrueIDSingle, prefix+
"TrueIDSingle",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1484 man.
AddVectorVar(prefix_index+TreeVars::tecalReconUniqueID, prefix+
"UniqueID",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1486 man.
AddVectorVar(prefix_index+TreeVars::tecalReconBunch, prefix+
"Bunch",
"I",
"",counter_index,counter, -NMAXTECALRECONOBJECTS);
1493 void AnaTECALReconObjectIO::Write (
OutputManager& man,
const std::string& prefix)
const{
1498 man.
FillVectorVar(prefix_index+TreeVars::tecalReconAverageHitTime, AverageHitTime );
1499 man.
FillVectorVar(prefix_index+TreeVars::tecalReconAverageZPos, AverageZPos );
1500 man.
FillVectorVar(prefix_index+TreeVars::tecalReconContainment, Containment );
1501 man.
FillVectorVar(prefix_index+TreeVars::tecalReconEFitResult, EFitResult );
1502 man.
FillVectorVar(prefix_index+TreeVars::tecalReconEFitUncertainty, EFitUncertainty );
1503 man.
FillVectorVar(prefix_index+TreeVars::tecalReconFirstLayer, FirstLayer );
1504 man.
FillVectorVar(prefix_index+TreeVars::tecalReconIsShowerLike, IsShowerLike );
1505 man.
FillVectorVar(prefix_index+TreeVars::tecalReconIsTrackLike, IsTrackLike );
1506 man.
FillVectorVar(prefix_index+TreeVars::tecalReconLastLayer, LastLayer );
1507 man.
FillVectorVar(prefix_index+TreeVars::tecalReconLikeMIPEM, LikeMIPEM );
1508 man.
FillVectorVar(prefix_index+TreeVars::tecalReconLikeMIPPion, LikeMIPPion );
1509 man.
FillVectorVar(prefix_index+TreeVars::tecalReconLikeEMHIP, LikeEMHIP );
1510 man.
FillVectorVar(prefix_index+TreeVars::tecalReconLikeMIPEMLow, LikeMIPEMLow );
1511 man.
FillVectorVar(prefix_index+TreeVars::tecalReconMatchingLike, MatchingLike );
1512 man.
FillVectorVar(prefix_index+TreeVars::tecalReconMichelTagNDelayedCluster, MichelTagNDelayedCluster );
1513 man.
FillVectorVar(prefix_index+TreeVars::tecalReconModule, Module );
1514 man.
FillVectorVar(prefix_index+TreeVars::tecalReconMostDownStreamLayerHit, MostDownStreamLayerHit );
1515 man.
FillVectorVar(prefix_index+TreeVars::tecalReconMostUpStreamLayerHit, MostUpStreamLayerHit );
1517 man.
FillVectorVar(prefix_index+TreeVars::tecalReconNLayersHit, NLayersHit );
1518 man.
FillVectorVar(prefix_index+TreeVars::tecalReconObjectLength, ObjectLength );
1519 man.
FillVectorVar(prefix_index+TreeVars::tecalReconPIDAMR, PIDAMR );
1520 man.
FillVectorVar(prefix_index+TreeVars::tecalReconPIDAngle, PIDAngle );
1521 man.
FillVectorVar(prefix_index+TreeVars::tecalReconPIDAsymmetry, PIDAsymmetry );
1522 man.
FillVectorVar(prefix_index+TreeVars::tecalReconPIDCircularity, PIDCircularity );
1523 man.
FillVectorVar(prefix_index+TreeVars::tecalReconPIDFBR, PIDFBR );
1524 man.
FillVectorVar(prefix_index+TreeVars::tecalReconPIDMaxRatio, PIDMaxRatio );
1525 man.
FillVectorVar(prefix_index+TreeVars::tecalReconPIDMeanPos, PIDMeanPos );
1526 man.
FillVectorVar(prefix_index+TreeVars::tecalReconPIDShowerAngle, PIDShowerAngle );
1527 man.
FillVectorVar(prefix_index+TreeVars::tecalReconPIDShowerWidth, PIDShowerWidth );
1528 man.
FillVectorVar(prefix_index+TreeVars::tecalReconPIDTransverseChargeRatio, PIDTransverseChargeRatio );
1529 man.
FillVectorVar(prefix_index+TreeVars::tecalReconPIDTruncatedMaxRatio, PIDTruncatedMaxRatio );
1531 man.
FillVectorVar(prefix_index+TreeVars::tecalReconThrust, Thrust );
1534 man.
FillVectorVar(prefix_index+TreeVars::tecalReconTimeBunch, TimeBunch );
1535 man.
FillVectorVar(prefix_index+TreeVars::tecalReconTotalHitCharge, TotalHitCharge );
1536 man.
FillVectorVar(prefix_index+TreeVars::tecalReconTrueID, TrueID );
1537 man.
FillVectorVar(prefix_index+TreeVars::tecalReconTrueIDPrimary, TrueIDPrimary );
1538 man.
FillVectorVar(prefix_index+TreeVars::tecalReconTrueIDRecursive, TrueIDRecursive );
1539 man.
FillVectorVar(prefix_index+TreeVars::tecalReconTrueIDSingle, TrueIDSingle );
1542 man.
FillVectorVar(prefix_index+TreeVars::tecalReconBunch, Bunch );
1544 man.IncrementCounterForVar(prefix_index+TreeVars::tecalReconBunch);
1550 void AnaTECALUnmatchedObjectIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const {
1553 man.
AddVectorVar(prefix_index+TreeVars::tecalUnmatchedAverageHitTime, prefix+
"AverageHitTime",
"F",
"",counter_index,counter, -NMAXTECALUNMATCHEOBJECTS);
1554 man.
AddMatrixVar(prefix_index+TreeVars::tecalUnmatchedBackPos, prefix+
"BackPos",
"F",
"",counter_index,counter, -NMAXTECALUNMATCHEOBJECTS, 3);
1555 man.
AddMatrixVar(prefix_index+TreeVars::tecalUnmatchedFrontPos, prefix+
"FrontPos",
"F",
"",counter_index,counter, -NMAXTECALUNMATCHEOBJECTS, 3);
1556 man.
AddVectorVar(prefix_index+TreeVars::tecalUnmatchedMostDownStreamLayerHit, prefix+
"MostDownStreamLayerHit",
"I",
"",counter_index,counter, -NMAXTECALUNMATCHEOBJECTS);
1557 man.
AddVectorVar(prefix_index+TreeVars::tecalUnmatchedMostUpStreamLayerHit, prefix+
"MostUpStreamLayerHit",
"I",
"",counter_index,counter, -NMAXTECALUNMATCHEOBJECTS);
1558 man.
AddVectorVar(prefix_index+TreeVars::tecalUnmatchedNHits, prefix+
"NHits",
"I",
"",counter_index,counter, -NMAXTECALUNMATCHEOBJECTS);
1559 man.
AddVectorVar(prefix_index+TreeVars::tecalUnmatchedTotalHitCharge, prefix+
"TotalHitCharge",
"F",
"",counter_index,counter, -NMAXTECALUNMATCHEOBJECTS);
1560 man.
AddVectorVar(prefix_index+TreeVars::tecalUnmatchedTrueID, prefix+
"TrueID",
"I",
"",counter_index,counter, -NMAXTECALUNMATCHEOBJECTS);
1561 man.
AddVectorVar(prefix_index+TreeVars::tecalUnmatchedTrueIDPrimary, prefix+
"TrueIDPrimary",
"I",
"",counter_index,counter, -NMAXTECALUNMATCHEOBJECTS);
1562 man.
AddVectorVar(prefix_index+TreeVars::tecalUnmatchedTrueIDRecursive, prefix+
"TrueIDRecursive",
"I",
"",counter_index,counter, -NMAXTECALUNMATCHEOBJECTS);
1563 man.
AddVectorVar(prefix_index+TreeVars::tecalUnmatchedTrueIDSingle, prefix+
"TrueIDSingle",
"I",
"",counter_index,counter, -NMAXTECALUNMATCHEOBJECTS);
1564 man.
AddVectorVar(prefix_index+TreeVars::tecalUnmatchedView, prefix+
"View",
"I",
"",counter_index,counter, -NMAXTECALUNMATCHEOBJECTS);
1566 man.
AddVectorVar(prefix_index+TreeVars::tecalUnmatchedBunch, prefix+
"Bunch",
"I",
"",counter_index,counter, -NMAXTECALUNMATCHEOBJECTS);
1573 void AnaTECALUnmatchedObjectIO::Write (
OutputManager& man,
const std::string& prefix)
const{
1578 man.
FillVectorVar (prefix_index+TreeVars::tecalUnmatchedAverageHitTime, AverageHitTime );
1581 man.
FillVectorVar (prefix_index+TreeVars::tecalUnmatchedMostDownStreamLayerHit, MostDownStreamLayerHit );
1582 man.
FillVectorVar (prefix_index+TreeVars::tecalUnmatchedMostUpStreamLayerHit, MostUpStreamLayerHit );
1584 man.
FillVectorVar (prefix_index+TreeVars::tecalUnmatchedTotalHitCharge, TotalHitCharge );
1585 man.
FillVectorVar (prefix_index+TreeVars::tecalUnmatchedTrueID, TrueID );
1586 man.
FillVectorVar (prefix_index+TreeVars::tecalUnmatchedTrueIDPrimary, TrueIDPrimary );
1587 man.
FillVectorVar (prefix_index+TreeVars::tecalUnmatchedTrueIDRecursive, TrueIDRecursive );
1588 man.
FillVectorVar (prefix_index+TreeVars::tecalUnmatchedTrueIDSingle, TrueIDSingle );
1589 man.
FillVectorVar (prefix_index+TreeVars::tecalUnmatchedView, View );
1591 man.
FillVectorVar (prefix_index+TreeVars::tecalUnmatchedBunch, Bunch );
1593 man.IncrementCounterForVar(prefix_index+TreeVars::tecalUnmatchedBunch);
1598 void AnaP0DReconObjectIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const {
1601 int p0dPrefix = prefix_index;
1602 if ( prefix ==
"p0dParticle" ) p0dPrefix += TreeVars::p0dParticleAlgorithmName - TreeVars::p0dVertexAlgorithmName;
1605 man.
AddMatrixVar(p0dPrefix+TreeVars::p0dClusterTruth_PrimaryTrajIDs, prefix+
"Truth_PrimaryTrajIDs",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, 500);
1606 man.
AddMatrixVar(p0dPrefix+TreeVars::p0dClusterTruth_TrajIDs, prefix+
"Truth_TrajIDs",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, 500);
1607 man.
AddMatrixVar(p0dPrefix+TreeVars::p0dClusterTruth_HitCount, prefix+
"Truth_HitCount",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, 500);
1608 man.
AddMatrixVar(p0dPrefix+TreeVars::p0dClusterTruth_ChargeShare, prefix+
"Truth_ChargeShare",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, 500);
1609 man.
AddMatrixVar(p0dPrefix+TreeVars::p0dClusterPosition, prefix+
"Position",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, 4);
1610 man.
AddMatrixVar(p0dPrefix+TreeVars::p0dClusterPosVariance, prefix+
"PosVariance",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, 4);
1612 man.
AddVectorVar(p0dPrefix+TreeVars::p0dVertexAlgorithmName, prefix+
"AlgorithmName",
"C",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1613 man.
AddVectorVar(p0dPrefix+TreeVars::p0dVertexCycle, prefix+
"Cycle",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1614 man.
AddVectorVar(p0dPrefix+TreeVars::p0dVertexNHits, prefix+
"NHits",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1615 man.
AddVectorVar(p0dPrefix+TreeVars::p0dVertexUniqueID, prefix+
"UniqueID",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1616 man.
AddVectorVar(p0dPrefix+TreeVars::p0dVertexBunch, prefix+
"Bunch",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1619 man.
AddVectorVar(p0dPrefix+TreeVars::p0dVertexValidDimensions, prefix+
"ValidDimensions",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1621 man.
AddMatrixVar(p0dPrefix+TreeVars::p0dVertexVertices, prefix+
"Vertices",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, NMAXP0DRECONOBJECTS);
1622 man.
AddMatrixVar(p0dPrefix+TreeVars::p0dVertexParticles, prefix+
"Particles",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, NMAXP0DRECONOBJECTS);
1623 man.
AddMatrixVar(p0dPrefix+TreeVars::p0dVertexTracks, prefix+
"Tracks",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, NMAXP0DRECONOBJECTS);
1624 man.
AddMatrixVar(p0dPrefix+TreeVars::p0dVertexShowers, prefix+
"Showers",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, NMAXP0DRECONOBJECTS);
1625 man.
AddMatrixVar(p0dPrefix+TreeVars::p0dVertexClusters, prefix+
"Clusters",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, NMAXP0DRECONOBJECTS);
1626 man.
AddMatrixVar(p0dPrefix+TreeVars::p0dVertexNodes, prefix+
"Nodes",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, 1000);
1627 man.
AddMatrixVar(p0dPrefix+TreeVars::p0dVertexHits, prefix+
"Hits",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, 1000);
1634 void AnaP0DReconObjectIO::Write (
OutputManager& man,
const std::string& prefix)
const {
1639 int p0dPrefix = prefix_index;
1640 if ( prefix ==
"p0dParticle" ) p0dPrefix += TreeVars::p0dParticleAlgorithmName - TreeVars::p0dVertexAlgorithmName;
1642 man.
FillVectorVar(p0dPrefix+TreeVars::p0dVertexAlgorithmName, AlgorithmName );
1643 man.
FillVectorVar(p0dPrefix+TreeVars::p0dVertexCycle, (Int_t)Cycle );
1646 man.
FillVectorVar(p0dPrefix+TreeVars::p0dVertexBunch, Bunch );
1648 unsigned int iObj = 0;
1649 for (iObj=0; iObj<Vertices .size(); iObj++) man.
FillMatrixVar(p0dPrefix+TreeVars::p0dVertexVertices, Vertices [iObj], -1, iObj);
1650 for (iObj=0; iObj<Particles.size(); iObj++) man.
FillMatrixVar(p0dPrefix+TreeVars::p0dVertexParticles, Particles[iObj], -1, iObj);
1651 for (iObj=0; iObj<Tracks .size(); iObj++) man.
FillMatrixVar(p0dPrefix+TreeVars::p0dVertexTracks, Tracks [iObj], -1, iObj);
1652 for (iObj=0; iObj<Showers .size(); iObj++) man.
FillMatrixVar(p0dPrefix+TreeVars::p0dVertexShowers, Showers [iObj], -1, iObj);
1653 for (iObj=0; iObj<Clusters .size(); iObj++) man.
FillMatrixVar(p0dPrefix+TreeVars::p0dVertexClusters, Clusters [iObj], -1, iObj);
1654 for (iObj=0; iObj<Nodes .size(); iObj++) man.
FillMatrixVar(p0dPrefix+TreeVars::p0dVertexNodes, Nodes [iObj], -1, iObj);
1655 for (iObj=0; iObj<Hits .size(); iObj++) man.
FillMatrixVar(p0dPrefix+TreeVars::p0dVertexHits, Hits [iObj], -1, iObj);
1657 for (iObj=0; iObj<Truth_PrimaryTrajIDs.size(); iObj++) man.
FillMatrixVar(prefix_index+TreeVars::p0dClusterTruth_PrimaryTrajIDs, Truth_PrimaryTrajIDs[iObj], -1, iObj);
1658 for (iObj=0; iObj<Truth_TrajIDs .size(); iObj++) man.
FillMatrixVar(prefix_index+TreeVars::p0dClusterTruth_TrajIDs, Truth_TrajIDs [iObj], -1, iObj);
1659 for (iObj=0; iObj<Truth_HitCount .size(); iObj++) man.
FillMatrixVar(prefix_index+TreeVars::p0dClusterTruth_HitCount, Truth_HitCount [iObj], -1, iObj);
1660 for (iObj=0; iObj<Truth_ChargeShare .size(); iObj++) man.
FillMatrixVar(prefix_index+TreeVars::p0dClusterTruth_ChargeShare, Truth_ChargeShare [iObj], -1, iObj);
1662 man.
FillVectorVar (prefix_index+TreeVars::p0dVertexValidDimensions, ValidDimensions );
1668 man.IncrementCounterForVar(p0dPrefix+TreeVars::p0dVertexAlgorithmName);
1673 void AnaP0DReconVertexIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const {
1676 man.
AddVectorVar(prefix_index+TreeVars::p0dVertexStatus, prefix+
"Status",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1677 man.
AddVectorVar(prefix_index+TreeVars::p0dVertexQuality, prefix+
"Quality",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1678 man.
AddVectorVar(prefix_index+TreeVars::p0dVertexNDOF, prefix+
"NDOF",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1679 man.
AddVectorVar(prefix_index+TreeVars::p0dVertexFiducial, prefix+
"Fiducial",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1686 void AnaP0DReconVertexIO::Write (
OutputManager& man,
const std::string& prefix)
const {
1693 man.
FillVectorVar(prefix_index+TreeVars::p0dVertexQuality, Quality);
1694 man.
FillVectorVar(prefix_index+TreeVars::p0dVertexNDOF, NDOF );
1696 man.
FillVectorVar (prefix_index+TreeVars::p0dVertexFiducial, Fiducial );
1703 void AnaP0DReconParticleIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const {
1708 man.
AddVectorVar(prefix_index+TreeVars::p0dParticleStatus, prefix+
"Status",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1709 man.
AddVectorVar(prefix_index+TreeVars::p0dParticleQuality, prefix+
"Quality",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1710 man.
AddVectorVar(prefix_index+TreeVars::p0dParticleNDOF, prefix+
"NDOF",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1711 man.
AddVectorVar(prefix_index+TreeVars::p0dParticleSideDeposit, prefix+
"SideDeposit",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1712 man.
AddVectorVar(prefix_index+TreeVars::p0dParticleEndDeposit, prefix+
"EndDeposit",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1713 man.
AddMatrixVar(prefix_index+TreeVars::p0dParticleDirection, prefix+
"Direction",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, 3);
1714 man.
AddMatrixVar(prefix_index+TreeVars::p0dParticleDirVariance, prefix+
"DirVariance",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS, 3);
1715 man.
AddVectorVar(prefix_index+TreeVars::p0dParticleMomentum, prefix+
"Momentum",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1716 man.
AddVectorVar(prefix_index+TreeVars::p0dParticleCharge, prefix+
"Charge",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1717 man.
AddVectorVar(prefix_index+TreeVars::p0dParticleLength, prefix+
"Length",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1718 man.
AddVectorVar(prefix_index+TreeVars::p0dParticleEDeposit, prefix+
"EDeposit",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1725 void AnaP0DReconParticleIO::Write (
OutputManager& man,
const std::string& prefix)
const {
1731 man.
FillVectorVar(prefix_index+TreeVars::p0dParticleQuality, Quality);
1732 man.
FillVectorVar(prefix_index+TreeVars::p0dParticleNDOF, NDOF );
1733 man.
FillVectorVar(prefix_index+TreeVars::p0dParticleSideDeposit, SideDeposit );
1734 man.
FillVectorVar(prefix_index+TreeVars::p0dParticleEndDeposit, EndDeposit );
1742 man.
FillVectorVar (prefix_index+TreeVars::p0dParticleEDeposit, EDeposit );
1749 void AnaP0DReconClusterIO::Define(
OutputManager& man,
const std::string& counter,
const std::string& prefix)
const {
1752 man.
AddVectorVar(prefix_index+TreeVars::p0dClusterNFiducialHits, prefix+
"NFiducialHits",
"I",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1753 man.
AddVectorVar(prefix_index+TreeVars::p0dClusterEDeposit, prefix+
"EDeposit",
"F",
"", counter_index, counter, -NMAXP0DRECONOBJECTS);
1760 void AnaP0DReconClusterIO::Write (
OutputManager& man,
const std::string& prefix)
const {
1765 man.
FillVectorVar (prefix_index+TreeVars::p0dClusterNFiducialHits, NFiducialHits );
1766 man.
FillVectorVar (prefix_index+TreeVars::p0dClusterEDeposit, EDeposit );
Float_t dEdxexpMuon
Expected dE/dx for a muon, based on the reconstructed momentum.
Float_t Pullmu
Muon pull of the segment: (dEdxMeas-dEdxexpMuon)/dEdxSigmaMuon.
AnaTrueVertexB * TrueVertex
Pointer to the AnaTrueVertexB of the interaction that created this AnaTrueParticleB.
Float_t DirectionStartFlip[3]
Direction at the start for the main PID hypothesis and reverse sense.
int nP0DSegments
How many P0D tracks are associated with this track.
virtual void Define(OutputManager &man, const std::string &prefix="") const
Add the variables for representing an AnaBunch to the OutputManager.
Float_t PositionStart[4]
The reconstructed start position of the particle.
Float_t MomentumAtVertex
The reconstructed momentum of the track, at the most primary global vertex (if exists).
void AddVar(Int_t index, const std::string &name, const std::string &type, const std::string &doc, double ini=-9999)
Add a single variable to all trees.
Representation of a global track.
Representation of detector time info.
Int_t InputFileIndex
Index of the input file producing this spill.
int nDetCrossings
The number of DetCrossing objects.
Float_t MomentumEle
Momentum from refitting the track assuming the electron hypothesis.
bool IsTruePrimaryPi0DecayPhoton
Is this a true primary pi0 decay photon or the child of one?
Representation of the beam information, including POT and quality.
Float_t dEdxexpProton
Expected dE/dx for a proton, based on the reconstructed momentum.
virtual void Define(OutputManager &man, const std::string &counter, const std::string &prefix="") const
Add the variables for representing an AnaDetTimeInfo to the OutputManager.
int nECALSegments
How many ECAL tracks are associated with this track.
Int_t Status
The Status of the fit of this reconstructed object.
Int_t NDOF
The number of degrees of freedom when the track was fitted with a Kalman filter.
Float_t DirectionEnd[3]
The reconstructed end direction of the particle.
Float_t Pullpi
Pion pull of the segment: (dEdxMeas-dEdxexpPion)/dEdxSigmaPion.
void FillVectorVar(Int_t index, Float_t var, Int_t indx=-1)
Fill a vector variable.
Int_t NNodes
The number of nodes in the reconstructed object.
Int_t GParentPDG
The PDG code of this particle's grandparent, or 0 if there is no grandparent.
Int_t Bunch
The bunch of the track, based on the PositionStart.T()
Float_t dEdxSigmaProton
Expected error on the dE/dx measurement, for the proton hypothesis.
AnaTrueObjectC * TrueObject
The link to the true oject that most likely generated this reconstructed object.
Float_t Length
The number of hits in the reconstructed object.
AnaToF ToF
Times of flight between pairs of detectors.
void Fill3DMatrixVarFromArray(Int_t index, const Double_t var[], Int_t indx1, Int_t indx2, UInt_t size)
Fill a 3D matrix variable from array.
AnaEventInfoB * EventInfo
Run, sunrun, event, time stamp, etc.
static bool GetDetectorUsed(unsigned long BitField, SubDetId::SubDetEnum det)
Method to see if a certain subdetector or subdetector system is used.
Float_t Momentum
The initial momentum of the true particle.
Float_t MomentumErrorProton
Error on momentum from refitting the track assuming the proton hypothesis.
Float_t RangeMomentumMuon
Momentum by range calculated with muon hypothesis.
void FillMatrixVarFromArray(Int_t index, const Double_t var[], Int_t indx1, UInt_t size)
Fill a matrix variable from array.
std::vector< AnaParticleB * > ReconParticles
Vector of pointers to AnaParticle's associated with this true particle.
Float_t dEdxexpPion
Expected dE/dx for a pion, based on the reconstructed momentum.
Int_t VertexID
The TruthVertexID of the AnaTrueVertexB of the interaction that created this AnaTrueParticleB.
Int_t UniqueID
The UniqueID of this reconstructed object.
Float_t dEdxexpEle
Expected dE/dx for an electron, based on the reconstructed momentum.
Float_t Charge
The reconstructed charge of the particle.
Int_t ID
The ID of the trueObj, which corresponds to the ID of the TTruthParticle that created it...
Float_t Chi2
The chi2 value when the track was fitted using a Kalman filter.
virtual void Write(OutputManager &man, const std::string &prefix="") const
Fill the current state of the AnaBunch into the OutputManager.
int nSMRDSegments
How many SMRD tracks are associated with this track.
virtual void Write(OutputManager &man, const std::string &prefix="", Int_t indx1=-1, Int_t indx2=0) const
Fill the current state of the AnaDetTimeInfo into the OutputManager.
Float_t MomentumError
Error of the momentum at the start of the segment.
Float_t MomentumFlip
Momentum for the main PID hypothesis and reverse sense.
Float_t Momentum
The reconstructed momentum of the particle, at the start position.
Int_t Index
The index of this particle track in the vector of particles. TODO: Not sure it is needed (only use in...
int nTPCSegments
How many TPC tracks are associated with this track.
TVector3 UpstreamHits_Position[2]
const AnaParticleB * Original
UInt_t GeomID
Is this the original Spill or a clone.
Float_t dEdxSigmaKaon
Expected error on the dE/dx measurement, for the proton hypothesis.
Float_t dEdxSigmaEle
Expected error on the dE/dx measurement, for the electron hypothesis.
AnaBeamB * Beam
The beam quality flags for this spill.
AnaDetCrossingB ** DetCrossings
Float_t DirectionAtVertex[3]
The reconstructed direction of the track at the most primary global vertex (if exists).
Float_t EFieldRefitMomentum
Reconstructed momentum with the E-field distortion corrections.
Int_t TPCQualityCut
Whether track passes TPC quality cut.
Int_t PDG
The PDG code of this particle.
Float_t MomentumErrorMuon
Error on momentum from refitting the track assuming the muon hypothesis.
Int_t NHits
The number of hits in the particle.
Int_t ParentPDG
The PDG code of this particle's immediate parent, or 0 if there is no parent.
Float_t MomentumErrorEle
Error on momentum from refitting the track assuming the electron hypothesis.
Float_t dEdxMeas
dE/dx as measured by the TPC.
static SubDetId::SubDetEnum GetSubdetectorEnum(unsigned long BitField)
Get the single subdetector that this track is from.
Float_t MomentumEnd
The reconstructed momentum of the particle, at the end position.
Representation of the ND280 data quality flags.
Representation of a TPC segment of a global track.
Float_t Weight
The weight to apply to this bunch (nominally 1). An example is the beam flux weight.
int GetLocalDetEnum(SubDetId::SubDetEnum det, SubDetId::SubDetEnum idet)
Get old local detector enumeration to find array index of Flat tree.
UInt_t NTotalTrueVertices
Float_t Pullk
Kaon pull of the segment: (dEdxMeas-dEdxexpPion)/dEdxSigmaKaon.
Float_t Pullp
Proton pull of the segment: (dEdxMeas-dEdxexpProton)/dEdxSigmaProton.
Int_t RooVtxEntry
Not in the MiniTree for the Moment since it produces a seg fault.
Float_t Length
The length of this global track.
void FillVar(Int_t index, Float_t var)
Fill a single variable.
Float_t MomentumError
The error on the reconstructed momentum.
Representation of the ND280 trigger bits.
Float_t DirectionStart[3]
The reconstructed start direction of the particle.
Int_t Bunch
The index of this bunch (0-7).
Representation of a detector crossing info for a trajectory/track.
virtual void Write(OutputManager &man, const std::string &prefix="") const
Fill the current state of the AnaTriggerIO object into the OutputManager.
Float_t Pullele
Electron pull of the segment: (dEdxMeas-dEdxexpEle)/dEdxSigmaEle.
int nFGDSegments
How many FGD tracks are associated with this track.
AnaTrigger Trigger
Not in the MiniTree for the Moment since it produces a seg fault.
Float_t dEdxSigmaMuon
Expected error on the dE/dx measurement, for the muon hypothesis.
Int_t ParentID
The ID of this particle's immediate parent, or 0 if there is no parent.
Float_t PositionEnd[4]
The end position of the true particle.
Float_t Purity
The purity with which this particle was matched to a reconstructed object.
Float_t Position[4]
The initial position of the true particle.
void AddMatrixVar(Int_t index, const std::string &name, const std::string &type, const std::string &doc, Int_t counter_index, const std::string &counter_name, int size1=-MAXVECTORSIZE, int size2=-1)
Add a matrix variable to all trees.
Representation of a TPC segment of a global track.
void AddVectorVar(Int_t index, const std::string &name, const std::string &type, const std::string &doc, Int_t counter_index, const std::string &counter_name, Int_t size=-MAXVECTORSIZE)
Add a vector variable to all trees.
Float_t dEdxSigmaPion
Expected error on the dE/dx measurement, for the pion hypothesis.
Float_t Charge
The true charge of the particle.
Representation of a reconstructed particle (track or shower).
AnaDataQualityB * DataQuality
The ND280 data quality flags for this spill.
Int_t ReconPDG
PDG of the most probable particle hypothesis used at reconstruction level.
Float_t Direction[3]
The initial direction of the true particle.
UInt_t NTotalTrueParticles
Representation of a true Monte Carlo trajectory/particle.
Float_t MomentumMuon
Momentum from refitting the track assuming the muon hypothesis.
void FillMatrixVar(Int_t index, Float_t var, Int_t indx1, Int_t indx2)
Fill a matrix variable.
void ConvertBitFieldToTrueParticleDetEnum(unsigned long det, int &trueDet)
Get highland style numbering for true objects.
void Add3DMatrixVar(Int_t index, const std::string &name, const std::string &type, const std::string &doc, Int_t counter_index, const std::string &counter_name, int size1=-MAXVECTORSIZE, int size2=-1, int size3=-1)
Add a 3D matrix variable to all trees.
virtual void Define(OutputManager &man, const std::string &prefix="") const
Add the variables for representing an AnaTriggerIO object to the OutputManager.
Float_t dEdxexpKaon
Expected dE/dx for a proton, based on the reconstructed momentum.
Float_t PositionEnd[4]
The reconstructed end position of the particle.
void ConvertBitFieldToTrackerDetField(unsigned long det, int &trackerDet)
Get highland style tracker combination numbering.
Float_t RefitMomentum
Reconstructed momentum with the empirical distortion corrections.
Float_t MomentumProton
Momentum from refitting the track assuming the proton hypothesis.