HighLAND
MomentumResolSystematics.hxx
1 #ifndef MomentumResolSystematics_h
2 #define MomentumResolSystematics_h
3 
4 #include "EventVariationBase.hxx"
5 #include "MomentumResolVariation.hxx"
6 
7 /// This systematic smears the momentum of tracks with TPC information, by a
8 /// random amount from a Gaussian distribution.
9 ///
10 /// The amount each track is changed by uses two Gaussian distributions.
11 /// The first distribution uses the input parameters to select a resolution.
12 /// This is called once for each virtual analysis. The second distribution
13 /// then uses the chosen resolution as its width, and the amount to vary each
14 /// track's momentum is chosen from this distribution. This is called for each
15 /// track individually.
17 public:
18 
19  /// Instantiate the momentum resolution systematic. nbins is the number of
20  /// bins in the PDF. addResol and addResolError describe
21  /// the Gaussian distribution from which the resolution of each virtual
22  /// analysis is selected from.
24 
25  virtual ~MomentumResolSystematics() {}
26 
27  /// Apply the systematic
28  virtual void Apply(const ToyExperiment& toy, AnaEventC& event);
29 
30  /// Get the variation given a track
31  bool GetVariation(AnaTrackB* track, Float_t& variation, const ToyExperiment& exp);
32 
33  /// Get the variation given a track
34  bool GetVariationTPC(AnaTPCParticleB* track, Float_t& variation, const ToyExperiment& exp);
35 
36 
37  /// Undo the systematic variations done by ApplyVariation. This is faster tha reseting the full Spill
38  virtual bool UndoSystematic(AnaEventC& event);
39 
40 
41 protected:
42 
43  /// Get the TrackGroup IDs array for this systematic
44  Int_t GetRelevantRecObjectGroups(const SelectionBase& sel, Int_t* IDs) const;
45 
46  /// Value of psycheSystematics.Tracker.FullCorrelations parameter
48 
49  /// Whether to do the smearing based on the local TPC mom
51 
52  bool _useP0DFV;
53 
54 };
55 
56 #endif
virtual bool UndoSystematic(AnaEventC &event)
Undo the systematic variations done by ApplyVariation. This is faster tha reseting the full Spill...
bool _tpc_based_var
Whether to do the smearing based on the local TPC mom.
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.
Int_t GetRelevantRecObjectGroups(const SelectionBase &sel, Int_t *IDs) const
Get the TrackGroup IDs array for this systematic.
bool GetVariation(AnaTrackB *track, Float_t &variation, const ToyExperiment &exp)
Get the variation given a track.