CMS 3D CMS Logo

List of all members | Public Member Functions
EvolutionECAL Class Reference

#include <EvolutionECAL.h>

Public Member Functions

double AgingVPT (double instLumi, double integralLumi, double eta)
 
double ChargeVPTCathode (double instLumi, double eta, double integralLumi)
 
double DamageProfileEta (double eta)
 
double DamageProfileEtaAPD (double eta)
 
double DegradationMeanEM50GeV (double mu)
 
double DegradationNonLinearityEM50GeV (double mu, double ene)
 
double DoseLongitudinalProfile (double z)
 
Double_t EquilibriumFractionColorCentersEM (double *x, double *par)
 
 EvolutionECAL ()
 
double InducedAbsorptionEM (double lumi, double eta)
 
double InducedAbsorptionHadronic (double lumi, double eta)
 
double LightCollectionEfficiency (double z, double mu)
 
double LightCollectionEfficiencyWeighted (double z, double mu_ind)
 
double NoiseFactorFE (double lumi, double eta)
 
double ResolutionConstantTermEM50GeV (double mu)
 
 ~EvolutionECAL ()=default
 

Detailed Description

Definition at line 23 of file EvolutionECAL.h.

Constructor & Destructor Documentation

◆ EvolutionECAL()

EvolutionECAL::EvolutionECAL ( )
inline

Definition at line 25 of file EvolutionECAL.h.

25 {};

◆ ~EvolutionECAL()

EvolutionECAL::~EvolutionECAL ( )
default

Member Function Documentation

◆ AgingVPT()

double EvolutionECAL::AgingVPT ( double  instLumi,
double  integralLumi,
double  eta 
)

Definition at line 353 of file EvolutionECAL.cc.

References ChargeVPTCathode(), MillePedeFileConverter_cfg::e, PVValHelper::eta, JetChargeProducer_cfi::exp, muonGEMDigis_cfi::instLumi, and mps_fire::result.

353  {
354  if (fabs(eta) < 1.497)
355  return 1.0;
356  double Q = ChargeVPTCathode(instLumi, eta, integralLumi);
357  double result = 0.772 + 0.228 * (3.94304e-01 * exp(-Q / 5.99232e-04) + (1 - 3.94304e-01) * exp(-Q / 1.58243e-02));
358  return result;
359 }
double ChargeVPTCathode(double instLumi, double eta, double integralLumi)

◆ ChargeVPTCathode()

double EvolutionECAL::ChargeVPTCathode ( double  instLumi,
double  eta,
double  integralLumi 
)

Definition at line 338 of file EvolutionECAL.cc.

References ALCARECOTkAlJpsiMuMu_cff::charge, DamageProfileEta(), DegradationMeanEM50GeV(), PVValHelper::eta, InducedAbsorptionEM(), InducedAbsorptionHadronic(), and muonGEMDigis_cfi::instLumi.

Referenced by AgingVPT().

338  {
339  double charge = 0.0;
340  double tmpLumi = 0.0;
341  double stepLumi = 1.0;
342  double muEM = InducedAbsorptionEM(instLumi, eta);
343  while (tmpLumi < integralLumi) {
344  tmpLumi += stepLumi;
345  double muHD = InducedAbsorptionHadronic(tmpLumi, eta);
346  double SS0 = DegradationMeanEM50GeV(muEM + muHD);
347  charge += SS0 * 0.26e-3 * DamageProfileEta(eta) * stepLumi;
348  }
349  return charge;
350 }
double DegradationMeanEM50GeV(double mu)
double InducedAbsorptionHadronic(double lumi, double eta)
double InducedAbsorptionEM(double lumi, double eta)
double DamageProfileEta(double eta)

◆ DamageProfileEta()

double EvolutionECAL::DamageProfileEta ( double  eta)

Definition at line 169 of file EvolutionECAL.cc.

References PVValHelper::eta, JetChargeProducer_cfi::exp, and x.

Referenced by ChargeVPTCathode(), EquilibriumFractionColorCentersEM(), and InducedAbsorptionHadronic().

169  {
170  double x = fabs(eta);
171  if (x < 1.497) {
172  return exp(-4.11065 + 0.258478 * x);
173  } else {
174  return exp(-13.5112 + 7.913860 * x - 0.998649 * x * x);
175  }
176 }

◆ DamageProfileEtaAPD()

double EvolutionECAL::DamageProfileEtaAPD ( double  eta)

Definition at line 179 of file EvolutionECAL.cc.

References EgHLTOffHistBins_cfi::et, PVValHelper::eta, and x.

Referenced by NoiseFactorFE().

179  {
180  double x = fabs(eta);
181  if (x < 1.497) {
182  double et = x / 1.48 * 34.0;
183  double etaprof = (9.54827 + et * 0.0379222 + et * et * (-0.00257047) + et * et * et * 0.00073546 +
184  et * et * et * et * (-1.49683e-05)) /
185  9.54827;
186  return etaprof;
187  } else {
188  return 1.0;
189  }
190 }

◆ DegradationMeanEM50GeV()

double EvolutionECAL::DegradationMeanEM50GeV ( double  mu)

Definition at line 246 of file EvolutionECAL.cc.

References alpha, MillePedeFileConverter_cfg::e, JetChargeProducer_cfi::exp, DeadROC_duringRun::f1, DeadROC_duringRun::f2, mps_fire::i, dqm-mbProfile::log, amptDefaultParameters_cff::mu, and x.

Referenced by ChargeVPTCathode().

246  {
247  double retval = 1.0;
248  double x = mu;
249  if (x < 1e-4)
250  return retval;
251  if (x >= 200.0)
252  x = 200.0; // parameterization is not valid for large mu
253 
254  double par[11] = {1.00000e+01,
255  -4.41441e-01,
256  7.08607e-02,
257  -3.75572e-01,
258  -3.60410e-01,
259  1.30130e-01,
260  -4.72350e-01,
261  3.36315e-01,
262  -1.19872e-01,
263  1.99574e-02,
264  -1.22910e-03};
265 
266  double alpha = par[0];
267 
268  double f1 = par[1] * x + par[2] * x * x;
269  double u = log(x);
270  double f2 = par[10];
271  for (int i = 9; i >= 3; i--)
272  f2 = par[i] + f2 * u;
273 
274  retval = f1 / (1.0 + exp(alpha * u)) + f2 / (1.0 + exp(-alpha * u));
275  retval = exp(retval);
276  return retval;
277 }
float alpha
Definition: AMPTWrapper.h:105

◆ DegradationNonLinearityEM50GeV()

double EvolutionECAL::DegradationNonLinearityEM50GeV ( double  mu,
double  ene 
)

Definition at line 280 of file EvolutionECAL.cc.

References MillePedeFileConverter_cfg::e, mps_fire::i, amptDefaultParameters_cff::mu, slope, and x.

280  {
281  if (ene <= 1e-3)
282  return 0.0;
283 
284  double x = mu;
285  if (mu <= 0.06)
286  x = 0.06;
287  if (mu >= 150.0)
288  x = 150.0;
289 
290  double par[9] = {5.17712e-03,
291  1.97597e-02,
292  3.36596e-02,
293  2.84505e-02,
294  1.38480e-02,
295  1.11498e-02,
296  7.73634e-03,
297  -1.30767e-03,
298  -2.20628e-03};
299 
300  double u = log10(x);
301  double slope = par[8];
302  for (int i = 7; i >= 0; i--)
303  slope = par[i] + slope * u;
304 
305  double retval = 1.0 + slope * log10(ene / 50.0);
306  if (retval <= 0.0)
307  retval = 0.0;
308  return retval;
309 }
static const double slope[3]

◆ DoseLongitudinalProfile()

double EvolutionECAL::DoseLongitudinalProfile ( double  z)

Definition at line 200 of file EvolutionECAL.cc.

References alpha, HLT_2023v12_cff::beta, JetChargeProducer_cfi::exp, hltrates_dqm_sourceclient-live_cfg::offset, funct::pow(), and z.

Referenced by EquilibriumFractionColorCentersEM().

200  {
201  double alpha = 4.72877e+00;
202  double beta = 5.91296e-01;
203  double amp1 = 6.24495e+02;
204  double amp2 = 1.84367e-01;
205  double offset = 2.00705e+01;
206  if (z >= 0.0 && z <= 22.0) {
207  double term1 = (amp1 / TMath::Gamma(alpha)) * pow((beta * z), (alpha - 1)) * exp(-beta * z);
208  double term2 = amp2 * (z - 11.0) * (z - 11.0) + offset;
209  return (term1 + term2) / 150.44;
210  } else {
211  return 0;
212  }
213 }
float alpha
Definition: AMPTWrapper.h:105
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ EquilibriumFractionColorCentersEM()

Double_t EvolutionECAL::EquilibriumFractionColorCentersEM ( double *  x,
double *  par 
)

Definition at line 216 of file EvolutionECAL.cc.

References alpha, DamageProfileEta(), DoseLongitudinalProfile(), MillePedeFileConverter_cfg::e, PVValHelper::eta, RPCpg::rate(), and x.

Referenced by InducedAbsorptionEM().

216  {
217  double instantLumi = par[0];
218  double eta = par[1];
219  double rate = DoseLongitudinalProfile(x[0]) * 5.0 * DamageProfileEta(eta) * instantLumi / 1e+34;
220  if (rate <= 0.0)
221  rate = 0.0;
222  double alpha = par[2];
223  return rate / (alpha + rate);
224 }
float alpha
Definition: AMPTWrapper.h:105
double DoseLongitudinalProfile(double z)
double rate(double x)
Definition: Constants.cc:3
double DamageProfileEta(double eta)

◆ InducedAbsorptionEM()

double EvolutionECAL::InducedAbsorptionEM ( double  lumi,
double  eta 
)

Definition at line 227 of file EvolutionECAL.cc.

References EquilibriumFractionColorCentersEM(), and PVValHelper::eta.

Referenced by ChargeVPTCathode().

227  {
228  double mu_max = 2.0;
229  double alpha1 = 3.41488e+00;
230 
231  std::unique_ptr<TF1> ftmp1 = std::make_unique<TF1>("ftmp1",
232  this,
234  0.0,
235  22.0,
236  3,
237  "EvolutionECAL",
238  "EquilibriumFractionColorCentersEM");
239  ftmp1->SetParameters(lumi, eta, alpha1);
240  double muEM = mu_max * ftmp1->Integral(0.0, 22.0) / 22.0;
241 
242  return muEM;
243 }
Double_t EquilibriumFractionColorCentersEM(double *x, double *par)

◆ InducedAbsorptionHadronic()

double EvolutionECAL::InducedAbsorptionHadronic ( double  lumi,
double  eta 
)

Definition at line 193 of file EvolutionECAL.cc.

References DamageProfileEta(), PVValHelper::eta, BXlumiParameters_cfi::lumi, amptDefaultParameters_cff::mu, and funct::pow().

Referenced by ChargeVPTCathode().

193  {
194  double fluence = DamageProfileEta(eta) * 2.7e+13 / 500.0 * lumi;
195  double mu = 2.08E-13 * pow(fluence, 1.0049);
196  return mu;
197 }
double DamageProfileEta(double eta)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ LightCollectionEfficiency()

double EvolutionECAL::LightCollectionEfficiency ( double  z,
double  mu 
)

Definition at line 5 of file EvolutionECAL.cc.

References A, a0, testProducerWithPsetDescEmpty_cfi::a2, B, b0, b1, b2, b3, b4, correctionTermsCaloMet_cff::C, fftjetpileupestimator_calo_uncalib_cfi::c0, alignmentValidation::c1, d0, d1, StorageManager_cfg::e1, JetChargeProducer_cfi::exp, f, amptDefaultParameters_cff::mu, funct::pow(), dttmaxenums::R, and z.

5  {
6  double f = 0;
7  if (z <= 0)
8  return f;
9  if (z >= 0.22)
10  return f;
11 
12  double e0 = 6.91563e-02;
13  double e1 = 1.64406e+00;
14  double e2 = 6.42509e-01;
15  double E = e0 / (1 + exp(e1 * (log10(mu) - e2)));
16 
17  double d0 = 3.85334e-01;
18  double d1 = -1.04647e-02;
19  double D = d0 * exp(d1 * mu);
20 
21  double c0 = 3.77629e-01;
22  double c1 = -3.23755e-01;
23  double c2 = 1.50247e+00;
24  double c3 = 3.03278e-01;
25  double C = -1 + c0 * exp(c1 * mu) * (1 + c2 * exp(c3 * mu));
26 
27  double b0 = -3.33575e-01;
28  double b1 = 4.44856e-01;
29  double b2 = 1.91766e+00;
30  double b3 = 2.69423e+00;
31  double b4 = 1.06905e+00;
32  double B =
33  (1 / mu) * (b0 + b1 * log10(mu) + b2 * pow(log10(mu), 2) + b3 * pow(log10(mu), 3) + b4 * pow(log10(mu), 4));
34 
35  double a0 = 7.18248e-02;
36  double a1 = 1.89016e+00;
37  double a2 = 2.15651e-02;
38  double a3 = 2.30786e-02;
39  double A = exp(B * mu * 0.015) * (a0 / (exp(a1 * (log10(mu) + a2)) + 1) + a3);
40 
41  double R = 0.01 * D * (4 / (0.222 + E) / (0.222 + E) - 1 / ((0.22 - z) * (z + E)));
42  f = A * exp(-B * mu * (0.22 - z)) * (1 + C * exp(R));
43 
44  return f;
45 }
weight_default_t b3[10]
Definition: b3.h:9
weight_default_t b1[25]
Definition: b1.h:9
Definition: APVGainStruct.h:7
weight_default_t b4[1]
Definition: b4.h:9
double f[11][100]
weight_default_t b2[10]
Definition: b2.h:9
static constexpr float d0
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
static constexpr float a0
Definition: APVGainStruct.h:7
static constexpr float b0
static constexpr float d1
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ LightCollectionEfficiencyWeighted()

double EvolutionECAL::LightCollectionEfficiencyWeighted ( double  z,
double  mu_ind 
)

Definition at line 114 of file EvolutionECAL.cc.

References A, a0, testProducerWithPsetDescEmpty_cfi::a2, B, b0, b1, b2, b3, b4, correctionTermsCaloMet_cff::C, fftjetpileupestimator_calo_uncalib_cfi::c0, alignmentValidation::c1, d0, d1, StorageManager_cfg::e1, JetChargeProducer_cfi::exp, f, amptDefaultParameters_cff::mu, funct::pow(), dttmaxenums::R, HLT_2023v12_cff::R0, and z.

114  {
115  if (z <= 0)
116  return 0;
117  if (z >= 1)
118  return 0;
119  if (mu_ind < 0)
120  return 1;
121 
122  double mu = mu_ind + 0.7;
123  double lmu = log10(mu);
124 
125  double e0 = 6.91563e-02;
126  double e1 = 1.64406e+00;
127  double e2 = 6.42509e-01;
128  double E = e0 / (1 + exp(e1 * (lmu - e2)));
129 
130  double d0 = 3.85334e-01;
131  double d1 = -1.04647e-02;
132  double D = d0 * exp(d1 * mu);
133 
134  double c0 = 3.77629e-01;
135  double c1 = -3.23755e-01;
136  double c2 = 1.50247e+00;
137  double c3 = 3.03278e-01;
138  double C = -1 + c0 * exp(c1 * mu) * (1 + c2 * exp(c3 * mu));
139 
140  double b0 = -3.33575e-01;
141  double b1 = 4.44856e-01;
142  double b2 = 1.91766e+00;
143  double b3 = 2.69423e+00;
144  double b4 = 1.06905e+00;
145  double B = (1 / mu) * (b0 + b1 * lmu + b2 * pow(lmu, 2) + b3 * pow(lmu, 3) + b4 * pow(lmu, 4));
146 
147  double a0 = 7.18248e-02;
148  double a1 = 1.89016e+00;
149  double a2 = 2.15651e-02;
150  double a3 = 2.30786e-02;
151  double A = exp(B * mu * 0.015) * (a0 / (exp(a1 * (lmu + a2)) + 1) + a3);
152 
153  double R = 0.01 * D * (4 / (0.222 + E) / (0.222 + E) - 1 / ((0.22 * 0.22) * (1. - z) * (z + E / 0.22)));
154 
155  // for undamaged crystal, mu0 = 0.7
156  double A0 = 0.0631452;
157  double B0 = -0.52267;
158  double C0 = -0.139646;
159  double D0 = 0.382522;
160  double E0 = 0.054473;
161  double R0 = 0.01 * D0 * (4 / (0.222 + E0) / (0.222 + E0) - 1 / ((0.22 * 0.22) * (1. - z) * (z + E0 / 0.22)));
162 
163  double f = A / A0 * exp(-(B * mu - B0 * 0.7) * 0.22 * (1. - z)) * (1 + C * exp(R)) / (1 + C0 * exp(R0));
164 
165  return f;
166 }
weight_default_t b3[10]
Definition: b3.h:9
weight_default_t b1[25]
Definition: b1.h:9
Definition: APVGainStruct.h:7
weight_default_t b4[1]
Definition: b4.h:9
Divides< arg, void > D0
Definition: Factorize.h:135
double f[11][100]
weight_default_t b2[10]
Definition: b2.h:9
static constexpr float d0
DecomposeProduct< arg, typename Div::arg > D
Definition: Factorize.h:141
static constexpr float a0
Definition: APVGainStruct.h:7
static constexpr float b0
static constexpr float d1
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ NoiseFactorFE()

double EvolutionECAL::NoiseFactorFE ( double  lumi,
double  eta 
)

Definition at line 362 of file EvolutionECAL.cc.

References DamageProfileEtaAPD(), PVValHelper::eta, mathSSE::sqrt(), and x.

362  {
363  double x = fabs(eta);
364  if (x < 1.497) {
365  return sqrt(1.0 + 0.495 * 0.03512 * lumi * DamageProfileEtaAPD(eta));
366  } else {
367  return 1.0;
368  }
369 }
T sqrt(T t)
Definition: SSEVec.h:19
double DamageProfileEtaAPD(double eta)

◆ ResolutionConstantTermEM50GeV()

double EvolutionECAL::ResolutionConstantTermEM50GeV ( double  mu)

Definition at line 312 of file EvolutionECAL.cc.

References JetChargeProducer_cfi::exp, f, mps_fire::i, dqm-mbProfile::log, amptDefaultParameters_cff::mu, and x.

312  {
313  double x = mu;
314  if (mu <= 0.01)
315  x = 0.01;
316  if (mu >= 200.0)
317  x = 200.0;
318 
319  double par[10] = {-6.21503e+00,
320  1.59759e+00,
321  -4.75221e-02,
322  -3.90299e-02,
323  3.97269e-03,
324  2.29574e-03,
325  -1.05280e-04,
326  -9.60963e-05,
327  -1.29594e-06,
328  1.70850e-06};
329 
330  double u = log(x);
331  double f = par[9];
332  for (int i = 8; i >= 0; i--)
333  f = par[i] + f * u;
334  return exp(f);
335 }
double f[11][100]