1 #include "FGDECalSMRDMatchEffSystematics.hxx" 2 #include "CutUtils.hxx" 3 #include "SystematicUtils.hxx" 10 FGDECalSMRDMatchEffSystematics::FGDECalSMRDMatchEffSystematics(
bool computecounters):
32 std::cout <<
"FGDECalSMRDMatchEffSystematics::Apply(): " << SystBox->
nRelevantTrueObjects<< std::endl;
42 if (!truePart || !recoTrack)
continue;
51 if(nsmrd_det==0)
continue;
67 if (!
GetBinValues(smrd_det[0], dir[2], params, index))
continue;
72 eventWeight *= systUtils::ComputeEffLikeWeight(found, toy,
GetIndex(), index, params);
75 std::cout<<
"fgd-ecal-smrd found "<< found<<
" eventWeight "<<eventWeight<<std::endl;
Float_t PositionStart[4]
The reconstructed start position of the particle.
Int_t GetIndex() const
Return the index of this systematic.
Int_t SelectionEnabledIndex
The enabled index of this selection this ToyBox belongs to.
SystBoxB * GetSystBox(const AnaEventC &event, Int_t isel=0, Int_t ibranch=0) const
Get the SystBox corresponding to a selection, branch and event.
static bool GetDetectorUsed(unsigned long BitField, SubDetId::SubDetEnum det)
Method to see if a certain subdetector or subdetector system is used.
bool GetBinValues(Float_t value, Float_t &mean, Float_t &sigma)
Gets the bin values for a 1D source.
bool UpdateEfficiencyCounter(Int_t index, bool correct)
Update the efficiency variables _ncorrect and _nwrong.
Representation of a true Monte Carlo trajectory/particle.
int GetSMRDDetCrossed(const AnaTrueParticleB *track, SubDetId::SubDetEnum det[])
SMRD detectors crossed.
bool TrueParticleCrossesSMRD(const AnaTrueParticleB *track, Float_t min_sep=48.)
Int_t SuccessfulBranch
The branch that is successful for this toy in the selection this ToyBox belongs to.
SubDetEnum
Enumeration of all detector systems and subdetectors.
Representation of a global track.
Int_t nRelevantTrueObjects
Array of Relevant True RecObjects for each systematic.
bool IsRelevantTrueObject(const AnaEventC &event, const AnaTrueObjectC &track) const
Is this track relevant for this systematic ?
bool IsRelevantRecObject(const AnaEventC &event, const AnaRecObjectC &track) const
Is this track relevant for this systematic ?
Float_t DirectionStart[3]
The reconstructed start direction of the particle.
AnaRecObjectC ** RelevantTrueObjectsReco
Weight_h ComputeWeight(const ToyExperiment &, const AnaEventC &, const ToyBoxB &)
Apply the systematic.
Float_t * GetSLineDir(Float_t *start, Float_t *end)
Direction assuming straight line between given start and end points.
void InitializeEfficiencyCounter()
Initialize counters.
virtual bool IsRelevantTrueObjectForSystematicInToy(const AnaEventC &, const ToyBoxB &, AnaTrueObjectC *, SystId_h syst_index, Int_t branch=0) const
Is this true track relevant for a given systematic (after selection, called for each toy) ...
AnaParticleB * GetSegmentWithMostNodesInDet(const AnaTrackB &track, SubDetId::SubDetEnum det)
Method to get the subtrack with most nodes in a given detector.
Representation of a reconstructed particle (track or shower).
Float_t PositionEnd[4]
The reconstructed end position of the particle.