1 #include "FGDTrackEffSystematics.hxx" 2 #include "ND280AnalysisUtils.hxx" 3 #include "EventBoxTracker.hxx" 4 #include "SystematicUtils.hxx" 6 #include "EventBoxId.hxx" 9 FGDTrackEffSystematics::FGDTrackEffSystematics(
bool comp):
EventWeightBase(1){
15 _computecounters = comp;
16 _fgd1 =
new BinnedParams(
"FGD1TrackEff_p5F",BinnedParams::k1D_EFF_SYMMETRIC);
18 if( _computecounters) {
19 _fgd1->InitializeEfficiencyCounter();
34 _fgd1->InitializeEfficiencyCounter();
48 Float_t costheta = trueTrack->
Direction[2];
51 bool found = (recoTrack);
56 if( !_fgd1->GetBinValues(fabs(costheta), params, index))
continue;
58 _fgd1->UpdateEfficiencyCounter(index,found);
60 else return eventWeight;
66 eventWeight *= systUtils::ComputeEffLikeWeight(found, toy,
GetIndex(), index, params);
77 EventBoxB* EventBox =
event.EventBoxes[EventBoxId::kEventBoxTracker];
82 AnaRecObjectC* track = EventBox->RecObjectsInGroup[EventBoxTracker::kTracksWithTPC][i];
83 if (CheckTrueRecoAssociation(trueTrack, *track))
88 if(fabs(static_cast<const AnaTrueParticleB*>(&trueTrack)->Direction[2]) < 0.3 )
return false;
99 if (det == SubDetId::kFGD1){
100 IDs[0] = EventBoxTracker::kTracksWithFGD1AndNoTPC;
103 else if (det == SubDetId::kFGD2){
104 IDs[0] = EventBoxTracker::kTracksWithFGD2AndNoTPC;
107 else if (det == SubDetId::kFGD){
108 IDs[0] = EventBoxTracker::kTracksWithFGD1AndNoTPC;
109 IDs[1] = EventBoxTracker::kTracksWithFGD2AndNoTPC;
122 if (det == SubDetId::kFGD1){
123 IDs[0] = EventBoxTracker::kTrueParticlesChargedInFGD1AndNoTPCInBunch;
126 else if (det == SubDetId::kFGD2){
127 IDs[0] = EventBoxTracker::kTrueParticlesChargedInFGD2AndNoTPCInBunch;
130 else if (det == SubDetId::kFGD){
131 IDs[0] = EventBoxTracker::kTrueParticlesChargedInFGD1AndNoTPCInBunch;
132 IDs[1] = EventBoxTracker::kTrueParticlesChargedInFGD2AndNoTPCInBunch;
Int_t GetIndex() const
Return the index of this systematic.
Int_t GetRelevantRecObjectGroups(const SelectionBase &sel, Int_t ibranch, Int_t *IDs) const
Get the TrackGroup IDs array for this systematic.
Int_t SelectionEnabledIndex
The enabled index of this selection this ToyBox belongs to.
SubDetId_h DetectorFV
Indicate the FV we are interested in.
SystBoxB * GetSystBox(const AnaEventC &event, Int_t isel=0, Int_t ibranch=0) const
Get the SystBox corresponding to a selection, branch and event.
void SetNParameters(int N)
Set the number of systematic parameters associated to this systematic.
bool IsRelevantTrueObject(const AnaEventC &event, const AnaTrueObjectC &trueTrack) const
Is this true track relevant for this systematic ?
Weight_h ComputeWeight(const ToyExperiment &toy, const AnaEventC &event, const ToyBoxB &box)
Int_t nRecObjectsInGroup[NMAXRECOBJECTGROUPS]
----—— RecObjects and TrueRecObjects used in the selection and systematics ------------—— ...
Representation of a true Monte Carlo trajectory/particle.
Int_t SuccessfulBranch
The branch that is successful for this toy in the selection this ToyBox belongs to.
Representation of a global track.
Int_t nRelevantTrueObjects
Array of Relevant True RecObjects for each systematic.
Float_t DirectionStart[3]
The reconstructed start direction of the particle.
AnaRecObjectC ** RelevantTrueObjectsReco
Float_t Direction[3]
The initial direction of the true particle.
SubDetId_h GetDetectorFV(Int_t ibranch=0) const
Get the detector in which the Fiducial Volume is defined.
Int_t GetRelevantTrueObjectGroups(const SelectionBase &sel, Int_t ibranch, Int_t *IDs) const
Get the TrueTrackGroup IDs array for this systematic.