1 #include "ECalTrackEffSystematics.hxx" 2 #include "CutUtils.hxx" 3 #include "SystematicUtils.hxx" 5 #include "EventBoxId.hxx" 11 ECalTrackEffSystematics::ECalTrackEffSystematics(
bool comp):
BinnedParams(
"ECalTrackEff",k3D_EFF_ASSYMMETRIC){
14 _computecounters = comp;
36 std::cout <<
" \n ECalTrackEffSystematics::Apply(): " << SystBox->
nRelevantTrueObjects<< std::endl;
44 if (!truePart)
continue;
53 if (ndet != 1)
continue;
58 int pdg = abs(truePart->
PDG);
61 if (pdg != 13) pdg = 11;
80 std::cout <<
"ecal track found " << found <<
" eventWeight local " << eventWeight_tmp << std::endl;
84 eventWeight *= eventWeight_tmp;
92 std::cout <<
" eventWeight total " << eventWeight << std::endl;
107 if (ndet!=1)
return false;
119 IDs[0] = EventBoxTracker::kTracksWithECal;
Int_t _index
The index of this systematic (needed by SystematicsManager);.
Float_t * Variations
the vector of Variations, one for each of the systematic parameters
bool IsRelevantTrueObject(const AnaEventC &event, const AnaTrueObjectC &track) const
Is this track relevant for this systematic ?
int GetECalDetCrossed(const AnaTrueParticleB *track, SubDetId::SubDetEnum det[])
ECal detectors crossed: split based on geom info PECal and TECal sub-detectors, this may not be very ...
Int_t SelectionEnabledIndex
The enabled index of this selection this ToyBox belongs to.
True particles crossing ECal.
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.
Int_t GetRelevantRecObjectGroups(const SelectionBase &sel, Int_t ibranch, Int_t *IDs) const
Get the TrackGroup IDs array for this systematic.
static bool GetDetectorUsed(unsigned long BitField, SubDetId::SubDetEnum det)
Method to see if a certain subdetector or subdetector system is used.
Float_t Momentum
The initial momentum of the true particle.
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_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.
Weight_h ComputeWeight(const ToyExperiment &, const AnaEventC &, const ToyBoxB &)
Apply the systematic.
Int_t PDG
The PDG code of this particle.
Representation of a global track.
Int_t nRelevantTrueObjects
Array of Relevant True RecObjects for each systematic.
static bool IsTECALDetector(SubDetId::SubDetEnum det)
Check if a detector enumeration refers to a Tracker ECAL or not.
ToyVariations * GetToyVariations(UInt_t index) const
returns the variations for a given systematic (index)
AnaRecObjectC ** RelevantTrueObjectsReco
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) ...
Int_t GetRelevantTrueObjectGroups(const SelectionBase &sel, Int_t ibranch, Int_t *IDs) const
Get the TrueTrackGroup IDs array for this systematic.
Int_t GetNBins()
Get the number of bins.