1 #include "FGD2ShowerSystematics.hxx" 2 #include "CutUtils.hxx" 3 #include "SystematicUtils.hxx" 5 #include "EventBoxId.hxx" 10 FGD2ShowerSystematics::FGD2ShowerSystematics(
bool comp):
BinnedParams(
"FGD2Shower", k2D_EFF_ASSYMMETRIC){
13 _computecounters = comp;
35 std::cout <<
" \n FGD2ShowerSystematics::Apply(): " << SystBox->
nRelevantRecObjects<< std::endl;
38 if(boxB.
DetectorFV != SubDetId::kFGD1)
return eventWeight;
50 if (!truePart)
continue;
52 int pdg = abs(truePart->
PDG);
63 eventWeight *= systUtils::ComputeEffLikeWeight(found, toy,
GetIndex(), index, params);
67 std::cout<<
"FGD2Shower " << found <<
" eventWeight local " << eventWeight << std::endl;
102 IDs[0] = EventBoxTracker::kTracksWithTPC;
Int_t GetIndex() const
Return the index of this systematic.
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.
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.
AnaTrueObjectC * TrueObject
The link to the true oject that most likely generated this reconstructed object.
bool GetBinValues(Float_t value, Float_t &mean, Float_t &sigma)
Gets the bin values for a 1D source.
Weight_h ComputeWeight(const ToyExperiment &, const AnaEventC &, const ToyBoxB &)
Apply the 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.
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) ...
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.
Representation of a global track.
int nFGDSegments
How many FGD tracks are associated with this track.
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_t GetRelevantRecObjectGroups(const SelectionBase &sel, Int_t ibranch, Int_t *IDs) const
Get the TrackGroup IDs array for this systematic.