Skip to content

Commit

Permalink
Merge pull request #163 from JeffersonLab/jzNumBlocks_FCALbranch
Browse files Browse the repository at this point in the history
Add ability to access NumBlocks_FCAL in DSelectors (this was the only…
  • Loading branch information
jonzarling authored Jun 20, 2022
2 parents cb5b07b + 0064eb2 commit c2ce427
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions libraries/DSelector/DNeutralParticleHypothesis.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class DNeutralParticleHypothesis : public DKinematicData
Float_t Get_E9E25_FCAL(void) const;
Float_t Get_SumU_FCAL(void) const;
Float_t Get_SumV_FCAL(void) const;
Float_t Get_NumBlocks_FCAL(void) const;

//TRACK MATCHING
Float_t Get_TrackBCAL_DeltaPhi(void) const; //999.0 if not matched //units are radians
Expand Down Expand Up @@ -131,6 +132,7 @@ class DNeutralParticleHypothesis : public DKinematicData
TBranch* dBranch_E9E25_FCAL;
TBranch* dBranch_SumU_FCAL;
TBranch* dBranch_SumV_FCAL;
TBranch* dBranch_NumBlocks_FCAL;

//TRACK MATCHING
TBranch* dBranch_TrackBCAL_DeltaPhi;
Expand Down Expand Up @@ -251,6 +253,9 @@ inline void DNeutralParticleHypothesis::Setup_Branches(void)
locBranchName = "NeutralHypo__SumV_FCAL";
dBranch_SumV_FCAL = dTreeInterface->Get_Branch(locBranchName);

locBranchName = "NeutralHypo__NumBlocks_FCAL";
dBranch_NumBlocks_FCAL = dTreeInterface->Get_Branch(locBranchName);



//TRACK MATCHING:
Expand Down Expand Up @@ -483,6 +488,14 @@ inline Float_t DNeutralParticleHypothesis::Get_SumV_FCAL(void) const
return ((Float_t*)dBranch_SumV_FCAL->GetAddress())[dMeasuredArrayIndex];
}

inline Float_t DNeutralParticleHypothesis::Get_NumBlocks_FCAL(void) const
{
if(dBranch_NumBlocks_FCAL == NULL)
return -1.;
else
return ((Float_t*)dBranch_NumBlocks_FCAL->GetAddress())[dMeasuredArrayIndex];
}

inline TLorentzVector DNeutralParticleHypothesis::Get_X4_Shower(void) const
{
return *((TLorentzVector*)(*dX4_Shower)->At(dMeasuredArrayIndex));
Expand Down

0 comments on commit c2ce427

Please sign in to comment.