1 #include "TPCP0DMatchEffSystematics.hxx" 2 #include "CutUtils.hxx" 3 #include "SystematicUtils.hxx" 10 TPCP0DMatchEffSystematics::TPCP0DMatchEffSystematics(
bool comp):
BinnedParams(
"TPCP0DMatchEff",k2D_EFF_ASSYMMETRIC){
13 _computecounters=comp;
39 std::cout <<
"TPCP0DMatchEffSystematics::Apply(): " << SystBox->
nRelevantTrueObjects<< std::endl;
49 if (!truePart || !recoTrack)
continue;
56 if(!tpcTrack)
continue;
58 if (!tpcTrack)
continue;
68 eventWeight *= systUtils::ComputeEffLikeWeight(found, toy,
GetIndex(), index, params);
71 std::cout<<
"tpc1-p0d found "<< found<<
" eventWeight "<<eventWeight<<std::endl;
104 if(!tpcTrack)
return false;
106 if (!cutUtils::TPCTrackQualityCut(*tpcTrack))
return false;
118 IDs[0] = EventBoxTracker::kTracksWithTPC;
131 IDs[0] = EventBoxTracker::kTrueParticlesChargedInTPCInBunch;
bool TrueParticleEntersDet(const AnaTrueParticleB *track, SubDetId::SubDetEnum det)
Whether a true track enters a given sub-detector.
Int_t GetIndex() const
Return the index of this systematic.
Int_t GetRelevantTrueObjectGroups(const SelectionBase &sel, Int_t ibranch, Int_t *IDs) const
Get the TrueTrackGroup IDs array for 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.
void SetNParameters(int N)
Set the number of systematic parameters associated to this systematic.
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.
Int_t GetRelevantRecObjectGroups(const SelectionBase &sel, Int_t ibranch, Int_t *IDs) const
Get the TrackGroup IDs array for this systematic.
bool UpdateEfficiencyCounter(Int_t index, bool correct)
Update the efficiency variables _ncorrect and _nwrong.
Float_t Momentum
The reconstructed momentum of the particle, at the start position.
Representation of a true Monte Carlo trajectory/particle.
bool IsRelevantTrueObject(const AnaEventC &event, const AnaTrueObjectC &track) const
Is this track relevant for this systematic ?
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.
Representation of a TPC segment of a global track.
Weight_h ComputeWeight(const ToyExperiment &, const AnaEventC &, const ToyBoxB &)
Apply the systematic.
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) ...
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).
Int_t GetNBins()
Get the number of bins.
bool IsRelevantRecObject(const AnaEventC &event, const AnaRecObjectC &track) const
Is this track relevant for this systematic ?