Skip to content

Commit

Permalink
Merge pull request #124 from JeffersonLab/PidFomUpdates
Browse files Browse the repository at this point in the history
Pid fom updates
  • Loading branch information
sdobbs authored Jul 14, 2020
2 parents 7fbe145 + 41cf065 commit 640461c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
16 changes: 16 additions & 0 deletions libraries/DSelector/DChargedTrackHypothesis.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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
{
Expand Down
6 changes: 6 additions & 0 deletions libraries/DSelector/DSelector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,9 @@ void DSelector::Create_FlatBranches(DKinematicData* locParticle, bool locIsMCFla
dFlatTreeInterface->Create_Branch_NoSplitTObject<TLorentzVector>(locBranchPrefix + "_p4_true");
}

// Global PID
dFlatTreeInterface->Create_Branch_Fundamental<Float_t>(locBranchPrefix + "_pid_fom");

//timing
dFlatTreeInterface->Create_Branch_Fundamental<Float_t>(locBranchPrefix + "_beta_time");
dFlatTreeInterface->Create_Branch_Fundamental<Float_t>(locBranchPrefix + "_chisq_time");
Expand Down Expand Up @@ -800,6 +803,9 @@ void DSelector::Fill_FlatBranches(DKinematicData* locParticle, bool locIsMCFlag)
dFlatTreeInterface->Fill_TObject<TLorentzVector>(locBranchPrefix + "_p4_true", TLorentzVector());
}
}

// Global PID
dFlatTreeInterface->Fill_Fundamental<Float_t>(locBranchPrefix + "_pid_fom", locChargedTrackHypothesis->Get_PIDFOM());

//timing
dFlatTreeInterface->Fill_Fundamental<Float_t>(locBranchPrefix + "_beta_time", locChargedTrackHypothesis->Get_Beta_Timing());
Expand Down

0 comments on commit 640461c

Please sign in to comment.