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,
33  float emEnergy,
34  float& expectedDepth,
35  float& expectedSigma) const;
36 
37  private:
38  // HGCAL average medium
39  static constexpr float criticalEnergy_ = 0.00536; // in GeV
40  static constexpr float radiationLength_ = 0.968; // in cm
41 
42  // mean values
43  // shower max <t_max> = t0 + t1*lny
44  static constexpr float meant0_{-1.396};
45  static constexpr float meant1_{1.007};
46  // <alpha> = alpha0 + alpha1*lny
47  static constexpr float meanalpha0_{-0.0433};
48  static constexpr float meanalpha1_{0.540};
49  // sigmas (relative uncertainty)
50  // sigma(ln(t_max)) = 1 / (sigmalnt0 + sigmalnt1*lny);
51  static constexpr float sigmalnt0_{-2.506};
52  static constexpr float sigmalnt1_{1.245};
53  // sigma(ln(alpha)) = 1 / (sigmalnt0 + sigmalnt1*lny);
54  static constexpr float sigmalnalpha0_{-0.08442};
55  static constexpr float sigmalnalpha1_{0.7904};
56  // correlation coefficient
57  // corr(ln(alpha), ln(t_max)) = corrlnalpha0_+corrlnalphalnt1_*lny
58  static constexpr float corrlnalphalnt0_{0.7858};
59  static constexpr float corrlnalphalnt1_{-0.0232};
60  };
61 
62 } // namespace hgcal
63 
64 #endif
static constexpr float meant0_
Definition: ShowerDepth.h:44
static constexpr float corrlnalphalnt0_
Definition: ShowerDepth.h:58
static constexpr float sigmalnalpha1_
Definition: ShowerDepth.h:55
float getClusterDepthCompatibility(float measuredDepth, float emEnergy, float &expectedDepth, float &expectedSigma) const
Definition: ShowerDepth.cc:6
static constexpr float meanalpha0_
Definition: ShowerDepth.h:47
static constexpr float meanalpha1_
Definition: ShowerDepth.h:48
static constexpr float radiationLength_
Definition: ShowerDepth.h:40
static constexpr float meant1_
Definition: ShowerDepth.h:45
static constexpr float sigmalnalpha0_
Definition: ShowerDepth.h:54
static constexpr float sigmalnt1_
Definition: ShowerDepth.h:52
static constexpr float corrlnalphalnt1_
Definition: ShowerDepth.h:59
static constexpr float criticalEnergy_
Definition: ShowerDepth.h:39
static constexpr float sigmalnt0_
Definition: ShowerDepth.h:51
#define constexpr