10 #ifndef TGlobalReconModule_hxx_seen
11 #define TGlobalReconModule_hxx_seen
15 #include <TClonesArray.h>
16 #include <TLorentzVector.h>
20 #include <TND280Event.hxx>
22 #include <TReconPID.hxx>
23 #include <TReconVertex.hxx>
25 #include <TComboHit.hxx>
27 #include <TFGDmcDigit.hxx>
28 #include <TG4HitSegment.hxx>
29 #include <TG4PrimaryVertex.hxx>
30 #include <TG4Trajectory.hxx>
31 #include <TMCDigit.hxx>
33 #include <TMultiHit.hxx>
34 #include <TTFBmcDigit.hxx>
35 #include <TTPCmcDigit.hxx>
42 #include "recpack/HelixEquation.h"
43 #include "recpack/Surface.h"
44 #include "recpack/Trajectory.h"
45 #include "recpack/Volume.h"
56 class TGlobalReconModule;
57 OA_EXCEPTION(EeventAnalysisInfiniteLoop2, EeventAnalysis);
620 std::vector<std::pair<unsigned long, TVector2> >
NodeTimes;
701 const char* title =
"Global Recon Module");
708 std::cout << indent <<
"=UseECalVertices: Will assume global vertexing\n"
709 << indent <<
"\t used the results of ECal-iso vertexing."
721 virtual bool FillTree(ND::TND280Event&);
723 bool FillVertex(ND::TND280Event& event,ND::THandle<ND::TReconVertex> vertex,
bool primary);
725 void MatchTrueVertex(ND::THandle<ND::TG4PrimaryVertexContainer> g4PrimVert);
728 ND::THandle<ND::TReconBase>
object);
731 ND::THandle<ND::TReconBase>
object,
732 TGlobalPID& globalObject);
734 ND::THandle<ND::TReconBase>
object,
735 TGlobalPIDAlternate& PIDAlternate);
737 void FillTPCPID(ND::THandle<ND::TReconBase>
object);
739 ND::THandle<ND::TG4PrimaryVertex>
GetG4Vertex(
const ND::TReconBase&
object,
740 double& pur,
double& eff);
741 bool GetG4Vertex(ND::THandle<ND::TG4Trajectory> G4track,
742 ND::TG4PrimaryVertex& G4vertex);
746 void FillTrueVertex(
bool,
const ND::TG4PrimaryVertex& G4vertex,
double pur,
751 void FillTPCObject(ND::THandle<ND::TReconBase>
object, TTPCObject& sub,
754 void FillP0DECALInfo(ND::THandle<ND::TReconBase>
object, TGlobalPID& pid);
755 void FillECALInfo(ND::THandle<ND::TReconBase>
object, TGlobalPID& pid);
756 void FillTPCInfo(ND::THandle<ND::TReconBase>
object, TGlobalPID& pid);
757 void FillFGDInfo(ND::THandle<ND::TReconBase>
object, TGlobalPID& pid);
758 void FillSFGInfo(ND::THandle<ND::TReconBase>
object, TGlobalPID& pid);
759 void FillP0DInfo(ND::THandle<ND::TReconBase>
object, TGlobalPID& pid);
760 void FillSMRDInfo(ND::THandle<ND::TReconBase>
object, TGlobalPID& pid);
761 void FillTrackerInfo(ND::THandle<ND::TReconBase>
object, TGlobalPID& pid);
766 void FillGlobalHit(ND::THandle<ND::THit> hit, TGlobalHit& gHit);
767 void FillGlobalHit(ND::THandle<ND::THit> hit, TSMRDHit& smrdHit);
770 void FillSmrdHit(ND::THandle<ND::THit> hit, TSMRDHit& smrdHit);
774 TOutermostHits& outer);
776 void FillAllHits(ND::THitSelection& hits, TGlobalPID& globalObject);
781 ND::THandle<ND::TReconBase>&
object,
782 TLorentzVector& vertexPos,
int globpass,
int vaea);
784 void CheckFGDdist(TLorentzVector& FGDPos, TVector3 fFGDActiveMin,
785 TVector3 fFGDActiveMax);
790 ND::THandle<ND::TReconObjectContainer> globalObjects);
796 std::string
GetObjectType(ND::THandle<ND::TReconBase>
object);
797 bool IsTrackLike(ND::THandle<ND::TReconBase>
object);
799 ND::THandle<ND::TG4Trajectory>
GetParent(
800 ND::THandle<ND::TG4Trajectory> G4track);
803 ND::TG4PrimaryParticle& incoming);
807 TGlobalPID& globalObject);
809 TGlobalPID& globalObject, Trajectory& traj,
813 ND::THandle<ND::TReconBase>
object,
814 TLorentzVector& pos, TVector3& dir,
815 double& mom,
double& momErr,
double& charge,
816 double (&cov)[7][7]);
819 ND::THandle<ND::TReconBase>
object,
820 TLorentzVector& pos, TLorentzVector& posVar,
821 TVector3& dir, TVector3& dirVar,
double& mom,
824 void FillKinematics(ND::THandle<ND::TReconState> state, TLorentzVector& pos,
825 TVector3& dir,
double& mom,
double& momErr,
826 double& charge,
double (&cov)[7][7]);
828 void FillKinematics(ND::THandle<ND::TReconState> state, TLorentzVector& pos,
829 TLorentzVector& posVar, TVector3& dir, TVector3& dirVar,
830 double& mom,
double& momErr);
837 ND::TReconObjectContainer& trackerObjects);
840 const ND::TReconObjectContainer& globalObjects,
841 const ND::TReconObjectContainer& trackerObjects);
843 ND::THandle<ND::TG4Trajectory>
GetG4Trajectory(
const ND::TReconBase&
object,
844 double& pur,
double& eff);
846 ND::THandle<ND::TG4Trajectory> traj,
847 ND::THitSelection& traj_hits);
849 std::vector<int>& coinc,
int& nhits);
851 ND::THandle<ND::TMCHit> mch,
852 ND::THandle<ND::TG4TrajectoryContainer> trajectories);
856 std::vector<UInt_t>& brokenIDs1,
857 std::vector<UInt_t>& brokenIDs2);
873 std::map<ND::THandle<ND::TReconBase>, std::vector<UInt_t> >
877 ND::THandle<ND::TReconBase>
object);
882 ND::THandle<ND::TReconBase> reco);
885 template <
class T,
typename I>
886 bool GetTPCDatum(ND::THandle<ND::TReconBase>
object,
const std::string& datum,
887 std::vector<I>& vector)
const;
Int_t fNP0DECAL
Number of objects containing the P0DECAL.
double PIDWeightMuon
PID weights for muon hypothesis.
void FillSMRDInfo(ND::THandle< ND::TReconBase > object, TGlobalPID &pid)
double PullPion
The FGD PID pull value for a pion.
double LLR_MIP_EM
Value to separate MIP-like objects (e.g. muons) from EM showers e.g. photons/electrons). -9999 indicates an error.
bool IsTrackLike(ND::THandle< ND::TReconBase > object)
TGlobalHit hackFGDUnused
This is just here to fool TFile::MakeProject, not a real object.
double PIDWeightProt
PID weights for proton hypothesis.
void FillGlobalPIDAlternates(ND::THandle< ND::TG4Trajectory > G4track, ND::THandle< ND::TReconBase > object, TGlobalPID &globalObject)
void FillGlobalHit(ND::THandle< ND::THit > hit, TGlobalHit &gHit)
double dEdxexpMuon
Estimated dE/dx for muon hypothesis.
double Length
The length of the track or shower, its value depends on if the object is reconstructed as track-like ...
void GetConstituentsInTracker(ND::THandle< ND::TReconBase > t1, ND::TReconObjectContainer &trackerObjects)
TVector3 BackDirection
The direction of the object.
int ExitOK[NDETSEXTRAP]
Status of the subdetector exit.
Int_t NECALs
Number of ECAL objects.
void FillP0DInfo(ND::THandle< ND::TReconBase > object, TGlobalPID &pid)
double Quality
The quality of the fit.
double PID_TruncatedMaxRatio
A truncated Max Ratio. See ecalRecon docs for the full definition.
Int_t NTRACKERs
Number of Tracker objects.
double RangeMomentumEndToTPCProton
the momentum by range for the proton hypothesis (from end to a TPC)
TGlobalPIDAlternate hackGlobalPIDAlternate
This is just here to fool TFile::MakeProject, not a real object.
float chargePerLayer[2][30]
Summed hit charge for layer x in FGD1 (chargePerLayer[0][x]), and 2 (chargePerLayer[1][x]) ...
double PullMuon
The FGD PID pull value for a muon.
double PullElectron
The FGD PID pull value for an electron.
TLorentzVector Position
The position of the vertex.
Int_t fNSMRDRightUnused
Number of hits unused in the SMRDRight.
TClonesArray * Constituents
Constituent tracks.
An object to describe a reconstructed PID.
UInt_t UniqueID
Unique identifier for global recon objects (needed fro broken association)
double SigmaEle
Sigma estimated width of TPC pid electron hypothesis.
int NDOF
The number of degrees of freedom.
TLorentzVector BackPosition
The position of the object.
double fgdEA_verNextNextNearQ_rect
FGD end activity values.
double fgdVA_verNearQ
FGD vertex activity values.
double LLR_MIP_EM_LowMomentum
UNSTABLE: A combined discriminator for separating MIPs from EM showers. This is similar to LLR_MIP_EM...
double RangeMomentumEndToTPCPion
the momentum by range for the pion hypothesis (from end to a TPC)
double ExitMomentumErr[NDETSEXTRAP]
The error of the momentum of the object at the exit of each subdetector.
virtual void InitializeBranches()
Initialize Branches. Don't do anything else in this function.
double FrontMomentumError
the error on the momentum of the object
double fgdVA_totalQ
FGD vertex activity values.
double minTime
Bin start time.
std::vector< int > fgdhits_TrajID
Vector to store the ID of the Trajectory that created the hit.
TClonesArray * FGD2Unused
The vector unused hits in FGD2.
std::vector< int > TPCGasPathIDs
The IDs of the TREx paths which contributed to the object.
TLorentzVector BackPosition
The position of the object.
std::vector< std::string > fALLMODULES
std::vector< float > SFGHitPositionX
Vector to store the Xposition of each hit in SFG.
ClassDef(TGlobalReconModule::TSMRDObject, 1)
Int_t NDsECALs
Number of DsECAL objects.
void FillUnusedHits(ND::TND280Event &event)
std::vector< float > SFGHitPositionY
Vector to store the Y position of each hit in SFG.
TLorentzVector PositionVarAtTrueVertex
The position variance at the true vertex.
const int NDETSEXTRAP
For questions or suggestions about this module please contact the current responsible and CC in the e...
Int_t NFGDs
Number of FGD objects.
double fgdEA_verNearQ_rect
FGD end activity values.
int g4ID
The ID for the G4 trajectory that contributed most to this time bin.
double RangeMomentumProton
the momentum by range for the proton hypothesis
virtual Bool_t ProcessFirstEvent(ND::TND280Event &event)
Is called after the first event is loaded in.
unsigned long Detectors
Detectors used, defined according to the formula in GetDetectorNumber.
Int_t NSFGUnused
Number of hits unused in SFG.
int OuterMostLayerHit
Zero-indexed layer number of tracker-farthest layer with an ECal hit belonging to this object...
double SigmaPion
Sigma estimated width of TPC pid pion hypothesis.
int Status
The status for the fit.
OA_EXCEPTION(EeventAnalysis, EoaCore)
Generate a base exception for the Analysis library.
An object to describe a reconstructed PID.
TTrueParticle TrueParticle
The true particle.
double ComputeTrackLength(ND::THandle< ND::TReconBase > object)
double Chi2
The chi2 of the fit.
TClonesArray * fVertices
The TGlobalVertex vector of vertices.
TVector3 FrontDirection
The direction of the object.
ClassDef(TGlobalReconModule::TOutermostHits, 1)
void FillDetectorUsed(ND::THandle< ND::TReconBase > object, bool dets[])
int NegPionBraggCut
Bragg peak cut (only used for SFGD contained tracks)
void FillTrueParticle(ND::THandle< ND::TG4Trajectory > G4track, double pur, double eff, ND::TTrueParticle &part)
std::vector< std::vector< int > > NodeUniqueID
Vector to store the Unique ID of the node.
void FillSfgTimeBins(ND::TND280Event &event)
std::vector< double > Likelihoods
double fgdVA_verQ
FGD vertex activity values.
TLorentzVector BackPosition
The position of the object.
double LLR_MIP_Pion
Value to separate MIP-like objects (e.g. muons) from showering pions. -9999 indicates an error...
int EntranceOK[NDETSEXTRAP]
Status of the subdetector entrance.
double fgdVA_verNextNearQ
FGD vertex activity values.
TLorentzVector BackPositionVar
The position variance;.
bool GetIncomingParticle(const ND::TG4PrimaryVertex &G4vertex, ND::TG4PrimaryParticle &incoming)
TClonesArray * fSFGClusters
The vector of SFG cluster objects.
int GetTrackerDetectorNumber(ND::THandle< ND::TReconBase > object)
TVector3 DirectionVarAtTrueVertex
The direction variance at the true vertex.
double Charge
Deposited charge.
bool IsTrackerOnly(ND::THandle< ND::TReconBase > t1)
ClassDef(TGlobalReconModule::TGlobalPIDAlternate, 1)
void FillFgdTimeBins(ND::TND280Event &event)
TVertexConstituent hackVertexConstituentObject
This is just here to fool TFile::MakeProject, not a real object.
std::vector< double > NodeEDeposit_fit
std::vector< int > TPCGasPatternIDs
Variables to get the association between the global track and the gas ouptut involved The vectorS of ...
std::vector< std::vector< int > > HitUniqueID
Vector to store the Unique ID of the hit.
TVector3 FrontDirection
The direction of the object.
Int_t fNDsECAL
Number of objects containing the DsECAL.
An object to hold specific TPC variables.
std::vector< float > FGD1HitT
Vector to store the time of each hit in FGD1.
double BackMomentum
the momentum of the object
double MomentumAtTrueVertex
Momentum at the true vertex.
void InitializeExtrapolationToDetectors()
TVector3 DirectionAtTrueVertex
Direction at the true vertex.
std::map< ND::THandle< ND::TReconBase >, int > fTrackerGlobalIndexMap
std::vector< float > FGD1HitPosition
Vector to store the X or Y position of each hit in FGD1.
int TrackType
Record of why the track was refit with a kalman filter fit instead of the likelihood fit...
std::vector< TVector3 > NodeDirVariance
Vector to store the variance on the direction of each node.
int PionBraggCut
Bragg peak cut (only used for SFGD contained tracks)
double Charge
Deposited charge.
int CountDetector(ND::THandle< ND::TReconBase > object)
bool GetTPCDatum(ND::THandle< ND::TReconBase > object, const std::string &datum, std::vector< I > &vector) const
A getter for TPC Datums to work both with TREx and TPC info.
Int_t fNTPCOthers
The number of TPC other objects.
Int_t NSFGs
Number of SFG objects.
double RangeMomentumEndToTPCMuon
the momentum by range for the muon hypothesis (from end to a TPC)
double fgdEA_verQ
FGD end activity values.
double BackMomentum
the momentum of the object
double avgtime
Averaged corrected node time.
std::vector< int > NodeNHits
Vector to store the number of hits contributing to each node.
std::vector< std::pair< unsigned long, TVector2 > > NodeTimes
vector of pairs, sub-detecor number and time-stamps of edge nodes in this subdetector ...
void CheckMatchingFailure(TTrackerObject *result, ND::THandle< ND::TReconBase > reco)
Method to find FGD constituent track from a matching object and fill matchingFailure_flag.
An object to hold specific TRACKER variables.
int ComputeParticleId(ND::THandle< ND::TReconPID > PID)
TClonesArray * fFgdTimeBins
Information for each hit time bin (TFgdTimeBins).
std::vector< float > SFGHitPositionZ
Vector to store the X or Y position of each hit in SFG.
ClassDef(TGlobalReconModule::TGlobalVertex, 1)
Int_t fNP0D
Number of objects containing the P0D.
TLorentzVector ExitPosition[NDETSEXTRAP]
The position of the object at the exit of each subdetector.
double maxTime
Bin end time.
void FillSFGInfo(ND::THandle< ND::TReconBase > object, TGlobalPID &pid)
void FillTPCPID(ND::THandle< ND::TReconBase > object)
std::vector< TLorentzVector > HitPosition
TClonesArray * fP0DUnused
The vector unused hits in the P0D (TGlobalHit).
double PID_ShowerAngle
The angle from the start of an object to its width at its charge centre.
An object to store hit information for the SMRD subdetector.
double SigmaMuon
Sigma estimated width of TPC pid muon hypothesis.
double Length
The length of the track or shower (RMS)
double FrontCharge
the charge of the object at the first state
TClonesArray * HitsSaved
the two first and two last hits (TGlobalHit).
TClonesArray * TRACKER
Tracker specific variables.
double RangeMomentumMuonFlip
the momentum by range for the flipped muon hypothesis
void UpdateCoincidences(ND::THandle< ND::TMCHit > mch, ND::TMCDigit *mcdigit, std::vector< int > &coinc, int &nhits)
TLorentzVector FrontPosition
The position of the object.
int NConstituents
The number of constituents.
double PullProton
Pull for TPC pid proton hypothesis.
double TrueE
True energy in an FGD.
TVector3 FrontDirectionVar
The direction variance of the object.
double SigmaKaon
Sigma estimated width of TPC pid kaon hypothesis.
bool fPassedDetector[NDETSEXTRAP]
unsigned long GetDetectorNumber(ND::THandle< ND::TReconBase > object)
void FillTPCObject(ND::THandle< ND::TReconBase > object, TTPCObject &sub, int det)
std::vector< float > FGD2HitT
Vector to store the time of each hit in FGD2.
Int_t fNTrECALIso
Number of objects in the TrECAL only.
Int_t fPVInd
The last primary vertex index.
double MomentumAtTrueVertex
The momentum at the true vertex.
Int_t fNTPC
Number of objects containing the TPC.
TVector3 FrontDirection
The Front direction of the object.
TLorentzVector ExitPositionErr[NDETSEXTRAP]
The error of the position of the object at the exit of each subdetector.
double Momentum
the momentum of the object
TClonesArray * fSfgTimeBins
Information for each hit time bin (TSfgTimeBins).
TLorentzVector Position
Position of the correspponding object.
double LLR_MIP_HIP_VACut
UNSTABLE: Only filled for FilledAsType == 2 Recalculates PID variables for a vertex track where the X...
double TPCLength
TPC track length.
TLorentzVector PosVariance
Variance on the position of the corresponding object.
TTrueVertex hackTrueVertexObject
This is just here to fool TFile::MakeProject, not a real object.
int Counter
SMRD scint number.
std::vector< double > PIDWeight
The weights for the PID hypotheses, c.f. TP0DObject::ParticleId.
double FrontMomentumError
the error on the momentum of the object
Int_t fNSFGClusters
The number of SFG cluster objects.
Int_t fNVertices
The number of added primary vertices.
virtual ~TOutermostHits()
double EDeposit
Energy deposit.
bool GetBrokenIDs(ND::THandle< ND::TReconBase > object, std::vector< UInt_t > &brokenIDs1, std::vector< UInt_t > &brokenIDs2)
An object to store subdetector-agnostic hit information.
int Charge
Charge of the constituent track.
void FillKinematics(ND::THandle< ND::TReconState > state, TLorentzVector &pos, TVector3 &dir, double &mom, double &momErr, double &charge, double(&cov)[7][7])
double PEField
Placeholder for momentum of EField refit.
ClassDef(TGlobalReconModule::TFGDObject, 1)
FGD Node Energy Deposits.
double sigmaE_pion
Expected energy uncertainty for a pion.
double MomentumAtTrueVertex
Momentum at the true vertex.
TVector3 chargeWeightedPos[2]
Charge weighted average hit position in FGD1 chargeWeightedPos[0]) and 2 (chargeWeightedPos[1]) ...
int ParticleId
the PDG code obtained in the recon combined PID
double PID_Circularity
The circularity of the object.
double avgtime
Average fully corrected SFG hit time.
int NDOF
For Vertices created using -O TGlobalReconModule=UseECalVertices the quality denotes.
double BackMomentumError
the error on the momentum of the object
void FillConfigTree(TTree *configTree)
Int_t fNFgdTimeBins
Number of hit time bins in the FGD as determined by fgdRecon.
TClonesArray * TPC
TPC specific variables.
double minTime
Bin start time.
std::vector< float > FGD2HitQ
Vector to store the charge of each hit in FGD2.
unsigned long Detectors
Detectors used, defined according to the algorithm in GetDetectorNumber.
TECALObject hackECALObject
This is just here to fool TFile::MakeProject, not a real object.
int PrimaryIndex
The index of the corresponding primary vertex.
int NNodes
The number of nodes.
ND::THandle< ND::TG4Trajectory > GetG4Trajectory(const ND::TReconBase &object, double &pur, double &eff)
TGlobalHit hitMaxZ
Hit with highest Z position.
double RangeMomentumEndToTPCElectron
the momentum by range for the electron hypothesis (from end to a TPC)
double BackCharge
the momentum of the object at the back state
virtual ~TGlobalReconModule()
TLorentzVector EntrancePosition[NDETSEXTRAP]
The position of the object at the entrance of each subdetector.
double fgdEA_verNextNearQ_rect
FGD end activity values.
double E_exp_electron
Expected energy deposit for an electron.
std::vector< int > fgdhits_Layer
Vector to store the layer number of each hit.
double sigmaE_muon
Expected energy uncertainty for a muon.
double ChargeAtTrueVertex
Charge at the true vertex.
std::vector< double > NodeEDeposit
TClonesArray * fTPCOthers
The vector of TPC other objects (TTPCOtherObject).
double Containment
Containment: contained = 1.0, not-contained = 0.0, default = -1.0. An object is classed as contained ...
double PID_Angle
The zenith angle with respect to each detector.
dict::dictionary< int > fDetIndex
double EDeposit
The deposited charge for the object.
TVector3 Direction
Direction of the corresponding object.
Int_t fNTPCUnused
Number of hits unused in the TPC.
bool DetectorUsed[NDETSUSED]
Detectors used (NDETSUSED = 23)
TVector3 BackDirectionVar
The direction variance of the object.
double Length
The total length of the object.
int NbFittedHorizontalClusters
The number of horizontal clusters contributed to the fit, TREx.
ClassDef(TGlobalReconModule::TECALObject, 2)
double FrontMomentum
the momentum of the object
double Charge
Charge from the TPC pid (+1, or -1)
int Layer
SMRD hit layer number.
Int_t fNFGD
Number of objects containing the FGD.
double EMEnergyFit_Uncertainty
The uncertainty of the EM energy fit to the cluster.
double fgdVA_verNextNextNearQ_rect
FGD vertex activity 2x7.
TVector3 EntranceDirection[NDETSEXTRAP]
The direction of the object at the entrance of each subdetector volume.
TSFGObject hackSFGObject
This is just here to fool TFile::MakeProject, not a real object.
double MomentumErrorAtTrueVertex
Error of the momentum at the true vertex.
Int_t fNTPCIso
Number of objects in the TPC only.
void FillTPCInfo(ND::THandle< ND::TReconBase > object, TGlobalPID &pid)
double MomentumErrorAtTrueVertex
The error of the momentum at the true vertex.
double maxTime
Bin end time.
An object to hold specific FGD variables.
double EntranceMomentum[NDETSEXTRAP]
The momentum of the object at the entrance of each subdetector.
float chargePerLayerAttenCorr[30]
std::vector< int > FGD1HitLayer
Vector to store the layer number of each hit in FGD1.
double fgdEA_verNextNearQ
FGD end activity values.
double fgdEA_verNextNextNearQ
FGD end activity values.
double PID_TransverseChargeRatio
A variable sensitive to the charge distribution in the plane transverse to a shower/track direction...
double PullNotSet
PullNotSet = 1 if the pull is not set, and 0 otherwise.
TClonesArray * FGD1Unused
The vector unused hits in FGD1.
int Yoke
Yoke ring number.
double PDist
Placeholder for momentum of BField refit.
int Type
Vertex type (0: Global vertex | 1: SFG vertex)
double fgdEA_verLayQ
FGD end activity values.
int PID
The TGlobalPID of the constituent track.
Int_t fNSFG
Number of objects containing the SFG.
Int_t fNPIDs
The number of global objects.
double PullProton
The FGD PID pull value for a proton.
ClassDef(TGlobalReconModule::TSfgTimeBin, 1)
std::vector< TLorentzVector > NodePosition
Vector to store the position and time of each node.
TVector3 DirVariance
Direction variance of the corresponding object.
double PullKaon
Pull for TPC pid kaon hypothesis.
Int_t fNTrECAL
Number of objects containing the TrECAL.
Int_t fNSMRD
Number of objects containing the SMRD.
Int_t fNSFGIso
Number of objects in the SFG only.
TClonesArray * fSMRDUnused
The vector unused hits in the SMRD (TSMRDHit).
Describes a reconstructed ECalObject.
double fgdVA_verNearQ_rect
FGD vertex activity 2x3.
Int_t fNSMRDLeftUnused
Number of hits unused in the SMRDLeft.
ND::THandle< ND::TReconBase > GetTrackerReconVersionOfFGDIsoTrack(ND::THandle< ND::TReconBase > object)
Int_t NSMRDs
Number of SMRD objects.
TClonesArray * SFG
SFG specific variables.
double fgdVA_otherUpQ
FGD vertex activity values.
Int_t NHitsSaved
Number of entries in the HitsSaved array.
ClassDef(TGlobalReconModule::TSFGObject, 1)
std::vector< std::vector< int > > NodeHits
Vector to store the hits contributing to each node.
bool DetectorUsed[NDETSUSED]
Detectors used. Index order from 0 to 26.
An object to describe a reconstructed PID.
std::vector< int > T0Source
The T0Source, the values are defined in TTPCFitStatusBranch.hxx, the TTPCT0Source enumeration...
Int_t fNSMRDTopUnused
Number of hits unused in the SMRDTop.
double MedianObjectTime(ND::THandle< ND::TReconBase > object)
std::vector< int > ParticleIds
the PDG codes obtained in the recon combined PID
void FillFirstLastHits(ND::THitSelection &hits, TGlobalPID &globalObject)
double Ccorr
Corrected truncated mean charge deposit in PID.
void FillAllHits(ND::THitSelection &hits, TGlobalPID &globalObject)
TSMRDObject hackSMRDObject
This is just here to fool TFile::MakeProject, not a real object.
This module summarizes the information from global reconstruction.
double fgdVA_totalCorrE
FGD vertex activity values.
Int_t NP0DECALs
Number of P0DECAL objects.
std::vector< TLorentzVector > NodePosition
FGD Node positions.
double x
Distance traveled in an FGD.
TVector3 Momentum
3-momentum of the constituent track
An object to hold a reconstructed vertex constituent track.
TVector3 ExitDirection[NDETSEXTRAP]
The direction of the object at the exit of each subdetector.
ClassDef(TGlobalReconModule::TGlobalPID, 1)
TGlobalHit hackSFGUnused
This is just here to fool TFile::MakeProject, not a real object.
TVector3 ExitDirectionErr[NDETSEXTRAP]
The error of the direction of the object at the exit of each subdetector.
std::vector< int > NHorRows
The number of horizontal clusters in the track.
double BackStateCov[7][7]
full covariance matrix for last state: pos, dir, qp
TP0DObject hackP0DObject
This is just here to fool TFile::MakeProject, not a real object.
int NHits
The number of hits.
double RangeMomentumPion
the momentum by range for the pion hypothesis
ClassDef(TGlobalReconModule::TP0DObject, 1)
std::vector< int > HitTrajID
Vector to store the ID of the Trajectory that created the hit.
An object to described a P0D shower.
ND::THandle< ND::TG4Trajectory > GetMainContributor(ND::THandle< ND::TMCHit > mch, ND::THandle< ND::TG4TrajectoryContainer > trajectories)
double Chi2
The chi2 of the fit.
bool SenseOK
Sense of object.
void FillSFGOther(ND::TND280Event &event)
void FillGlobalPIDAlternate(ND::THandle< ND::TG4Trajectory > G4track, ND::THandle< ND::TReconBase > object, TGlobalPIDAlternate &PIDAlternate)
double EDeposit
Deposited energy. Its value depends on if the object is reconstructed as track-like or shower-like If...
TClonesArray * SMRD
SMRD specific variables.
double E_exp_pion
Expected energy deposit for a pion.
std::vector< TLorentzVector > NodePosition
Int_t fNP0DECALIso
Number of objects in the P0DECAL only.
An object to hold specific SMRD variables.
std::vector< float > fgdhits_Charge
Vector to store the charge of each hit.
std::vector< double > PIDWeights
the PID likelihoods for combined PID
double EMEnergyFit_Result
The result from the EM energy fit to the cluster.
int Type
Object type, 0: Particle, 1: Track, 2: Cluster, 3: Shower, 4: Vertex.
int ProtonBraggCut
Bragg peak cut (only used for SFGD contained tracks)
double PIDWeightElec
PID weights for electron hypothesis.
std::vector< double > NodeEDeposit
Vector to store the energy deposit of each node.
double sigmaE_proton
Expected energy uncertainty for a proton.
double fgdEA_verNearQ
FGD end activity values.
TGlobalHit hitMinX
Hit with lowest X position.
double avgtime
Average fully corrected FGD hit time.
TVector3 DirectionVarAtTrueVertex
The direction variance at the true vertex.
double RangeMomentumPionFlip
the momentum by range for the flipped pion hypothesis
ClassDef(TGlobalReconModule::TTPCOtherObject, 1)
int Tower
SMRD Tower number.
TVector3 Width
TrackShower width Filled depending on FilledAsShower. * Track: ND::TReconTrack::GetWidth * Shower: Al...
void SayAvailableOpts(std::string indent="")
Subclasses should override this to let a user know what options are available.
std::vector< int > FGD2HitLayer
Vector to store the layer number of each hit in FGD2.
int NNodes
The number of nodes.
Int_t fNFGDIso
Number of objects in the FGD only.
void FillVertexInfo(ND::TND280Event &event, ND::THandle< ND::TReconObjectContainer > globalObjects)
std::vector< TVector3 > NodeDirection
Vector to store the direction of each node.
virtual bool FillTree(ND::TND280Event &)
Fill all the stuff that goes in the output tree.
double PullPion
Pull for TPC pid pion hypothesis.
TClonesArray * FGD
FGD specific variables.
TVector3 Position
Hit position in global ND coordinates [mm].
Int_t NFGD2Unused
Number of hits unused in FGD2.
TVector3 BackDirection
The direction of the object.
void FillOutermostHits(ND::THitSelection &hits, double charge_cut, TOutermostHits &outer)
ClassDef(TGlobalReconModule::TVertexConstituent, 1)
double FrontMomentum
the momentum of the object
bool IsCurvBack
A curving-back object.
double PID_Asymmetry
Ratio of the big width of an object by its small width.
Int_t NTrECALs
Number of TrECAL objects.
ND::THandle< ND::TG4PrimaryVertex > GetG4Vertex(const ND::TReconBase &object, double &pur, double &eff)
unsigned long Status
The status for the fit.
TVector3 BackDirectionVar
The direction variance of the object.
Int_t fNFGD1Unused
Number of hits unused in the FGD1.
void DoAssociationBetweenTrackerAndGlobalObjects(const ND::TReconObjectContainer &globalObjects, const ND::TReconObjectContainer &trackerObjects)
double dEdxexpPion
Estimated dE/dx for pion hypothesis.
virtual void InitializeModule()
Initialize Module, override if necessary.
TLorentzVector PositionVarAtTrueVertex
The position variance at the true vertex.
TVector3 DirectionAtTrueVertex
Direction at the true vertex.
TVector3 FrontDirectionVar
The direction variance of the object.
double EDeposit
The deposited charge for the object.
std::vector< float > SFGHitT
Vector to store the time of each hit in SFG.
std::string AlgorithmName
The name of the algorithm that created this object.
TClonesArray * P0D
P0D specific variables.
An object to store the outermost hits in x,y, and z.
TLorentzVector FrontPosition
The Front position of the object.
void GetFGDSimpleVA(ND::TND280Event &event, ND::THandle< ND::TReconBase > &object, TLorentzVector &vertexPos, int globpass, int vaea)
double fgdVA_downMaxZ
FGD vertex activity values.
void FillTrackerInfo(ND::THandle< ND::TReconBase > object, TGlobalPID &pid)
double fgdVA_downCosTheta
FGD vertex activity values.
TOutermostHits FGD2OutermostHits
A named collection of the outermost hits in X,Y, and Z from FGD2.
double PullMuon
Pull for TPC pid muon hypothesis.
void FillFGDInfo(ND::THandle< ND::TReconBase > object, TGlobalPID &pid)
TLorentzVector FrontPositionVar
The position variance;.
std::map< ND::THandle< ND::TReconBase >, int > fGlobalIndexMap
Describes a true G4 particle associated to a TGlobalPID.
double MomentumErrorAtTrueVertex
The momentum variance at the true vertex.
double E_exp_proton
Expected energy deposit for a proton.
std::vector< int > ParticleId
A vector of potential PIDs, sorted by weight, c.f. TP0DObject::PIDWeight.
double Time
Hit time [ns].
double dEdxexpProton
Estimated dE/dx for proton hypothesis.
bool isForward
Sense of object.
double fgdEA_otherDownQ
FGD end activity values.
int NDOF
The number of degrees of freedom.
int FilledAsType
Whether the object was filled as a shower (or a track.). This is NOT a PID. This lets you know how so...
void FillTrueVertex(bool, const ND::TG4PrimaryVertex &G4vertex, double pur, double eff, ND::TTrueVertex &vertex)
TClonesArray * ECAL
ECAL specific variables.
double BackMomentumError
the error on the momentum of the object
int Type
The hit 'type': (0=X,1=Y,2=Z)
An object to store information about an SFG Time Bin.
int GetNumberOfHits(ND::THandle< ND::TReconBase > object)
double BackMomentum
the momentum of the object
TClonesArray * Alternates
List of alternate hypotheses.
std::vector< UInt_t > BrokenUniqueIDs
the broken partners unique IDs
std::vector< double > HitCharge
Vector to store the charge of each hit.
std::string AlgorithmName
The name of the algorithm that created this object.
An object to hold specific TPC variables.
double PullEle
Pull for TPC pid electron hypothesis.
Int_t fNDsECALIso
Number of objects in the DsECAL only.
TLorentzVector EntrancePositionErr[NDETSEXTRAP]
The error of the position of the object at the entrance of each subdetector.
TVector3 BackDirection
The Back direction of the object.
TVector3 ThrustAxis
The thrust axis.
unsigned long Status
The status for the fit, from: object->CheckStatus(object->kSuccess).
std::vector< int > SFGHitTrajID
Vector to store the ID of the Trajectory that created the hit in SFG.
void FillECALInfo(ND::THandle< ND::TReconBase > object, TGlobalPID &pid)
TVector3 Cone
The opening angles of the cone (only for showers)
TClonesArray * fTPCPIDs
For tests only (TTpcPID).
TTPCObject hackTPCObject
This is just here to fool TFile::MakeProject, not a real object.
TLorentzVector PositionAtTrueVertex
Position at true vertex.
double AverageHitTime
The charged weighted average time for the ECal cluster.
double E_exp_muon
Expected energy deposit for a muon.
double PIDWeight
the PID weight for this hypothesis
TGlobalHit hitMinY
Hit with lowest Y position.
bool fTestTPCInfo
For tests only.
TGlobalHit hitMaxX
Hit with highest X position.
bool FillVertex(ND::TND280Event &event, ND::THandle< ND::TReconVertex > vertex, bool primary)
int fgdContainment
Fully contained PID information.
int InnerMostLayerHit
Zero-indexed layer number of tracker-closest layer with an ECal hit belonging to this object...
double PID_FrontBackRatio
The ratio of the charge in equal length blocks at each end of the track.
double RangeMomentumElectronFlip
the momentum by range for the flipped electron hypothesis
double dEdxexpKaon
Estimated dE/dx for kaon hypothesis.
double fgdVA_verNextNearQ_rect
FGD vertex activity 2x5.
double Width
The width of the shower (perpendicular to the direction).
double fgdEA_otherUpQ
FGD end activity End (1) or Exit (2)
TTrackerObject hackTrackerObject
This is just here to fool TFile::MakeProject, not a real object.
int Type
The hit 'type': (0=X,1=Y,2=Z)
ClassDef(TGlobalReconModule::TSMRDHit, 1)
TClonesArray * P0DECAL
P0DECAL specific variables.
Int_t fNSMRDBottomUnused
Number of hits unused in the SMRDBottom.
double EntranceMomentumErr[NDETSEXTRAP]
The error of the momentum of the object at the entrance of each subdetector.
std::vector< float > FGD2HitPosition
Vector to store the X or Y position of each hit in FGD2.
ClassDef(TGlobalReconModule::TGlobalHit, 1)
Int_t fNSMRDUnused
Number of all hits unused in the SMRD.
int NConstituents
The number of constituents.
std::vector< float > fgdhits_Time
Vector to store the time of each hit.
Int_t fNSVertices
Number of added secondary vertices.
Int_t fNFGD2Unused
Number of hits unused in the FGD2.
TVector3 chargeWeightedPos
Charge weighted average hit position in SFG.
double BackMomentumError
the error on the momentum of the object
Int_t fNP0DIso
Number of objects in the P0D only.
TLorentzVector PositionAtTrueVertex
Position at the true vertex.
double Length
The length of the track or shower (RMS)
int NDOF
The number of degrees of freedom.
std::map< ND::THandle< ND::TReconBase >, std::vector< UInt_t > > fBrokenIndexMap
An object to hold specific SFG variables.
TLorentzVector BackPositionVar
The position variance;.
TTrueParticle TrueParticle
The true particle.
void MatchTrueVertex(ND::THandle< ND::TG4PrimaryVertexContainer > g4PrimVert)
double LLR_Quality
PID quality flag. A non-zero indicates an bad quality. If this value is non-zero the PID values are s...
double PIDWeightPion
PID weights for pion hypothesis.
double FrontStateCov[7][7]
full covariance matrix for front state: pos, dir, qp
TVector3 ThrustOrigin
The origin point of the thrust.
TLorentzVector PositionAtTrueVertex
The position at the true vertex.
double SigmaProton
Sigma estimated width of TPC pid proton hypothesis.
TOutermostHits FGD1OutermostHits
A named collection of the outermost hits in X,Y, and Z from FGD1.
bool isForward
Sense of object.
double AverageZPosition
Unweighted average Z position of object-constituent hits.
std::vector< TLorentzVector > HitPosition
Vector to store the position of each hit.
Int_t fNTPCPIDs
For tests only.
TLorentzVector FrontPosition
The position of the object.
std::vector< int > FGD2HitTrajID
Vector to store the ID of the Trajectory that created the hit in FGD1.
double FrontMomentumError
the error on the momentum of the object
void FillSubBaseObject(ND::THandle< ND::TReconBase > object, TSubBaseObject &sub, int det)
double RangeMomentumProtonFlip
the momentum by range for the flipped proton hypothesis
bool IsFgdECalIncremental
A track created by FGD-ECal matching algorithm.
std::vector< TLorentzVector * > ExitPosition
the position of the object at the exit of each subdetector
double fgdVA_upMinZ
FGD vertex activity Vertex (1) or Entrance (2)
std::string GetObjectType(ND::THandle< ND::TReconBase > object)
double RangeMomentumMuon
the momentum by range for the muon hypothesis
double StateCovAtTrueVertex[7][7]
Full covariance matrix for the state: pos, dir, qp at the true vertex.
double Time
Hit time [ns].
void FillBrokenTracksMap(const ND::TReconObjectContainer &globalObjects)
double fEarliestTrackMedianHitTime
Median hit time of the earliest track.
int Wall
SMRD wall number, 0=Top, 1=Bottom, 2= Right, 3= Left.
double Thrust
The thrust value.
double Quality
Quality (chi2) of the constituent track.
TVector3 PositionError
The variance on ND::TGlobalReconModule::TSMRDHit::Position [mm].
std::vector< int > TPCGasJunctionIDs
The IDs of the TREx junctions which contributed to the object.
double sigmaE_electron
Expected energy uncertainty for an electron.
double fgdVA_upCosTheta
FGD vertex activity values.
ClassDef(TGlobalReconModule::TTrackerObject, 1)
An object to describe the true G4 vertex associated to the TGlobalVertex.
std::vector< float > FGD1HitTrueE
Vector to store the true edeposit of each hit in FGD1.
void FillTPCOther(ND::TND280Event &event)
TVector3 EntranceDirectionErr[NDETSEXTRAP]
The error of the direction of the object at the entrance of each subdetector.
Int_t NFGD1Unused
Number of hits unused in FGD1.
double LLR_EM_HIP
Value to separate light tracks/MIP-like objects (e.g. muons) from heavy tracks / Highly-ionising part...
std::string AlgorithmName
The name of the algorithm that created this object.
TVector3 BackDirection
The direction of the object.
An object to store information about an FGD Time Bin.
TOutermostHits fP0DOutermostHits
Outermost hits in the P0D.
ClassDef(TGlobalReconModule::TTpcPID, 1)
int NHits
The number of hits.
void CheckFGDdist(TLorentzVector &FGDPos, TVector3 fFGDActiveMin, TVector3 fFGDActiveMax)
virtual ~TTPCOtherObject()
TGlobalReconModule(const char *name="Global", const char *title="Global Recon Module")
Default Constructor.
double RangeMomentumElectron
the momentum by range for the electron hypothesis
virtual ~TVertexConstituent()
void FillP0DECALInfo(ND::THandle< ND::TReconBase > object, TGlobalPID &pid)
double fgdVA_otherDownQ
FGD vertex activity values.
double rawChargeSum
Summed hit charge in SFG.
TClonesArray * TrueVertices
The true vertex.
Provides data members common to reconstructed showers from all sub detectors.
double Chi2
The chi2 of the fit.
double rawChargeSum[2]
Summed hit charge in FGD1 (rawChargeSum[0]), and 2 (rawChargeSum[1])
void FillExtrapolationToDetectors(ND::THandle< ND::TReconBase > object, TGlobalPID &globalObject)
Int_t fNSFGUnused
Number of hits unused in the SFG.
int nHits[2]
Number of hits in FGD1 (nHits[0]), and 2 (nHits[1])
std::vector< float > SFGHitQ
Vector to store the charge of each hit in SFG.
TVector3 Position
Hit position in global ND coordinates [mm].
Provides data members common to reconstructed objects from all sub detectors.
TGlobalHit hitMaxY
Hit with highest Y position.
virtual ~TTrackerObject()
TClonesArray * fPIDs
The vector of TGlobalPID.
TVector3 FrontDirection
The direction of the object.
std::vector< TVector3 > fgdhits_Position
Vector to store the X or Y position of each hit.
void FillGlobalPIDs(ND::TND280Event &event, ND::THandle< ND::TReconBase > object)
std::vector< int > NVerRows
The number of vertical clusters in the track.
double ExitMomentum[NDETSEXTRAP]
The momentum of the object at the exit of each subdetector.
TVector3 Cone
The opening angles of the cone (only for showers)
double FrontMomentum
the momentum of the object
An object to describe a reconstructed primary vertex candidate.
double fgdVA_verLayQ
FGD vertex activity values.
std::vector< float > FGD1HitQ
Vector to store the charge of each hit in FGD1.
std::vector< TLorentzVector * > EntrancePosition
the position of the object at the entrance of each subdetector
ND::THandle< ND::TG4Trajectory > GetParent(ND::THandle< ND::TG4Trajectory > G4track)
Int_t fNSMRDIso
Number on objects in the SMRD only.
TLorentzVector FrontPosition
the PID likelihoods for combined PID
Int_t NTPCs
Number of TPC objects.
void FillKinematicsAtTrueVertex(ND::THandle< ND::TG4Trajectory > G4track, ND::THandle< ND::TReconBase > object, TLorentzVector &pos, TVector3 &dir, double &mom, double &momErr, double &charge, double(&cov)[7][7])
TVector3 PositionError
The variance on ND::TGlobalReconModule::TGlobalHit::Position [mm].
TVector3 DirectionAtTrueVertex
The direction at the true vertex.
Int_t fNP0DUnused
Number of hits unused in the P0D.
TGlobalHit hitMinZ
Hit with lowest Z position.
Int_t NTrueVertices
The true vertex.
unsigned long Status
The status for the fit.
void FillSmrdHit(ND::THandle< ND::THit > hit, TSMRDHit &smrdHit)
unsigned long Detectors
Detectors used.
int g4ID
The ID for the G4 trajectory that contributed most to this time bin.
TLorentzVector FrontPositionVar
The position variance;.
TLorentzVector Variance
The position variance;.
std::vector< TLorentzVector > HitPosVariance
Vector to store the variance of the position of each hit.
double E
Measured energy in an FGD.
Int_t NConstituents
Constituent tracks.
double dEdxexpEle
Estimated dE/dx for electron hypothesis.
std::vector< TLorentzVector > NodePosVariance
Vector to store the variance on the position and time of each node.
double Width
The width of the shower (perpendicular to the direction)
virtual ~TGlobalPIDAlternate()
surface_vector fDetSurfaces[NDETSEXTRAP]
std::vector< int > FGD1HitTrajID
Vector to store the ID of the Trajectory that created the hit in FGD1.
double fgdVA_verNextNextNearQ
FGD vertex activity values.
Int_t NP0Ds
Number of P0D objects.
ClassDef(TGlobalReconModule::TTPCObject, 1)
TOutermostHits SFGOutermostHits
A named collection of the outermost hits in X,Y, and Z from SFG.
TFGDObject hackFGDObject
This is just here to fool TFile::MakeProject, not a real object.
A base class for analysis output modules which contain reconstructed event information.
TLorentzVector BackPosition
The Back position of the object.
int nHits
Number of hits in SFG.
Int_t NAlternates
Number of entries in the alternate hypotheses list.
double Width
The width of the shower (perpendicular to the direction)
ClassDef(TGlobalReconModule::TFgdTimeBin, 1)
Int_t fNSfgTimeBins
Number of hit time bins in the SFG as determined by sfgRecon.
void GetHitsAssociatedToG4Trajectory(const ND::THitSelection &hits, ND::THandle< ND::TG4Trajectory > traj, ND::THitSelection &traj_hits)
int NbFittedVerticalClusters
The number of vertical clusters contributed to the fit, TREx.
TClonesArray * SFGUnused
The vector unused hits in SFG.
double NTrun
70% of the number of cluster
TTrueParticle TrueParticle
The true particle.
double EDeposit
Energy deposit of the corresponding object.
Bool_t Configure(std::string &opt)
A function that allows the module to be configured from an external class without any dependencies...