CMS 3D CMS Logo

ShowerDepth.h
Go to the documentation of this file.
1 #ifndef RecoEgamma_EgammaTools_ShowerDepth_h
2 #define RecoEgamma_EgammaTools_ShowerDepth_h
3 
4 /* ShowerDepth: computes expected EM shower mean depth
5  * in the HGCal, and compares it to measured depth
6  *
7  * Code copied from C. Charlot's
8  * Hopefully correct explanations by N. Smith
9  *
10  * Based on gamma distribution description of electromagnetic cascades [PDG2016, ss33.5]
11  * Basic equation:
12  * D_exp = X_0 t_max alpha / (alpha-1)
13  * where D_exp is expectedDepth, X_0 the radiation length in HGCal material, t_max
14  * the shower maximum and alpha a parameter of the gamma distribution. (beta := (a-1)/t_max)
15  * Both t_max and alpha are approximated as first order polynomials of ln y = E/E_c, where E_c
16  * is the critical energy, and presumably are extracted from fits to simulation, along with their
17  * corresponding uncertainties.
18  *
19  * sigma(D_exp) then follows from error propagation and we can compare to
20  * measured depth (distance between first hit and shower barycenter)
21  *
22  * The parameterization is for electrons, although photons will give similar results
23  */
24 
25 namespace hgcal {
26 
27  class ShowerDepth {
28  public:
31 
32  float getClusterDepthCompatibility(float measuredDepth, float emEnergy, float & expectedDepth, float & expectedSigma) const;
33 
34  private:
35  // HGCAL average medium
36  static constexpr float criticalEnergy_ = 0.00536; // in GeV
37  static constexpr float radiationLength_ = 0.968; // in cm
38 
39  // mean values
40  // shower max <t_max> = t0 + t1*lny
41  static constexpr float meant0_{ -1.396 };
42  static constexpr float meant1_{ 1.007 };
43  // <alpha> = alpha0 + alpha1*lny
44  static constexpr float meanalpha0_{ -0.0433 };
45  static constexpr float meanalpha1_{ 0.540 };
46  // sigmas (relative uncertainty)
47  // sigma(ln(t_max)) = 1 / (sigmalnt0 + sigmalnt1*lny);
48  static constexpr float sigmalnt0_{ -2.506 };
49  static constexpr float sigmalnt1_{ 1.245 };
50  // sigma(ln(alpha)) = 1 / (sigmalnt0 + sigmalnt1*lny);
51  static constexpr float sigmalnalpha0_{ -0.08442 };
52  static constexpr float sigmalnalpha1_{ 0.7904 };
53  // correlation coefficient
54  // corr(ln(alpha), ln(t_max)) = corrlnalpha0_+corrlnalphalnt1_*lny
55  static constexpr float corrlnalphalnt0_{ 0.7858 };
56  static constexpr float corrlnalphalnt1_{ -0.0232 };
57  };
58 
59 }
60 
61 #endif
static constexpr float meant0_
Definition: ShowerDepth.h:41
static constexpr float corrlnalphalnt0_
Definition: ShowerDepth.h:55
static constexpr float sigmalnalpha1_
Definition: ShowerDepth.h:52
float getClusterDepthCompatibility(float measuredDepth, float emEnergy, float &expectedDepth, float &expectedSigma) const
Definition: ShowerDepth.cc:6
#define constexpr
static constexpr float meanalpha0_
Definition: ShowerDepth.h:44
static constexpr float meanalpha1_
Definition: ShowerDepth.h:45
static constexpr float radiationLength_
Definition: ShowerDepth.h:37
static constexpr float meant1_
Definition: ShowerDepth.h:42
static constexpr float sigmalnalpha0_
Definition: ShowerDepth.h:51
static constexpr float sigmalnt1_
Definition: ShowerDepth.h:49
static constexpr float corrlnalphalnt1_
Definition: ShowerDepth.h:56
static constexpr float criticalEnergy_
Definition: ShowerDepth.h:36
static constexpr float sigmalnt0_
Definition: ShowerDepth.h:48