HighLAND
ToFCorrection.hxx
1 #ifndef ToFCorrection_h
2 #define ToFCorrection_h
3 
4 #include "CorrectionBase.hxx"
5 #include "DataClasses.hxx"
6 #include "ToFSenseCorrector.hxx"
7 
8 /// This correction smears and shifts the MC ToF to match data
9 /// There is also an option to flip track according to ToF
10 class TRandom;
11 
13 public:
14 
15  ToFCorrection();
16 
17  virtual ~ToFCorrection();
18 
19  /// Apply the correction to all relevant tracks
20  void Apply(AnaSpillC& spill);
21 
22  /// The only thing we allow for the generator is to get the seed
23  UInt_t GetRandomSeed() const;
24 
25  /// And change the seed
26  void SetRandomSeed(UInt_t seed);
27 
28 private:
29  /// Apply MC ToF smearing
30  void ApplyToFSmear(AnaTrack& track, ToFSenseCorrector::ToFTopology topo, bool IsSandMC) const;
31 
32  /// Initialze random generator
33  void InitializeRandomGenerator();
34 
35  /// Values to apply the smearing (MC)
36  Float_t _P0D_FGD1_ToF_MC_TrueFwd_Track_Mean;
37  Float_t _P0D_FGD1_ToF_MC_TrueFwd_Track_Sigma;
38  Float_t _P0D_FGD1_ToF_MC_TrueBwd_Track_Mean;
39  Float_t _P0D_FGD1_ToF_MC_TrueBwd_Track_Sigma;
40  Float_t _P0D_FGD1_ToF_Sand_Track_Mean;
41  Float_t _P0D_FGD1_ToF_Sand_Track_Sigma;
42 
43  Float_t _FGD1_FGD2_ToF_MC_TrueFwd_Mean;
44  Float_t _FGD1_FGD2_ToF_MC_TrueFwd_Sigma;
45  Float_t _FGD1_FGD2_ToF_MC_TrueBwd_Mean;
46  Float_t _FGD1_FGD2_ToF_MC_TrueBwd_Sigma;
47  Float_t _FGD1_FGD2_ToF_Sand_Mean;
48  Float_t _FGD1_FGD2_ToF_Sand_Sigma;
49 
50  Float_t _ECal_FGD1_ToF_MC_LAStartFgd_TrueFwd_Shower_Mean;
51  Float_t _ECal_FGD1_ToF_MC_LAStartFgd_TrueFwd_Shower_Sigma;
52  Float_t _ECal_FGD1_ToF_MC_LAStartFgd_TrueBwd_Shower_Mean;
53  Float_t _ECal_FGD1_ToF_MC_LAStartFgd_TrueBwd_Shower_Sigma;
54  Float_t _ECal_FGD1_ToF_MC_LAStartFgd_TrueFwd_Track_Mean;
55  Float_t _ECal_FGD1_ToF_MC_LAStartFgd_TrueFwd_Track_Sigma;
56  Float_t _ECal_FGD1_ToF_MC_LAStartFgd_TrueBwd_Track_Mean;
57  Float_t _ECal_FGD1_ToF_MC_LAStartFgd_TrueBwd_Track_Sigma;
58  Float_t _ECal_FGD1_ToF_Sand_LAStartFgd_Shower_Mean;
59  Float_t _ECal_FGD1_ToF_Sand_LAStartFgd_Shower_Sigma;
60  Float_t _ECal_FGD1_ToF_Sand_LAStartFgd_Track_Mean;
61  Float_t _ECal_FGD1_ToF_Sand_LAStartFgd_Track_Sigma;
62 
63  Float_t _ECal_FGD1_ToF_MC_LAEndFgd_TrueFwd_Shower_Mean;
64  Float_t _ECal_FGD1_ToF_MC_LAEndFgd_TrueFwd_Shower_Sigma;
65  Float_t _ECal_FGD1_ToF_MC_LAEndFgd_TrueBwd_Shower_Mean;
66  Float_t _ECal_FGD1_ToF_MC_LAEndFgd_TrueBwd_Shower_Sigma;
67  Float_t _ECal_FGD1_ToF_MC_LAEndFgd_TrueFwd_Track_Mean;
68  Float_t _ECal_FGD1_ToF_MC_LAEndFgd_TrueFwd_Track_Sigma;
69  Float_t _ECal_FGD1_ToF_MC_LAEndFgd_TrueBwd_Track_Mean;
70  Float_t _ECal_FGD1_ToF_MC_LAEndFgd_TrueBwd_Track_Sigma;
71 
72  Float_t _ECal_FGD1_ToF_MC_HAStartFgd_TrueFwd_Shower_Mean;
73  Float_t _ECal_FGD1_ToF_MC_HAStartFgd_TrueFwd_Shower_Sigma;
74  Float_t _ECal_FGD1_ToF_MC_HAStartFgd_TrueBwd_Shower_Mean;
75  Float_t _ECal_FGD1_ToF_MC_HAStartFgd_TrueBwd_Shower_Sigma;
76  Float_t _ECal_FGD1_ToF_MC_HAStartFgd_TrueFwd_Track_Mean;
77  Float_t _ECal_FGD1_ToF_MC_HAStartFgd_TrueFwd_Track_Sigma;
78  Float_t _ECal_FGD1_ToF_MC_HAStartFgd_TrueBwd_Track_Mean;
79  Float_t _ECal_FGD1_ToF_MC_HAStartFgd_TrueBwd_Track_Sigma;
80  Float_t _ECal_FGD1_ToF_Sand_HAStartFgd_Shower_Mean;
81  Float_t _ECal_FGD1_ToF_Sand_HAStartFgd_Shower_Sigma;
82  Float_t _ECal_FGD1_ToF_Sand_HAStartFgd_Track_Mean;
83  Float_t _ECal_FGD1_ToF_Sand_HAStartFgd_Track_Sigma;
84 
85  Float_t _ECal_FGD1_ToF_MC_HAEndFgd_TrueFwd_Shower_Mean;
86  Float_t _ECal_FGD1_ToF_MC_HAEndFgd_TrueFwd_Shower_Sigma;
87  Float_t _ECal_FGD1_ToF_MC_HAEndFgd_TrueBwd_Shower_Mean;
88  Float_t _ECal_FGD1_ToF_MC_HAEndFgd_TrueBwd_Shower_Sigma;
89  Float_t _ECal_FGD1_ToF_MC_HAEndFgd_TrueFwd_Track_Mean;
90  Float_t _ECal_FGD1_ToF_MC_HAEndFgd_TrueFwd_Track_Sigma;
91  Float_t _ECal_FGD1_ToF_MC_HAEndFgd_TrueBwd_Track_Mean;
92  Float_t _ECal_FGD1_ToF_MC_HAEndFgd_TrueBwd_Track_Sigma;
93  Float_t _ECal_FGD1_ToF_Sand_HAEndFgd_Shower_Mean;
94  Float_t _ECal_FGD1_ToF_Sand_HAEndFgd_Shower_Sigma;
95  Float_t _ECal_FGD1_ToF_Sand_HAEndFgd_Track_Mean;
96  Float_t _ECal_FGD1_ToF_Sand_HAEndFgd_Track_Sigma;
97 
98  /// Whether to flip the track based on ToF
99  bool _apply_ToF_based_Flip;
100 
101  /// A random generator that can be used to generate throws.
102  TRandom* _RandomGenerator;
103 
104  /// A corrector to deal with various ToF business
105  ToFSenseCorrector _tofCorrector;
106 };
107 
108 #endif
void SetRandomSeed(UInt_t seed)
And change the seed.
Representation of a global track.
void Apply(AnaSpillC &spill)
Apply the correction to all relevant tracks.
All corrections should be registered with the CorrectionManager.
UInt_t GetRandomSeed() const
The only thing we allow for the generator is to get the seed.