1 #include "ECalPIDSystematics.hxx" 2 #include "CutUtils.hxx" 3 #include "SystematicUtils.hxx" 5 #include "EventBoxId.hxx" 12 ECalPIDSystematics::ECalPIDSystematics(
bool comp):
BinnedParams(
"ECalPID", k3D_EFF_ASSYMMETRIC){
15 _computecounters = comp;
37 std::cout <<
" \n ECalPIDSystematics::Apply(): " << SystBox->
nRelevantRecObjects<< std::endl;
53 if (!trueTrack)
continue;
58 if (count < 1)
continue;
62 if (!ecalTrack)
continue;
64 Float_t PIDMipEm = ecalTrack->
PIDMipEm;
67 int pdg = abs(trueTrack->
PDG);
73 if (pdg == 211) pdg = 13;
102 std::cout<<
"ecal track PIDMipEm "<< found <<
" eventWeight local " << eventWeight_tmp << std::endl;
106 eventWeight *= eventWeight_tmp;
114 std::cout <<
" eventWeight total " << eventWeight << std::endl;
136 if (count != 1)
return false;
149 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 IsRelevantRecObject(const AnaEventC &event, const AnaRecObjectC &recObj) const
Is this track relevant for this systematic ?
Int_t SelectionEnabledIndex
The enabled index of this selection this ToyBox belongs to.
Representation of an ECAL segment of a global track.
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 RecObjectGroup IDs array for this systematic.
Float_t Momentum
The initial momentum of the true particle.
bool TrackUsesDet(const AnaTrackB &track, SubDetId::SubDetEnum det)
bool GetBinValues(Float_t value, Float_t &mean, Float_t &sigma)
Gets the bin values for a 1D source.
Float_t meanDATA
The mean value for each of the systematic parameters of the control sample.
bool UpdateEfficiencyCounter(Int_t index, bool correct)
Update the efficiency variables _ncorrect and _nwrong.
Representation of a true Monte Carlo trajectory/particle.
virtual bool IsRelevantRecObjectForSystematicInToy(const AnaEventC &, const ToyBoxB &, AnaRecObjectC *, SystId_h syst_index, Int_t branch=0) const
Is this track relevant for a given systematic (after selection, called for each toy) ...
Weight_h ComputeWeight(const ToyExperiment &, const AnaEventC &, const ToyBoxB &)
Apply the systematic.
Int_t SuccessfulBranch
The branch that is successful for this toy in the selection this ToyBox belongs to.
Int_t PDG
The PDG code of this particle.
Float_t meanMC
The mean value for each of the systematic parameters of the control sample.
Representation of a global track.
static SubDetId::SubDetEnum GetSubdetectorEnum(unsigned long BitField)
Get the single subdetector that this track is from.
ToyVariations * GetToyVariations(UInt_t index) const
returns the variations for a given systematic (index)
Int_t nRelevantRecObjects
----—— Relevant rec objects and true objects for each systematic ------------—— ...
void InitializeEfficiencyCounter()
Initialize counters.
AnaTrueParticleB * GetTrueParticle() const
Return a casted version of the AnaTrueObject associated.
Int_t GetNBins()
Get the number of bins.
int GetTrackerDsEcals(AnaTrackB *track, AnaECALParticleB *selTracks[])