7 #ifndef TTrackerReconModule_hxx_seen
8 #define TTrackerReconModule_hxx_seen
12 #include <TClonesArray.h>
13 #include <TLorentzVector.h>
17 #include <TND280Event.hxx>
19 #include <TG4PrimaryVertex.hxx>
20 #include <TG4Trajectory.hxx>
21 #include <TReconPID.hxx>
22 #include <TReconVertex.hxx>
28 class TTrackerReconModule;
341 const char *title =
"Tracker Recon Module");
364 virtual bool FillTree(ND::TND280Event &);
370 void FillVertex(ND::THandle<ND::TReconVertex> in, TClonesArray *out,
int idx);
381 void FillTPC(ND::THandle<ND::TReconPID> in, TClonesArray *out,
int idx);
384 bool ExtrapolateTPC(ND::THandle<ND::TReconPID> in, TClonesArray *out,
int idx,
385 ND::THandle<ND::THitSelection> fgd);
396 void FillFGD(ND::THandle<ND::TReconTrack> in, TClonesArray *out,
int idx);
407 void FillOther(ND::THandle<ND::TReconTrack> in, TClonesArray *out,
int idx);
412 ND::THandle<ND::THitSelection> tpc);
437 ND::THandle<ND::TReconTrack> in,
int &idx);
441 void GetMomentum(ND::THandle<ND::TTrackState> state,
double &p,
double &ep);
445 double GetCharge(ND::THandle<ND::TTrackState> state);
452 ND::THandle<ND::TReconTrack> reco);
463 ND::THandle<ND::TReconBase> reco);
467 const ND::THandle<ND::TReconBase> track);
474 ND::THandle<ND::TG4Trajectory>
GetParent(ND::TG4Trajectory *G4track);
475 ND::THandle<ND::TG4Trajectory>
GetParent(
476 ND::THandle<ND::TG4Trajectory> G4track);
479 void FillTrueVertex(
bool found,
const ND::TG4PrimaryVertex &G4vertex,
483 bool GetG4Vertex(ND::TG4Trajectory *G4track, ND::TG4PrimaryVertex &G4vertex);
488 ND::TG4PrimaryParticle &incoming);
496 ND::THandle<ND::TReconPID> in,
int &nconstit);
501 ND::THandle<ND::TReconBase> reco);
double ExtrapolatedVertexZY
for ybar vertex, this is z coordinate in mm
TClonesArray * fVertices
The vector of trackerRecon vertices (none ever?).
TClonesArray * fTPCUnused
The vector of unused TPC hits.
bool ExtrapolateTPC(ND::THandle< ND::TReconPID > in, TClonesArray *out, int idx, ND::THandle< ND::THitSelection > fgd)
Method to make a TPC object with extrapolated hit association information.
TTrueParticle TrueParticle
information about the true particleassociated with this track
double EDeposit
The deposited charge for the constituent object(number of pe's).
An object to describe a reconstructed trackerRecon result.
std::string AlgorithmName
The name of the algorithm that created this object.
Int_t fNTPCExtrapolation
The number of TPC tracks extrapolated into theFGD following Claudio's (2010a) method.
double Length
The total length of the object in mm.
int Detector
Detector used (1,2,3 for TPC, or 4,5 for FGD?)
double ExtrapolatedVertexXX
for xbar vertex, this is x coordinate in mm
int GetDetectorNumber(ND::THandle< ND::TReconBase > object)
Method to build an integer key that describes the detectors used to build the TRecon object...
virtual ~TTrackerVertex()
int Ndof
Number of degrees of freedom in FGD track fit.
TVector3 Direction
the FGD track direction vector (dx,dy,dz)
TVector3 Direction
direction vector
Int_t NTotalConstituents
Number of all constituents, andconstituents-constituents...
TLorentzVector BackVariance
The 4-vector position variance at theback of the track(var(x),var(y),var(z),var(t)) in mm^2...
double PullPion
Pull for TPC pid pion hypothesis.
double fCathodeOffset
TPC cathode offset used for tpc other hits.
UInt_t UniqueID
Unique ID number to allow matching to Global Reconobject.
double Quality
The quality of the fit.(probability)
TLorentzVector FrontPosition
The 4-vector position at the front ofthe track (x,y,z,t) in mm, ns.
void FillConfigTree(TTree *configTree)
double TrCurvature
track curvature, units are 1/mm
An object to describe a reconstructed track.
UInt_t UniqueID
Unique ID number to allow matching to Global Reconobject.
virtual ~TTrackerResult()
int Detectors
Detectors used.
ClassDef(TTrackerReconModule::TTrackerConstituent, 1)
bool GetG4Vertex(ND::TG4Trajectory *G4track, ND::TG4PrimaryVertex &G4vertex)
Method to find the best matching G4 vertex for a given G4 track.
double MomentumError
uncertainty in momentum MeV/c
int NHits
The number of hits.
ClassDef(TTrackerReconModule::TTPCTrack, 1)
double PullMuon
Pull for TPC pid muon hypothesis.
TClonesArray * FGD
FGD objects associated with track.
double Quality
The quality of the fit. Ie. the Prob(chi2,ndof)
int NDOF
The number of degrees of freedom.
bool isForward
Sense of track.
TLorentzVector Position
Position 4-vector (at node) x,y,z,t in mm, ns.
TClonesArray * fTPCIso
The vector of isolated TPC tracks with fits.
ClassDef(TTrackerReconModule::TFGDTrack, 1)
Int_t NFGDs
Number of FGD Specific objects.
TFGDTrack hackFGDTrack
This is just here to fool TFile::MakeProject,not a real object.
virtual void InitializeBranches()
Initialize the branches in the trackerRecon eventAnalysis tree.
void FillFinalTrack(TTrackerResult *result, ND::THandle< ND::TReconTrack > reco)
Method to fill a trackerRecon result entry.
An object to describe a reconstructed vertex.
ND::THandle< ND::TReconTrack > GetConstituentTrack(ND::THandle< ND::TReconPID > in, int &nconstit)
called recursively to look for bottom level track that built a PID.
ND::THandle< ND::TG4Trajectory > GetParent(ND::TG4Trajectory *G4track)
Method to get the parent G4 track for a given G4 track.
int NNodes
The number of nodes (fgd hits + tpc tracks)
double Charge
Charge from the TPC pid (+1, or -1)
TTPCTrack hackTPCTrack
This is just here to fool TFile::MakeProject,not a real object.
Int_t fNFGDUnused
The number of unused FGD hits.
void FillTrueVertex(bool found, const ND::TG4PrimaryVertex &G4vertex, double pur, double eff, ND::TTrueVertex &vertex)
Method to fill the true vertex information from a given G4 vertex.
void FillFGD(ND::THandle< ND::TReconTrack > in, TClonesArray *out, int idx)
Method to fill trackerRecon tree with FGD information Input is a TReconPID of FGD fit information...
void FillVertex(ND::THandle< ND::TReconVertex > in, TClonesArray *out, int idx)
Method to fill trackerRecon tree with vertex information Input is a TReconVertex. ...
ClassDef(TTrackerReconModule::TTrackerVertex, 1)
The position variance;.
double ExtrapolatedVertexZX
for xbar vertex, this is z coordinate in mm
int Detectors
Detectors used.
double fMaxDrift
TPC maximum drift used for tpc other hits.
double SigmaPion
Sigma estimated width of TPC pid pion hypothesis.
int Status
The status for the fit.
std::string AlgorithmName
algorithm that created this object.
Int_t fNFGDOther
The number of FGD tracks with no fit (none ever?).
TLorentzVector Position
position 4-vector (x,y,z,t) in mm, ns
double MomentumError
Uncertainty in the Momentum in MeV/c from theTPC pid.
Int_t fNTPCOther
The number of TPC tracks with no fit.
std::map< int, double > TrkRecModGetG4TrajectoryFractions(const ND::THandle< ND::TReconBase > track)
Method to measure the purity of a reconstructed track against the truth.
An object to hold specific FGD track variables.
double EDeposit
The deposited charge for the object.
TLorentzVector FrontVariance
The 4-vector position variance at thefront of the track(var(x),var(y),var(z),var(t)) in mm^2...
int NHits
The number of hits.
bool HasExtrapolation
extrapolation method of vertex is calculated ornot
TClonesArray * fFGDUnused
The vector of unused TPC hits.
void FillTrueParticle(ND::TG4Trajectory *G4track, double pur, double eff, ND::TTrackerReconModule::TTrueParticle &trueParticle)
Method to fill the true particle information given a G4track.
double Charge
The Charge (+-1)
virtual Bool_t ProcessFirstEvent(ND::TND280Event &event)
Method for special handling of first event.
An object to describe the true G4 particle associated to the TTrackerResult.
TLorentzVector Position
The position of the vertex components [0]=x [1]=y [2]=z [3]=t x,y,z are in mm, t is in ns...
TLorentzVector Variance
Position variance 4-vector (at node)var(x),var(y),var(z),var(t) in mm^2, ns^2.
TLorentzVector PositionVariance
Variance in Position in mm^2, ns^2.
TVector3 Variance
The position variance in mm.
std::vector< int > Pids
the PID that goes with Likelihoods
int NConstituents
Number of constituents (probably 1, for track!)
Int_t ConstitIdx[2]
Index into Constituents inTTrackerResult::Constituents of this constituent'sconstituents.
TVector3 Direction
Direction vector (at node)
TVector3 Direction
TPC pid direction vector in mm.
double Pur
The purity for matching.
bool FillConstituentTrack(TTrackerResult *result, ND::THandle< ND::TReconTrack > in, int &idx)
Method to fill information about constituent tracks.
int matchingFailure_flag
Flag a object where the TPC-FGD matchingfailed.
double Charge
The Charge of this constituent (+-1)
TLorentzVector Position
Position at which kinematics are reported in mm, ns.
TVector3 DirectionVariance
direction variance vector
ClassDef(TTrackerReconModule::TTrackOther, 1)
TVector3 DirectionVariance
TPC pid variance in vector direction in mm^2.
double EDeposit
the FGD track energy deposit (total number of pe's)
unsigned long Status
The status for the fit.
virtual ~TTrackerConstituent()
double FrontMomentum
the momentum at the front of the track in MeV/c
ClassDef(TTrackerReconModule::TUnusedHit, 1)
std::vector< double > Likelihoods
the PID likelihoods for combined PID for now this is the product of the three TPC PID probabilities T...
Int_t fNVertices
Tree Entries.
int NDOF
The number of degrees of freedom.
double Sigma0
TPC track diffusion parameters depend on diffusion model used Original TPC diffusion model was: sigma...
int GetNumberOfHits(ND::THandle< ND::TReconBase > object)
Method to find the total number of hits used to build the reconstructed track/pid/etc.
double MomentumError
Track Momentum uncertainty (at node) in MeV/c.
double SigmaMuon
Sigma estimated width of TPC pid muon hypothesis.
double dEdxexpKaon
Estimated dE/dx for kaon hypothesis.
TVector3 BackDirection
The direction vector at the back of the track.
void FillOther(ND::THandle< ND::TReconTrack > in, TClonesArray *out, int idx)
Method to fill trackerRecon tree with unfit track information Input is a TReconTrack that was not fit...
std::string AlgorithmName
The name of the algorithm that created this object.
TLorentzVector Variance
The position of the vertex.
virtual void InitializeModule()
Method to initialize this module.
int NNodes
The number of nodes.
double Chi2
The chi2 of the fit.
TClonesArray * Constituents
All constituents, and constituents-constituents...
TTrackerReconModule(const char *name="Tracker", const char *title="Tracker Recon Module")
Constructor.
bool isForward
Sense of object.
virtual ~TTrackerReconModule()
Destructor.
double Ccorr
Corrected truncated mean charge deposit in PID.
virtual bool FillTree(ND::TND280Event &)
Main call to fill all of the branches of the trackerRecon eventAnalysis tree for a given event...
double Chi2
Chi2 of the FGD track fit the FGD track starting position vector coordinates in order x...
Object to describe the fit parameters at a track node.
double EDeposit
The Energy Deposit (number of pe's)
TVector3 DirectionVariance
track direction variance
double Momentum
momentum MeV/c
double EDeposit
The deposited charge for the object (number of pe's)
double SigmaKaon
Sigma estimated width of TPC pid kaon hypothesis.
ND::TG4Trajectory GetTrajectory(ND::TND280Event &event, ND::THandle< ND::TReconBase > reco)
Method to get the G4 trajectory that best matches the TRecon object.
TTrackerConstituent hackConstituentsObject
This is just here to foolTFile::MakeProject, not areal object.
unsigned long Status
The status for the fit.
double dEdxexpMuon
Estimated dE/dx for muon hypothesis.
void CheckMatchingFailure(TTrackerResult *result, ND::THandle< ND::TReconBase > reco)
Method to find FGD constituent track from a matching object and fill matchingFailure_flag.
double PullEle
Pull for TPC pid electron hypothesis.
double Quality
The quality of the fit.(probability(chi2,ndof))
ND::TTrueVertex Vertex
True vertex associated to this TrueParticle.
TClonesArray * fFGDOther
The vector of FGD tracks with no fit.
double Momentum
Momentum of the TPC pid in MeV/c.
bool GetIncomingParticle(const ND::TG4PrimaryVertex &G4vertex, ND::TG4PrimaryParticle &incoming)
Method to find the incident particle (neutrino) that gave rise to a given G4 track.
int NHits
number of clusters used in TPC fit
TLorentzVector BackPosition
The 4-vector position of the back of thetrack (x,y,z,t) in mm, ns.
double Time
Time of the hit in ns.
double MomentumError
track momentum MeV/c
std::string AlgorithmName
The name of the algorithm that created this object.
double SigmaEle
Sigma estimated width of TPC pid electron hypothesis.
TLorentzVector BackPosition
The position of the track at itsdownstream-most end (x,y,z,t) in mm,ns.
TLorentzVector Position
track position 4-vector (x,y,z,t) in mm, ns
TVector3 DirectionVariance
Direction variance vector (at node)
Int_t NConstituents
The number of constituents this constituent ismade of.
ClassDef(TTrackerReconModule::TTrackerNode, 1)
bool FillConstituentPid(TTrackerResult *result, ND::THandle< ND::TReconPID > in, int &idx)
Method to fill information about constituent pids.
TVector3 TrDirectionVar
variance in track direction vector
int Ndof
Number of degrees of freedom in TPC fit.
TPC pid and track variables.
double ExtrapolatedVertexYY
for ybar vertex, this is y coordinate in mm
ClassDef(TTrackerReconModule::TTrackerResult, 1)
int Detector
FGD number 1 or 2.
double Chi2
TPC chi2 calculated after likelihood fit.
TClonesArray * Hits
The hits.
double dEdxexpPion
Estimated dE/dx for pion hypothesis.
TTrackerNode hackNodes
This is just here to fool TFile::MakeProject,not a real object.
double Sigma1
TPC track diffusion sigma1 parameter.
TClonesArray * fTPCOther
The vector of TPC tracks with no fit.
int NDOF
The number of degrees of freedom.
double BackMomentum
the momentum at the back of the track iin MeV/c
int NHits
The number of hits.
ClassDef(TTrackerReconModule::TTrueParticle, 1)
TVector3 Position
The position of the hit component 0=x 1=y 2=z in mm.
Int_t NTPCs
Number of TPC tracks used to build this track.
TUnusedHit hackHits
This is just here to fool TFile::MakeProject, nota real object.
double Charge
The Charge (+-1)
double TimeUnc
Time Uncertainty of hit in ns.
double dEdxexpEle
Estimated dE/dx for electron hypothesis.
An object to describe a track that has no fit result.
Int_t fNTPCIso
The number of isolated TPC tracks with fits (none ever?)
This module summarizes the reconstruction information from the trackerRecon.
Int_t fNTPCUnused
The number of unused TPC hits.
An object to describe the true G4 vertex associated to the TGlobalVertex.
UInt_t UniqueID
Unique ID number to allow matching to Global Reconobject.
TClonesArray * fTracks
The vector of overall trackerRecon results.
Int_t NConstituents
The number of constituents (tracks and pids) usedto build this track.
double PullKaon
Pull for TPC pid kaon hypothesis.
double TrCurvatureVar
variance in track direction vector, units are(1mm)^2
double Eff
The efficiency for matching.
Int_t ConstitIdx[2]
Index into Constituents of the constituents usedto build this track.
TLorentzVector FrontPosition
The position of the track at itsupstream-most end (x,y,z,t) in mm, ns.
double SigmaProton
Sigma estimated width of TPC pid proton hypothesis.
TClonesArray * TPC
Information about the TPC pids/tracks used to buildthis track.
TClonesArray * fTPCExtrapolation
The vector of TPC tracks extrapolatedinto the FGD following Claudio's (2010a)method.
double dEdxexpProton
Estimated dE/dx for proton hypothesis.
An object to describe a constituent of a trackerRecon result.
void GetMomentum(ND::THandle< ND::TTrackState > state, double &p, double &ep)
Helper method to convert TTrackState curvature information into momentum and momentum uncertainty...
double fDriftVelocity
TPC drift velocity used for tpc other hits.
double Momentum
track momentum MeV/c
double Chi2
The chi2 of the fit.
TClonesArray * Nodes
Kinematics of the track at each node in the track fit.
double GetCharge(ND::THandle< ND::TTrackState > state)
Helper method to convert TTrackState curvature information into track charge.
double Sigma2
TPC track diffusion sigma2 parameter.
void FillFinalPid(TTrackerResult *result, ND::THandle< ND::TReconPID > reco)
Method to fill a trackerRecon result entry.
TVector3 Direction
track direction vector
double PullProton
Pull for TPC pid proton hypothesis.
double NTrun
70% of the number of clusters
Int_t fNTracks
The number of trackerRecon results.
TLorentzVector Variance
track position variance 4-vectorvar(x),var(y),var(z),var(t) in mm^2, ns^2
ND::THandle< ND::THitSelection > GetHitsFromComboHits(ND::THandle< ND::THitSelection > tpc)
Method to get the tpc combo hits from the tpc hit selection (used for tpc other)
int Detector
TPC number 1, 2 or 3.
TVector3 TrDirection
track direction vector
TLorentzVector Variance
position variance 4-vector(var(x),var(y),var(z),var(t)) in mm^2, ns^2
TVector3 FrontDirection
The direction vector at the front of the track.
double MeanDrift
TPC track mean drift value used in diffusion model.
double TotalCharge
Deposited charge (the hit EDeposit)
A base class for analysis output modules which contain reconstructed event information.
double Momentum
Track Momentum (at node) in MeV/c.
void FillTPC(ND::THandle< ND::TReconPID > in, TClonesArray *out, int idx)
Method to fill trackerRecon tree with TPC information Input is a TReconPID of TPC fit information...