All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
photonCorrector.h
Go to the documentation of this file.
1 #ifndef photonCorrector_h
2 #define photonCorrector_h 1
3 
4 #include "EVENT/ReconstructedParticle.h"
5 #include <cassert>
6 
8  public:
11  _energyLin_const = 0.;
12  _energyLin_logen = 0.;
30  _endcap_gaus1_norm = 0.;
31  _endcap_gaus1_mean = 0.;
32  _endcap_gaus1_sigm = 0.;
33  _endcap_gaus2_norm = 0.;
34  _endcap_gaus2_mean = 0.;
35  _endcap_gaus2_sigm = 0.;
36  _assumed_boxsize = 0.;
37  _assumed_endZ = 0.;
38 
67 
68  }
70 
71 
72  // the main energy corrector
73  float photonEnergyCorrection( EVENT::ReconstructedParticle* rp );
74  void photonDirectionCorrection( EVENT::ReconstructedParticle* rp , float& cor_theta, float& cor_phi );
75 
76  // parameter setters
78  void set_assumed_boxsize ( float x ) { _assumed_boxsize = x; }
79  void set_assumed_endZ ( float x ) { _assumed_endZ = x; }
80 
81 
82  void set_energyCorr_linearise ( std::vector <float> pars );
83  void set_energyCorr_barrelPhi ( std::vector <float> pars );
84  void set_energyCorr_costheta ( std::vector <float> pars );
85  void set_energyCorr_endcap ( std::vector <float> pars );
86  void set_phiCorr_barrel ( std::vector <float> pars );
87  void set_thetaCorr_barrel ( std::vector <float> pars );
88  void set_thetaCorr_endcap ( std::vector <float> pars );
89 
91  float get_energyLin_const ( ) { return _energyLin_const ; }
92  float get_energyLin_logen ( ) { return _energyLin_logen ; }
116  float get_assumed_boxsize ( ) { return _assumed_boxsize ; }
117  float get_assumed_endZ ( ) { return _assumed_endZ ; }
118 
119 
148 
149 
150  void printParams();
151 
152  private:
153 
154  float energyLinearise( float en );
155  float gapCompensatedEnergy( EVENT::ReconstructedParticle* rp );
156  float gapCompensate_barrelPhi( float en, float phi );
157  float gapCompensate_theta( float en, float costh );
158  float gapCompensate_endcap( float xAcross );
159  float getDistanceAcrossEndcapQuadrant( float costh, float phi );
160  float getBarrelFoldedPhi( float phi);
161 
162  float getBarrelCorrectedPhi( float en, float phi );
163  float getCorrectedPhi ( float en, float costh, float phi );
164 
165  float getBarrelCorrectedTheta( float en, float theta );
166  float getEndcapCorrectedTheta( float en, float theta );
167  float getCorrectedTheta ( float en, float theta );
168 
169 
170  // -------------------
171 
173 
176 
182 
187 
192 
197 
204 
233 
235  float _assumed_endZ{};
236 
237 };
238 #endif
float _costhCorr_gaus2_norm_const
float get_phiBarrelCorr_pos_logen()
float get_phiBias_barrel_p0_4()
float getEndcapCorrectedTheta(float en, float theta)
float get_phiBias_barrel_p5_3()
float get_endcap_gaus2_mean()
void set_energyCorr_costheta(std::vector< float > pars)
float get_phiBias_barrel_p2_2()
void set_energyCorr_linearise(std::vector< float > pars)
float getDistanceAcrossEndcapQuadrant(float costh, float phi)
float _phiBarrelCorr_pos_const
float gapCompensatedEnergy(EVENT::ReconstructedParticle *rp)
float get_phiBias_barrel_p1_2()
float _thetaBias_endcap_p0_2
float get_endcap_gaus2_sigm()
float _costhCorr_gaus1_norm_logen
float get_costhCorr_gaus1_mean()
float get_phiBias_barrel_p2_1()
void set_phiCorr_barrel(std::vector< float > pars)
float get_phiBias_barrel_p5_2()
float get_phiBarrelCorr_pos_const()
float photonEnergyCorrection(EVENT::ReconstructedParticle *rp)
float _costhCorr_gaus1_norm_const
float get_assumed_boxsize()
float get_thetaBias_endcap_p2_2()
float get_phiBias_barrel_p0_1()
float get_thetaBias_endcap_p1_2()
float _thetaBias_barrel_p0_1
float get_phiBias_barrel_p7_3()
float get_thetaBias_endcap_p2_1()
float get_phiBias_barrel_p7_2()
float _thetaBias_endcap_p1_1
void photonDirectionCorrection(EVENT::ReconstructedParticle *rp, float &cor_theta, float &cor_phi)
float gapCompensate_endcap(float xAcross)
float get_phiBias_barrel_p6_2()
float get_phiBarrelCorr_depth()
float get_phiBias_barrel_p1_1()
float _thetaBias_endcap_p1_2
float getBarrelFoldedPhi(float phi)
float get_thetaBias_endcap_p0_1()
float _thetaBias_barrel_p1_1
float get_costhCorr_gaus2_norm_logen()
float get_phiBias_barrel_p5_1()
void set_thetaCorr_barrel(std::vector< float > pars)
float get_phiBias_barrel_p0_3()
float get_endcap_gaus1_norm()
float get_costhCorr_gaus2_sigm()
float get_costhCorr_gaus3_mean()
float get_energyLin_const()
float _thetaBias_endcap_p2_1
float get_barrelendcap_limit()
void set_thetaCorr_endcap(std::vector< float > pars)
float get_assumed_endZ()
float get_phiBias_barrel_p7_1()
float getBarrelCorrectedTheta(float en, float theta)
float get_costhCorr_gaus2_norm_const()
float get_thetaBias_barrel_p0_2()
float get_costhCorr_gaus3_norm()
float _thetaBias_barrel_p0_2
float get_endcap_gaus1_sigm()
float get_phiBias_barrel_p0_2()
float get_costhCorr_gaus1_norm_logen()
float _costhCorr_gaus2_norm_logen
float _thetaBias_endcap_p2_2
float get_phiBias_barrel_p3_1()
float get_phiBarrelCorr_width2()
float get_thetaBias_barrel_p1_2()
float get_costhCorr_gaus1_norm_const()
float get_costhCorr_gaus2_mean()
float _barrelendcap_costhlimit
float get_phiBias_barrel_p4_1()
float get_phiBias_barrel_p6_1()
float get_phiBarrelCorr_width1()
float gapCompensate_barrelPhi(float en, float phi)
float get_thetaBias_barrel_p0_1()
float get_costhCorr_gaus1_sigm()
float get_costhCorr_gaus3_sigm()
float get_thetaBias_endcap_p0_2()
float get_endcap_gaus2_norm()
void set_barrelendcap_limit(float x)
void set_assumed_endZ(float x)
void set_energyCorr_endcap(std::vector< float > pars)
void set_assumed_boxsize(float x)
void set_energyCorr_barrelPhi(std::vector< float > pars)
float get_thetaBias_endcap_p1_1()
float get_costhCorr_endcap_scale()
float _thetaBias_endcap_p0_1
float getCorrectedTheta(float en, float theta)
float getBarrelCorrectedPhi(float en, float phi)
float gapCompensate_theta(float en, float costh)
float get_energyLin_logen()
float get_endcap_gaus1_mean()
float energyLinearise(float en)
float _thetaBias_barrel_p1_2
float _phiBarrelCorr_pos_logen
float _costhCorr_endcap_scale
float getCorrectedPhi(float en, float costh, float phi)
float get_thetaBias_barrel_p1_1()