diff --git a/libraries/DSelector/DChargedTrackHypothesis.h b/libraries/DSelector/DChargedTrackHypothesis.h index 967aac4..947f31d 100644 --- a/libraries/DSelector/DChargedTrackHypothesis.h +++ b/libraries/DSelector/DChargedTrackHypothesis.h @@ -32,6 +32,9 @@ class DChargedTrackHypothesis : public DKinematicData Int_t Get_ThrownIndex(void) const; //the array index of the thrown particle it is matched with (-1 for no match) //only present if simulated data Int_t Get_ID(void) const{return Get_TrackID();} + // Global PID + Float_t Get_PIDFOM(void) const; + //TRACKING INFO UInt_t Get_NDF_Tracking(void) const; Float_t Get_ChiSq_Tracking(void) const; @@ -102,6 +105,9 @@ class DChargedTrackHypothesis : public DKinematicData TBranch* dBranch_TrackID; TBranch* dBranch_ThrownIndex; + // GLOBAL PID + TBranch* dBranch_PIDFOM; + //TRACKING INFO TBranch* dBranch_NDF_Tracking; TBranch* dBranch_ChiSq_Tracking; @@ -174,6 +180,10 @@ inline void DChargedTrackHypothesis::Setup_Branches(void) locBranchName = "ChargedHypo__ThrownIndex"; dBranch_ThrownIndex = dTreeInterface->Get_Branch(locBranchName); + + // GLOBAL PID + locBranchName = "ChargedHypo__PIDFOM"; + dBranch_PIDFOM = dTreeInterface->Get_Branch(locBranchName); //TRACKING INFO locBranchName = "ChargedHypo__NDF_Tracking"; @@ -433,6 +443,12 @@ inline DetectorSystem_t DChargedTrackHypothesis::Get_Detector_System_Timing(void return SYS_NULL; } +// Global PID +inline Float_t DChargedTrackHypothesis::Get_PIDFOM(void) const +{ + return ((Float_t*)dBranch_PIDFOM->GetAddress())[dMeasuredArrayIndex]; +} + //HIT ENERGY inline Float_t DChargedTrackHypothesis::Get_dEdx_TOF(void) const { diff --git a/libraries/DSelector/DSelector.cc b/libraries/DSelector/DSelector.cc index 4ecad15..8cee608 100644 --- a/libraries/DSelector/DSelector.cc +++ b/libraries/DSelector/DSelector.cc @@ -567,6 +567,9 @@ void DSelector::Create_FlatBranches(DKinematicData* locParticle, bool locIsMCFla dFlatTreeInterface->Create_Branch_NoSplitTObject(locBranchPrefix + "_p4_true"); } + // Global PID + dFlatTreeInterface->Create_Branch_Fundamental(locBranchPrefix + "_pid_fom"); + //timing dFlatTreeInterface->Create_Branch_Fundamental(locBranchPrefix + "_beta_time"); dFlatTreeInterface->Create_Branch_Fundamental(locBranchPrefix + "_chisq_time"); @@ -800,6 +803,9 @@ void DSelector::Fill_FlatBranches(DKinematicData* locParticle, bool locIsMCFlag) dFlatTreeInterface->Fill_TObject(locBranchPrefix + "_p4_true", TLorentzVector()); } } + + // Global PID + dFlatTreeInterface->Fill_Fundamental(locBranchPrefix + "_pid_fom", locChargedTrackHypothesis->Get_PIDFOM()); //timing dFlatTreeInterface->Fill_Fundamental(locBranchPrefix + "_beta_time", locChargedTrackHypothesis->Get_Beta_Timing());