1 #include "P0DELossScaleSystematics.hxx" 2 #include "ND280AnalysisUtils.hxx" 3 #include "BaseDataClasses.hxx" 4 #include "EventBoxTracker.hxx" 7 const bool debug =
false;
18 sprintf(dirname,
"%s/data",getenv(
"PSYCHESYSTEMATICSROOT"));
23 for (
int i = 0 ; i <
GetNBins(); i++)
27 std::cout<<
"Mean, sigma = "<<mean<<
" "<<sigma<<std::endl;
50 std::cout <<
"P0DELossScaleSystematics::Apply(): " << std::endl;
55 std::cout << itrk << std::endl;
61 std::cout <<
"P0D Segments: "<<track->
nP0DSegments<<std::endl;
62 std::cout <<
"TPC Segments: "<<track->
nTPCSegments<<std::endl;
71 Float_t p0dlength = p0d->Length;
72 Float_t p0dEloss = p0d->ELoss;
73 Float_t scale, scaleError;
74 if (p0dEloss < 0 )
continue;
78 std::cout <<
"p0 = " << p << std::endl;
80 std::cout <<
"P0D Length: "<<p0dlength<<std::endl;
81 std::cout <<
"P0D Eloss: "<<p0dEloss<<std::endl;
82 std::cout <<
"Getting bin values:"<<std::endl;
89 std::cout <<
"Bin values retrieved"<<std::endl;
90 std::cout <<
"Scale = "<<scale<<
" Scale Err = " <<scaleError<<std::endl;
96 std::cout <<
"p = " << p << std::endl;
128 if (det == SubDetId::kP0D){
129 IDs[0] = EventBoxTracker::kTracksWithTPCInP0DFV;
Int_t _index
The index of this systematic (needed by SystematicsManager);.
int nP0DSegments
How many P0D tracks are associated with this track.
const AnaTrackB * GetOriginalTrack() const
Return a casted version of the original AnaParticleB associated.
AnaP0DParticleB * P0DSegments[NMAXP0DS]
The P0D segments that contributed to this global track.
Float_t * Variations
the vector of Variations, one for each of the systematic parameters
virtual bool UndoSystematic(AnaEventC &event)
Undo the systematic variations done by ApplyVariation. This is faster than resetting the full Spill...
P0DELossScaleSystematics()
virtual void Apply(const ToyExperiment &toy, AnaEventC &event)
Apply the systematic.
void SetType(TypeEnum type)
Set the type.
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 SetName(const std::string &name)
Set the name.
bool GetBinValues(Float_t value, Float_t &mean, Float_t &sigma)
Gets the bin values for a 1D source.
Float_t Momentum
The reconstructed momentum of the particle, at the start position.
int nTPCSegments
How many TPC tracks are associated with this track.
const AnaParticleB * Original
void Read(const std::string &inputDirName, const std::string &extension="")
Read from a file the systematic source values.
Representation of a global track.
ToyVariations * GetToyVariations(UInt_t index) const
returns the variations for a given systematic (index)
Int_t GetRelevantRecObjectGroups(const SelectionBase &sel, Int_t *IDs) const
Get the TrackGroup IDs array for this systematic.
Int_t nRelevantRecObjects
----—— Relevant rec objects and true objects for each systematic ------------—— ...
bool GetParametersForBin(Int_t index, Float_t &mean, Float_t &sigma)
Gets the bin values for a source provided the bin index.
Representation of a P0D segment of a global track.
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.