From 0064eb22ed9b9ec3bb668751a2ddcf996bddf9c3 Mon Sep 17 00:00:00 2001 From: jonzarling Date: Mon, 20 Jun 2022 18:41:00 -0400 Subject: [PATCH] Add ability to access NumBlocks_FCAL in DSelectors (this was the only missing feature branch for FCAL shower classifiers) --- libraries/DSelector/DNeutralParticleHypothesis.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/libraries/DSelector/DNeutralParticleHypothesis.h b/libraries/DSelector/DNeutralParticleHypothesis.h index 2c4d211..4c95eff 100644 --- a/libraries/DSelector/DNeutralParticleHypothesis.h +++ b/libraries/DSelector/DNeutralParticleHypothesis.h @@ -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 @@ -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; @@ -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: @@ -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));