1 #include "CreateFlatTree.hxx" 2 #include "InputManager.hxx" 3 #include "FlatTreeConverter.hxx" 4 #include "oaAnalysisTreeConverter.hxx" 5 #include "HighlandMiniTreeConverter.hxx" 6 #include "Parameters.hxx" 7 #include "Versioning.hxx" 8 #include "HighlandAnalysisUtils.hxx" 13 #include "CT4POTCorrection.hxx" 14 #include "DataQualityCorrection.hxx" 15 #include "PileUpCorrection.hxx" 16 #include "TPCdEdxDataCorrection.hxx" 17 #include "TPCdEdxMCCorrection.hxx" 18 #include "TPCExpecteddEdxCorrection.hxx" 19 #include "IgnoreRightECalRuns3and4Correction.hxx" 20 #include "UseGlobalAltMomCorrection.hxx" 21 #include "FlipKinematicsCorrection.hxx" 22 #include "ToFCorrection.hxx" 23 #include "MomResolMCCorrection.hxx" 24 #include "MomRangeCorrection.hxx" 25 #include "TPCPIDPullMCCorrection.hxx" 31 CreateFlatTree::CreateFlatTree(
int argc,
char *argv[]):
SimpleLoopBase(argc, argv){
35 ND::versioning().
AddProduction(ProdId::PROD5E,
"PROD5E",
"v10r11p17",
"v10r11p18");
36 ND::versioning().
AddProduction(ProdId::PROD5F,
"PROD5F",
"v10r11p19",
"v10r11p24");
37 ND::versioning().
AddProduction(ProdId::PROD5G,
"PROD5G",
"v10r11p27",
"v10r11p28");
38 ND::versioning().
AddProduction(ProdId::PROD6PRE,
"PROD6PRE",
"v11r17",
"v11r28");
39 ND::versioning().
AddProduction(ProdId::PROD6A,
"PROD6A",
"v11r29",
"v11r30");
40 ND::versioning().
AddProduction(ProdId::PROD6BC,
"PROD6B/6C",
"v11r31",
"v11r32");
42 ND::versioning().
AddProduction(ProdId::PROD7DEVEL,
"PROD7DEVEL",
"v12",
"v13");
62 _saveTruthWithRecon = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.SaveTruthWithReconAssociation");
63 _saveRoo = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.SaveRooTracker");
65 _saveTPCInfo = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.SaveTPCInfo");
66 _saveFGDInfo = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.SaveFGDInfo");
67 _saveECALInfo = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.SaveECALInfo");
68 _saveP0DInfo = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.SaveP0DInfo");
69 _saveSMRDInfo = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.SaveSMRDInfo");
70 _saveTrackerInfo = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.SaveTrackerInfo");
73 _saveReconDirFGDOnlyInfo = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseReconDirFGDOnly" );
74 _saveReconDirP0DInfo = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseReconDirP0D" );
75 _saveReconDirPECALInfo = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseReconDirP0DECal" );
76 _saveReconDirTECALInfo = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseReconDirTrackerECal");
78 _useTPC1 = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseTPC1");
79 _useTPC2 = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseTPC2");
80 _useTPC3 = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseTPC3");
81 _useFGD1 = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseFGD1");
82 _useFGD2 = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseFGD2");
83 _useP0D = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseP0D");
84 _useDsECal = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseDsECal");
85 _useTrECal = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseTrECal");
86 _useP0DECal = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseP0DECal");
87 _useSMRD = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseSMRD");
89 _useTPC1outOfBunch = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseTPC1outOfBunch");
90 _useTPC2outOfBunch = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseTPC2outOfBunch");
91 _useTPC3outOfBunch = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseTPC3outOfBunch");
92 _useFGD1outOfBunch = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseFGD1outOfBunch");
93 _useFGD2outOfBunch = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseFGD2outOfBunch");
94 _useP0DoutOfBunch = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseP0DoutOfBunch");
95 _useDsECaloutOfBunch = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseDsECaloutOfBunch");
96 _useTrECaloutOfBunch = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseTrECaloutOfBunch");
97 _useP0DECaloutOfBunch = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseP0DECaloutOfBunch");
98 _useSMRDoutOfBunch = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.UseSMRDoutOfBunch");
100 _saveTrueNuNC = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.TrueVertex.NuNC");
101 _saveTrueAntiNuNC = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.TrueVertex.AntiNuNC");
102 _saveTrueNumuCC = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.TrueVertex.NumuCC");
103 _saveTrueAntiNumuCC = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.TrueVertex.AntiNumuCC");
104 _saveTrueNueCC = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.TrueVertex.NueCC");
105 _saveTrueAntiNueCC = (bool)ND::params().
GetParameterI(
"highlandIO.FlatTree.TrueVertex.AntiNueCC");
108 if (ND::params().GetParameterI(
"highlandIO.FlatTree.TrueVertex.TPC1")) _saveTrueVertexInDet.push_back(SubDetId::kTPC1);
109 if (ND::params().GetParameterI(
"highlandIO.FlatTree.TrueVertex.TPC2")) _saveTrueVertexInDet.push_back(SubDetId::kTPC2);
110 if (ND::params().GetParameterI(
"highlandIO.FlatTree.TrueVertex.TPC3")) _saveTrueVertexInDet.push_back(SubDetId::kTPC3);
111 if (ND::params().GetParameterI(
"highlandIO.FlatTree.TrueVertex.FGD1")) _saveTrueVertexInDet.push_back(SubDetId::kFGD1);
112 if (ND::params().GetParameterI(
"highlandIO.FlatTree.TrueVertex.FGD2")) _saveTrueVertexInDet.push_back(SubDetId::kFGD2);
113 if (ND::params().GetParameterI(
"highlandIO.FlatTree.TrueVertex.P0D")) _saveTrueVertexInDet.push_back(SubDetId::kP0D);
114 if (ND::params().GetParameterI(
"highlandIO.FlatTree.TrueVertex.DsECal")) _saveTrueVertexInDet.push_back(SubDetId::kDSECAL);
115 if (ND::params().GetParameterI(
"highlandIO.FlatTree.TrueVertex.TrECal")) _saveTrueVertexInDet.push_back(SubDetId::kTECAL);
116 if (ND::params().GetParameterI(
"highlandIO.FlatTree.TrueVertex.P0DECal")) _saveTrueVertexInDet.push_back(SubDetId::kPECAL);
117 if (ND::params().GetParameterI(
"highlandIO.FlatTree.TrueVertex.SMRD")) _saveTrueVertexInDet.push_back(SubDetId::kSMRD);
127 versionUtils::prod6_bunching =
false;
128 versionUtils::prod6_corrections =
false;
129 versionUtils::prod6_systematics =
false;
131 if (ND::versioning().GetProduction(input().GetSoftwareVersion()) >= ProdId::PROD6PRE){
132 versionUtils::prod6_bunching =
true;
133 versionUtils::prod6_corrections =
true;
134 versionUtils::prod6_systematics =
true;
139 versionUtils::DumpProductions();
141 _POTSincePreviousSpill = 0;
142 _spill_filled =
false;
147 if (ND::params().GetParameterI(
"highlandIO.FlatTree.EnableIgnoreRightECalCorrection")){
151 if (ND::params().GetParameterI(
"highlandIO.FlatTree.EnableDQCorrection")) {
157 #if !VERSION_HAS_OFFICIAL_POT 160 if (ND::params().GetParameterI(
"highlandIO.FlatTree.EnablePOTCorrection")) {
162 _corrections.AddCorrection(CorrId::kCT4POTCorr,
"ct4pot_corr",
new CT4POTCorrection());
167 #if !VERSION_HAS_EQUIVALENT_MAIN_AND_ALT_FITS 168 if (ND::params().GetParameterI(
"highlandIO.FlatTree.EnableUseMuonAltMomCorrection")) {
169 _corrections.AddCorrection(CorrId:: kGlobalAltMomCorr,
"altmom_corr",
new UseGlobalAltMomCorrection(UseGlobalAltMomCorrection::kMuon));
174 if (ND::params().GetParameterI(
"highlandIO.FlatTree.EnablePileUpCorrection")){
175 _corrections.AddCorrection(CorrId::kPileUpCorr,
"pileup_corr",
new PileUpCorrection());
178 if (ND::params().GetParameterI(
"highlandIO.FlatTree.EnableTPCdEdxDataCorrection")){
179 _corrections.AddCorrection(CorrId::kTPCdEdxDataCorr,
"tpcdedx_data_corr",
new TPCdEdxDataCorrection());
182 if (ND::params().GetParameterI(
"highlandIO.FlatTree.EnableTPCdEdxMCCorrection")){
183 _corrections.AddCorrection(CorrId::kTPCdEdxMCCorr,
"tpcdedx_mc_corr",
new TPCdEdxMCCorrection());
186 if (ND::params().GetParameterI(
"highlandIO.FlatTree.EnableTPCExpecteddEdxCorrection")){
191 if (ND::params().GetParameterI(
"highlandIO.FlatTree.EnableTPCPIDPullMCCorrection")){
192 _corrections.AddCorrection(CorrId::kTPCPIDPullMCCorr,
"tpc_pid_pull_mc_corr",
new TPCPIDPullMCCorrection());
195 if (ND::params().GetParameterI(
"highlandIO.FlatTree.EnableMomResolMCCorrection")){
196 _corrections.AddCorrection(CorrId::kMomResolMCCorr,
"mom_resol_mc_corr",
new MomResolMCCorrection());
200 if (ND::params().GetParameterI(
"highlandIO.FlatTree.EnableFlipKinematicsCorrection")){
204 if (ND::params().GetParameterI(
"highlandIO.FlatTree.EnableToFCorrection")){
205 _corrections.AddCorrection(CorrId::kToFCorr,
"tof_corr",
new ToFCorrection());
209 if (ND::params().GetParameterI(
"highlandIO.FlatTree.EnableMomRangeCorrection")){
210 _corrections.AddCorrection(CorrId::kMomRangeCorr,
"momrange_corr",
new MomRangeCorrection());
222 AddTreeWithName(flattree,
"flattree");
226 if (input().GetChain(
"NRooTrackerVtx") && _saveRoo)
227 AddTreeWithName(RooTrackerVtx,
"RooTrackerVtx", input().GetChain(
"NRooTrackerVtx"));
229 if (input().GetChain(
"GRooTrackerVtx") && _saveRoo)
230 AddTreeWithName(RooTrackerVtx,
"RooTrackerVtx", input().GetChain(
"GRooTrackerVtx"));
233 SetCurrentTree(flattree);
234 SetFillSingleTree(GetCurrentTree());
260 AddVar(sPOTSincePreviousSpill,
"sPOTSincePreviousSpill",
"D",
"");
263 DefineTrueVertex(trueVertex);
266 DefineTrueParticle(trueParticle);
269 DefineFgdTimeBin(fgdTimeBin);
274 if (_saveTPCInfo) DefineTPCParticle (tpc );
275 if (_saveFGDInfo) DefineFGDParticle (fgd );
276 if (_saveECALInfo) DefineECALParticle (ecal );
277 if (_saveSMRDInfo) DefineSMRDParticle (smrd );
278 if (_saveP0DInfo) DefineP0DParticle (p0d );
279 if (_saveTrackerInfo) DefineTrackerTrack(tracker);
285 if (_saveReconDirTECALInfo){
286 DefineTECALReconObject (tecalRecon );
287 DefineTECALUnmatchedObject(tecalUnmatched);
289 if (_saveReconDirP0DInfo){
290 DefineP0DReconVertex (p0dVertex );
291 DefineP0DReconParticle(p0dParticle);
295 DefineVertex(vertex);
296 _POTSincePreviousSpill=0;
308 delete tecalUnmatched;
325 SetFillSingleTree(flattree);
326 SetCurrentTree(flattree);
331 _POTSincePreviousSpill +=
static_cast<const AnaBeam*
>(spill.
Beam)->POT;
334 std::vector<AnaBunchC*> outplusbunches;
336 for (
unsigned int b = 0; b < spill.
Bunches.size(); b++){
337 outplusbunches.push_back(spill.
Bunches[b]);
341 for (
unsigned int b=0; b < outplusbunches.size(); b++){
345 if (!bunch)
continue;
348 bool ok_recon = CheckReconFillFlatTree(*bunch);
351 if (!ok_recon)
continue;
354 InitializeTree(GetCurrentTree());
361 if (HasTree(RooTrackerVtx))
362 spill_io.
RooVtxEntry = _rooVtxManager.GetRooVtxEntry();
365 spill_io.Write(*
this,
"s");
371 WriteBunch(&bunch_io);
375 if (!_spill_filled) {
377 FillSpillVariables();
380 if (HasTree(RooTrackerVtx)){
382 _rooVtxManager.IncrementRooVtxEntry();
385 _spill_filled =
true;
389 for (UInt_t i = 0; i < bunch->
Particles.size(); i++){
392 if (!track)
continue;
397 ResetCheckWriteSegment();
401 if (CheckWriteSegment(SubDetId::kTPC, *track->
TPCSegments[j])) WriteTPCParticle(&particle_io);
407 ResetCheckWriteSegment();
411 if (CheckWriteSegment(SubDetId::kFGD, *track->
FGDSegments[j])) WriteFGDParticle(&particle_io);
417 ResetCheckWriteSegment();
421 if (CheckWriteSegment(SubDetId::kECAL, *track->
ECALSegments[j])) WriteECALParticle(&particle_io);
427 ResetCheckWriteSegment();
432 if (CheckWriteSegment(SubDetId::kSMRD, *track->
SMRDSegments[j])) WriteSMRDParticle(&particle_io);
438 ResetCheckWriteSegment();
443 if (CheckWriteSegment(SubDetId::kP0D, *track->
P0DSegments[j])) WriteP0DParticle(&particle_io);
448 if (_saveTrackerInfo) {
450 for (
unsigned int j = 0; j < trackers.size(); j++){
455 WriteTrackerTrack(&tracker_io, j);
462 WriteTrack(&track_io);
466 if (_saveReconDirTECALInfo){
473 for (std::vector<AnaTECALReconObject*>::const_iterator it = localBunch->TECALReconObjects.begin(); it != localBunch->TECALReconObjects.end(); it++){
478 WriteTECALReconObject(&object_ecal);
483 for (std::vector<AnaTECALUnmatchedObject*>::const_iterator it=localBunch->TECALUnmatchedObjects.begin(); it!=localBunch->TECALUnmatchedObjects.end(); it++){
489 WriteTECALUnmatchedObject(&object_ecal);
494 if (_saveReconDirP0DInfo){
501 for (std::vector<AnaP0DReconVertex*>::const_iterator it = localBunch->P0DReconVertices.begin(); it != localBunch->P0DReconVertices.end(); it++){
506 WriteP0DReconVertex(&object_p0d);
510 for (std::vector<AnaP0DReconParticle*>::const_iterator it = localBunch->P0DReconParticles.begin(); it!=localBunch->P0DReconParticles.end(); it++){
515 WriteP0DReconParticle(&object_p0d);
521 std::vector<int> trueVertexIndices;
522 for (
unsigned int i = 0; i < bunch->
Vertices.size(); i++) {
525 int nMatchedTrueVertices = bunch->
Vertices[i]->GetTrueVertices(MatchedTrueVertices);
526 trueVertexIndices.clear();
527 for (
int j = 0; j < nMatchedTrueVertices; j++) {
528 int trueVertexIndex = FindTrueVertexIndex(MatchedTrueVertices[j]);
529 trueVertexIndices.push_back(trueVertexIndex);
536 WriteVertex(&vertex, trueVertexIndices);
547 bool ok_truth = CheckTruthFillFlatTree(spill);
550 InitializeTree(GetCurrentTree());
556 if (HasTree(RooTrackerVtx))
557 spill.
RooVtxEntry = _rooVtxManager.GetRooVtxEntry();
560 spill.Write(*
this,
"s");
563 FillSpillVariables();
569 if (HasTree(RooTrackerVtx)){
571 _rooVtxManager.IncrementRooVtxEntry();
574 _spill_filled =
true;
585 if (_spill_filled)
return;
589 InitializeTree(GetCurrentTree());
599 void CreateFlatTree::FillSpillVariables(){
603 _savedTrueVertices.clear();
607 for (
unsigned int i=0; i<spill.
TrueVertices.size(); i++){
613 WriteTrueVertex(&vertex);
616 _savedTrueVertices.push_back(vertex_tmp);
619 if (_saveTruthWithRecon) CreateListOfTrueParticlesToSave();
623 if (!_saveTruthWithRecon || _trueParticleIDs.find(spill.
TrueParticles[i]->ID) != _trueParticleIDs.end()) {
625 int trueVertexIndex = -2;
627 trueVertexIndex = FindTrueVertexIndex(spill.
TrueParticles[i]->TrueVertex);
632 WriteTrueParticle(&particle, trueVertexIndex);
637 for (
unsigned int i=0;i<spill.
FgdTimeBins.size();i++){
642 WriteFgdTimeBin(&bin);
653 if (_savedTrueVertices.size() == spill.
TrueVertices.size())
654 std::cout <<
"debug error 1234 TrueVertex not associated." << std::endl;
657 for (
unsigned int i = 0; i < _savedTrueVertices.size(); i++) {
658 if (vertex == _savedTrueVertices[i])
return i;
660 std::cout <<
"debug error 1235: TrueVertexIndex not found" << std::endl;
665 void CreateFlatTree::CreateListOfTrueParticlesToSave() {
667 _trueParticleIDs.clear();
671 std::set<AnaTrueObjectC*> matched;
675 std::vector<AnaBunch*> outplusbunches;
676 outplusbunches.push_back(static_cast<AnaBunch*>(spill.
OutOfBunch));
677 for (
unsigned int b = 0; b < spill.
Bunches.size(); b++) {
678 outplusbunches.push_back(static_cast<AnaBunch*>(spill.
Bunches[b]));
681 for (
unsigned int b = 0; b < outplusbunches.size(); b++) {
685 for (
unsigned int i = 0; i < bunch->
Particles.size(); i++) {
701 for (std::set<AnaTrueObjectC*>::iterator it = matched.begin(); it != matched.end(); it++){
705 _trueParticleIDs.insert(parent->
ID);
707 while (parent && _trueParticleIDs.find(parent->
ParentID) == _trueParticleIDs.end()) {
708 parent = GetTrueParticleByID(parent->
ParentID);
710 _trueParticleIDs.insert(parent->
ID);
734 for (
unsigned int i = 0; i < all.size(); i++) {
735 if (all[i]->ID == ID) {
744 bool CreateFlatTree::CheckTruthFillFlatTree(
const AnaSpill& spill){
748 bool ok_reac =
false;
750 const std::vector<AnaTrueVertexB*>& vertices = spill.
TrueVertices;
751 for (std::vector<AnaTrueVertexB*>::const_iterator it = vertices.begin(); it!=vertices.end(); it++) {
755 ok_reac = CheckTrueVertexReaction(vtx);
759 ok_det = CheckTrueVertexDetector(vtx.
Detector);
762 if (ok_reac && ok_det)
return true;
769 bool CreateFlatTree::CheckTrueVertexReaction(
const AnaTrueVertex& vtx){
774 if (_saveTrueNuNC && vtx.
ReacCode>=+30 && abs(vtx.
ReacCode)!=70)
return true;
775 if (_saveTrueAntiNuNC && vtx.
ReacCode<=-30 && abs(vtx.
ReacCode)!=70)
return true;
784 bool CreateFlatTree::CheckTrueVertexDetector(
unsigned long det){
787 for (
unsigned int i = 0;i<_saveTrueVertexInDet.size();i++)
794 bool CreateFlatTree::CheckReconFillFlatTreeOutOfBunch(
const AnaBunch& bunch){
797 for (std::vector<AnaParticleB*>::const_iterator it = bunch.
Particles.begin(); it!=bunch.
Particles.end(); it++) {
799 unsigned long bitfield = (*it)->Detector;
801 if (_useTPC1outOfBunch)
803 if (_useTPC2outOfBunch)
805 if (_useTPC3outOfBunch)
807 if (_useFGD1outOfBunch)
809 if (_useFGD2outOfBunch)
811 if (_useP0DoutOfBunch)
813 if (_useDsECaloutOfBunch)
815 if (_useTrECaloutOfBunch)
817 if (_useP0DECaloutOfBunch)
819 if (_useSMRDoutOfBunch)
827 bool CreateFlatTree::CheckReconFillFlatTree(
const AnaBunch& bunch){
830 if (bunch.
Bunch == -1)
return CheckReconFillFlatTreeOutOfBunch(bunch);
832 for (std::vector<AnaParticleB*>::const_iterator it = bunch.
Particles.begin(); it!=bunch.
Particles.end(); it++) {
834 unsigned long bitfield = (*it)->Detector;
865 void CreateFlatTree::FillFlatTree(){
869 FillVar(sPOTSincePreviousSpill, _POTSincePreviousSpill);
872 _POTSincePreviousSpill = 0;
879 void CreateFlatTree::ResetCheckWriteSegment(){
882 for (Int_t i=0;i<10;i++){
896 if (seg.
NNodes>_max_nodes[idet]){
897 _max_nodes[idet] = seg.
NNodes;
Representation of a true Monte Carlo trajectory/particle.
int nP0DSegments
How many P0D tracks are associated with this track.
Representation of a global track.
Representation of an ECAL segment of a global track.
AnaP0DParticleB * P0DSegments[NMAXP0DS]
The P0D segments that contributed to this global track.
Int_t NuPDG
The PDG code of the incoming neutrino.
int GetParameterI(std::string)
Get parameter. Value is returned as integer.
int nTrueParticles
How many true particles are associated with this vertex.
static bool HasPECALDetector(unsigned long BitField)
Check if a detector bit field has a P0D ECAL or not.
AnaECALParticleB * ECALSegments[NMAXECALS]
The ECAL segments that contributed to this global track.
int nECALSegments
How many ECAL tracks are associated with this track.
AnaSMRDParticleB * SMRDSegments[NMAXSMRDS]
The SMRD segments that contributed to this global track.
Representation of a true Monte Carlo vertex.
Representation of a true Monte Carlo vertex.
void AddPackage(const std::string &name, const std::string &version)
Add a package.
std::vector< AnaTrueVertexB * > TrueVertices
The true MC vertices used in this spill.
std::vector< AnaBunchC * > Bunches
The reconstructed objects, split into timing bunches.
Int_t NNodes
The number of nodes in the reconstructed object.
Representation of an SMRD segment of a global track.
AnaTPCParticleB * TPCSegments[NMAXTPCS]
The TPC segments that contributed to this global track.
AnaTrueObjectC * TrueObject
The link to the true oject that most likely generated this reconstructed object.
static bool GetDetectorUsed(unsigned long BitField, SubDetId::SubDetEnum det)
Method to see if a certain subdetector or subdetector system is used.
AnaTrueParticleB ** TrueParticles
The true particles associated with this vertex.
This Ana* object is used to flatten TECALReconObjects from ReconDir/TrackerECal.
AnaBunchB * OutOfBunch
Reconstructed objects that didn't fit into one of the timing bunches.
Int_t ID
The ID of the trueObj, which corresponds to the ID of the TTruthParticle that created it...
std::vector< AnaVertexB * > Vertices
std::string GetSoftwareVersionFromPath(const std::string &path)
Get The software version from the path of the package.
void FillTree()
Fill the current tree.
int nSMRDSegments
How many SMRD tracks are associated with this track.
static bool HasSMRDDetector(unsigned long BitField)
Check if a detector bit field has a SMRD or not.
Representation of a true Monte Carlo vertex.
int nTPCSegments
How many TPC tracks are associated with this track.
Representation of a true Monte Carlo trajectory/particle.
This class defines a correction that affects the reconstructed TPC Momentum of an.
AnaBeamB * Beam
The beam quality flags for this spill.
SubDetEnum
Enumeration of all detector systems and subdetectors.
Creates the appropriate AnaSpillB type. The rest of the work is done by the base converter.
Representation of a Tracker segment of a global track.
std::vector< AnaFgdTimeBinB * > FgdTimeBins
The FGD time bins.
Representation of a global track.
static SubDetId::SubDetEnum GetSubdetectorEnum(unsigned long BitField)
Get the single subdetector that this track is from.
Representation of a TPC segment of a global track.
static bool HasTECALDetector(unsigned long BitField)
Check if a detector bit field has a Tracker ECAL or not.
int GetLocalDetEnum(SubDetId::SubDetEnum det, SubDetId::SubDetEnum idet)
Get old local detector enumeration to find array index of Flat tree.
Representation of a FGD segment of a global track.
std::vector< AnaTrackerTrackB * > TRACKERSegments
The TRACKER segments that contributed to this global track.
std::vector< AnaTrueParticleB * > TrueParticles
The true MC particles used in this spill.
Representation of a P0D segment of a global track.
Int_t RooVtxEntry
Not in the MiniTree for the Moment since it produces a seg fault.
virtual bool Initialize()
Int_t Bunch
The index of this bunch (0-7).
This Ana* object is used to flatten TECALUnmatchedObjects from ReconDir/TrackerECal.
int nFGDSegments
How many FGD tracks are associated with this track.
Int_t ParentID
The ID of this particle's immediate parent, or 0 if there is no parent.
ProdId_h GetProductionIdFromND280AnalysisTools()
Get Production Id from nd280AnalysisTools.
Representation of a global track.
std::vector< AnaParticleB * > Particles
void AddProduction(ProdId_h prodId, const std::string &prodName, const std::string &prodLowVersion, const std::string &prodHighVersion)
Add a production.
Representation of a TPC segment of a global track.
Representation of a reconstructed particle (track or shower).
virtual void DefineOutputTree()
Define the tree that should be written to the output file.
Representation of a TPC segment of a global particle.
Representation of a true Monte Carlo trajectory/particle.
Representation of the beam information, including POT and quality.
AnaFGDParticleB * FGDSegments[NMAXFGDS]
The FGD segments that contributed to this global track.
Representation of a global vertex.