CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EMECALShowerParametrization.h
Go to the documentation of this file.
1 #ifndef EMECALShowerParametrization_H
2 #define EMECALShowerParametrization_H
3 
8 
16 #include <vector>
17 #include <cmath>
18 
20 {
21  public:
22 
24  const HCALProperties* hcal,
25  const PreshowerLayer1Properties* layer1,
26  const PreshowerLayer2Properties* layer2,
27  const std::vector<double>& coreIntervals,
28  const std::vector<double>& tailIntervals,
29  double RCFact=1.,
30  double RTFact=1.) :
31  theECAL(ecal),
32  theHCAL(hcal),
33  theLayer1(layer1),
34  theLayer2(layer2),
35  theCore(coreIntervals),
36  theTail(tailIntervals),
37  theRcfactor(RCFact),
38  theRtfactor(RTFact){}
39 
41 
42  inline double meanT(double lny) const {
43  return lny-0.858; }
44 
45  inline double meanAlpha(double lny) const {
46  return 0.21+(0.492+2.38/theECAL->theZeff())*lny; }
47 
48  inline double meanLnT(double lny) const {
49  return std::log(lny-0.812); }
50 
51  inline double sigmaLnT(double lny) const {
52  return 1./(-1.4+1.26*lny); }
53 
54  inline double meanLnAlpha(double lny) const {
55  return std::log(0.81+(0.458+2.26/theECAL->theZeff())*lny); }
56 
57  inline double sigmaLnAlpha(double lny) const {
58  return 1./(-0.58+0.86*lny); }
59 
60  inline double correlationAlphaT(double lny) const {
61  return 0.705-0.023*lny; }
62 
63  inline double nSpots(double E) const {
64  return 93.*std::log(theECAL->theZeff()) * std::pow(E,0.876); }
65 
66  inline double meanAlphaSpot(double alpha) const {
67  return alpha*(0.639+0.00334*theECAL->theZeff()); }
68 
69  inline double meanTSpot(double T) const {
70  return T*(0.698+0.00212*theECAL->theZeff()); }
71 
72  inline double p(double tau, double E) const {
73  double arg = (p2()-tau)/p3(E);
74  return p1()* std::exp(arg-std::exp(arg));
75  }
76 
77  inline double rT(double tau,double E) const {
78  return theRtfactor*k1() * ( std::exp(k3()*(tau-k2()))+
79  std::exp(k4(E)*(tau-k2())) );
80  }
81 
82  inline double rC(double tau, double E) const {
83  return theRcfactor*(z1(E) + z2()*tau);
84  }
85 
86  inline const ECALProperties* ecalProperties() const {
87  return theECAL;
88  }
89 
90  inline const HCALProperties* hcalProperties() const {
91  return theHCAL;
92  }
93 
95  return theLayer1;
96  }
97 
99  return theLayer2;
100  }
101 
102  inline const std::vector<double>& getCoreIntervals() const { return theCore;}
103 
104  inline const std::vector<double>& getTailIntervals() const { return theTail;}
105 
106  private:
107 
112 
113  const std::vector<double>& theCore;
114  const std::vector<double>& theTail;
115 
116  double theRcfactor;
117  double theRtfactor;
118 
119  double p1() const { return 2.632-0.00094*theECAL->theZeff(); }
120  double p2() const { return 0.401+0.00187*theECAL->theZeff(); }
121  double p3(double E) const { return 1.313-0.0686*std::log(E); }
122 
123  double z1(double E) const { return 0.0251+0.00319*std::log(E); }
124  double z2() const { return 0.1162-0.000381*theECAL->theZeff(); }
125 
126  double k1() const { return 0.6590-0.00309*theECAL->theZeff(); }
127  double k2() const { return 0.6450; }
128  double k3() const { return -2.59; }
129  double k4(double E) const { return 0.3585+0.0421*std::log(E); }
130 
131 };
132 
133 #endif
float alpha
Definition: AMPTWrapper.h:95
double sigmaLnT(double lny) const
const HCALProperties * hcalProperties() const
double meanAlphaSpot(double alpha) const
double theZeff() const
Effective Z.
EMECALShowerParametrization(const ECALProperties *ecal, const HCALProperties *hcal, const PreshowerLayer1Properties *layer1, const PreshowerLayer2Properties *layer2, const std::vector< double > &coreIntervals, const std::vector< double > &tailIntervals, double RCFact=1., double RTFact=1.)
double rC(double tau, double E) const
Exp< T >::type exp(const T &t)
Definition: Exp.h:22
const PreshowerLayer1Properties * theLayer1
A arg
Definition: Factorize.h:36
const std::vector< double > & getTailIntervals() const
const std::vector< double > & getCoreIntervals() const
const PreshowerLayer2Properties * theLayer2
const std::vector< double > & theCore
double rT(double tau, double E) const
const std::vector< double > & theTail
const PreshowerLayer1Properties * layer1Properties() const
double correlationAlphaT(double lny) const
const ECALProperties * ecalProperties() const
Log< T >::type log(const T &t)
Definition: Log.h:22
double p(double tau, double E) const
const PreshowerLayer2Properties * layer2Properties() const
double meanLnAlpha(double lny) const
double meanAlpha(double lny) const
double sigmaLnAlpha(double lny) const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40