CMS 3D CMS Logo

EcalUncalibRecHitWorkerGlobal.cc
Go to the documentation of this file.
2 
7 
16 
19 
21  : EcalUncalibRecHitWorkerRunOneDigiBase(ps, c), testbeamEEShape(EEShape(true)), testbeamEBShape(EBShape(true)) {
22  // ratio method parameters
23  EBtimeFitParameters_ = ps.getParameter<std::vector<double>>("EBtimeFitParameters");
24  EEtimeFitParameters_ = ps.getParameter<std::vector<double>>("EEtimeFitParameters");
25  EBamplitudeFitParameters_ = ps.getParameter<std::vector<double>>("EBamplitudeFitParameters");
26  EEamplitudeFitParameters_ = ps.getParameter<std::vector<double>>("EEamplitudeFitParameters");
27  EBtimeFitLimits_.first = ps.getParameter<double>("EBtimeFitLimits_Lower");
28  EBtimeFitLimits_.second = ps.getParameter<double>("EBtimeFitLimits_Upper");
29  EEtimeFitLimits_.first = ps.getParameter<double>("EEtimeFitLimits_Lower");
30  EEtimeFitLimits_.second = ps.getParameter<double>("EEtimeFitLimits_Upper");
31  EBtimeConstantTerm_ = ps.getParameter<double>("EBtimeConstantTerm");
32  EBtimeNconst_ = ps.getParameter<double>("EBtimeNconst");
33  EEtimeConstantTerm_ = ps.getParameter<double>("EEtimeConstantTerm");
34  EEtimeNconst_ = ps.getParameter<double>("EEtimeNconst");
35  outOfTimeThreshG12pEB_ = ps.getParameter<double>("outOfTimeThresholdGain12pEB");
36  outOfTimeThreshG12mEB_ = ps.getParameter<double>("outOfTimeThresholdGain12mEB");
37  outOfTimeThreshG61pEB_ = ps.getParameter<double>("outOfTimeThresholdGain61pEB");
38  outOfTimeThreshG61mEB_ = ps.getParameter<double>("outOfTimeThresholdGain61mEB");
39  outOfTimeThreshG12pEE_ = ps.getParameter<double>("outOfTimeThresholdGain12pEE");
40  outOfTimeThreshG12mEE_ = ps.getParameter<double>("outOfTimeThresholdGain12mEE");
41  outOfTimeThreshG61pEE_ = ps.getParameter<double>("outOfTimeThresholdGain61pEE");
42  outOfTimeThreshG61mEE_ = ps.getParameter<double>("outOfTimeThresholdGain61mEE");
43  amplitudeThreshEB_ = ps.getParameter<double>("amplitudeThresholdEB");
44  amplitudeThreshEE_ = ps.getParameter<double>("amplitudeThresholdEE");
45 
46  // spike threshold
47  ebSpikeThresh_ = ps.getParameter<double>("ebSpikeThreshold");
48 
49  ebPulseShape_ = ps.getParameter<std::vector<double>>("ebPulseShape");
50  eePulseShape_ = ps.getParameter<std::vector<double>>("eePulseShape");
51 
52  // chi2 parameters
53  kPoorRecoFlagEB_ = ps.getParameter<bool>("kPoorRecoFlagEB");
54  kPoorRecoFlagEE_ = ps.getParameter<bool>("kPoorRecoFlagEE");
55  ;
56  chi2ThreshEB_ = ps.getParameter<double>("chi2ThreshEB_");
57  chi2ThreshEE_ = ps.getParameter<double>("chi2ThreshEE_");
58  EBchi2Parameters_ = ps.getParameter<std::vector<double>>("EBchi2Parameters");
59  EEchi2Parameters_ = ps.getParameter<std::vector<double>>("EEchi2Parameters");
60 }
61 
64  // ratio method parameters
65  EBtimeFitParameters_ = ps.getParameter<std::vector<double>>("EBtimeFitParameters");
66  EEtimeFitParameters_ = ps.getParameter<std::vector<double>>("EEtimeFitParameters");
67  EBamplitudeFitParameters_ = ps.getParameter<std::vector<double>>("EBamplitudeFitParameters");
68  EEamplitudeFitParameters_ = ps.getParameter<std::vector<double>>("EEamplitudeFitParameters");
69  EBtimeFitLimits_.first = ps.getParameter<double>("EBtimeFitLimits_Lower");
70  EBtimeFitLimits_.second = ps.getParameter<double>("EBtimeFitLimits_Upper");
71  EEtimeFitLimits_.first = ps.getParameter<double>("EEtimeFitLimits_Lower");
72  EEtimeFitLimits_.second = ps.getParameter<double>("EEtimeFitLimits_Upper");
73  EBtimeConstantTerm_ = ps.getParameter<double>("EBtimeConstantTerm");
74  EBtimeNconst_ = ps.getParameter<double>("EBtimeNconst");
75  EEtimeConstantTerm_ = ps.getParameter<double>("EEtimeConstantTerm");
76  EEtimeNconst_ = ps.getParameter<double>("EEtimeNconst");
77  outOfTimeThreshG12pEB_ = ps.getParameter<double>("outOfTimeThresholdGain12pEB");
78  outOfTimeThreshG12mEB_ = ps.getParameter<double>("outOfTimeThresholdGain12mEB");
79  outOfTimeThreshG61pEB_ = ps.getParameter<double>("outOfTimeThresholdGain61pEB");
80  outOfTimeThreshG61mEB_ = ps.getParameter<double>("outOfTimeThresholdGain61mEB");
81  outOfTimeThreshG12pEE_ = ps.getParameter<double>("outOfTimeThresholdGain12pEE");
82  outOfTimeThreshG12mEE_ = ps.getParameter<double>("outOfTimeThresholdGain12mEE");
83  outOfTimeThreshG61pEE_ = ps.getParameter<double>("outOfTimeThresholdGain61pEE");
84  outOfTimeThreshG61mEE_ = ps.getParameter<double>("outOfTimeThresholdGain61mEE");
85  amplitudeThreshEB_ = ps.getParameter<double>("amplitudeThresholdEB");
86  amplitudeThreshEE_ = ps.getParameter<double>("amplitudeThresholdEE");
87 
88  // spike threshold
89  ebSpikeThresh_ = ps.getParameter<double>("ebSpikeThreshold");
90 
91  ebPulseShape_ = ps.getParameter<std::vector<double>>("ebPulseShape");
92  eePulseShape_ = ps.getParameter<std::vector<double>>("eePulseShape");
93  // chi2 parameters
94  kPoorRecoFlagEB_ = ps.getParameter<bool>("kPoorRecoFlagEB");
95  kPoorRecoFlagEE_ = ps.getParameter<bool>("kPoorRecoFlagEE");
96  ;
97  chi2ThreshEB_ = ps.getParameter<double>("chi2ThreshEB_");
98  chi2ThreshEE_ = ps.getParameter<double>("chi2ThreshEE_");
99  EBchi2Parameters_ = ps.getParameter<std::vector<double>>("EBchi2Parameters");
100  EEchi2Parameters_ = ps.getParameter<std::vector<double>>("EEchi2Parameters");
101 }
102 
104  // common setup
105  es.get<EcalGainRatiosRcd>().get(gains);
106  es.get<EcalPedestalsRcd>().get(peds);
107 
108  // for the weights method
109  es.get<EcalWeightXtalGroupsRcd>().get(grps);
110  es.get<EcalTBWeightsRcd>().get(wgts);
111 
112  // which of the samples need be used
114 
115  // for the ratio method
116 
119 
120  // for the time correction methods
122 
123  // for the DB Ecal Pulse Sim Shape
126 }
127 
128 // check saturation: 5 samples with gainId = 0
129 template <class C>
131  //bool saturated_ = 0;
132  int cnt;
133  for (int j = 0; j < C::MAXSAMPLES - 5; ++j) {
134  cnt = 0;
135  for (int i = j; i < (j + 5) && i < C::MAXSAMPLES; ++i) {
136  if (dataFrame.sample(i).gainId() == 0)
137  ++cnt;
138  }
139  if (cnt == 5)
140  return j - 1; // the last unsaturated sample
141  }
142  return -1; // no saturation found
143 }
144 
155  const std::vector<float>& amplitudeBins,
156  const std::vector<float>& shiftBins) {
157  // computed initially in ns. Than turned in the BX's, as
158  // EcalUncalibratedRecHit need be.
159  double theCorrection = 0;
160 
161  // sanity check for arrays
162  if (amplitudeBins.empty()) {
163  edm::LogError("EcalRecHitError") << "timeCorrAmplitudeBins is empty, forcing no time bias corrections.";
164 
165  return 0;
166  }
167 
168  if (amplitudeBins.size() != shiftBins.size()) {
169  edm::LogError("EcalRecHitError") << "Size of timeCorrAmplitudeBins different from "
170  "timeCorrShiftBins. Forcing no time bias corrections. ";
171 
172  return 0;
173  }
174 
175  int myBin = -1;
176  for (int bin = 0; bin < (int)amplitudeBins.size(); bin++) {
177  if (ampli > amplitudeBins.at(bin)) {
178  myBin = bin;
179  } else {
180  break;
181  }
182  }
183 
184  if (myBin == -1) {
185  theCorrection = shiftBins.at(0);
186  } else if (myBin == ((int)(amplitudeBins.size() - 1))) {
187  theCorrection = shiftBins.at(myBin);
188  } else if (-1 < myBin && myBin < ((int)amplitudeBins.size() - 1)) {
189  // interpolate linearly between two assingned points
190  theCorrection = (shiftBins.at(myBin + 1) - shiftBins.at(myBin));
191  theCorrection *=
192  (((double)ampli) - amplitudeBins.at(myBin)) / (amplitudeBins.at(myBin + 1) - amplitudeBins.at(myBin));
193  theCorrection += shiftBins.at(myBin);
194  } else {
195  edm::LogError("EcalRecHitError") << "Assigning time correction impossible. Setting it to 0 ";
196  theCorrection = 0.;
197  }
198 
199  // convert ns into clocks
200  return theCorrection / 25.;
201 }
202 
206  DetId detid(itdg->id());
207 
208  const EcalSampleMask* sampleMask_ = sampleMaskHand_.product();
209 
210  // intelligence for recHit computation
211  EcalUncalibratedRecHit uncalibRecHit;
212 
213  const EcalPedestals::Item* aped = nullptr;
214  const EcalMGPAGainRatio* aGain = nullptr;
215  const EcalXtalGroupId* gid = nullptr;
216  float offsetTime = 0;
217 
218  if (detid.subdetId() == EcalEndcap) {
219  unsigned int hashedIndex = EEDetId(detid).hashedIndex();
220  aped = &peds->endcap(hashedIndex);
221  aGain = &gains->endcap(hashedIndex);
222  gid = &grps->endcap(hashedIndex);
223  offsetTime = offtime->getEEValue();
224  } else {
225  unsigned int hashedIndex = EBDetId(detid).hashedIndex();
226  aped = &peds->barrel(hashedIndex);
227  aGain = &gains->barrel(hashedIndex);
228  gid = &grps->barrel(hashedIndex);
229  offsetTime = offtime->getEBValue();
230  }
231 
232  pedVec[0] = aped->mean_x12;
233  pedVec[1] = aped->mean_x6;
234  pedVec[2] = aped->mean_x1;
235  pedRMSVec[0] = aped->rms_x12;
236  pedRMSVec[1] = aped->rms_x6;
237  pedRMSVec[2] = aped->rms_x1;
238  gainRatios[0] = 1.;
239  gainRatios[1] = aGain->gain12Over6();
240  gainRatios[2] = aGain->gain6Over1() * aGain->gain12Over6();
241 
242  // compute the right bin of the pulse shape using time calibration constants
244  EcalTimeCalibConstant itimeconst = 0;
245  if (it != itime->end()) {
246  itimeconst = (*it);
247  } else {
248  edm::LogError("EcalRecHitError") << "No time intercalib const found for xtal " << detid.rawId()
249  << "! something wrong with EcalTimeCalibConstants in your DB? ";
250  }
251 
252  // === amplitude computation ===
253  int leadingSample = -1;
254  if (detid.subdetId() == EcalEndcap) {
255  leadingSample = ((EcalDataFrame)(*itdg)).lastUnsaturatedSample();
256  } else {
257  leadingSample = ((EcalDataFrame)(*itdg)).lastUnsaturatedSample();
258  }
259 
260  if (leadingSample == 4) { // saturation on the expected max sample
261  uncalibRecHit = EcalUncalibratedRecHit((*itdg).id(), 4095 * 12, 0, 0, 0);
263  // do not propagate the default chi2 = -1 value to the calib rechit (mapped to 64), set it to 0 when saturation
264  uncalibRecHit.setChi2(0);
265  } else if (leadingSample >= 0) { // saturation on other samples: cannot extrapolate from the fourth one
266  double pedestal = 0.;
267  double gainratio = 1.;
268  int gainId = ((EcalDataFrame)(*itdg)).sample(5).gainId();
269 
270  if (gainId == 0 || gainId == 3) {
271  pedestal = aped->mean_x1;
272  gainratio = aGain->gain6Over1() * aGain->gain12Over6();
273  } else if (gainId == 1) {
274  pedestal = aped->mean_x12;
275  gainratio = 1.;
276  } else if (gainId == 2) {
277  pedestal = aped->mean_x6;
278  gainratio = aGain->gain12Over6();
279  }
280  double amplitude = ((double)(((EcalDataFrame)(*itdg)).sample(5).adc()) - pedestal) * gainratio;
281  uncalibRecHit = EcalUncalibratedRecHit((*itdg).id(), amplitude, 0, 0, 0);
283  // do not propagate the default chi2 = -1 value to the calib rechit (mapped to 64), set it to 0 when saturation
284  uncalibRecHit.setChi2(0);
285  } else {
286  // weights method
287  EcalTBWeights::EcalTDCId tdcid(1);
288  EcalTBWeights::EcalTBWeightMap const& wgtsMap = wgts->getMap();
289  EcalTBWeights::EcalTBWeightMap::const_iterator wit;
290  wit = wgtsMap.find(std::make_pair(*gid, tdcid));
291  if (wit == wgtsMap.end()) {
292  edm::LogError("EcalUncalibRecHitError")
293  << "No weights found for EcalGroupId: " << gid->id() << " and EcalTDCId: " << tdcid
294  << "\n skipping digi with id: " << detid.rawId();
295 
296  return false;
297  }
298  const EcalWeightSet& wset = wit->second; // this is the EcalWeightSet
299 
302 
303  weights[0] = &mat1;
304  weights[1] = &mat2;
305 
306  // get uncalibrated recHit from weights
307  if (detid.subdetId() == EcalEndcap) {
309  } else {
311  }
312 
313  // === time computation ===
314  // ratio method
315  float const clockToNsConstant = 25.;
316  if (detid.subdetId() == EcalEndcap) {
317  ratioMethod_endcap_.init(*itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios);
321  double theTimeCorrectionEE = timeCorrection(
323 
324  uncalibRecHit.setJitter(crh.timeMax - 5 + theTimeCorrectionEE);
325  uncalibRecHit.setJitterError(
326  std::sqrt(pow(crh.timeError, 2) + std::pow(EEtimeConstantTerm_, 2) / std::pow(clockToNsConstant, 2)));
327  // consider flagging as kOutOfTime only if above noise
328  if (uncalibRecHit.amplitude() > pedRMSVec[0] * amplitudeThreshEE_) {
329  float outOfTimeThreshP = outOfTimeThreshG12pEE_;
330  float outOfTimeThreshM = outOfTimeThreshG12mEE_;
331  // determine if gain has switched away from gainId==1 (x12 gain)
332  // and determine cuts (number of 'sigmas') to ose for kOutOfTime
333  // >3k ADC is necessasry condition for gain switch to occur
334  if (uncalibRecHit.amplitude() > 3000.) {
335  for (int iSample = 0; iSample < EEDataFrame::MAXSAMPLES; iSample++) {
336  int GainId = ((EcalDataFrame)(*itdg)).sample(iSample).gainId();
337  if (GainId != 1) {
338  outOfTimeThreshP = outOfTimeThreshG61pEE_;
339  outOfTimeThreshM = outOfTimeThreshG61mEE_;
340  break;
341  }
342  }
343  }
344  float correctedTime = (crh.timeMax - 5) * clockToNsConstant + itimeconst + offsetTime;
345  float cterm = EEtimeConstantTerm_;
346  float sigmaped = pedRMSVec[0]; // approx for lower gains
347  float nterm = EEtimeNconst_ * sigmaped / uncalibRecHit.amplitude();
348  float sigmat = std::sqrt(nterm * nterm + cterm * cterm);
349  if ((correctedTime > sigmat * outOfTimeThreshP) || (correctedTime < (-1. * sigmat * outOfTimeThreshM))) {
351  }
352  }
353 
354  } else {
355  ratioMethod_barrel_.init(*itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios);
360 
361  double theTimeCorrectionEB = timeCorrection(
363 
364  uncalibRecHit.setJitter(crh.timeMax - 5 + theTimeCorrectionEB);
365 
366  uncalibRecHit.setJitterError(
367  std::sqrt(std::pow(crh.timeError, 2) + std::pow(EBtimeConstantTerm_, 2) / std::pow(clockToNsConstant, 2)));
368  // consider flagging as kOutOfTime only if above noise
369  if (uncalibRecHit.amplitude() > pedRMSVec[0] * amplitudeThreshEB_) {
370  float outOfTimeThreshP = outOfTimeThreshG12pEB_;
371  float outOfTimeThreshM = outOfTimeThreshG12mEB_;
372  // determine if gain has switched away from gainId==1 (x12 gain)
373  // and determine cuts (number of 'sigmas') to ose for kOutOfTime
374  // >3k ADC is necessasry condition for gain switch to occur
375  if (uncalibRecHit.amplitude() > 3000.) {
376  for (int iSample = 0; iSample < EBDataFrame::MAXSAMPLES; iSample++) {
377  int GainId = ((EcalDataFrame)(*itdg)).sample(iSample).gainId();
378  if (GainId != 1) {
379  outOfTimeThreshP = outOfTimeThreshG61pEB_;
380  outOfTimeThreshM = outOfTimeThreshG61mEB_;
381  break;
382  }
383  }
384  }
385  float correctedTime = (crh.timeMax - 5) * clockToNsConstant + itimeconst + offsetTime;
386  float cterm = EBtimeConstantTerm_;
387  float sigmaped = pedRMSVec[0]; // approx for lower gains
388  float nterm = EBtimeNconst_ * sigmaped / uncalibRecHit.amplitude();
389  float sigmat = std::sqrt(nterm * nterm + cterm * cterm);
390  if ((correctedTime > sigmat * outOfTimeThreshP) || (correctedTime < (-1. * sigmat * outOfTimeThreshM))) {
392  }
393  }
394  }
395 
396  // === chi2express ===
397  if (detid.subdetId() == EcalEndcap) {
398  double amplitude = uncalibRecHit.amplitude();
399  double amplitudeOutOfTime = 0.;
400  double jitter = uncalibRecHit.jitter();
401 
402  EcalUncalibRecHitRecChi2Algo<EEDataFrame> chi2expressEE_(*itdg,
403  amplitude,
404  (itimeconst + offsetTime),
405  amplitudeOutOfTime,
406  jitter,
407  pedVec,
408  pedRMSVec,
409  gainRatios,
412  double chi2 = chi2expressEE_.chi2();
413  uncalibRecHit.setChi2(chi2);
414 
415  if (kPoorRecoFlagEE_) {
416  if (chi2 > chi2ThreshEE_) {
417  // first check if all samples are ok, if not don't use chi2 to flag
418  bool samplesok = true;
419  for (int sample = 0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
420  if (!sampleMask_->useSampleEE(sample)) {
421  samplesok = false;
422  break;
423  }
424  }
425  if (samplesok)
427  }
428  }
429 
430  } else {
431  double amplitude = uncalibRecHit.amplitude();
432  double amplitudeOutOfTime = 0.;
433  double jitter = uncalibRecHit.jitter();
434 
435  EcalUncalibRecHitRecChi2Algo<EBDataFrame> chi2expressEB_(*itdg,
436  amplitude,
437  (itimeconst + offsetTime),
438  amplitudeOutOfTime,
439  jitter,
440  pedVec,
441  pedRMSVec,
442  gainRatios,
445  double chi2 = chi2expressEB_.chi2();
446  uncalibRecHit.setChi2(chi2);
447 
448  if (kPoorRecoFlagEB_) {
449  if (chi2 > chi2ThreshEB_) {
450  // first check if all samples are ok, if not don't use chi2 to flag
451  bool samplesok = true;
452  for (int sample = 0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
453  if (!sampleMask_->useSampleEB(sample)) {
454  samplesok = false;
455  break;
456  }
457  }
458  if (samplesok)
460  }
461  }
462  }
463  }
464 
465  // set flags if gain switch has occurred
466  if (((EcalDataFrame)(*itdg)).hasSwitchToGain6())
468  if (((EcalDataFrame)(*itdg)).hasSwitchToGain1())
470 
471  // put the recHit in the collection
472  if (detid.subdetId() == EcalEndcap) {
473  result.push_back(uncalibRecHit);
474  } else {
475  result.push_back(uncalibRecHit);
476  }
477 
478  return true;
479 }
480 
483  psd.addNode(
484  edm::ParameterDescription<std::vector<double>>(
485  "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
486  edm::ParameterDescription<std::vector<double>>(
487  "EBtimeFitParameters",
488  {-2.015452, 3.130702, -12.3473, 41.88921, -82.83944, 91.01147, -50.35761, 11.05621},
489  true) and
490  edm::ParameterDescription<double>("outOfTimeThresholdGain61pEB", 5, true) and
491  edm::ParameterDescription<double>("amplitudeThresholdEE", 10, true) and
492  edm::ParameterDescription<double>("EBtimeConstantTerm", 0.6, true) and
493  edm::ParameterDescription<double>("outOfTimeThresholdGain61pEE", 1000, true) and
494  edm::ParameterDescription<double>("ebSpikeThreshold", 1.042, true) and
495  edm::ParameterDescription<double>("EBtimeNconst", 28.5, true) and
496  edm::ParameterDescription<bool>("kPoorRecoFlagEB", true, true) and
497  edm::ParameterDescription<std::vector<double>>(
498  "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
499  edm::ParameterDescription<double>("EBtimeFitLimits_Lower", 0.2, true) and
500  edm::ParameterDescription<bool>("kPoorRecoFlagEE", false, true) and
501  edm::ParameterDescription<double>("chi2ThreshEB_", 36.0, true) and
502  edm::ParameterDescription<std::vector<double>>(
503  "EEtimeFitParameters",
504  {-2.390548, 3.553628, -17.62341, 67.67538, -133.213, 140.7432, -75.41106, 16.20277},
505  true) and
506  edm::ParameterDescription<double>("outOfTimeThresholdGain61mEE", 1000, true) and
507  edm::ParameterDescription<std::vector<double>>("EEchi2Parameters", {2.122, 0.022, 2.122, 0.022}, true) and
508  edm::ParameterDescription<double>("outOfTimeThresholdGain12mEE", 1000, true) and
509  edm::ParameterDescription<double>("outOfTimeThresholdGain12mEB", 5, true) and
510  edm::ParameterDescription<double>("EEtimeFitLimits_Upper", 1.4, true) and
511  edm::ParameterDescription<double>("EEtimeFitLimits_Lower", 0.2, true) and
512  edm::ParameterDescription<std::vector<double>>("EEamplitudeFitParameters", {1.89, 1.4}, true) and
513  edm::ParameterDescription<std::vector<double>>("EBamplitudeFitParameters", {1.138, 1.652}, true) and
514  edm::ParameterDescription<double>("amplitudeThresholdEB", 10, true) and
515  edm::ParameterDescription<double>("outOfTimeThresholdGain12pEE", 1000, true) and
516  edm::ParameterDescription<double>("outOfTimeThresholdGain12pEB", 5, true) and
517  edm::ParameterDescription<double>("EEtimeNconst", 31.8, true) and
518  edm::ParameterDescription<double>("outOfTimeThresholdGain61mEB", 5, true) and
519  edm::ParameterDescription<std::vector<double>>("EBchi2Parameters", {2.122, 0.022, 2.122, 0.022}, true) and
520  edm::ParameterDescription<double>("EEtimeConstantTerm", 1.0, true) and
521  edm::ParameterDescription<double>("chi2ThreshEE_", 95.0, true) and
522  edm::ParameterDescription<double>("EBtimeFitLimits_Upper", 1.4, true));
523 
524  return psd;
525 }
526 
533  "EcalUncalibRecHitWorkerGlobal");
edm::ESHandle< EcalTimeOffsetConstant > offtime
std::pair< double, double > EEtimeFitLimits_
T getParameter(std::string const &) const
edm::ESHandle< EcalTimeBiasCorrections > timeCorrBias_
int hashedIndex() const
get a compact index for arrays
Definition: EBDetId.h:82
void computeAmplitude(std::vector< double > &amplitudeFitParameters)
std::vector< float > EBTimeCorrShiftBins
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)
void push_back(T const &t)
EcalUncalibRecHitRecWeightsAlgo< EBDataFrame > weightsMethod_barrel_
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
math::Matrix< 3, 10 >::type EcalWeightMatrix
Definition: EcalWeightSet.h:20
void set(const edm::EventSetup &es) override
void setJitterError(float jitterErr)
EcalUncalibRecHitRatioMethodAlgo< EEDataFrame > ratioMethod_endcap_
const unsigned int id() const
std::vector< float > EBTimeCorrAmplitudeBins
std::vector< float > EETimeCorrShiftBins
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:38
EcalUncalibRecHitRatioMethodAlgo< EBDataFrame > ratioMethod_barrel_
edm::ESHandle< EcalGainRatios > gains
std::vector< float > EETimeCorrAmplitudeBins
T sqrt(T t)
Definition: SSEVec.h:19
edm::ESHandle< EcalPedestals > peds
virtual EcalUncalibratedRecHit makeRecHit(const C &dataFrame, const double *pedestals, const double *pedestalsRMS, const double *gainRatios, const EcalWeightSet::EcalWeightMatrix **weights, const EcalShapeBase &testbeamPulseShape)
Compute parameters.
edm::ESHandle< EcalTBWeights > wgts
float gain6Over1() const
edm::ESHandle< EcalWeightXtalGroups > grps
bool run(const edm::Event &evt, const EcalDigiCollection::const_iterator &digi, EcalUncalibratedRecHitCollection &result) override
EcalWeightMatrix & getWeightsAfterGainSwitch()
Definition: EcalWeightSet.h:28
Definition: EBShape.h:6
Definition: DetId.h:17
int hashedIndex() const
Definition: EEDetId.h:183
std::pair< double, double > EBtimeFitLimits_
EcalWeightMatrix & getWeightsBeforeGainSwitch()
Definition: EcalWeightSet.h:27
std::vector< Item >::const_iterator const_iterator
float gain12Over6() const
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const EcalWeightSet::EcalWeightMatrix * weights[2]
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
float EcalTimeCalibConstant
T get() const
Definition: EventSetup.h:73
edm::ESHandle< EcalTimeCalibConstants > itime
void setEventSetup(const edm::EventSetup &evtSetup)
EcalUncalibRecHitRecWeightsAlgo< EEDataFrame > weightsMethod_endcap_
const EcalTBWeightMap & getMap() const
Definition: EcalTBWeights.h:28
#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)
T const * product() const
Definition: ESHandle.h:86
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:30
Definition: EEShape.h:6