Skip to content

Commit c7f218a

Browse files
authored
Merge pull request #181 from JeffersonLab/ecal_tree
add ECAL showers
2 parents f7897b0 + 27bd388 commit c7f218a

File tree

4 files changed

+53
-0
lines changed

4 files changed

+53
-0
lines changed

libraries/DSelector/DChargedTrackHypothesis.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ class DChargedTrackHypothesis : public DKinematicData
8686
Float_t Get_SumU_FCAL(void) const;
8787
Float_t Get_SumV_FCAL(void) const;
8888

89+
Float_t Get_Energy_ECAL(void) const;
90+
8991
//SHOWER MATCHING
9092
Float_t Get_TrackBCAL_DeltaPhi(void) const; //999.0 if not matched //units are radians
9193
Float_t Get_TrackBCAL_DeltaZ(void) const; //999.0 if not matched
@@ -172,6 +174,8 @@ class DChargedTrackHypothesis : public DKinematicData
172174
TBranch* dBranch_E9E25_FCAL;
173175
TBranch* dBranch_SumU_FCAL;
174176
TBranch* dBranch_SumV_FCAL;
177+
178+
TBranch* dBranch_Energy_ECAL;
175179

176180
//SHOWER MATCHING
177181
TBranch* dBranch_TrackBCAL_DeltaPhi;
@@ -353,6 +357,9 @@ inline void DChargedTrackHypothesis::Setup_Branches(void)
353357
locBranchName = "ChargedHypo__SumV_FCAL";
354358
dBranch_SumV_FCAL = dTreeInterface->Get_Branch(locBranchName);
355359

360+
locBranchName = "ChargedHypo__Energy_ECAL";
361+
dBranch_Energy_ECAL = dTreeInterface->Get_Branch(locBranchName);
362+
356363
//SHOWER MATCHING:
357364
locBranchName = "ChargedHypo__TrackBCAL_DeltaPhi";
358365
dBranch_TrackBCAL_DeltaPhi = dTreeInterface->Get_Branch(locBranchName);
@@ -693,6 +700,10 @@ inline Float_t DChargedTrackHypothesis::Get_SumV_FCAL(void) const
693700
return ((Float_t*)dBranch_SumV_FCAL->GetAddress())[dMeasuredArrayIndex];
694701
}
695702

703+
inline Float_t DChargedTrackHypothesis::Get_Energy_ECAL(void) const
704+
{
705+
return ((Float_t*)dBranch_Energy_ECAL->GetAddress())[dMeasuredArrayIndex];
706+
}
696707

697708
//SHOWER MATCHING:
698709
inline Float_t DChargedTrackHypothesis::Get_TrackBCAL_DeltaPhi(void) const

libraries/DSelector/DNeutralParticleHypothesis.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ class DNeutralParticleHypothesis : public DKinematicData
7575
Float_t Get_SumV_FCAL(void) const;
7676
Float_t Get_NumBlocks_FCAL(void) const;
7777
Float_t Get_TrackFCAL_DeltaT(void) const;
78+
79+
Float_t Get_Energy_ECAL(void) const;
80+
Float_t Get_NumBlocks_ECAL(void) const;
7881

7982
//TRACK MATCHING
8083
Float_t Get_TrackBCAL_DeltaPhi(void) const; //999.0 if not matched //units are radians
@@ -136,6 +139,9 @@ class DNeutralParticleHypothesis : public DKinematicData
136139
TBranch* dBranch_NumBlocks_FCAL;
137140
TBranch* dBranch_TrackFCAL_DeltaT;
138141

142+
TBranch* dBranch_Energy_ECAL;
143+
TBranch* dBranch_NumBlocks_ECAL;
144+
139145
//TRACK MATCHING
140146
TBranch* dBranch_TrackBCAL_DeltaPhi;
141147
TBranch* dBranch_TrackBCAL_DeltaZ;
@@ -261,7 +267,11 @@ inline void DNeutralParticleHypothesis::Setup_Branches(void)
261267
locBranchName = "NeutralHypo__TrackFCAL_DeltaT";
262268
dBranch_TrackFCAL_DeltaT = dTreeInterface->Get_Branch(locBranchName);
263269

270+
locBranchName = "NeutralHypo__Energy_ECAL";
271+
dBranch_Energy_ECAL = dTreeInterface->Get_Branch(locBranchName);
264272

273+
locBranchName = "NeutralHypo__NumBlocks_ECAL";
274+
dBranch_NumBlocks_ECAL = dTreeInterface->Get_Branch(locBranchName);
265275

266276
//TRACK MATCHING:
267277
locBranchName = "NeutralHypo__TrackBCAL_DeltaPhi";
@@ -509,6 +519,19 @@ inline Float_t DNeutralParticleHypothesis::Get_TrackFCAL_DeltaT(void) const
509519
return ((Float_t*)dBranch_TrackFCAL_DeltaT->GetAddress())[dMeasuredArrayIndex];
510520
}
511521

522+
inline Float_t DNeutralParticleHypothesis::Get_Energy_ECAL(void) const
523+
{
524+
return ((Float_t*)dBranch_Energy_ECAL->GetAddress())[dMeasuredArrayIndex];
525+
}
526+
527+
inline Float_t DNeutralParticleHypothesis::Get_NumBlocks_ECAL(void) const
528+
{
529+
if(dBranch_NumBlocks_ECAL == NULL)
530+
return -1.;
531+
else
532+
return ((Float_t*)dBranch_NumBlocks_ECAL->GetAddress())[dMeasuredArrayIndex];
533+
}
534+
512535
inline TLorentzVector DNeutralParticleHypothesis::Get_X4_Shower(void) const
513536
{
514537
return *((TLorentzVector*)(*dX4_Shower)->At(dMeasuredArrayIndex));

libraries/DSelector/DSelector.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ void DSelector::Setup_Branches(void)
9797
dL1BCALEnergy = (locL1BCALEnergyBranch != NULL) ? (Double_t*)locL1BCALEnergyBranch->GetAddress() : NULL;
9898
TBranch* locL1FCALEnergyBranch = dTreeInterface->Get_Branch("L1FCALEnergy");
9999
dL1FCALEnergy = (locL1FCALEnergyBranch != NULL) ? (Double_t*)locL1FCALEnergyBranch->GetAddress() : NULL;
100+
TBranch* locL1ECALEnergyBranch = dTreeInterface->Get_Branch("L1ECALEnergy");
101+
dL1ECALEnergy = (locL1ECALEnergyBranch != NULL) ? (Double_t*)locL1ECALEnergyBranch->GetAddress() : NULL;
102+
TBranch* locL1FCAL2EnergyBranch = dTreeInterface->Get_Branch("L1FCAL2Energy");
103+
dL1FCAL2Energy = (locL1FCAL2EnergyBranch != NULL) ? (Double_t*)locL1FCAL2EnergyBranch->GetAddress() : NULL;
100104

101105
// MC
102106
if(dIsMCFlag)

libraries/DSelector/DSelector.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ class DSelector : public TSelector
9292
UInt_t Get_L1TriggerBits(void) const;
9393
Double_t Get_L1BCALEnergy(void) const;
9494
Double_t Get_L1FCALEnergy(void) const;
95+
Double_t Get_L1ECALEnergy(void) const;
96+
Double_t Get_L1FCAL2Energy(void) const;
9597
Bool_t Get_IsThrownTopology(void) const;
9698
Float_t Get_MCWeight(void) const;
9799
Float_t Get_GeneratedEnergy(void) const;
@@ -155,6 +157,8 @@ class DSelector : public TSelector
155157
UInt_t* dL1TriggerBits;
156158
Double_t* dL1BCALEnergy;
157159
Double_t* dL1FCALEnergy;
160+
Double_t* dL1ECALEnergy;
161+
Double_t* dL1FCAL2Energy;
158162
Float_t* dMCWeight; //only present if simulated data
159163
Float_t* dGeneratedEnergy; //only present if simulated data
160164
Bool_t* dIsThrownTopology; //only present if simulated data
@@ -207,6 +211,7 @@ inline DSelector::DSelector(TTree* locTree) :
207211
dBeamWrapper(NULL), dComboWrapper(NULL), dAnalysisActions(vector<DAnalysisAction*>()),
208212
dFile(NULL), dOutputFlatTreeFile(NULL), dProofFile(NULL), dOutputFlatTreeProofFile(NULL),
209213
dTreeNumber(0), dRunNumber(NULL), dEventNumber(NULL), dL1TriggerBits(NULL), dMCWeight(NULL), dGeneratedEnergy(NULL), dIsThrownTopology(NULL), dX4_Production(NULL),
214+
dL1BCALEnergy(NULL), dL1FCALEnergy(NULL), dL1ECALEnergy(NULL), dL1FCAL2Energy(NULL),
210215
dNumBeam(NULL), dNumChargedHypos(NULL), dNumNeutralHypos(NULL), dNumCombos(NULL), dNumThrown(NULL),
211216
dNumPIDThrown_FinalState(NULL), dPIDThrown_Decaying(NULL) {}
212217

@@ -238,6 +243,16 @@ inline Double_t DSelector::Get_L1FCALEnergy(void) const
238243
return *dL1FCALEnergy;
239244
}
240245

246+
inline Double_t DSelector::Get_L1ECALEnergy(void) const
247+
{
248+
return *dL1ECALEnergy;
249+
}
250+
251+
inline Double_t DSelector::Get_L1FCAL2Energy(void) const
252+
{
253+
return *dL1FCAL2Energy;
254+
}
255+
241256
inline Bool_t DSelector::Get_IsThrownTopology(void) const
242257
{
243258
return ((dIsThrownTopology != NULL) ? *dIsThrownTopology : false);

0 commit comments

Comments
 (0)