CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Attributes
EnergyResolutionVsLumi Class Reference

#include <EnergyResolutionVsLumi.h>

Classes

struct  DegradationAtEta
 

Public Member Functions

double calcampDropPhotoDetector (double eta)
 
double calcampDropTotal (double eta)
 
double calcampDropTransparency (double eta)
 
double calcLightCollectionEfficiencyWeighted (DetId id, double z)
 
double calcLightCollectionEfficiencyWeighted2 (double eta, double z, double mu_ind=-1.0)
 
double calcmuEM (double eta)
 
double calcmuHD (double eta)
 
void calcmuTot ()
 
double calcmuTot (double eta)
 
double calcnoiseADC (double eta)
 
double calcnoiseIncreaseADC (double eta)
 
double calcresolutitonConstantTerm (double eta)
 
DegradationAtEta CalculateDegradation (double eta)
 
 EnergyResolutionVsLumi ()
 
 EnergyResolutionVsLumi (double lumi, double instlumi)
 
double getmuTot (double eta, int ix, int iy)
 
double Resolution (double eta, double ene)
 
void setInstLumi (double x)
 
void setLumi (double x)
 
void setLumies (double x, double y)
 
virtual ~EnergyResolutionVsLumi ()
 

Private Attributes

double m_instlumi
 
double m_lumi
 
double mu_eta [10085]
 
double vpt_eta [10085]
 

Detailed Description

Definition at line 18 of file EnergyResolutionVsLumi.h.

Constructor & Destructor Documentation

◆ EnergyResolutionVsLumi() [1/2]

EnergyResolutionVsLumi::EnergyResolutionVsLumi ( )

Definition at line 9 of file EnergyResolutionVsLumi.cc.

9  {
10  m_lumi = 0;
11  m_instlumi = 0;
12 }

References m_instlumi, and m_lumi.

◆ EnergyResolutionVsLumi() [2/2]

EnergyResolutionVsLumi::EnergyResolutionVsLumi ( double  lumi,
double  instlumi 
)
inline

Definition at line 22 of file EnergyResolutionVsLumi.h.

22  {
23  m_lumi = lumi;
24  m_instlumi = instlumi;
25  calcmuTot();
26  };

References calcmuTot(), BXlumiParameters_cfi::lumi, m_instlumi, and m_lumi.

◆ ~EnergyResolutionVsLumi()

EnergyResolutionVsLumi::~EnergyResolutionVsLumi ( )
virtual

Definition at line 14 of file EnergyResolutionVsLumi.cc.

14 {}

Member Function Documentation

◆ calcampDropPhotoDetector()

double EnergyResolutionVsLumi::calcampDropPhotoDetector ( double  eta)

Definition at line 150 of file EnergyResolutionVsLumi.cc.

150  {
151  double instLumi = m_instlumi;
152  double totLumi = m_lumi;
154  double result = model.AgingVPT(instLumi, totLumi, eta);
155  return result;
156 }

References PVValHelper::eta, muonGEMDigis_cfi::instLumi, m_instlumi, m_lumi, ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi::model, and mps_fire::result.

Referenced by calcampDropTotal(), calcLightCollectionEfficiencyWeighted2(), and calcmuTot().

◆ calcampDropTotal()

double EnergyResolutionVsLumi::calcampDropTotal ( double  eta)

Definition at line 158 of file EnergyResolutionVsLumi.cc.

158  {
159  double tra = this->calcampDropTransparency(eta);
160  double pho = this->calcampDropPhotoDetector(eta);
161  double result = tra * pho;
162  return result;
163 }

References calcampDropPhotoDetector(), calcampDropTransparency(), and mps_fire::result.

Referenced by EcalTrivialConditionRetriever::produceEcalLaserAPDPNRatios().

◆ calcampDropTransparency()

double EnergyResolutionVsLumi::calcampDropTransparency ( double  eta)

Definition at line 142 of file EnergyResolutionVsLumi.cc.

142  {
143  double muEM = this->calcmuEM(eta);
144  double muHD = this->calcmuHD(eta);
146  double result = model.DegradationMeanEM50GeV(muEM + muHD);
147  return result;
148 }

References calcmuEM(), calcmuHD(), ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi::model, and mps_fire::result.

Referenced by calcampDropTotal().

◆ calcLightCollectionEfficiencyWeighted()

double EnergyResolutionVsLumi::calcLightCollectionEfficiencyWeighted ( DetId  id,
double  z 
)

Definition at line 92 of file EnergyResolutionVsLumi.cc.

92  {
93  double v = 1.0;
94  double muTot = 0;
95  if (id.subdetId() == EcalBarrel) {
96  EBDetId ebId(id);
97  int ieta = std::abs(ebId.ieta());
98  muTot = mu_eta[ieta];
99 
100  } else if (id.subdetId() == EcalEndcap) {
101  EEDetId eeId(id);
102  int ix = eeId.ix();
103  int iy = eeId.iy();
104 
105  muTot = mu_eta[EBDetId::MAX_IETA + ix + iy * (EEDetId::IX_MAX)];
106  v = vpt_eta[EBDetId::MAX_IETA + ix + iy * (EEDetId::IX_MAX)];
107  } else {
108  muTot = 0;
109  }
110  double zcor = z;
112  if (z < 0.02) {
113  zcor = 0.02;
114  } else if (z > 0.98) {
115  zcor = 0.98;
116  }
117 
118  double result = model.LightCollectionEfficiencyWeighted(zcor, muTot) * v;
119 
120  return result;
121 }

References funct::abs(), EcalBarrel, EcalEndcap, EBDetId::ieta(), LEDCalibrationChannels::ieta, EEDetId::ix(), EEDetId::IX_MAX, EEDetId::iy(), EBDetId::MAX_IETA, ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi::model, mu_eta, mps_fire::result, findQualityFiles::v, vpt_eta, and z.

Referenced by ECalSD::curve_LY().

◆ calcLightCollectionEfficiencyWeighted2()

double EnergyResolutionVsLumi::calcLightCollectionEfficiencyWeighted2 ( double  eta,
double  z,
double  mu_ind = -1.0 
)

Definition at line 123 of file EnergyResolutionVsLumi.cc.

123  {
124  if (mu_ind < 0)
125  mu_ind = this->calcmuTot(eta);
126  double v = this->calcampDropPhotoDetector(eta);
128  double result = model.LightCollectionEfficiencyWeighted(z, mu_ind) * v;
129  return result;
130 }

References calcampDropPhotoDetector(), calcmuTot(), ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi::model, mps_fire::result, findQualityFiles::v, and z.

◆ calcmuEM()

double EnergyResolutionVsLumi::calcmuEM ( double  eta)

◆ calcmuHD()

double EnergyResolutionVsLumi::calcmuHD ( double  eta)

Definition at line 55 of file EnergyResolutionVsLumi.cc.

55  {
56  double totLumi = m_lumi;
58  double result = model.InducedAbsorptionHadronic(totLumi, eta);
59  return result;
60 }

References PVValHelper::eta, m_lumi, ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi::model, and mps_fire::result.

Referenced by calcampDropTransparency(), and calcresolutitonConstantTerm().

◆ calcmuTot() [1/2]

void EnergyResolutionVsLumi::calcmuTot ( )

Definition at line 62 of file EnergyResolutionVsLumi.cc.

62  {
63  for (int iEta = 1; iEta <= EBDetId::MAX_IETA; ++iEta) {
64  if (iEta == 0)
65  continue;
66 
67  double eta = EBDetId::approxEta(EBDetId(iEta, 1));
68  eta = std::abs(eta);
69  double r = calcmuTot(eta);
70 
71  mu_eta[iEta] = r;
72  vpt_eta[iEta] = 1.0;
73  }
74 
75  for (int iX = EEDetId::IX_MIN; iX <= EEDetId::IX_MAX; ++iX) {
76  for (int iY = EEDetId::IY_MIN; iY <= EEDetId::IY_MAX; ++iY) {
77  if (EEDetId::validDetId(iX, iY, 1)) {
78  EEDetId eedetidpos(iX, iY, 1);
79  double eta = -log(tan(0.5 * atan(sqrt((iX - 50.0) * (iX - 50.0) + (iY - 50.0) * (iY - 50.0)) * 2.98 / 328.)));
80  eta = std::abs(eta);
81  double r = calcmuTot(eta);
82  double v = calcampDropPhotoDetector(eta);
83 
84  mu_eta[EBDetId::MAX_IETA + iX + iY * (EEDetId::IX_MAX)] = r;
85  vpt_eta[EBDetId::MAX_IETA + iX + iY * (EEDetId::IX_MAX)] = v;
86  //std::cout<<"eta/mu/vpt"<<eta<<"/"<<r<<"/"<<v<<std::endl;
87  }
88  }
89  }
90 }

References funct::abs(), EBDetId::approxEta(), calcampDropPhotoDetector(), PVValHelper::eta, L1TowerCalibrationProducer_cfi::iEta, EEDetId::IX_MAX, EEDetId::IX_MIN, EEDetId::IY_MAX, EEDetId::IY_MIN, dqm-mbProfile::log, EBDetId::MAX_IETA, mu_eta, alignCSCRings::r, mathSSE::sqrt(), funct::tan(), findQualityFiles::v, EEDetId::validDetId(), and vpt_eta.

Referenced by calcLightCollectionEfficiencyWeighted2(), EnergyResolutionVsLumi(), and setLumies().

◆ calcmuTot() [2/2]

double EnergyResolutionVsLumi::calcmuTot ( double  eta)

Definition at line 132 of file EnergyResolutionVsLumi.cc.

132  {
133  double totLumi = m_lumi;
134  double instLumi = m_instlumi;
136  double muEM = model.InducedAbsorptionEM(instLumi, eta);
137  double muH = model.InducedAbsorptionHadronic(totLumi, eta);
138  double result = muEM + muH;
139  return result;
140 }

References PVValHelper::eta, muonGEMDigis_cfi::instLumi, m_instlumi, m_lumi, ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi::model, and mps_fire::result.

◆ calcnoiseADC()

double EnergyResolutionVsLumi::calcnoiseADC ( double  eta)

Definition at line 173 of file EnergyResolutionVsLumi.cc.

173  {
174  double totLumi = m_lumi;
175  double Nadc = 1.1;
176  double result = 1.0;
178  if (std::abs(eta) < 1.497) {
179  Nadc = 1.1;
180  result = model.NoiseFactorFE(totLumi, eta) * Nadc;
181  } else {
182  Nadc = 2.0;
183  result = Nadc;
184  // endcaps no increase in ADC
185  }
186  return result;
187 }

References funct::abs(), PVValHelper::eta, m_lumi, ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi::model, and mps_fire::result.

◆ calcnoiseIncreaseADC()

double EnergyResolutionVsLumi::calcnoiseIncreaseADC ( double  eta)

Definition at line 165 of file EnergyResolutionVsLumi.cc.

165  {
166  double totLumi = m_lumi;
168  double result = model.NoiseFactorFE(totLumi, eta);
169  return result;
170  // noise increase in ADC
171 }

References PVValHelper::eta, m_lumi, ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi::model, and mps_fire::result.

Referenced by EcalTrivialConditionRetriever::produceEcalPedestals().

◆ calcresolutitonConstantTerm()

double EnergyResolutionVsLumi::calcresolutitonConstantTerm ( double  eta)

Definition at line 189 of file EnergyResolutionVsLumi.cc.

189  {
190  double muEM = this->calcmuEM(eta);
191  double muHD = this->calcmuHD(eta);
193  double result = model.ResolutionConstantTermEM50GeV(muEM + muHD);
194  return result;
195 }

References calcmuEM(), calcmuHD(), ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi::model, and mps_fire::result.

Referenced by EcalTrivialConditionRetriever::getIntercalibConstantsFromConfiguration().

◆ CalculateDegradation()

EnergyResolutionVsLumi::DegradationAtEta EnergyResolutionVsLumi::CalculateDegradation ( double  eta)

Definition at line 16 of file EnergyResolutionVsLumi.cc.

16  {
17  DegradationAtEta result;
18 
19  result.eta = eta;
20  double totLumi = m_lumi;
21  double instLumi = m_instlumi;
22 
24 
25  // Index of induced absorption due to EM damages in PWO4
26  result.muEM = model.InducedAbsorptionEM(instLumi, eta);
27 
28  // Index of induced absorption due to hadron damages in PWO4
29  result.muHD = model.InducedAbsorptionHadronic(totLumi, eta);
30 
31  // Average degradation of amplitude due to transparency change
32  result.ampDropTransparency = model.DegradationMeanEM50GeV(result.muEM + result.muHD);
33 
34  // Average degradation of amplitude due to photo-detector aging
35  result.ampDropPhotoDetector = model.AgingVPT(instLumi, totLumi, eta);
36 
37  result.ampDropTotal = result.ampDropTransparency * result.ampDropPhotoDetector;
38 
39  // Noise increase in ADC counts due to photo-detector and front-end
40  result.noiseIncreaseADC = model.NoiseFactorFE(totLumi, eta);
41 
42  // Resolution degradation due to LY non-uniformity caused by transparency loss
43  result.resolutitonConstantTerm = model.ResolutionConstantTermEM50GeV(result.muEM + result.muHD);
44 
45  return result;
46 }

References PVValHelper::eta, muonGEMDigis_cfi::instLumi, m_instlumi, m_lumi, ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi::model, and mps_fire::result.

Referenced by Resolution().

◆ getmuTot()

double EnergyResolutionVsLumi::getmuTot ( double  eta,
int  ix,
int  iy 
)

◆ Resolution()

double EnergyResolutionVsLumi::Resolution ( double  eta,
double  ene 
)

Definition at line 197 of file EnergyResolutionVsLumi.cc.

197  {
198  // Initial parameters for ECAL resolution
199  double S;
200  double Nadc;
201  double adc2GeV;
202  double C;
203  if (eta < 1.497) {
204  S = 0.028; // CMS note 2006/148 (EB test beam)
205  Nadc = 1.1;
206  adc2GeV = 0.039;
207  C = 0.003;
208  } else {
209  S = 0.052; // CMS DN 2009/002
210  Nadc = 2.0;
211  adc2GeV = 0.069;
212  C = 0.004;
213  }
214 
215  DegradationAtEta d = CalculateDegradation(eta);
216 
217  // adjust resolution parameters
218  S /= sqrt(d.ampDropTotal);
219  Nadc *= d.noiseIncreaseADC;
220  adc2GeV /= d.ampDropTotal;
221  double N = Nadc * adc2GeV * 3.0; // 3x3 noise in GeV
222  C = sqrt(C * C + d.resolutitonConstantTerm * d.resolutitonConstantTerm);
223 
224  return sqrt(S * S / ene + N * N / ene / ene + C * C);
225 }

References gen::C, CalculateDegradation(), ztail::d, PVValHelper::eta, N, S(), and mathSSE::sqrt().

◆ setInstLumi()

void EnergyResolutionVsLumi::setInstLumi ( double  x)
inline

◆ setLumi()

void EnergyResolutionVsLumi::setLumi ( double  x)
inline

◆ setLumies()

void EnergyResolutionVsLumi::setLumies ( double  x,
double  y 
)
inline

Definition at line 47 of file EnergyResolutionVsLumi.h.

47 { m_lumi = x, m_instlumi = y, calcmuTot(); };

References calcmuTot(), m_instlumi, m_lumi, x, and y.

Referenced by ECalSD::ECalSD().

Member Data Documentation

◆ m_instlumi

double EnergyResolutionVsLumi::m_instlumi
private

◆ m_lumi

double EnergyResolutionVsLumi::m_lumi
private

◆ mu_eta

double EnergyResolutionVsLumi::mu_eta[10085]
private

Definition at line 68 of file EnergyResolutionVsLumi.h.

Referenced by calcLightCollectionEfficiencyWeighted(), and calcmuTot().

◆ vpt_eta

double EnergyResolutionVsLumi::vpt_eta[10085]
private

Definition at line 69 of file EnergyResolutionVsLumi.h.

Referenced by calcLightCollectionEfficiencyWeighted(), and calcmuTot().

EnergyResolutionVsLumi::calcampDropTransparency
double calcampDropTransparency(double eta)
Definition: EnergyResolutionVsLumi.cc:142
DDAxes::y
EnergyResolutionVsLumi::m_instlumi
double m_instlumi
Definition: EnergyResolutionVsLumi.h:67
EBDetId::approxEta
float approxEta() const
Definition: EBDetId.h:102
EnergyResolutionVsLumi::calcmuTot
void calcmuTot()
Definition: EnergyResolutionVsLumi.cc:62
EBDetId
Definition: EBDetId.h:17
EnergyResolutionVsLumi::CalculateDegradation
DegradationAtEta CalculateDegradation(double eta)
Definition: EnergyResolutionVsLumi.cc:16
EnergyResolutionVsLumi::m_lumi
double m_lumi
Definition: EnergyResolutionVsLumi.h:66
EEDetId::IX_MIN
static const int IX_MIN
Definition: EEDetId.h:290
DDAxes::x
EEDetId::IY_MIN
static const int IY_MIN
Definition: EEDetId.h:294
EnergyResolutionVsLumi::calcmuHD
double calcmuHD(double eta)
Definition: EnergyResolutionVsLumi.cc:55
findQualityFiles.v
v
Definition: findQualityFiles.py:179
EcalBarrel
Definition: EcalSubdetector.h:10
ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi.model
model
Definition: ReggeGribovPartonMC_EposLHC_2760GeV_PbPb_cfi.py:11
BXlumiParameters_cfi.lumi
lumi
Definition: BXlumiParameters_cfi.py:6
PVValHelper::eta
Definition: PVValidationHelpers.h:70
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DDAxes::z
N
#define N
Definition: blowfish.cc:9
EnergyResolutionVsLumi::vpt_eta
double vpt_eta[10085]
Definition: EnergyResolutionVsLumi.h:69
EEDetId::IY_MAX
static const int IY_MAX
Definition: EEDetId.h:302
EEDetId
Definition: EEDetId.h:14
EnergyResolutionVsLumi::mu_eta
double mu_eta[10085]
Definition: EnergyResolutionVsLumi.h:68
EnergyResolutionVsLumi::calcmuEM
double calcmuEM(double eta)
Definition: EnergyResolutionVsLumi.cc:48
EcalEndcap
Definition: EcalSubdetector.h:10
S
double S(const TLorentzVector &, const TLorentzVector &)
Definition: Particle.cc:97
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
EEDetId::IX_MAX
static const int IX_MAX
Definition: EEDetId.h:298
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
muonGEMDigis_cfi.instLumi
instLumi
Definition: muonGEMDigis_cfi.py:10
alignCSCRings.r
r
Definition: alignCSCRings.py:93
EvolutionECAL
Definition: EvolutionECAL.h:23
EnergyResolutionVsLumi::calcampDropPhotoDetector
double calcampDropPhotoDetector(double eta)
Definition: EnergyResolutionVsLumi.cc:150
gen::C
C
Definition: PomwigHadronizer.cc:78
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
S
Definition: CSCDBL1TPParametersExtended.h:16
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
L1TowerCalibrationProducer_cfi.iEta
iEta
Definition: L1TowerCalibrationProducer_cfi.py:60
ztail.d
d
Definition: ztail.py:151
mps_fire.result
result
Definition: mps_fire.py:311
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
EBDetId::MAX_IETA
static const int MAX_IETA
Definition: EBDetId.h:136