CMS 3D CMS Logo

Functions
HcalCorrectionFunctions.h File Reference

Go to the source code of this file.

Functions

float hbminus_special_ecorr (int ieta, int iphi, double energy, int runnum)
 Special energy correction for some HB- cells. More...
 
float timeshift_ns_hbheho (float wpksamp)
 

Function Documentation

◆ hbminus_special_ecorr()

float hbminus_special_ecorr ( int  ieta,
int  iphi,
double  energy,
int  runnum 
)

Special energy correction for some HB- cells.

Special energy correction for some HB- cells.

Definition at line 461 of file HcalSimpleRecAlgo.cc.

461  {
462  // return energy correction factor for HBM channels
463  // iphi=6 ieta=(-1,-15) and iphi=32 ieta=(-1,-7)
464  // I.Vodopianov 28 Feb. 2011
465  static const float low32[7] = {0.741, 0.721, 0.730, 0.698, 0.708, 0.751, 0.861};
466  static const float high32[7] = {0.973, 0.925, 0.900, 0.897, 0.950, 0.935, 1};
467  static const float low6[15] = {
468  0.635, 0.623, 0.670, 0.633, 0.644, 0.648, 0.600, 0.570, 0.595, 0.554, 0.505, 0.513, 0.515, 0.561, 0.579};
469  static const float high6[15] = {
470  0.875, 0.937, 0.942, 0.900, 0.922, 0.925, 0.901, 0.850, 0.852, 0.818, 0.731, 0.717, 0.782, 0.853, 0.778};
471 
472  double slope, mid, en;
473  double corr = 1.0;
474 
475  if (!(iphi == 6 && ieta < 0 && ieta > -16) && !(iphi == 32 && ieta < 0 && ieta > -8))
476  return corr;
477 
478  int jeta = -ieta - 1;
479  double xeta = (double)ieta;
480  if (energy > 0.)
481  en = energy;
482  else
483  en = 0.;
484 
485  if (iphi == 32) {
486  slope = 0.2272;
487  mid = 17.14 + 0.7147 * xeta;
488  if (en > 100.)
489  corr = high32[jeta];
490  else
491  corr = low32[jeta] + (high32[jeta] - low32[jeta]) / (1.0 + exp(-(en - mid) * slope));
492  } else if (iphi == 6 && runnum < 216091) {
493  slope = 0.1956;
494  mid = 15.96 + 0.3075 * xeta;
495  if (en > 100.0)
496  corr = high6[jeta];
497  else
498  corr = low6[jeta] + (high6[jeta] - low6[jeta]) / (1.0 + exp(-(en - mid) * slope));
499  }
500 
501  // std::cout << "HBHE cell: ieta, iphi = " << ieta << " " << iphi
502  // << " -> energy = " << en << " corr = " << corr << std::endl;
503 
504  return corr;
505 }

References alignCSCRings::corr, HCALHighEnergyHPDFilter_cfi::energy, JetChargeProducer_cfi::exp, LEDCalibrationChannels::ieta, LEDCalibrationChannels::iphi, METSignificanceParams_cfi::jeta, and slope.

Referenced by SimpleHBHEPhase1Algo::hbminusCorrectionFactor().

◆ timeshift_ns_hbheho()

float timeshift_ns_hbheho ( float  wpksamp)

Timeshift correction for HPDs based on the position of the peak ADC measurement. Allows for an accurate determination of the relative phase of the pulse shape from the HPD. Calculated based on a weighted sum of the -1,0,+1 samples relative to the peak as follows: wpksamp = (0*sample[0] + 1*sample[1] + 2*sample[2]) / (sample[0] + sample[1] + sample[2]) where sample[1] is the maximum ADC sample value.

Definition at line 582 of file HcalSimpleRecAlgo.cc.

582  {
583  float flx = (num_bins_hbheho - 1) * (wpksamp - wpksamp0_hbheho);
584  int index = (int)flx;
585  float yval;
586 
587  if (index < 0)
588  return actual_ns_hbheho[0];
589  else if (index >= num_bins_hbheho - 1)
590  return actual_ns_hbheho[num_bins_hbheho - 1];
591 
592  // else interpolate:
593  float y1 = actual_ns_hbheho[index];
594  float y2 = actual_ns_hbheho[index + 1];
595 
596  yval = y1 + (y2 - y1) * (flx - (float)index);
597 
598  return yval;
599 }

References actual_ns_hbheho, createfilelist::int, num_bins_hbheho, wpksamp0_hbheho, testProducerWithPsetDescEmpty_cfi::y1, and testProducerWithPsetDescEmpty_cfi::y2.

Referenced by HcalSimpleRecAlgoImpl::reco().

METSignificanceParams_cfi.jeta
jeta
Definition: METSignificanceParams_cfi.py:12
wpksamp0_hbheho
static const float wpksamp0_hbheho
Definition: HcalSimpleRecAlgo.cc:515
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
testProducerWithPsetDescEmpty_cfi.y1
y1
Definition: testProducerWithPsetDescEmpty_cfi.py:29
alignCSCRings.corr
dictionary corr
Definition: alignCSCRings.py:124
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
actual_ns_hbheho
static const float actual_ns_hbheho[num_bins_hbheho]
Definition: HcalSimpleRecAlgo.cc:518
testProducerWithPsetDescEmpty_cfi.y2
y2
Definition: testProducerWithPsetDescEmpty_cfi.py:30
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
num_bins_hbheho
static const int num_bins_hbheho
Definition: HcalSimpleRecAlgo.cc:516
createfilelist.int
int
Definition: createfilelist.py:10
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
slope
static const double slope[3]
Definition: CastorTimeSlew.cc:6