1 #include "MomentumResolSystematics.hxx" 2 #include "ND280AnalysisUtils.hxx" 3 #include "EventBoxTracker.hxx" 4 #include "VersioningUtils.hxx" 5 #include "Parameters.hxx" 37 BinnedParams::k1D_SYMMETRIC,
38 versionUtils::Extension());
42 _useP0DFV = (bool) ND::params().
GetParameterI(
"psycheSystematics.Tracker.UseP0DFV");
58 std::cout <<
"MomentumResolSystematics::ApplyVariation(): " << box->
nRelevantRecObjects << std::endl;
64 std::cout << itrk << std::endl;
98 if (!tpcTrack || !tpcTrackorig)
continue;
122 Float_t value1, value2;
123 Int_t index1, index2;
125 if (versionUtils::prod6_systematics){
128 if (!
GetXBinnedValues(track, value1, value2, index1, index2, MomentumResolVariation::kSyst))
return false;
161 Float_t value1, value2;
162 Int_t index1, index2;
164 if (versionUtils::prod6_systematics){
167 if (!
GetXBinnedValues(track, value1, value2, index1, index2, MomentumResolVariation::kSyst))
return false;
198 if (det == SubDetId::kFGD1 || det == SubDetId::kFGD){
199 IDs[ngroups++] = EventBoxTracker::kTracksWithTPCInFGD1FV;
201 if (det == SubDetId::kFGD2 || det == SubDetId::kFGD){
202 IDs[ngroups++] = EventBoxTracker::kTracksWithTPCInFGD2FV;
204 if (det == SubDetId::kP0D){
205 IDs[ngroups++] = EventBoxTracker::kTracksWithTPCInP0DFV;
Int_t _index
The index of this systematic (needed by SystematicsManager);.
virtual void ApplyVariation(AnaTrackB *track, const ToyExperiment &exp)
const AnaTrackB * GetOriginalTrack() const
Return a casted version of the original AnaParticleB associated.
virtual bool UndoSystematic(AnaEventC &event)
Undo the systematic variations done by ApplyVariation. This is faster tha reseting the full Spill...
Float_t * Variations
the vector of Variations, one for each of the systematic parameters
int GetParameterI(std::string)
Get parameter. Value is returned as integer.
SystBoxB * GetSystBox(const AnaEventC &event, Int_t isel=0, Int_t ibranch=0) const
Get the SystBox corresponding to a selection, branch and event.
AnaTPCParticleB * TPCSegments[NMAXTPCS]
The TPC segments that contributed to this global track.
void SetNParameters(int N)
Set the number of systematic parameters associated to this systematic.
bool GetBinValues(Float_t value, Float_t &mean, Float_t &sigma)
Gets the bin values for a 1D source.
Float_t MomentumError
Error of the momentum at the start of the segment.
Float_t MomentumFlip
Momentum for the main PID hypothesis and reverse sense.
bool _tpc_based_var
Whether to do the smearing based on the local TPC mom.
Float_t Momentum
The reconstructed momentum of the particle, at the start position.
int nTPCSegments
How many TPC tracks are associated with this track.
virtual void ApplyVariationTPCBased(AnaTrackB *track, const ToyExperiment &exp)
virtual void Apply(const ToyExperiment &toy, AnaEventC &event)
Apply the systematic.
bool _full_correlations
Value of psycheSystematics.Tracker.FullCorrelations parameter.
bool GetVariationTPC(AnaTPCParticleB *track, Float_t &variation, const ToyExperiment &exp)
Get the variation given a track.
Representation of a global track.
Representation of a TPC segment 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.
UInt_t GetNBranches() const
Return the number of branches.
bool GetXBinnedValues(AnaTrackB *track, Float_t &value1, Float_t &value2, Int_t &index1, Int_t &index2, ModeEnum mode)
Get parameters for this global track assumed one uses X bins.
Int_t nRelevantRecObjects
----—— Relevant rec objects and true objects for each systematic ------------—— ...
bool GetVariation(AnaTrackB *track, Float_t &variation, const ToyExperiment &exp)
Get the variation given a track.
MomentumResolSystematics()
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.
BinnedParams * _params
Binned data to read the parameters.