Go to the documentation of this file.00001 #ifndef EMECALShowerParametrization_H
00002 #define EMECALShowerParametrization_H
00003
00004 #include "FastSimulation/CalorimeterProperties/interface/ECALProperties.h"
00005 #include "FastSimulation/CalorimeterProperties/interface/HCALProperties.h"
00006 #include "FastSimulation/CalorimeterProperties/interface/PreshowerLayer1Properties.h"
00007 #include "FastSimulation/CalorimeterProperties/interface/PreshowerLayer2Properties.h"
00008
00016 #include <vector>
00017 #include <cmath>
00018
00019 class EMECALShowerParametrization
00020 {
00021 public:
00022
00023 EMECALShowerParametrization(const ECALProperties* ecal,
00024 const HCALProperties* hcal,
00025 const PreshowerLayer1Properties* layer1,
00026 const PreshowerLayer2Properties* layer2,
00027 const std::vector<double>& coreIntervals,
00028 const std::vector<double>& tailIntervals,
00029 double RCFact=1.,
00030 double RTFact=1.) :
00031 theECAL(ecal),
00032 theHCAL(hcal),
00033 theLayer1(layer1),
00034 theLayer2(layer2),
00035 theCore(coreIntervals),
00036 theTail(tailIntervals),
00037 theRcfactor(RCFact),
00038 theRtfactor(RTFact){}
00039
00040 virtual ~EMECALShowerParametrization() { }
00041
00042 inline double meanT(double lny) const {
00043 return lny-0.858; }
00044
00045 inline double meanAlpha(double lny) const {
00046 return 0.21+(0.492+2.38/theECAL->theZeff())*lny; }
00047
00048 inline double meanLnT(double lny) const {
00049 return std::log(lny-0.812); }
00050
00051 inline double sigmaLnT(double lny) const {
00052 return 1./(-1.4+1.26*lny); }
00053
00054 inline double meanLnAlpha(double lny) const {
00055 return std::log(0.81+(0.458+2.26/theECAL->theZeff())*lny); }
00056
00057 inline double sigmaLnAlpha(double lny) const {
00058 return 1./(-0.58+0.86*lny); }
00059
00060 inline double correlationAlphaT(double lny) const {
00061 return 0.705-0.023*lny; }
00062
00063 inline double nSpots(double E) const {
00064 return 93.*std::log(theECAL->theZeff()) * std::pow(E,0.876); }
00065
00066 inline double meanAlphaSpot(double alpha) const {
00067 return alpha*(0.639+0.00334*theECAL->theZeff()); }
00068
00069 inline double meanTSpot(double T) const {
00070 return T*(0.698+0.00212*theECAL->theZeff()); }
00071
00072 inline double p(double tau, double E) const {
00073 double arg = (p2()-tau)/p3(E);
00074 return p1()* std::exp(arg-std::exp(arg));
00075 }
00076
00077 inline double rT(double tau,double E) const {
00078 return theRtfactor*k1() * ( std::exp(k3()*(tau-k2()))+
00079 std::exp(k4(E)*(tau-k2())) );
00080 }
00081
00082 inline double rC(double tau, double E) const {
00083 return theRcfactor*(z1(E) + z2()*tau);
00084 }
00085
00086 inline const ECALProperties* ecalProperties() const {
00087 return theECAL;
00088 }
00089
00090 inline const HCALProperties* hcalProperties() const {
00091 return theHCAL;
00092 }
00093
00094 inline const PreshowerLayer1Properties* layer1Properties() const {
00095 return theLayer1;
00096 }
00097
00098 inline const PreshowerLayer2Properties* layer2Properties() const {
00099 return theLayer2;
00100 }
00101
00102 inline const std::vector<double>& getCoreIntervals() const { return theCore;}
00103
00104 inline const std::vector<double>& getTailIntervals() const { return theTail;}
00105
00106 private:
00107
00108 const ECALProperties* theECAL;
00109 const HCALProperties* theHCAL;
00110 const PreshowerLayer1Properties* theLayer1;
00111 const PreshowerLayer2Properties* theLayer2;
00112
00113 const std::vector<double>& theCore;
00114 const std::vector<double>& theTail;
00115
00116 double theRcfactor;
00117 double theRtfactor;
00118
00119 double p1() const { return 2.632-0.00094*theECAL->theZeff(); }
00120 double p2() const { return 0.401+0.00187*theECAL->theZeff(); }
00121 double p3(double E) const { return 1.313-0.0686*std::log(E); }
00122
00123 double z1(double E) const { return 0.0251+0.00319*std::log(E); }
00124 double z2() const { return 0.1162-0.000381*theECAL->theZeff(); }
00125
00126 double k1() const { return 0.6590-0.00309*theECAL->theZeff(); }
00127 double k2() const { return 0.6450; }
00128 double k3() const { return -2.59; }
00129 double k4(double E) const { return 0.3585+0.0421*std::log(E); }
00130
00131 };
00132
00133 #endif