1 #include "FGDPIDSystematics.hxx" 2 #include "ND280AnalysisUtils.hxx" 3 #include "EventBoxTracker.hxx" 4 #include "VersioningUtils.hxx" 15 _fgd1mean =
new BinnedParams(
"FGD1PIDMean", BinnedParams::k1D_EFF_SYMMETRIC, versionUtils::Extension());
16 _fgd1sigma =
new BinnedParams(
"FGD1PIDSigRatio",BinnedParams::k1D_SYMMETRIC, versionUtils::Extension());
18 if( versionUtils::prod6_systematics){
19 _fgd2mean =
new BinnedParams(
"FGD2PIDMean", BinnedParams::k1D_EFF_SYMMETRIC, versionUtils::Extension());
20 _fgd2sigma =
new BinnedParams(
"FGD2PIDSigRatio",BinnedParams::k1D_SYMMETRIC, versionUtils::Extension());
35 std::cout <<
"FGDPIDSystematics::Apply(): tracks size " << box->
nRelevantRecObjects << std::endl;
55 if(!fgdTrack)
continue;
59 if (!original)
continue;
62 std::cout << pdg<<
" FGDPIDSystematics::Apply(): nodes = " << fgdTrack->
NNodes << std::endl;
75 if(!_fgd1mean->
GetBinValues((Float_t)pdg,params, mean_index))
continue;
76 if(!_fgd1sigma->
GetBinValues((Float_t)pdg,sigR_value, sigR_error, sigR_index))
continue;
80 if( versionUtils::prod6_systematics){
81 if(!_fgd2mean->
GetBinValues((Float_t)pdg,params, mean_index))
continue;
82 if(!_fgd2sigma->
GetBinValues((Float_t)pdg,sigR_value, sigR_error, sigR_index))
continue;
88 std::cout <<
"FGDPIDSystematics::Apply(): meanmc, menadata, mean_index = " << params.
meanMC <<
" " << params.
meanDATA <<
" " << mean_index << std::endl;
89 std::cout <<
"FGDPIDSystematics::Apply(): sigR_value, sigR_error, sigR_index = " << sigR_value <<
" " << sigR_error <<
" " << sigR_index <<std::endl;
97 Float_t error=fabs(diffdataMC);
121 Float_t pullpi0 = original->
Pullpi;
122 Float_t pullmu0 = original->
Pullmu;
123 Float_t pullp0 = original->
Pullp;
124 std::cout <<
"FGDPIDSystematics::Apply(): Results: " << std::endl;
126 <<
", " << pullpi0 <<
" --> " << fgdTrack->
Pullpi 127 <<
", " << pullmu0 <<
" --> " << fgdTrack->
Pullmu 128 <<
", " << pullp0 <<
" --> " << fgdTrack->
Pullp << std::endl;
142 for (
int k = 0; k < static_cast<AnaTrackB*>(box->RelevantRecObjects[itrk])->nFGDSegments; k++) {
173 if (abs(truePart->
PDG) == 211 ) ok =
true;
174 else if (abs(truePart->
PDG) == 2212) ok =
true;
175 else if (abs(truePart->
PDG) == 13) ok =
true;
187 if (det == SubDetId::kFGD1 || det == SubDetId::kFGD){
188 IDs[ngroups++] = EventBoxTracker::kTracksWithFGD1AndNoTPC;
190 if (det == SubDetId::kFGD2 || det == SubDetId::kFGD){
191 IDs[ngroups++] = EventBoxTracker::kTracksWithFGD2AndNoTPC;
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
Float_t Pullp
Proton pull, according to FGD information.
Int_t NNodes
The number of nodes in the reconstructed object.
SystBoxB * GetSystBox(const AnaEventC &event, Int_t isel=0, Int_t ibranch=0) const
Get the SystBox corresponding to a selection, branch and event.
Float_t Pullpi
Pion pull, according to FGD information.
bool UndoSystematic(AnaEventC &event)
Undo the systematic variations done by ApplyVariation. This is faster tha reseting the full Spill...
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.
static bool GetDetectorUsed(unsigned long BitField, SubDetId::SubDetEnum det)
Method to see if a certain subdetector or subdetector system is used.
Float_t Pullmu
Muon pull, according to FGD information.
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.
Int_t GetRelevantRecObjectGroups(const SelectionBase &sel, Int_t *IDs) const
Get the TrackGroup IDs array for this systematic.
bool IsRelevantRecObject(const AnaEventC &event, const AnaRecObjectC &track) const
Is this track relevant for this systematic ?
Representation of a true Monte Carlo trajectory/particle.
const AnaParticleB * Original
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.
ToyVariations * GetToyVariations(UInt_t index) const
returns the variations for a given systematic (index)
Representation of a FGD segment of a global track.
UInt_t GetNBranches() const
Return the number of branches.
int nFGDSegments
How many FGD tracks are associated with this track.
Int_t nRelevantRecObjects
----—— Relevant rec objects and true objects for each systematic ------------—— ...
AnaTrueParticleB * GetTrueParticle() const
Return a casted version of the AnaTrueObject associated.
Int_t GetNBins()
Get the number of bins.
SubDetId_h GetDetectorFV(Int_t ibranch=0) const
Get the detector in which the Fiducial Volume is defined.
AnaFGDParticleB * FGDSegments[NMAXFGDS]
The FGD segments that contributed to this global track.
void Apply(const ToyExperiment &toy, AnaEventC &event)
Apply the systematic.