CMS 3D CMS Logo

EcalUncalibRecHitWorkerGlobal.cc
Go to the documentation of this file.
1 
39 
41 public:
43  EcalUncalibRecHitWorkerGlobal() = default; // for EcalUncalibRecHitFillDescriptionWorkerFactory
44 
45  void set(const edm::EventSetup& es) override;
46  bool run(const edm::Event& evt,
49 
51 
52 protected:
53  double pedVec[3];
54  double pedRMSVec[3];
55  double gainRatios[3];
56 
61 
62  template <class C>
63  int isSaturated(const C& digi);
64 
65  double timeCorrection(float ampli, const std::vector<float>& amplitudeBins, const std::vector<float>& shiftBins);
66 
67  // weights method
76  EEShape testbeamEEShape; // used in the chi2
77  EBShape testbeamEBShape; // can be replaced by simple shape arrays of float in the future
78 
79  // determie which of the samples must actually be used by ECAL local reco
82 
83  // ratio method
84  std::vector<double> EBtimeFitParameters_;
85  std::vector<double> EEtimeFitParameters_;
86  std::vector<double> EBamplitudeFitParameters_;
87  std::vector<double> EEamplitudeFitParameters_;
88  std::pair<double, double> EBtimeFitLimits_;
89  std::pair<double, double> EEtimeFitLimits_;
90 
93 
95  double EBtimeNconst_;
97  double EEtimeNconst_;
109 
112 
117  std::vector<double> ebPulseShape_;
118  std::vector<double> eePulseShape_;
119 
120  // chi2 method
125  std::vector<double> EBchi2Parameters_;
126  std::vector<double> EEchi2Parameters_;
127 };
128 
131  tokenPeds_(c.esConsumes<EcalPedestals, EcalPedestalsRcd>()),
132  tokenGains_(c.esConsumes<EcalGainRatios, EcalGainRatiosRcd>()),
134  tokenWgts_(c.esConsumes<EcalTBWeights, EcalTBWeightsRcd>()),
135  testbeamEEShape(c),
136  testbeamEBShape(c),
137  tokenSampleMask_(c.esConsumes<EcalSampleMask, EcalSampleMaskRcd>()),
141  // ratio method parameters
142  EBtimeFitParameters_ = ps.getParameter<std::vector<double>>("EBtimeFitParameters");
143  EEtimeFitParameters_ = ps.getParameter<std::vector<double>>("EEtimeFitParameters");
144  EBamplitudeFitParameters_ = ps.getParameter<std::vector<double>>("EBamplitudeFitParameters");
145  EEamplitudeFitParameters_ = ps.getParameter<std::vector<double>>("EEamplitudeFitParameters");
146  EBtimeFitLimits_.first = ps.getParameter<double>("EBtimeFitLimits_Lower");
147  EBtimeFitLimits_.second = ps.getParameter<double>("EBtimeFitLimits_Upper");
148  EEtimeFitLimits_.first = ps.getParameter<double>("EEtimeFitLimits_Lower");
149  EEtimeFitLimits_.second = ps.getParameter<double>("EEtimeFitLimits_Upper");
150  EBtimeConstantTerm_ = ps.getParameter<double>("EBtimeConstantTerm");
151  EBtimeNconst_ = ps.getParameter<double>("EBtimeNconst");
152  EEtimeConstantTerm_ = ps.getParameter<double>("EEtimeConstantTerm");
153  EEtimeNconst_ = ps.getParameter<double>("EEtimeNconst");
154  outOfTimeThreshG12pEB_ = ps.getParameter<double>("outOfTimeThresholdGain12pEB");
155  outOfTimeThreshG12mEB_ = ps.getParameter<double>("outOfTimeThresholdGain12mEB");
156  outOfTimeThreshG61pEB_ = ps.getParameter<double>("outOfTimeThresholdGain61pEB");
157  outOfTimeThreshG61mEB_ = ps.getParameter<double>("outOfTimeThresholdGain61mEB");
158  outOfTimeThreshG12pEE_ = ps.getParameter<double>("outOfTimeThresholdGain12pEE");
159  outOfTimeThreshG12mEE_ = ps.getParameter<double>("outOfTimeThresholdGain12mEE");
160  outOfTimeThreshG61pEE_ = ps.getParameter<double>("outOfTimeThresholdGain61pEE");
161  outOfTimeThreshG61mEE_ = ps.getParameter<double>("outOfTimeThresholdGain61mEE");
162  amplitudeThreshEB_ = ps.getParameter<double>("amplitudeThresholdEB");
163  amplitudeThreshEE_ = ps.getParameter<double>("amplitudeThresholdEE");
164 
165  // spike threshold
166  ebSpikeThresh_ = ps.getParameter<double>("ebSpikeThreshold");
167 
168  ebPulseShape_ = ps.getParameter<std::vector<double>>("ebPulseShape");
169  eePulseShape_ = ps.getParameter<std::vector<double>>("eePulseShape");
170 
171  // chi2 parameters
172  kPoorRecoFlagEB_ = ps.getParameter<bool>("kPoorRecoFlagEB");
173  kPoorRecoFlagEE_ = ps.getParameter<bool>("kPoorRecoFlagEE");
174 
175  chi2ThreshEB_ = ps.getParameter<double>("chi2ThreshEB_");
176  chi2ThreshEE_ = ps.getParameter<double>("chi2ThreshEE_");
177  EBchi2Parameters_ = ps.getParameter<std::vector<double>>("EBchi2Parameters");
178  EEchi2Parameters_ = ps.getParameter<std::vector<double>>("EEchi2Parameters");
179 }
180 
182  // common setup
184  peds_ = es.getHandle(tokenPeds_);
185 
186  // for the weights method
187  grps_ = es.getHandle(tokenGrps_);
188  wgts_ = es.getHandle(tokenWgts_);
189 
190  // which of the samples need be used
192 
193  // for the ratio method
194 
197 
198  // for the time correction methods
200 
201  // for the DB Ecal Pulse Sim Shape
204 }
205 
206 // check saturation: 5 samples with gainId = 0
207 template <class C>
209  //bool saturated_ = 0;
210  int cnt;
211  for (int j = 0; j < C::MAXSAMPLES - 5; ++j) {
212  cnt = 0;
213  for (int i = j; i < (j + 5) && i < C::MAXSAMPLES; ++i) {
214  if (dataFrame.sample(i).gainId() == 0)
215  ++cnt;
216  }
217  if (cnt == 5)
218  return j - 1; // the last unsaturated sample
219  }
220  return -1; // no saturation found
221 }
222 
233  const std::vector<float>& amplitudeBins,
234  const std::vector<float>& shiftBins) {
235  // computed initially in ns. Than turned in the BX's, as
236  // EcalUncalibratedRecHit need be.
237  double theCorrection = 0;
238 
239  // sanity check for arrays
240  if (amplitudeBins.empty()) {
241  edm::LogError("EcalRecHitError") << "timeCorrAmplitudeBins is empty, forcing no time bias corrections.";
242 
243  return 0;
244  }
245 
246  if (amplitudeBins.size() != shiftBins.size()) {
247  edm::LogError("EcalRecHitError") << "Size of timeCorrAmplitudeBins different from "
248  "timeCorrShiftBins. Forcing no time bias corrections. ";
249 
250  return 0;
251  }
252 
253  int myBin = -1;
254  for (int bin = 0; bin < (int)amplitudeBins.size(); bin++) {
255  if (ampli > amplitudeBins.at(bin)) {
256  myBin = bin;
257  } else {
258  break;
259  }
260  }
261 
262  if (myBin == -1) {
263  theCorrection = shiftBins.at(0);
264  } else if (myBin == ((int)(amplitudeBins.size() - 1))) {
265  theCorrection = shiftBins.at(myBin);
266  } else if (-1 < myBin && myBin < ((int)amplitudeBins.size() - 1)) {
267  // interpolate linearly between two assingned points
268  theCorrection = (shiftBins.at(myBin + 1) - shiftBins.at(myBin));
269  theCorrection *=
270  (((double)ampli) - amplitudeBins.at(myBin)) / (amplitudeBins.at(myBin + 1) - amplitudeBins.at(myBin));
271  theCorrection += shiftBins.at(myBin);
272  } else {
273  edm::LogError("EcalRecHitError") << "Assigning time correction impossible. Setting it to 0 ";
274  theCorrection = 0.;
275  }
276 
277  // convert ns into clocks
278  return theCorrection / 25.;
279 }
280 
284  DetId detid(itdg->id());
285 
286  const EcalSampleMask* sampleMask_ = sampleMaskHand_.product();
287 
288  // intelligence for recHit computation
289  EcalUncalibratedRecHit uncalibRecHit;
290 
291  const EcalPedestals::Item* aped = nullptr;
292  const EcalMGPAGainRatio* aGain = nullptr;
293  const EcalXtalGroupId* gid = nullptr;
294  float offsetTime = 0;
295 
296  if (detid.subdetId() == EcalEndcap) {
297  unsigned int hashedIndex = EEDetId(detid).hashedIndex();
298  aped = &peds_->endcap(hashedIndex);
299  aGain = &gains_->endcap(hashedIndex);
300  gid = &grps_->endcap(hashedIndex);
301  offsetTime = offtime_->getEEValue();
302  } else {
303  unsigned int hashedIndex = EBDetId(detid).hashedIndex();
304  aped = &peds_->barrel(hashedIndex);
305  aGain = &gains_->barrel(hashedIndex);
306  gid = &grps_->barrel(hashedIndex);
307  offsetTime = offtime_->getEBValue();
308  }
309 
310  pedVec[0] = aped->mean_x12;
311  pedVec[1] = aped->mean_x6;
312  pedVec[2] = aped->mean_x1;
313  pedRMSVec[0] = aped->rms_x12;
314  pedRMSVec[1] = aped->rms_x6;
315  pedRMSVec[2] = aped->rms_x1;
316  gainRatios[0] = 1.;
317  gainRatios[1] = aGain->gain12Over6();
318  gainRatios[2] = aGain->gain6Over1() * aGain->gain12Over6();
319 
320  // compute the right bin of the pulse shape using time calibration constants
322  EcalTimeCalibConstant itimeconst = 0;
323  if (it != itime_->end()) {
324  itimeconst = (*it);
325  } else {
326  edm::LogError("EcalRecHitError") << "No time intercalib const found for xtal " << detid.rawId()
327  << "! something wrong with EcalTimeCalibConstants in your DB? ";
328  }
329 
330  // === amplitude computation ===
331  int leadingSample = -1;
332  if (detid.subdetId() == EcalEndcap) {
333  leadingSample = ((EcalDataFrame)(*itdg)).lastUnsaturatedSample();
334  } else {
335  leadingSample = ((EcalDataFrame)(*itdg)).lastUnsaturatedSample();
336  }
337 
338  if (leadingSample == 4) { // saturation on the expected max sample
339  uncalibRecHit = EcalUncalibratedRecHit((*itdg).id(), 4095 * 12, 0, 0, 0);
341  // do not propagate the default chi2 = -1 value to the calib rechit (mapped to 64), set it to 0 when saturation
342  uncalibRecHit.setChi2(0);
343  } else if (leadingSample >= 0) { // saturation on other samples: cannot extrapolate from the fourth one
344  double pedestal = 0.;
345  double gainratio = 1.;
346  int gainId = ((EcalDataFrame)(*itdg)).sample(5).gainId();
347 
348  if (gainId == 0 || gainId == 3) {
349  pedestal = aped->mean_x1;
350  gainratio = aGain->gain6Over1() * aGain->gain12Over6();
351  } else if (gainId == 1) {
352  pedestal = aped->mean_x12;
353  gainratio = 1.;
354  } else if (gainId == 2) {
355  pedestal = aped->mean_x6;
356  gainratio = aGain->gain12Over6();
357  }
358  double amplitude = ((double)(((EcalDataFrame)(*itdg)).sample(5).adc()) - pedestal) * gainratio;
359  uncalibRecHit = EcalUncalibratedRecHit((*itdg).id(), amplitude, 0, 0, 0);
361  // do not propagate the default chi2 = -1 value to the calib rechit (mapped to 64), set it to 0 when saturation
362  uncalibRecHit.setChi2(0);
363  } else {
364  // weights method
365  EcalTBWeights::EcalTDCId tdcid(1);
366  EcalTBWeights::EcalTBWeightMap const& wgtsMap = wgts_->getMap();
367  EcalTBWeights::EcalTBWeightMap::const_iterator wit;
368  wit = wgtsMap.find(std::make_pair(*gid, tdcid));
369  if (wit == wgtsMap.end()) {
370  edm::LogError("EcalUncalibRecHitError")
371  << "No weights found for EcalGroupId: " << gid->id() << " and EcalTDCId: " << tdcid
372  << "\n skipping digi with id: " << detid.rawId();
373 
374  return false;
375  }
376  const EcalWeightSet& wset = wit->second; // this is the EcalWeightSet
377 
380 
381  weights[0] = &mat1;
382  weights[1] = &mat2;
383 
384  // get uncalibrated recHit from weights
385  if (detid.subdetId() == EcalEndcap) {
387  } else {
389  }
390 
391  // === time computation ===
392  // ratio method
393  float const clockToNsConstant = 25.;
394  if (detid.subdetId() == EcalEndcap) {
395  ratioMethod_endcap_.init(*itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios);
399  double theTimeCorrectionEE = timeCorrection(
401 
402  uncalibRecHit.setJitter(crh.timeMax - 5 + theTimeCorrectionEE);
403  uncalibRecHit.setJitterError(
404  std::sqrt(pow(crh.timeError, 2) + std::pow(EEtimeConstantTerm_, 2) / std::pow(clockToNsConstant, 2)));
405  // consider flagging as kOutOfTime only if above noise
406  if (uncalibRecHit.amplitude() > pedRMSVec[0] * amplitudeThreshEE_) {
407  float outOfTimeThreshP = outOfTimeThreshG12pEE_;
408  float outOfTimeThreshM = outOfTimeThreshG12mEE_;
409  // determine if gain has switched away from gainId==1 (x12 gain)
410  // and determine cuts (number of 'sigmas') to ose for kOutOfTime
411  // >3k ADC is necessasry condition for gain switch to occur
412  if (uncalibRecHit.amplitude() > 3000.) {
413  for (int iSample = 0; iSample < EEDataFrame::MAXSAMPLES; iSample++) {
414  int GainId = ((EcalDataFrame)(*itdg)).sample(iSample).gainId();
415  if (GainId != 1) {
416  outOfTimeThreshP = outOfTimeThreshG61pEE_;
417  outOfTimeThreshM = outOfTimeThreshG61mEE_;
418  break;
419  }
420  }
421  }
422  float correctedTime = (crh.timeMax - 5) * clockToNsConstant + itimeconst + offsetTime;
423  float cterm = EEtimeConstantTerm_;
424  float sigmaped = pedRMSVec[0]; // approx for lower gains
425  float nterm = EEtimeNconst_ * sigmaped / uncalibRecHit.amplitude();
426  float sigmat = std::sqrt(nterm * nterm + cterm * cterm);
427  if ((correctedTime > sigmat * outOfTimeThreshP) || (correctedTime < (-1. * sigmat * outOfTimeThreshM))) {
429  }
430  }
431 
432  } else {
433  ratioMethod_barrel_.init(*itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios);
438 
439  double theTimeCorrectionEB = timeCorrection(
441 
442  uncalibRecHit.setJitter(crh.timeMax - 5 + theTimeCorrectionEB);
443 
444  uncalibRecHit.setJitterError(
445  std::sqrt(std::pow(crh.timeError, 2) + std::pow(EBtimeConstantTerm_, 2) / std::pow(clockToNsConstant, 2)));
446  // consider flagging as kOutOfTime only if above noise
447  if (uncalibRecHit.amplitude() > pedRMSVec[0] * amplitudeThreshEB_) {
448  float outOfTimeThreshP = outOfTimeThreshG12pEB_;
449  float outOfTimeThreshM = outOfTimeThreshG12mEB_;
450  // determine if gain has switched away from gainId==1 (x12 gain)
451  // and determine cuts (number of 'sigmas') to ose for kOutOfTime
452  // >3k ADC is necessasry condition for gain switch to occur
453  if (uncalibRecHit.amplitude() > 3000.) {
454  for (int iSample = 0; iSample < EBDataFrame::MAXSAMPLES; iSample++) {
455  int GainId = ((EcalDataFrame)(*itdg)).sample(iSample).gainId();
456  if (GainId != 1) {
457  outOfTimeThreshP = outOfTimeThreshG61pEB_;
458  outOfTimeThreshM = outOfTimeThreshG61mEB_;
459  break;
460  }
461  }
462  }
463  float correctedTime = (crh.timeMax - 5) * clockToNsConstant + itimeconst + offsetTime;
464  float cterm = EBtimeConstantTerm_;
465  float sigmaped = pedRMSVec[0]; // approx for lower gains
466  float nterm = EBtimeNconst_ * sigmaped / uncalibRecHit.amplitude();
467  float sigmat = std::sqrt(nterm * nterm + cterm * cterm);
468  if ((correctedTime > sigmat * outOfTimeThreshP) || (correctedTime < (-1. * sigmat * outOfTimeThreshM))) {
470  }
471  }
472  }
473 
474  // === chi2express ===
475  if (detid.subdetId() == EcalEndcap) {
476  double amplitude = uncalibRecHit.amplitude();
477  double amplitudeOutOfTime = 0.;
478  double jitter = uncalibRecHit.jitter();
479 
480  EcalUncalibRecHitRecChi2Algo<EEDataFrame> chi2expressEE_(*itdg,
481  amplitude,
482  (itimeconst + offsetTime),
483  amplitudeOutOfTime,
484  jitter,
485  pedVec,
486  pedRMSVec,
487  gainRatios,
490  double chi2 = chi2expressEE_.chi2();
491  uncalibRecHit.setChi2(chi2);
492 
493  if (kPoorRecoFlagEE_) {
494  if (chi2 > chi2ThreshEE_) {
495  // first check if all samples are ok, if not don't use chi2 to flag
496  bool samplesok = true;
497  for (int sample = 0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
498  if (!sampleMask_->useSampleEE(sample)) {
499  samplesok = false;
500  break;
501  }
502  }
503  if (samplesok)
505  }
506  }
507 
508  } else {
509  double amplitude = uncalibRecHit.amplitude();
510  double amplitudeOutOfTime = 0.;
511  double jitter = uncalibRecHit.jitter();
512 
513  EcalUncalibRecHitRecChi2Algo<EBDataFrame> chi2expressEB_(*itdg,
514  amplitude,
515  (itimeconst + offsetTime),
516  amplitudeOutOfTime,
517  jitter,
518  pedVec,
519  pedRMSVec,
520  gainRatios,
523  double chi2 = chi2expressEB_.chi2();
524  uncalibRecHit.setChi2(chi2);
525 
526  if (kPoorRecoFlagEB_) {
527  if (chi2 > chi2ThreshEB_) {
528  // first check if all samples are ok, if not don't use chi2 to flag
529  bool samplesok = true;
530  for (int sample = 0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
531  if (!sampleMask_->useSampleEB(sample)) {
532  samplesok = false;
533  break;
534  }
535  }
536  if (samplesok)
538  }
539  }
540  }
541  }
542 
543  // set flags if gain switch has occurred
544  if (((EcalDataFrame)(*itdg)).hasSwitchToGain6())
546  if (((EcalDataFrame)(*itdg)).hasSwitchToGain1())
548 
549  // put the recHit in the collection
550  if (detid.subdetId() == EcalEndcap) {
551  result.push_back(uncalibRecHit);
552  } else {
553  result.push_back(uncalibRecHit);
554  }
555 
556  return true;
557 }
558 
561  psd.addNode(
562  edm::ParameterDescription<std::vector<double>>(
563  "eePulseShape", {5.2e-05, -5.26e-05, 6.66e-05, 0.1168, 0.7575, 1.0, 0.8876, 0.6732, 0.4741, 0.3194}, true) and
564  edm::ParameterDescription<std::vector<double>>(
565  "EBtimeFitParameters",
566  {-2.015452, 3.130702, -12.3473, 41.88921, -82.83944, 91.01147, -50.35761, 11.05621},
567  true) and
568  edm::ParameterDescription<double>("outOfTimeThresholdGain61pEB", 5, true) and
569  edm::ParameterDescription<double>("amplitudeThresholdEE", 10, true) and
570  edm::ParameterDescription<double>("EBtimeConstantTerm", 0.6, true) and
571  edm::ParameterDescription<double>("outOfTimeThresholdGain61pEE", 1000, true) and
572  edm::ParameterDescription<double>("ebSpikeThreshold", 1.042, true) and
573  edm::ParameterDescription<double>("EBtimeNconst", 28.5, true) and
574  edm::ParameterDescription<bool>("kPoorRecoFlagEB", true, true) and
575  edm::ParameterDescription<std::vector<double>>(
576  "ebPulseShape", {5.2e-05, -5.26e-05, 6.66e-05, 0.1168, 0.7575, 1.0, 0.8876, 0.6732, 0.4741, 0.3194}, true) and
577  edm::ParameterDescription<double>("EBtimeFitLimits_Lower", 0.2, true) and
578  edm::ParameterDescription<bool>("kPoorRecoFlagEE", false, true) and
579  edm::ParameterDescription<double>("chi2ThreshEB_", 36.0, true) and
580  edm::ParameterDescription<std::vector<double>>(
581  "EEtimeFitParameters",
582  {-2.390548, 3.553628, -17.62341, 67.67538, -133.213, 140.7432, -75.41106, 16.20277},
583  true) and
584  edm::ParameterDescription<double>("outOfTimeThresholdGain61mEE", 1000, true) and
585  edm::ParameterDescription<std::vector<double>>("EEchi2Parameters", {2.122, 0.022, 2.122, 0.022}, true) and
586  edm::ParameterDescription<double>("outOfTimeThresholdGain12mEE", 1000, true) and
587  edm::ParameterDescription<double>("outOfTimeThresholdGain12mEB", 5, true) and
588  edm::ParameterDescription<double>("EEtimeFitLimits_Upper", 1.4, true) and
589  edm::ParameterDescription<double>("EEtimeFitLimits_Lower", 0.2, true) and
590  edm::ParameterDescription<std::vector<double>>("EEamplitudeFitParameters", {1.89, 1.4}, true) and
591  edm::ParameterDescription<std::vector<double>>("EBamplitudeFitParameters", {1.138, 1.652}, true) and
592  edm::ParameterDescription<double>("amplitudeThresholdEB", 10, true) and
593  edm::ParameterDescription<double>("outOfTimeThresholdGain12pEE", 1000, true) and
594  edm::ParameterDescription<double>("outOfTimeThresholdGain12pEB", 5, true) and
595  edm::ParameterDescription<double>("EEtimeNconst", 31.8, true) and
596  edm::ParameterDescription<double>("outOfTimeThresholdGain61mEB", 5, true) and
597  edm::ParameterDescription<std::vector<double>>("EBchi2Parameters", {2.122, 0.022, 2.122, 0.022}, true) and
598  edm::ParameterDescription<double>("EEtimeConstantTerm", 1.0, true) and
599  edm::ParameterDescription<double>("chi2ThreshEE_", 95.0, true) and
600  edm::ParameterDescription<double>("EBtimeFitLimits_Upper", 1.4, true));
601 
602  return psd;
603 }
604 
611  "EcalUncalibRecHitWorkerGlobal");
std::pair< double, double > EEtimeFitLimits_
edm::ESHandle< EcalTimeOffsetConstant > offtime_
edm::ESGetToken< EcalTBWeights, EcalTBWeightsRcd > tokenWgts_
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::ESHandle< EcalTimeBiasCorrections > timeCorrBias_
edm::ESGetToken< EcalTimeCalibConstants, EcalTimeCalibConstantsRcd > tokenItime_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
void computeAmplitude(std::vector< double > &amplitudeFitParameters)
edm::ESHandle< EcalWeightXtalGroups > grps_
std::vector< float > EBTimeCorrShiftBins
const EcalTBWeightMap & getMap() const
Definition: EcalTBWeights.h:28
double timeCorrection(float ampli, const std::vector< float > &amplitudeBins, const std::vector< float > &shiftBins)
void setJitter(float jitter)
std::map< std::pair< EcalXtalGroupId, EcalTDCId >, EcalWeightSet > EcalTBWeightMap
Definition: EcalTBWeights.h:18
void computeTime(std::vector< double > &timeFitParameters, std::pair< double, double > &timeFitLimits, std::vector< double > &amplitudeFitParameters)
EcalUncalibRecHitRecWeightsAlgo< EBDataFrame > weightsMethod_barrel_
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
math::Matrix< 10, 10 >::type EcalChi2WeightMatrix
Definition: EcalWeightSet.h:20
math::Matrix< 3, 10 >::type EcalWeightMatrix
Definition: EcalWeightSet.h:19
Log< level::Error, false > LogError
void set(const edm::EventSetup &es) override
void setJitterError(float jitterErr)
edm::ESGetToken< EcalSampleMask, EcalSampleMaskRcd > tokenSampleMask_
EcalUncalibRecHitRatioMethodAlgo< EEDataFrame > ratioMethod_endcap_
std::vector< float > EBTimeCorrAmplitudeBins
std::vector< float > EETimeCorrShiftBins
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:36
T const * product() const
Definition: ESHandle.h:86
edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcd > tokenGains_
EcalUncalibRecHitRatioMethodAlgo< EBDataFrame > ratioMethod_barrel_
std::vector< float > EETimeCorrAmplitudeBins
T sqrt(T t)
Definition: SSEVec.h:19
edm::ESGetToken< EcalTimeBiasCorrections, EcalTimeBiasCorrectionsRcd > tokenTimeCorrBias_
virtual EcalUncalibratedRecHit makeRecHit(const C &dataFrame, const double *pedestals, const double *pedestalsRMS, const double *gainRatios, const EcalWeightSet::EcalWeightMatrix **weights, const EcalShapeBase &testbeamPulseShape)
Compute parameters.
unsigned int id() const
bool run(const edm::Event &evt, const EcalDigiCollection::const_iterator &digi, EcalUncalibratedRecHitCollection &result) override
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
EcalWeightMatrix & getWeightsAfterGainSwitch()
Definition: EcalWeightSet.h:27
edm::ESHandle< EcalGainRatios > gains_
Definition: EBShape.h:7
edm::ESHandle< EcalPedestals > peds_
float gain12Over6() const
Definition: DetId.h:17
edm::ESHandle< EcalTBWeights > wgts_
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
std::pair< double, double > EBtimeFitLimits_
EcalWeightMatrix & getWeightsBeforeGainSwitch()
Definition: EcalWeightSet.h:26
const EcalWeightSet::EcalChi2WeightMatrix * chi2mat[2]
std::vector< Item >::const_iterator const_iterator
float gain6Over1() const
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const EcalWeightSet::EcalWeightMatrix * weights[2]
float EcalTimeCalibConstant
void setEventSetup(const edm::EventSetup &evtSetup)
EcalUncalibRecHitRecWeightsAlgo< EEDataFrame > weightsMethod_endcap_
int hashedIndex() const
get a compact index for arrays
Definition: EBDetId.h:82
#define DEFINE_EDM_PLUGIN(factory, type, name)
static constexpr int MAXSAMPLES
Definition: EcalDataFrame.h:48
edm::ParameterSetDescription getAlgoDescription() override
edm::ESHandle< EcalSampleMask > sampleMaskHand_
void init(const C &dataFrame, const EcalSampleMask &sampleMask, const double *pedestals, const double *pedestalRMSes, const double *gainRatios)
int hashedIndex() const
Definition: EEDetId.h:183
edm::ESGetToken< EcalWeightXtalGroups, EcalWeightXtalGroupsRcd > tokenGrps_
edm::ESGetToken< EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd > tokenOfftime_
edm::ESHandle< EcalTimeCalibConstants > itime_
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > tokenPeds_
Definition: EEShape.h:7