1 #ifndef BaseDataClasses_hxx 2 #define BaseDataClasses_hxx 10 #include "TLorentzVector.h" 13 #include "CoreDataClasses.hxx" 14 #include "SampleId.hxx" 15 #include "SubDetId.hxx" 23 #define dump_array4(par) std::cout<< #par << ": \t" << par[0] << " " << par[1] << " " << par[2] << " " << par[3] << std::endl; 24 #define dump_array3(par) std::cout<< #par << ": \t" << par[0] << " " << par[1] << " " << par[2] << std::endl; 28 const UInt_t NDETECTORS=19;
31 const UInt_t NMAXPARTICLES = 100;
32 const UInt_t NMAXTRUEPARTICLES = 500;
33 const UInt_t NMAXTRUEVERTICES = 50;
34 const UInt_t NMAXVERTICES = 20;
35 const UInt_t NMAXFGDTIMEBINS = 10;
36 const UInt_t NMAXCROSSEDDET = 30;
38 const UInt_t NMAXTPCS = 3;
39 const UInt_t NMAXFGDS = 2;
40 const UInt_t NMAXECALS = 3;
41 const UInt_t NMAXP0DS = 1;
42 const UInt_t NMAXSMRDS = 4;
43 const UInt_t NMAXTRACKERS = 8;
44 const UInt_t NMAXTRUEVERTICESMATCH = 3;
45 const UInt_t NMAXPARTICLESINVERTEX = 7;
48 const UInt_t NECALSUBDETS = 9;
49 const UInt_t NSMRDSUBDETS = 4;
184 Float_t PositionEnd[4];
187 Float_t Direction[3];
217 FGD1_FGD2 = -999.0; Flag_FGD1_FGD2 =
false;
218 P0D_FGD1 = -999.0; Flag_P0D_FGD1 =
false;
219 ECal_FGD1 = -999.0; Flag_ECal_FGD1 =
false;
220 ECal_FGD2 = -999.0; Flag_ECal_FGD2 =
false;
221 DSECal_FGD2 = -999.0; Flag_DSECal_FGD2 =
false;
225 this->FGD1_FGD2 = B.FGD1_FGD2;
226 this->Flag_FGD1_FGD2 = B.Flag_FGD1_FGD2;
227 this->P0D_FGD1 = B.P0D_FGD1;
228 this->Flag_P0D_FGD1 = B.Flag_P0D_FGD1;
229 this->ECal_FGD1 = B.ECal_FGD1;
230 this->Flag_ECal_FGD1 = B.Flag_ECal_FGD1;
231 this->ECal_FGD2 = B.ECal_FGD2;
232 this->Flag_ECal_FGD2 = B.Flag_ECal_FGD2;
233 this->DSECal_FGD2 = B.DSECal_FGD2;
234 this->Flag_DSECal_FGD2 = B.Flag_DSECal_FGD2;
247 bool Flag_DSECal_FGD2;
264 virtual void Print()
const;
286 Float_t DirectionStart[3];
289 Float_t DirectionEnd[3];
292 Float_t PositionStart[4];
295 Float_t PositionEnd[4];
314 virtual void Print()
const;
347 virtual void Print()
const;
372 virtual void Print()
const;
510 Float_t ShowerPosition[3];
615 virtual void Print()
const;
673 std::vector<AnaFGDParticleB*> FGDSegmentsVect;
674 std::vector<AnaECALParticleB*> ECALSegmentsVect;
675 std::vector<AnaSMRDParticleB*> SMRDSegmentsVect;
676 std::vector<AnaP0DParticleB*> P0DSegmentsVect;
744 Float_t GetMainTrueVertexCleanliness();
747 Float_t GetMainTrueVertexCompleteness();
750 Float_t GetTrueVertexCleanliness(
const AnaTrueVertexB& trueVertex);
753 Float_t GetTrueVertexCompleteness(
const AnaTrueVertexB& trueVertex);
833 Float_t RawChargeSum;
857 virtual void Print()
const;
863 virtual bool IsEmpty()
const;
882 Int_t nDelayedClusters;
897 virtual void Print()
const;
908 Float_t RawChargeSum[2];
923 virtual void Print()
const;
982 virtual void Print()
const;
985 bool GetIsMC()
const {
return EventInfo->GetIsMC();}
991 virtual void CopyArraysIntoVectors();
994 virtual void CopyVectorsIntoArrays();
997 virtual void RedoLinks();
1064 void ResetSummary();
1075 float VertexPosition[SampleId::kNSamples][4];
1081 UInt_t RooVertexIndex[SampleId::kNSamples];
1094 virtual void Copy(
const AnaEventC& event,
bool copyBunchInfo =
true,
bool cloneTruth=
true);
1099 event->isClone=
true;
1104 virtual void Print()
const;
1107 bool GetIsMC()
const {
return EventInfo.GetIsMC();}
1113 virtual std::string GetEventInfoString()
const;
1149 Int_t nDelayedClusters;
Float_t dEdxexpMuon
Expected dE/dx for a muon, based on the reconstructed momentum.
Float_t Completeness
The completeness of the true-reco matching.
bool InActive
If the particle passes through an active part of the subdetector.
AnaTrueVertexB * TrueVertex
Pointer to the AnaTrueVertexB of the interaction that created this AnaTrueParticleB.
int nP0DSegments
How many P0D tracks are associated with this track.
const AnaTrackB * GetOriginalTrack() const
Return a casted version of the original AnaParticleB associated.
virtual AnaBunchB * Clone()
Clone this object.
Representation of the beam quality and perhaps other beam information as needed.
AnaTrueVertexB * TrueVertex
Representation of the ND280 data quality flags.
bool GetIsMC() const
Return whether this spill is from Monte Carlo or not.
Int_t NuPDG
The PDG code of the incoming neutrino.
int nDetCrossings
The number of DetCrossing objects.
virtual AnaFgdTimeBinB * Clone()
Clone this object.
int nTrueParticles
How many true particles are associated with this vertex.
Float_t ExitPosition[4]
for each subdetector tell the exit position
AnaFgdTimeBinB ** FgdTimeBins
The FGD time bins.
Float_t Cleanliness
The cleanliness of the true-reco matching.
virtual AnaTrueVertexB * Clone()
Clone this object.
Float_t dEdxexpProton
Expected dE/dx for a proton, based on the reconstructed momentum.
int nECALSegments
How many ECAL tracks are associated with this track.
std::vector< std::pair< AnaTrueVertexB *, AnaRecTrueMatchB > > TrueVerticesMatch
The true vertices that are associated with this global vertex, with the related cleanliness and compl...
/// Extension to AnaParticleB containing momentum and charge info
Float_t Pullp
Proton pull, according to FGD information.
bool GetIsSandMC() const
Return whether this event is from Sand Monte Carlo or not.
virtual AnaParticleMomB * Clone()
Clone this object.
AnaVertexB ** Vertices
The reconstructed objects in this bunch.
Representation of a true Monte Carlo vertex.
virtual AnaSpillB * Clone()
Clone this object.
std::vector< AnaTrueVertexB * > TrueVertices
The true MC vertices used in this spill.
AnaBeamB * Beam
The beam quality flags for this event.
virtual AnaEventB * Clone()
Clone this object.
Float_t Pullno
Dummy pull. If the FGD pulls weren't set, this is set to 1.
Int_t NNodes
The number of nodes in the reconstructed object.
virtual void Copy(const AnaEventC &event, bool copyBunchInfo=true, bool cloneTruth=true)
Copy the entire object.
Int_t GParentPDG
The PDG code of this particle's grandparent, or 0 if there is no grandparent.
Representation of an ECAL segment of a global track.
Float_t Pullpi
Pion pull, according to FGD information.
virtual AnaTPCParticleB * Clone()
Clone this object.
Extension to AnaParticleB containing momentum and charge info, to be used by aggregation.
Float_t AvgTime
Time charged averaged over hits.
Int_t SpillsSincePreviousSavedSpill
Float_t dEdxSigmaProton
Expected error on the dE/dx measurement, for the proton hypothesis.
virtual void associateVertexToParticle(AnaParticleB *, AnaVertexB *) const
Add to a particle a given associated vertex (not in the base class)
virtual void associateParticleToTrueParticle(AnaParticleB *) const
Add to a true particle a given associated reconstructed particle (not in the base class) ...
virtual AnaEventInfoB * Clone()
Clone this object.
AnaToF ToF
Times of flight between pairs of detectors.
virtual AnaVertexB * Clone()
Clone this object.
AnaEventInfoB * EventInfo
Run, sunrun, event, time stamp, etc.
Float_t Momentum
The initial momentum of the true particle.
AnaParticleB ** Particles
The reconstructed objects in this bunch.
AnaTrueParticleB ** TrueParticles
The true particles associated with this vertex.
AnaBunchB * OutOfBunch
Reconstructed objects that didn't fit into one of the timing bunches.
Int_t Bunch
The bunch of the global vertex, based on the Position.T()
virtual AnaTrackB * Clone()
Clone this object.
Float_t RangeMomentumMuon
Momentum by range calculated with muon hypothesis.
std::vector< AnaTPCParticleB * > TPCSegmentsVect
A copy of the segment arrays but using an std::vector, which can be saved into a tree.
bool IsSand
Is this event from the Sand MC.
virtual AnaDetCrossingB * Clone()
Clone this object.
AnaEventInfoB EventInfo
Run, sunrun, event, time stamp, etc.
bool GetIsSandMC() const
Return whether this spill is from Sand Monte Carlo or not.
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.
std::vector< AnaParticleB * > ParticlesVect
A copy of Particles but using an std::vector, which can be saved into a tree.
Float_t dEdxexpEle
Expected dE/dx for an electron, based on the reconstructed momentum.
Float_t Pullmu
Muon pull, according to FGD information.
Float_t Charge
The reconstructed charge of the particle.
Int_t SubRun
The subrun number.
bool isClone
Is this the original Event or a clone.
std::vector< AnaVertexB * > Vertices
int nSMRDSegments
How many SMRD tracks are associated with this track.
const AnaVertexB * Original
Float_t MomentumError
Error of the momentum at the start of the segment.
AnaDelayedClustersB ** DelayedClusters
The delayed cluster groups.
Float_t MomentumFlip
Momentum for the main PID hypothesis and reverse sense.
std::vector< AnaTrueParticleB * > TrueParticlesVect
A copy of TrueParticles but using an std::vector, which can be saved into a tree. ...
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.
Representation of a true Monte Carlo trajectory/particle.
virtual AnaParticleB * Clone()
Clone this object.
Float_t NuEnergy
The true energy of the incoming neutrino.
Representation of an SMRD segment of a global track.
Representation of a Tracker segment of a global track.
const AnaParticleB * Original
UInt_t GeomID
Is this the original Spill or a clone.
Float_t dEdxSigmaEle
Expected error on the dE/dx measurement, for the electron hypothesis.
Float_t EntrancePosition[4]
for each subdetector tell the entrance position
virtual AnaTrueParticleB * Clone()
Clone this object.
AnaBeamB * Beam
The beam quality flags for this spill.
AnaDetCrossingB ** DetCrossings
Representation of a detector crossing info for a true particle (G4 trajectory).
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.
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.
virtual AnaECALParticleB * Clone()
Clone this object.
bool GetIsMC() const
Return whether this spill is from Monte Carlo or not.
std::vector< AnaFgdTimeBinB * > FgdTimeBins
The FGD time bins.
Float_t dEdxMeas
dE/dx as measured by the TPC.
Representation of a global track.
Int_t Bunch
The index of this bunch (0-7).
virtual AnaTrackerTrackB * Clone()
Clone this object.
SampleId::SampleEnum EventSample
Event sample - whether it passes the NuMu-CCQE selection, or CC1Pi selection for example.
bool GetIsMC() const
Return whether this event is from Monte Carlo or not.
Float_t MomentumEnd
The reconstructed momentum of the particle, at the end position.
Representation of a TPC segment of a global track.
AnaParticleB ** Particles
Float_t ExitMomentum[3]
for each subdetector tell the exit momentum
UInt_t NTotalTrueVertices
virtual AnaP0DParticleB * Clone()
Clone this object.
std::vector< AnaTrueParticleB * > TrueParticles
The true MC particles used in this spill.
Representation of a global vertex.
Double_t POTSincePreviousSavedSpill
Float_t Length
The length of the ECal segment.
virtual AnaBeamB * Clone()
Clone this object.
int nParticles
The number of reconstructed particles in the event.
Representation of a FGD segment of a global track.
AnaDelayedClustersB ** DelayedClusters
The delayed cluster groups.
virtual AnaFGDParticleB * Clone()
Clone this object.
Int_t PrimaryIndex
Index of the global vertex.
Int_t GoodSpill
Good spill flag, as defined in Beam Summary Data. 0 is bad.
std::vector< AnaDetCrossingB * > DetCrossingsVect
A copy of DetCrossings but using an std::vector, which can be saved into a tree.
Int_t Event
The ND280 event number.
bool GetIsSandMC() const
Return whether this spill is from Sand Monte Carlo or not.
int nFGDSegments
How many FGD tracks are associated with this track.
AnaTrueParticleB ** TrueParticles
The true MC particles used in this spill.
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.
Int_t Containment
Containment flag required for proper PID analysis.
virtual void RedoLinks()
Redo reco-reco and reco-truth after cloning or reading MiniTree.
AnaTrueVertexB ** TrueVertices
The true MC vertices used in this spill.
std::vector< AnaParticleB * > Particles
Int_t MostUpStreamLayerHit
Innermost layer hit of the ecal object (used in ecal pi0 veto)
Representation of a P0D segment of a global track.
Float_t dEdxSigmaPion
Expected error on the dE/dx measurement, for the pion hypothesis.
AnaTrueParticleB * GetTrueParticle() const
Return a casted version of the AnaTrueObject associated.
Float_t Charge
The true charge of the particle.
AnaDataQualityB * DataQuality
The ND280 data quality flags for this event.
Representation of a reconstructed particle (track or shower).
AnaDataQualityB * DataQuality
The ND280 data quality flags for this spill.
bool IsMC
Says if the event is MC or data.
virtual AnaDataQualityB * Clone()
Clone this object.
UInt_t NTotalTrueParticles
virtual void associateVertexToTrueVertex(AnaVertexB *) const
Add to a true vertex a given associated reconstructed vertex (not in the base class) ...
virtual AnaRecTrueMatchB * Clone()
Clone this object.
virtual AnaSMRDParticleB * Clone()
Clone this object.
Float_t EntranceMomentum[3]
for each subdetector tell the entrance momentum
virtual AnaDelayedClustersB * Clone()
Clone this object.
Float_t RefitMomentum
Reconstructed momentum with the empirical distortion corrections.
Int_t Run
The ND280 run number.