CMS 3D CMS Logo

EcalUncalibRecHitWorkerMultiFit.cc
Go to the documentation of this file.
2 
8 
12 
15  // get the BX for the pulses to be activated
16  std::vector<int32_t> activeBXs = ps.getParameter<std::vector<int32_t>>("activeBXs");
17  activeBX.resize(activeBXs.size());
18  for (unsigned int ibx = 0; ibx < activeBXs.size(); ++ibx) {
19  activeBX.coeffRef(ibx) = activeBXs[ibx];
20  }
21 
22  // uncertainty calculation (CPU intensive)
23  ampErrorCalculation_ = ps.getParameter<bool>("ampErrorCalculation");
24  useLumiInfoRunHeader_ = ps.getParameter<bool>("useLumiInfoRunHeader");
25 
27  bunchSpacing_ = c.consumes<unsigned int>(edm::InputTag("bunchSpacingProducer"));
29  } else {
30  bunchSpacingManual_ = ps.getParameter<int>("bunchSpacing");
31  }
32 
33  doPrefitEB_ = ps.getParameter<bool>("doPrefitEB");
34  doPrefitEE_ = ps.getParameter<bool>("doPrefitEE");
35 
36  prefitMaxChiSqEB_ = ps.getParameter<double>("prefitMaxChiSqEB");
37  prefitMaxChiSqEE_ = ps.getParameter<double>("prefitMaxChiSqEE");
38 
39  dynamicPedestalsEB_ = ps.getParameter<bool>("dynamicPedestalsEB");
40  dynamicPedestalsEE_ = ps.getParameter<bool>("dynamicPedestalsEE");
41  mitigateBadSamplesEB_ = ps.getParameter<bool>("mitigateBadSamplesEB");
42  mitigateBadSamplesEE_ = ps.getParameter<bool>("mitigateBadSamplesEE");
43  gainSwitchUseMaxSampleEB_ = ps.getParameter<bool>("gainSwitchUseMaxSampleEB");
44  gainSwitchUseMaxSampleEE_ = ps.getParameter<bool>("gainSwitchUseMaxSampleEE");
45  selectiveBadSampleCriteriaEB_ = ps.getParameter<bool>("selectiveBadSampleCriteriaEB");
46  selectiveBadSampleCriteriaEE_ = ps.getParameter<bool>("selectiveBadSampleCriteriaEE");
47  addPedestalUncertaintyEB_ = ps.getParameter<double>("addPedestalUncertaintyEB");
48  addPedestalUncertaintyEE_ = ps.getParameter<double>("addPedestalUncertaintyEE");
49  simplifiedNoiseModelForGainSwitch_ = ps.getParameter<bool>("simplifiedNoiseModelForGainSwitch");
50  pedsToken_ = c.esConsumes<EcalPedestals, EcalPedestalsRcd>();
57  wgtsToken_ = c.esConsumes<EcalTBWeights, EcalTBWeightsRcd>();
61 
62  // algorithm to be used for timing
63  auto const& timeAlgoName = ps.getParameter<std::string>("timealgo");
64  if (timeAlgoName == "RatioMethod")
66  else if (timeAlgoName == "WeightsMethod")
68  else if (timeAlgoName != "None")
69  edm::LogError("EcalUncalibRecHitError") << "No time estimation algorithm defined";
70 
71  // ratio method parameters
72  EBtimeFitParameters_ = ps.getParameter<std::vector<double>>("EBtimeFitParameters");
73  EEtimeFitParameters_ = ps.getParameter<std::vector<double>>("EEtimeFitParameters");
74  EBamplitudeFitParameters_ = ps.getParameter<std::vector<double>>("EBamplitudeFitParameters");
75  EEamplitudeFitParameters_ = ps.getParameter<std::vector<double>>("EEamplitudeFitParameters");
76  EBtimeFitLimits_.first = ps.getParameter<double>("EBtimeFitLimits_Lower");
77  EBtimeFitLimits_.second = ps.getParameter<double>("EBtimeFitLimits_Upper");
78  EEtimeFitLimits_.first = ps.getParameter<double>("EEtimeFitLimits_Lower");
79  EEtimeFitLimits_.second = ps.getParameter<double>("EEtimeFitLimits_Upper");
80  EBtimeConstantTerm_ = ps.getParameter<double>("EBtimeConstantTerm");
81  EEtimeConstantTerm_ = ps.getParameter<double>("EEtimeConstantTerm");
82  EBtimeNconst_ = ps.getParameter<double>("EBtimeNconst");
83  EEtimeNconst_ = ps.getParameter<double>("EEtimeNconst");
84  outOfTimeThreshG12pEB_ = ps.getParameter<double>("outOfTimeThresholdGain12pEB");
85  outOfTimeThreshG12mEB_ = ps.getParameter<double>("outOfTimeThresholdGain12mEB");
86  outOfTimeThreshG61pEB_ = ps.getParameter<double>("outOfTimeThresholdGain61pEB");
87  outOfTimeThreshG61mEB_ = ps.getParameter<double>("outOfTimeThresholdGain61mEB");
88  outOfTimeThreshG12pEE_ = ps.getParameter<double>("outOfTimeThresholdGain12pEE");
89  outOfTimeThreshG12mEE_ = ps.getParameter<double>("outOfTimeThresholdGain12mEE");
90  outOfTimeThreshG61pEE_ = ps.getParameter<double>("outOfTimeThresholdGain61pEE");
91  outOfTimeThreshG61mEE_ = ps.getParameter<double>("outOfTimeThresholdGain61mEE");
92  amplitudeThreshEB_ = ps.getParameter<double>("amplitudeThresholdEB");
93  amplitudeThreshEE_ = ps.getParameter<double>("amplitudeThresholdEE");
94 
95  // spike threshold
96  ebSpikeThresh_ = ps.getParameter<double>("ebSpikeThreshold");
97 
98  ebPulseShape_ = ps.getParameter<std::vector<double>>("ebPulseShape");
99  eePulseShape_ = ps.getParameter<std::vector<double>>("eePulseShape");
100 
101  // chi2 parameters for flags determination
102  kPoorRecoFlagEB_ = ps.getParameter<bool>("kPoorRecoFlagEB");
103  kPoorRecoFlagEE_ = ps.getParameter<bool>("kPoorRecoFlagEE");
104  chi2ThreshEB_ = ps.getParameter<double>("chi2ThreshEB_");
105  chi2ThreshEE_ = ps.getParameter<double>("chi2ThreshEE_");
106 }
107 
109  // common setup
111  peds = es.getHandle(pedsToken_);
112 
113  // for the multifit method
119 
120  // weights parameters for the time
121  grps = es.getHandle(grpsToken_);
122  wgts = es.getHandle(wgtsToken_);
123 
124  // which of the samples need be used
126 
127  // for the ratio method
130 
131  // for the time correction methods
133 
134  int nnoise = SampleVector::RowsAtCompileTime;
135  SampleMatrix& noisecorEBg12 = noisecors_[1][0];
136  SampleMatrix& noisecorEBg6 = noisecors_[1][1];
137  SampleMatrix& noisecorEBg1 = noisecors_[1][2];
138  SampleMatrix& noisecorEEg12 = noisecors_[0][0];
139  SampleMatrix& noisecorEEg6 = noisecors_[0][1];
140  SampleMatrix& noisecorEEg1 = noisecors_[0][2];
141 
142  for (int i = 0; i < nnoise; ++i) {
143  for (int j = 0; j < nnoise; ++j) {
144  int vidx = std::abs(j - i);
145  noisecorEBg12(i, j) = noisecovariances->EBG12SamplesCorrelation[vidx];
146  noisecorEEg12(i, j) = noisecovariances->EEG12SamplesCorrelation[vidx];
147  noisecorEBg6(i, j) = noisecovariances->EBG6SamplesCorrelation[vidx];
148  noisecorEEg6(i, j) = noisecovariances->EEG6SamplesCorrelation[vidx];
149  noisecorEBg1(i, j) = noisecovariances->EBG1SamplesCorrelation[vidx];
150  noisecorEEg1(i, j) = noisecovariances->EEG1SamplesCorrelation[vidx];
151  }
152  }
153 }
154 
156  unsigned int bunchspacing = 450;
157 
158  if (useLumiInfoRunHeader_) {
159  edm::Handle<unsigned int> bunchSpacingH;
160  evt.getByToken(bunchSpacing_, bunchSpacingH);
161  bunchspacing = *bunchSpacingH;
162  } else {
163  bunchspacing = bunchSpacingManual_;
164  }
165 
167  if (bunchspacing == 25) {
168  activeBX.resize(10);
169  activeBX << -5, -4, -3, -2, -1, 0, 1, 2, 3, 4;
170  } else {
171  //50ns configuration otherwise (also for no pileup)
172  activeBX.resize(5);
173  activeBX << -4, -2, 0, 2, 4;
174  }
175  }
176 }
177 
188  const std::vector<float>& amplitudeBins,
189  const std::vector<float>& shiftBins) {
190  // computed initially in ns. Than turned in the BX's, as
191  // EcalUncalibratedRecHit need be.
192  double theCorrection = 0;
193 
194  // sanity check for arrays
195  if (amplitudeBins.empty()) {
196  edm::LogError("EcalRecHitError") << "timeCorrAmplitudeBins is empty, forcing no time bias corrections.";
197 
198  return 0;
199  }
200 
201  if (amplitudeBins.size() != shiftBins.size()) {
202  edm::LogError("EcalRecHitError") << "Size of timeCorrAmplitudeBins different from "
203  "timeCorrShiftBins. Forcing no time bias corrections. ";
204 
205  return 0;
206  }
207 
208  // FIXME? what about a binary search?
209  int myBin = -1;
210  for (int bin = 0; bin < (int)amplitudeBins.size(); bin++) {
211  if (ampli > amplitudeBins[bin]) {
212  myBin = bin;
213  } else {
214  break;
215  }
216  }
217 
218  if (myBin == -1) {
219  theCorrection = shiftBins[0];
220  } else if (myBin == ((int)(amplitudeBins.size() - 1))) {
221  theCorrection = shiftBins[myBin];
222  } else {
223  // interpolate linearly between two assingned points
224  theCorrection = (shiftBins[myBin + 1] - shiftBins[myBin]);
225  theCorrection *= (((double)ampli) - amplitudeBins[myBin]) / (amplitudeBins[myBin + 1] - amplitudeBins[myBin]);
226  theCorrection += shiftBins[myBin];
227  }
228 
229  // convert ns into clocks
230  constexpr double inv25 = 1. / 25.;
231  return theCorrection * inv25;
232 }
233 
235  const EcalDigiCollection& digis,
237  if (digis.empty())
238  return;
239 
240  // assume all digis come from the same subdetector (either barrel or endcap)
241  DetId detid(digis.begin()->id());
242  bool barrel = (detid.subdetId() == EcalBarrel);
243 
245  if (barrel) {
253  } else {
261  }
262 
263  FullSampleVector fullpulse(FullSampleVector::Zero());
264  FullSampleMatrix fullpulsecov(FullSampleMatrix::Zero());
265 
266  result.reserve(result.size() + digis.size());
267  for (auto itdg = digis.begin(); itdg != digis.end(); ++itdg) {
268  DetId detid(itdg->id());
269 
270  const EcalSampleMask* sampleMask_ = sampleMaskHand_.product();
271 
272  // intelligence for recHit computation
273  float offsetTime = 0;
274 
275  const EcalPedestals::Item* aped = nullptr;
276  const EcalMGPAGainRatio* aGain = nullptr;
277  const EcalXtalGroupId* gid = nullptr;
278  const EcalPulseShapes::Item* aPulse = nullptr;
279  const EcalPulseCovariances::Item* aPulseCov = nullptr;
280 
281  if (barrel) {
282  unsigned int hashedIndex = EBDetId(detid).hashedIndex();
283  aped = &peds->barrel(hashedIndex);
284  aGain = &gains->barrel(hashedIndex);
285  gid = &grps->barrel(hashedIndex);
286  aPulse = &pulseshapes->barrel(hashedIndex);
287  aPulseCov = &pulsecovariances->barrel(hashedIndex);
288  offsetTime = offtime->getEBValue();
289  } else {
290  unsigned int hashedIndex = EEDetId(detid).hashedIndex();
291  aped = &peds->endcap(hashedIndex);
292  aGain = &gains->endcap(hashedIndex);
293  gid = &grps->endcap(hashedIndex);
294  aPulse = &pulseshapes->endcap(hashedIndex);
295  aPulseCov = &pulsecovariances->endcap(hashedIndex);
296  offsetTime = offtime->getEEValue();
297  }
298 
299  double pedVec[3] = {aped->mean_x12, aped->mean_x6, aped->mean_x1};
300  double pedRMSVec[3] = {aped->rms_x12, aped->rms_x6, aped->rms_x1};
301  double gainRatios[3] = {1., aGain->gain12Over6(), aGain->gain6Over1() * aGain->gain12Over6()};
302 
303  for (int i = 0; i < EcalPulseShape::TEMPLATESAMPLES; ++i)
304  fullpulse(i + 7) = aPulse->pdfval[i];
305 
306  for (int i = 0; i < EcalPulseShape::TEMPLATESAMPLES; i++)
307  for (int j = 0; j < EcalPulseShape::TEMPLATESAMPLES; j++)
308  fullpulsecov(i + 7, j + 7) = aPulseCov->covval[i][j];
309 
310  // compute the right bin of the pulse shape using time calibration constants
312  EcalTimeCalibConstant itimeconst = 0;
313  if (it != itime->end()) {
314  itimeconst = (*it);
315  } else {
316  edm::LogError("EcalRecHitError") << "No time intercalib const found for xtal " << detid.rawId()
317  << "! something wrong with EcalTimeCalibConstants in your DB? ";
318  }
319 
320  int lastSampleBeforeSaturation = -2;
321  for (unsigned int iSample = 0; iSample < EcalDataFrame::MAXSAMPLES; iSample++) {
322  if (((EcalDataFrame)(*itdg)).sample(iSample).gainId() == 0) {
323  lastSampleBeforeSaturation = iSample - 1;
324  break;
325  }
326  }
327 
328  // === amplitude computation ===
329 
330  if (lastSampleBeforeSaturation == 4) { // saturation on the expected max sample
331  result.emplace_back((*itdg).id(), 4095 * 12, 0, 0, 0);
332  auto& uncalibRecHit = result.back();
333  uncalibRecHit.setFlagBit(EcalUncalibratedRecHit::kSaturated);
334  // do not propagate the default chi2 = -1 value to the calib rechit (mapped to 64), set it to 0 when saturation
335  uncalibRecHit.setChi2(0);
336  } else if (lastSampleBeforeSaturation >=
337  -1) { // saturation on other samples: cannot extrapolate from the fourth one
338  int gainId = ((EcalDataFrame)(*itdg)).sample(5).gainId();
339  if (gainId == 0)
340  gainId = 3;
341  auto pedestal = pedVec[gainId - 1];
342  auto gainratio = gainRatios[gainId - 1];
343  double amplitude = ((double)(((EcalDataFrame)(*itdg)).sample(5).adc()) - pedestal) * gainratio;
344  result.emplace_back((*itdg).id(), amplitude, 0, 0, 0);
345  auto& uncalibRecHit = result.back();
346  uncalibRecHit.setFlagBit(EcalUncalibratedRecHit::kSaturated);
347  // do not propagate the default chi2 = -1 value to the calib rechit (mapped to 64), set it to 0 when saturation
348  uncalibRecHit.setChi2(0);
349  } else {
350  // multifit
351  const SampleMatrixGainArray& noisecors = noisecor(barrel);
352 
353  result.push_back(multiFitMethod_.makeRecHit(*itdg, aped, aGain, noisecors, fullpulse, fullpulsecov, activeBX));
354  auto& uncalibRecHit = result.back();
355 
356  // === time computation ===
357  if (timealgo_ == ratioMethod) {
358  // ratio method
359  constexpr float clockToNsConstant = 25.;
360  constexpr float invClockToNs = 1. / clockToNsConstant;
361  if (not barrel) {
362  ratioMethod_endcap_.init(*itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios);
367  double theTimeCorrectionEE = timeCorrection(
369 
370  uncalibRecHit.setJitter(crh.timeMax - 5 + theTimeCorrectionEE);
371  uncalibRecHit.setJitterError(
372  std::sqrt(std::pow(crh.timeError, 2) + std::pow(EEtimeConstantTerm_ * invClockToNs, 2)));
373 
374  // consider flagging as kOutOfTime only if above noise
375  if (uncalibRecHit.amplitude() > pedRMSVec[0] * amplitudeThreshEE_) {
376  float outOfTimeThreshP = outOfTimeThreshG12pEE_;
377  float outOfTimeThreshM = outOfTimeThreshG12mEE_;
378  // determine if gain has switched away from gainId==1 (x12 gain)
379  // and determine cuts (number of 'sigmas') to ose for kOutOfTime
380  // >3k ADC is necessasry condition for gain switch to occur
381  if (uncalibRecHit.amplitude() > 3000.) {
382  for (int iSample = 0; iSample < EEDataFrame::MAXSAMPLES; iSample++) {
383  int GainId = ((EcalDataFrame)(*itdg)).sample(iSample).gainId();
384  if (GainId != 1) {
385  outOfTimeThreshP = outOfTimeThreshG61pEE_;
386  outOfTimeThreshM = outOfTimeThreshG61mEE_;
387  break;
388  }
389  }
390  }
391  float correctedTime = (crh.timeMax - 5) * clockToNsConstant + itimeconst + offsetTime;
392  float cterm = EEtimeConstantTerm_;
393  float sigmaped = pedRMSVec[0]; // approx for lower gains
394  float nterm = EEtimeNconst_ * sigmaped / uncalibRecHit.amplitude();
395  float sigmat = std::sqrt(nterm * nterm + cterm * cterm);
396  if ((correctedTime > sigmat * outOfTimeThreshP) || (correctedTime < -sigmat * outOfTimeThreshM)) {
397  uncalibRecHit.setFlagBit(EcalUncalibratedRecHit::kOutOfTime);
398  }
399  }
400 
401  } else {
402  ratioMethod_barrel_.init(*itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios);
408 
409  double theTimeCorrectionEB = timeCorrection(
411 
412  uncalibRecHit.setJitter(crh.timeMax - 5 + theTimeCorrectionEB);
413  uncalibRecHit.setJitterError(std::hypot(crh.timeError, EBtimeConstantTerm_ / clockToNsConstant));
414 
415  // consider flagging as kOutOfTime only if above noise
416  if (uncalibRecHit.amplitude() > pedRMSVec[0] * amplitudeThreshEB_) {
417  float outOfTimeThreshP = outOfTimeThreshG12pEB_;
418  float outOfTimeThreshM = outOfTimeThreshG12mEB_;
419  // determine if gain has switched away from gainId==1 (x12 gain)
420  // and determine cuts (number of 'sigmas') to ose for kOutOfTime
421  // >3k ADC is necessasry condition for gain switch to occur
422  if (uncalibRecHit.amplitude() > 3000.) {
423  for (int iSample = 0; iSample < EBDataFrame::MAXSAMPLES; iSample++) {
424  int GainId = ((EcalDataFrame)(*itdg)).sample(iSample).gainId();
425  if (GainId != 1) {
426  outOfTimeThreshP = outOfTimeThreshG61pEB_;
427  outOfTimeThreshM = outOfTimeThreshG61mEB_;
428  break;
429  }
430  }
431  }
432  float correctedTime = (crh.timeMax - 5) * clockToNsConstant + itimeconst + offsetTime;
433  float cterm = EBtimeConstantTerm_;
434  float sigmaped = pedRMSVec[0]; // approx for lower gains
435  float nterm = EBtimeNconst_ * sigmaped / uncalibRecHit.amplitude();
436  float sigmat = std::sqrt(nterm * nterm + cterm * cterm);
437  if ((correctedTime > sigmat * outOfTimeThreshP) || (correctedTime < -sigmat * outOfTimeThreshM)) {
438  uncalibRecHit.setFlagBit(EcalUncalibratedRecHit::kOutOfTime);
439  }
440  }
441  }
442  } else if (timealgo_ == weightsMethod) {
443  // weights method on the PU subtracted pulse shape
444  std::vector<double> amplitudes;
445  for (unsigned int ibx = 0; ibx < activeBX.size(); ++ibx)
446  amplitudes.push_back(uncalibRecHit.outOfTimeAmplitude(ibx));
447 
448  EcalTBWeights::EcalTDCId tdcid(1);
449  EcalTBWeights::EcalTBWeightMap const& wgtsMap = wgts->getMap();
450  EcalTBWeights::EcalTBWeightMap::const_iterator wit;
451  wit = wgtsMap.find(std::make_pair(*gid, tdcid));
452  if (wit == wgtsMap.end()) {
453  edm::LogError("EcalUncalibRecHitError")
454  << "No weights found for EcalGroupId: " << gid->id() << " and EcalTDCId: " << tdcid
455  << "\n skipping digi with id: " << detid.rawId();
456  result.pop_back();
457  continue;
458  }
459  const EcalWeightSet& wset = wit->second; // this is the EcalWeightSet
460 
463 
464  weights[0] = &mat1;
465  weights[1] = &mat2;
466 
467  double timerh;
468  if (detid.subdetId() == EcalEndcap) {
469  timerh = weightsMethod_endcap_.time(*itdg, amplitudes, aped, aGain, fullpulse, weights);
470  } else {
471  timerh = weightsMethod_barrel_.time(*itdg, amplitudes, aped, aGain, fullpulse, weights);
472  }
473  uncalibRecHit.setJitter(timerh);
474  uncalibRecHit.setJitterError(0.); // not computed with weights
475  } else { // no time method;
476  uncalibRecHit.setJitter(0.);
477  uncalibRecHit.setJitterError(0.);
478  }
479  }
480 
481  // set flags if gain switch has occurred
482  auto& uncalibRecHit = result.back();
483  if (((EcalDataFrame)(*itdg)).hasSwitchToGain6())
484  uncalibRecHit.setFlagBit(EcalUncalibratedRecHit::kHasSwitchToGain6);
485  if (((EcalDataFrame)(*itdg)).hasSwitchToGain1())
486  uncalibRecHit.setFlagBit(EcalUncalibratedRecHit::kHasSwitchToGain1);
487  }
488 }
489 
492  psd0.addNode((edm::ParameterDescription<std::vector<double>>("EBPulseShapeTemplate",
493  {1.13979e-02,
494  7.58151e-01,
495  1.00000e+00,
496  8.87744e-01,
497  6.73548e-01,
498  4.74332e-01,
499  3.19561e-01,
500  2.15144e-01,
501  1.47464e-01,
502  1.01087e-01,
503  6.93181e-02,
504  4.75044e-02},
505  true) and
506  edm::ParameterDescription<std::vector<double>>("EEPulseShapeTemplate",
507  {1.16442e-01,
508  7.56246e-01,
509  1.00000e+00,
510  8.97182e-01,
511  6.86831e-01,
512  4.91506e-01,
513  3.44111e-01,
514  2.45731e-01,
515  1.74115e-01,
516  1.23361e-01,
517  8.74288e-02,
518  6.19570e-02},
519  true)));
520 
521  psd0.addNode((edm::ParameterDescription<std::string>("EEdigiCollection", "", true) and
522  edm::ParameterDescription<std::string>("EBdigiCollection", "", true) and
523  edm::ParameterDescription<std::string>("ESdigiCollection", "", true) and
524  edm::ParameterDescription<bool>("UseLCcorrection", true, false) and
525  edm::ParameterDescription<std::vector<double>>(
526  "EBCorrNoiseMatrixG12",
527  {1.00000, 0.71073, 0.55721, 0.46089, 0.40449, 0.35931, 0.33924, 0.32439, 0.31581, 0.30481},
528  true) and
529  edm::ParameterDescription<std::vector<double>>(
530  "EECorrNoiseMatrixG12",
531  {1.00000, 0.71373, 0.44825, 0.30152, 0.21609, 0.14786, 0.11772, 0.10165, 0.09465, 0.08098},
532  true) and
533  edm::ParameterDescription<std::vector<double>>(
534  "EBCorrNoiseMatrixG06",
535  {1.00000, 0.70946, 0.58021, 0.49846, 0.45006, 0.41366, 0.39699, 0.38478, 0.37847, 0.37055},
536  true) and
537  edm::ParameterDescription<std::vector<double>>(
538  "EECorrNoiseMatrixG06",
539  {1.00000, 0.71217, 0.47464, 0.34056, 0.26282, 0.20287, 0.17734, 0.16256, 0.15618, 0.14443},
540  true) and
541  edm::ParameterDescription<std::vector<double>>(
542  "EBCorrNoiseMatrixG01",
543  {1.00000, 0.73354, 0.64442, 0.58851, 0.55425, 0.53082, 0.51916, 0.51097, 0.50732, 0.50409},
544  true) and
545  edm::ParameterDescription<std::vector<double>>(
546  "EECorrNoiseMatrixG01",
547  {1.00000, 0.72698, 0.62048, 0.55691, 0.51848, 0.49147, 0.47813, 0.47007, 0.46621, 0.46265},
548  true) and
549  edm::ParameterDescription<bool>("EcalPreMixStage1", false, true) and
550  edm::ParameterDescription<bool>("EcalPreMixStage2", false, true)));
551 
552  psd0.addOptionalNode(
553  (edm::ParameterDescription<std::vector<double>>(
554  "EBPulseShapeCovariance",
555  {3.001e-06, 1.233e-05, 0.000e+00, -4.416e-06, -4.571e-06, -3.614e-06, -2.636e-06, -1.286e-06, -8.410e-07,
556  -5.296e-07, 0.000e+00, 0.000e+00, 1.233e-05, 6.154e-05, 0.000e+00, -2.200e-05, -2.309e-05, -1.838e-05,
557  -1.373e-05, -7.334e-06, -5.088e-06, -3.745e-06, -2.428e-06, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
558  0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
559  -4.416e-06, -2.200e-05, 0.000e+00, 8.319e-06, 8.545e-06, 6.792e-06, 5.059e-06, 2.678e-06, 1.816e-06,
560  1.223e-06, 8.245e-07, 5.589e-07, -4.571e-06, -2.309e-05, 0.000e+00, 8.545e-06, 9.182e-06, 7.219e-06,
561  5.388e-06, 2.853e-06, 1.944e-06, 1.324e-06, 9.083e-07, 6.335e-07, -3.614e-06, -1.838e-05, 0.000e+00,
562  6.792e-06, 7.219e-06, 6.016e-06, 4.437e-06, 2.385e-06, 1.636e-06, 1.118e-06, 7.754e-07, 5.556e-07,
563  -2.636e-06, -1.373e-05, 0.000e+00, 5.059e-06, 5.388e-06, 4.437e-06, 3.602e-06, 1.917e-06, 1.322e-06,
564  9.079e-07, 6.529e-07, 4.752e-07, -1.286e-06, -7.334e-06, 0.000e+00, 2.678e-06, 2.853e-06, 2.385e-06,
565  1.917e-06, 1.375e-06, 9.100e-07, 6.455e-07, 4.693e-07, 3.657e-07, -8.410e-07, -5.088e-06, 0.000e+00,
566  1.816e-06, 1.944e-06, 1.636e-06, 1.322e-06, 9.100e-07, 9.115e-07, 6.062e-07, 4.436e-07, 3.422e-07,
567  -5.296e-07, -3.745e-06, 0.000e+00, 1.223e-06, 1.324e-06, 1.118e-06, 9.079e-07, 6.455e-07, 6.062e-07,
568  7.217e-07, 4.862e-07, 3.768e-07, 0.000e+00, -2.428e-06, 0.000e+00, 8.245e-07, 9.083e-07, 7.754e-07,
569  6.529e-07, 4.693e-07, 4.436e-07, 4.862e-07, 6.509e-07, 4.418e-07, 0.000e+00, 0.000e+00, 0.000e+00,
570  5.589e-07, 6.335e-07, 5.556e-07, 4.752e-07, 3.657e-07, 3.422e-07, 3.768e-07, 4.418e-07, 6.142e-07},
571  true) and
572  edm::ParameterDescription<std::vector<double>>(
573  "EEPulseShapeCovariance",
574  {3.941e-05, 3.333e-05, 0.000e+00, -1.449e-05, -1.661e-05, -1.424e-05, -1.183e-05, -6.842e-06, -4.915e-06,
575  -3.411e-06, 0.000e+00, 0.000e+00, 3.333e-05, 2.862e-05, 0.000e+00, -1.244e-05, -1.431e-05, -1.233e-05,
576  -1.032e-05, -5.883e-06, -4.154e-06, -2.902e-06, -2.128e-06, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
577  0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,
578  -1.449e-05, -1.244e-05, 0.000e+00, 5.840e-06, 6.649e-06, 5.720e-06, 4.812e-06, 2.708e-06, 1.869e-06,
579  1.330e-06, 9.186e-07, 6.446e-07, -1.661e-05, -1.431e-05, 0.000e+00, 6.649e-06, 7.966e-06, 6.898e-06,
580  5.794e-06, 3.157e-06, 2.184e-06, 1.567e-06, 1.084e-06, 7.575e-07, -1.424e-05, -1.233e-05, 0.000e+00,
581  5.720e-06, 6.898e-06, 6.341e-06, 5.347e-06, 2.859e-06, 1.991e-06, 1.431e-06, 9.839e-07, 6.886e-07,
582  -1.183e-05, -1.032e-05, 0.000e+00, 4.812e-06, 5.794e-06, 5.347e-06, 4.854e-06, 2.628e-06, 1.809e-06,
583  1.289e-06, 9.020e-07, 6.146e-07, -6.842e-06, -5.883e-06, 0.000e+00, 2.708e-06, 3.157e-06, 2.859e-06,
584  2.628e-06, 1.863e-06, 1.296e-06, 8.882e-07, 6.108e-07, 4.283e-07, -4.915e-06, -4.154e-06, 0.000e+00,
585  1.869e-06, 2.184e-06, 1.991e-06, 1.809e-06, 1.296e-06, 1.217e-06, 8.669e-07, 5.751e-07, 3.882e-07,
586  -3.411e-06, -2.902e-06, 0.000e+00, 1.330e-06, 1.567e-06, 1.431e-06, 1.289e-06, 8.882e-07, 8.669e-07,
587  9.522e-07, 6.717e-07, 4.293e-07, 0.000e+00, -2.128e-06, 0.000e+00, 9.186e-07, 1.084e-06, 9.839e-07,
588  9.020e-07, 6.108e-07, 5.751e-07, 6.717e-07, 7.911e-07, 5.493e-07, 0.000e+00, 0.000e+00, 0.000e+00,
589  6.446e-07, 7.575e-07, 6.886e-07, 6.146e-07, 4.283e-07, 3.882e-07, 4.293e-07, 5.493e-07, 7.027e-07},
590  true)),
591  true);
592 
594  psd.addNode(
595  edm::ParameterDescription<std::vector<int>>("activeBXs", {-5, -4, -3, -2, -1, 0, 1, 2, 3, 4}, true) and
596  edm::ParameterDescription<bool>("ampErrorCalculation", true, true) and
597  edm::ParameterDescription<bool>("useLumiInfoRunHeader", true, true) and
598  edm::ParameterDescription<int>("bunchSpacing", 0, true) and
599  edm::ParameterDescription<bool>("doPrefitEB", false, true) and
600  edm::ParameterDescription<bool>("doPrefitEE", false, true) and
601  edm::ParameterDescription<double>("prefitMaxChiSqEB", 25., true) and
602  edm::ParameterDescription<double>("prefitMaxChiSqEE", 10., true) and
603  edm::ParameterDescription<bool>("dynamicPedestalsEB", false, true) and
604  edm::ParameterDescription<bool>("dynamicPedestalsEE", false, true) and
605  edm::ParameterDescription<bool>("mitigateBadSamplesEB", false, true) and
606  edm::ParameterDescription<bool>("mitigateBadSamplesEE", false, true) and
607  edm::ParameterDescription<bool>("gainSwitchUseMaxSampleEB", false, true) and
608  edm::ParameterDescription<bool>("gainSwitchUseMaxSampleEE", false, true) and
609  edm::ParameterDescription<bool>("selectiveBadSampleCriteriaEB", false, true) and
610  edm::ParameterDescription<bool>("selectiveBadSampleCriteriaEE", false, true) and
611  edm::ParameterDescription<double>("addPedestalUncertaintyEB", 0., true) and
612  edm::ParameterDescription<double>("addPedestalUncertaintyEE", 0., true) and
613  edm::ParameterDescription<bool>("simplifiedNoiseModelForGainSwitch", true, true) and
614  edm::ParameterDescription<std::string>("timealgo", "RatioMethod", true) and
615  edm::ParameterDescription<std::vector<double>>("EBtimeFitParameters",
616  {-2.015452e+00,
617  3.130702e+00,
618  -1.234730e+01,
619  4.188921e+01,
620  -8.283944e+01,
621  9.101147e+01,
622  -5.035761e+01,
623  1.105621e+01},
624  true) and
625  edm::ParameterDescription<std::vector<double>>("EEtimeFitParameters",
626  {-2.390548e+00,
627  3.553628e+00,
628  -1.762341e+01,
629  6.767538e+01,
630  -1.332130e+02,
631  1.407432e+02,
632  -7.541106e+01,
633  1.620277e+01},
634  true) and
635  edm::ParameterDescription<std::vector<double>>("EBamplitudeFitParameters", {1.138, 1.652}, true) and
636  edm::ParameterDescription<std::vector<double>>("EEamplitudeFitParameters", {1.890, 1.400}, true) and
637  edm::ParameterDescription<double>("EBtimeFitLimits_Lower", 0.2, true) and
638  edm::ParameterDescription<double>("EBtimeFitLimits_Upper", 1.4, true) and
639  edm::ParameterDescription<double>("EEtimeFitLimits_Lower", 0.2, true) and
640  edm::ParameterDescription<double>("EEtimeFitLimits_Upper", 1.4, true) and
641  edm::ParameterDescription<double>("EBtimeConstantTerm", .6, true) and
642  edm::ParameterDescription<double>("EEtimeConstantTerm", 1.0, true) and
643  edm::ParameterDescription<double>("EBtimeNconst", 28.5, true) and
644  edm::ParameterDescription<double>("EEtimeNconst", 31.8, true) and
645  edm::ParameterDescription<double>("outOfTimeThresholdGain12pEB", 5, true) and
646  edm::ParameterDescription<double>("outOfTimeThresholdGain12mEB", 5, true) and
647  edm::ParameterDescription<double>("outOfTimeThresholdGain61pEB", 5, true) and
648  edm::ParameterDescription<double>("outOfTimeThresholdGain61mEB", 5, true) and
649  edm::ParameterDescription<double>("outOfTimeThresholdGain12pEE", 1000, true) and
650  edm::ParameterDescription<double>("outOfTimeThresholdGain12mEE", 1000, true) and
651  edm::ParameterDescription<double>("outOfTimeThresholdGain61pEE", 1000, true) and
652  edm::ParameterDescription<double>("outOfTimeThresholdGain61mEE", 1000, true) and
653  edm::ParameterDescription<double>("amplitudeThresholdEB", 10, true) and
654  edm::ParameterDescription<double>("amplitudeThresholdEE", 10, true) and
655  edm::ParameterDescription<double>("ebSpikeThreshold", 1.042, true) and
656  edm::ParameterDescription<std::vector<double>>(
657  "ebPulseShape", {5.2e-05, -5.26e-05, 6.66e-05, 0.1168, 0.7575, 1., 0.8876, 0.6732, 0.4741, 0.3194}, true) and
658  edm::ParameterDescription<std::vector<double>>(
659  "eePulseShape", {5.2e-05, -5.26e-05, 6.66e-05, 0.1168, 0.7575, 1., 0.8876, 0.6732, 0.4741, 0.3194}, true) and
660  edm::ParameterDescription<bool>("kPoorRecoFlagEB", true, true) and
661  edm::ParameterDescription<bool>("kPoorRecoFlagEE", false, true) and
662  edm::ParameterDescription<double>("chi2ThreshEB_", 65.0, true) and
663  edm::ParameterDescription<double>("chi2ThreshEE_", 50.0, true) and
664  edm::ParameterDescription<edm::ParameterSetDescription>("EcalPulseShapeParameters", psd0, true));
665 
666  return psd;
667 }
668 
675  "EcalUncalibRecHitWorkerMultiFit");
EcalDataFrame::MAXSAMPLES
static constexpr int MAXSAMPLES
Definition: EcalDataFrame.h:48
ConfigurationDescriptions.h
EcalUncalibratedRecHit::kHasSwitchToGain6
Definition: EcalUncalibratedRecHit.h:18
EcalUncalibRecHitWorkerMultiFit::ampErrorCalculation_
bool ampErrorCalculation_
Definition: EcalUncalibRecHitWorkerMultiFit.h:85
EcalUncalibRecHitRatioMethodAlgo::computeAmplitude
void computeAmplitude(std::vector< double > &amplitudeFitParameters)
Definition: EcalUncalibRecHitRatioMethodAlgo.h:527
EcalUncalibRecHitWorkerMultiFit::set
void set(const edm::EventSetup &es) override
Definition: EcalUncalibRecHitWorkerMultiFit.cc:108
EBDetId::hashedIndex
int hashedIndex() const
get a compact index for arrays
Definition: EBDetId.h:82
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalTimeOffsetConstantRcd
Definition: EcalTimeOffsetConstantRcd.h:5
EcalTBWeights::getMap
const EcalTBWeightMap & getMap() const
Definition: EcalTBWeights.h:28
ecalLiteDTU::gainId
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
Definition: EcalLiteDTUSample.h:14
EcalUncalibRecHitWorkerMultiFit::EEtimeNconst_
double EEtimeNconst_
Definition: EcalUncalibRecHitWorkerMultiFit.h:138
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG12pEE_
double outOfTimeThreshG12pEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:143
mps_fire.i
i
Definition: mps_fire.py:428
EcalUncalibRecHitWorkerMultiFit::amplitudeThreshEB_
double amplitudeThreshEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:147
CustomPhysics_cfi.amplitude
amplitude
Definition: CustomPhysics_cfi.py:12
EcalUncalibRecHitFillDescriptionWorkerFactory.h
Reference_intrackfit_cff.barrel
list barrel
Definition: Reference_intrackfit_cff.py:37
MessageLogger.h
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG12mEB_
double outOfTimeThreshG12mEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:140
EcalUncalibRecHitWorkerMultiFit::sampleMaskToken_
edm::ESGetToken< EcalSampleMask, EcalSampleMaskRcd > sampleMaskToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:94
EcalUncalibRecHitWorkerMultiFit::pulseShapesToken_
edm::ESGetToken< EcalPulseShapes, EcalPulseShapesRcd > pulseShapesToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:73
EcalUncalibRecHitWorkerMultiFit::noisecors_
std::array< SampleMatrixGainArray, 2 > noisecors_
Definition: EcalUncalibRecHitWorkerMultiFit.h:83
EcalSamplesCorrelationRcd
Definition: EcalSamplesCorrelationRcd.h:12
EcalUncalibRecHitWorkerMultiFit::addPedestalUncertaintyEE_
double addPedestalUncertaintyEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:121
SampleMatrixGainArray
std::array< SampleMatrix, NGains > SampleMatrixGainArray
Definition: EigenMatrixTypes.h:28
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
EcalUncalibRecHitWorkerMultiFit::run
void run(const edm::Event &evt, const EcalDigiCollection &digis, EcalUncalibratedRecHitCollection &result) override
Definition: EcalUncalibRecHitWorkerMultiFit.cc:234
EcalUncalibRecHitWorkerMultiFit::timealgo_
TimeAlgo timealgo_
Definition: EcalUncalibRecHitWorkerMultiFit.h:98
EcalUncalibRecHitWorkerMultiFit::EBtimeConstantTerm_
double EBtimeConstantTerm_
Definition: EcalUncalibRecHitWorkerMultiFit.h:135
EBDetId
Definition: EBDetId.h:17
EcalSamplesCorrelation::EEG1SamplesCorrelation
std::vector< double > EEG1SamplesCorrelation
Definition: EcalSamplesCorrelation.h:28
FullSampleMatrix
Eigen::Matrix< double, FullSampleVectorSize, FullSampleVectorSize > FullSampleMatrix
Definition: EigenMatrixTypes.h:18
EcalUncalibRecHitWorkerMultiFit::offtimeToken_
edm::ESGetToken< EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd > offtimeToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:157
SampleMatrix
Eigen::Matrix< double, SampleVectorSize, SampleVectorSize > SampleMatrix
Definition: EigenMatrixTypes.h:17
EcalSampleMask
Definition: EcalSampleMask.h:16
EcalTimeBiasCorrectionsRcd
Definition: EcalTimeBiasCorrectionsRcd.h:12
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
EcalTimeOffsetConstant::getEEValue
float getEEValue() const
Definition: EcalTimeOffsetConstant.h:21
EcalUncalibRecHitWorkerMultiFit::noiseConvariancesToken_
edm::ESGetToken< EcalSamplesCorrelation, EcalSamplesCorrelationRcd > noiseConvariancesToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:71
EcalUncalibRecHitWorkerMultiFit::pulsecovariances
edm::ESHandle< EcalPulseCovariances > pulsecovariances
Definition: EcalUncalibRecHitWorkerMultiFit.h:74
EcalUncalibRecHitWorkerMultiFit::weightsMethod_endcap_
EcalUncalibRecHitTimeWeightsAlgo< EEDataFrame > weightsMethod_endcap_
Definition: EcalUncalibRecHitWorkerMultiFit.h:107
EcalUncalibRecHitWorkerMultiFit::sampleMaskHand_
edm::ESHandle< EcalSampleMask > sampleMaskHand_
Definition: EcalUncalibRecHitWorkerMultiFit.h:93
edm::SortedCollection
Definition: SortedCollection.h:49
EcalUncalibRecHitWorkerMultiFit::EEtimeConstantTerm_
double EEtimeConstantTerm_
Definition: EcalUncalibRecHitWorkerMultiFit.h:136
EcalTimeOffsetConstant
Definition: EcalTimeOffsetConstant.h:13
EcalUncalibRecHitWorkerMultiFit::prefitMaxChiSqEB_
double prefitMaxChiSqEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:110
EcalUncalibRecHitWorkerMultiFit::multiFitMethod_
EcalUncalibRecHitMultiFitAlgo multiFitMethod_
Definition: EcalUncalibRecHitWorkerMultiFit.h:87
EcalUncalibRecHitWorkerMultiFit::EBtimeFitLimits_
std::pair< double, double > EBtimeFitLimits_
Definition: EcalUncalibRecHitWorkerMultiFit.h:129
EmptyGroupDescription.h
EcalUncalibRecHitWorkerMultiFit::EEtimeFitLimits_
std::pair< double, double > EEtimeFitLimits_
Definition: EcalUncalibRecHitWorkerMultiFit.h:130
EcalUncalibRecHitWorkerMultiFit::noisecovariances
edm::ESHandle< EcalSamplesCorrelation > noisecovariances
Definition: EcalUncalibRecHitWorkerMultiFit.h:70
EcalTimeOffsetConstant::getEBValue
float getEBValue() const
Definition: EcalTimeOffsetConstant.h:20
EcalUncalibRecHitRatioMethodAlgo::getCalculatedRecHit
CalculatedRecHit getCalculatedRecHit()
Definition: EcalUncalibRecHitRatioMethodAlgo.h:75
EcalUncalibRecHitWorkerMultiFit.h
EcalUncalibRecHitWorkerMultiFit::activeBX
BXVector activeBX
Definition: EcalUncalibRecHitWorkerMultiFit.h:84
EcalUncalibRecHitWorkerMultiFit::kPoorRecoFlagEE_
bool kPoorRecoFlagEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:163
EcalUncalibRecHitWorkerMultiFit::doPrefitEB_
bool doPrefitEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:108
EcalUncalibRecHitWorkerMultiFit::gainSwitchUseMaxSampleEE_
bool gainSwitchUseMaxSampleEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:117
EcalDataFrame
Definition: EcalDataFrame.h:16
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG12pEB_
double outOfTimeThreshG12pEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:139
EcalGainRatios
EcalGainRatioMap EcalGainRatios
Definition: EcalGainRatios.h:12
edm::Handle
Definition: AssociativeIterator.h:50
EcalUncalibRecHitRatioMethodAlgo::computeTime
void computeTime(std::vector< double > &timeFitParameters, std::pair< double, double > &timeFitLimits, std::vector< double > &amplitudeFitParameters)
Definition: EcalUncalibRecHitRatioMethodAlgo.h:211
EcalXtalGroupId
Definition: EcalXtalGroupId.h:11
EcalUncalibRecHitWorkerMultiFit::offtime
edm::ESHandle< EcalTimeOffsetConstant > offtime
Definition: EcalUncalibRecHitWorkerMultiFit.h:156
EcalUncalibRecHitWorkerMultiFit::grps
edm::ESHandle< EcalWeightXtalGroups > grps
Definition: EcalUncalibRecHitWorkerMultiFit.h:101
EcalBarrel
Definition: EcalSubdetector.h:10
EcalTimeBiasCorrections::EETimeCorrAmplitudeBins
std::vector< float > EETimeCorrAmplitudeBins
Definition: EcalTimeBiasCorrections.h:26
EcalTBWeightsRcd
Definition: EcalTBWeightsRcd.h:5
EcalUncalibRecHitWorkerMultiFit::mitigateBadSamplesEE_
bool mitigateBadSamplesEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:115
EcalUncalibRecHitWorkerMultiFit::EcalUncalibRecHitWorkerMultiFit
EcalUncalibRecHitWorkerMultiFit()
Definition: EcalUncalibRecHitWorkerMultiFit.h:54
EcalUncalibRecHitWorkerMultiFit::grpsToken_
edm::ESGetToken< EcalWeightXtalGroups, EcalWeightXtalGroupsRcd > grpsToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:102
EcalTimeBiasCorrections::EETimeCorrShiftBins
std::vector< float > EETimeCorrShiftBins
Definition: EcalTimeBiasCorrections.h:27
edm::ParameterSetDescription::addOptionalNode
ParameterDescriptionNode * addOptionalNode(ParameterDescriptionNode const &node, bool writeToCfi)
Definition: ParameterSetDescription.cc:50
EcalWeightSet::EcalWeightMatrix
math::Matrix< 3, 10 >::type EcalWeightMatrix
Definition: EcalWeightSet.h:19
EcalUncalibRecHitWorkerMultiFit::wgtsToken_
edm::ESGetToken< EcalTBWeights, EcalTBWeightsRcd > wgtsToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:104
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG61pEB_
double outOfTimeThreshG61pEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:141
EcalSamplesCorrelation::EBG12SamplesCorrelation
std::vector< double > EBG12SamplesCorrelation
Definition: EcalSamplesCorrelation.h:22
DetId
Definition: DetId.h:17
MakerMacros.h
EcalUncalibRecHitMultiFitAlgo::setAddPedestalUncertainty
void setAddPedestalUncertainty(double x)
Definition: EcalUncalibRecHitMultiFitAlgo.h:37
EcalUncalibRecHitWorkerMultiFit::mitigateBadSamplesEB_
bool mitigateBadSamplesEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:114
EcalUncalibRecHitWorkerMultiFit::simplifiedNoiseModelForGainSwitch_
bool simplifiedNoiseModelForGainSwitch_
Definition: EcalUncalibRecHitWorkerMultiFit.h:122
EcalUncalibRecHitWorkerMultiFit::gains
edm::ESHandle< EcalGainRatios > gains
Definition: EcalUncalibRecHitWorkerMultiFit.h:68
EcalUncalibRecHitWorkerMultiFit::doPrefitEE_
bool doPrefitEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:109
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG61mEE_
double outOfTimeThreshG61mEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:146
EcalUncalibRecHitTimeWeightsAlgo::time
double time(const C &dataFrame, const std::vector< double > &amplitudes, const EcalPedestals::Item *aped, const EcalMGPAGainRatio *aGain, const FullSampleVector &fullpulse, const EcalWeightSet::EcalWeightMatrix **weights)
Compute time.
Definition: EcalUncalibRecHitTimeWeightsAlgo.h:33
EcalUncalibRecHitWorkerMultiFit
Definition: EcalUncalibRecHitWorkerMultiFit.h:51
EcalUncalibRecHitWorkerMultiFit::ratioMethod_barrel_
EcalUncalibRecHitRatioMethodAlgo< EBDataFrame > ratioMethod_barrel_
Definition: EcalUncalibRecHitWorkerMultiFit.h:132
EcalUncalibRecHitWorkerMultiFit::chi2ThreshEE_
double chi2ThreshEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:165
EcalSampleMaskRcd
Definition: EcalSampleMaskRcd.h:5
EcalUncalibRecHitWorkerMultiFit::kPoorRecoFlagEB_
bool kPoorRecoFlagEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:162
EcalUncalibRecHitWorkerMultiFit::timeCorrBiasToken_
edm::ESGetToken< EcalTimeBiasCorrections, EcalTimeBiasCorrectionsRcd > timeCorrBiasToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:152
EcalUncalibratedRecHit::kOutOfTime
Definition: EcalUncalibratedRecHit.h:16
EcalUncalibRecHitWorkerMultiFit::timeCorrection
double timeCorrection(float ampli, const std::vector< float > &amplitudeBins, const std::vector< float > &shiftBins)
Definition: EcalUncalibRecHitWorkerMultiFit.cc:187
edm::DataFrameContainer::empty
bool empty() const
Definition: DataFrameContainer.h:160
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
EcalTimeBiasCorrections::EBTimeCorrAmplitudeBins
std::vector< float > EBTimeCorrAmplitudeBins
Definition: EcalTimeBiasCorrections.h:23
Run.h
EcalUncalibRecHitWorkerMultiFit::selectiveBadSampleCriteriaEB_
bool selectiveBadSampleCriteriaEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:118
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG12mEE_
double outOfTimeThreshG12mEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:144
EcalUncalibRecHitWorkerMultiFit::gainsToken_
edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcd > gainsToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:69
EcalUncalibRecHitWorkerMultiFit::addPedestalUncertaintyEB_
double addPedestalUncertaintyEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:120
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:531
EcalUncalibRecHitWorkerMultiFit::itime
edm::ESHandle< EcalTimeCalibConstants > itime
Definition: EcalUncalibRecHitWorkerMultiFit.h:154
EcalUncalibRecHitMultiFitAlgo::makeRecHit
EcalUncalibratedRecHit makeRecHit(const EcalDataFrame &dataFrame, const EcalPedestals::Item *aped, const EcalMGPAGainRatio *aGain, const SampleMatrixGainArray &noisecors, const FullSampleVector &fullpulse, const FullSampleMatrix &fullpulsecov, const BXVector &activeBX)
compute rechits
Definition: EcalUncalibRecHitMultiFitAlgo.cc:27
ParameterSetDescription.h
EcalUncalibRecHitWorkerMultiFit::dynamicPedestalsEB_
bool dynamicPedestalsEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:112
EcalWeightSet::getWeightsAfterGainSwitch
EcalWeightMatrix & getWeightsAfterGainSwitch()
Definition: EcalWeightSet.h:27
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
EcalTimeBiasCorrections
Definition: EcalTimeBiasCorrections.h:16
EcalMGPAGainRatio::gain12Over6
float gain12Over6() const
Definition: EcalMGPAGainRatio.h:19
EEDetId
Definition: EEDetId.h:14
EcalGainRatiosRcd
Definition: EcalGainRatiosRcd.h:5
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalPedestals
EcalPedestalsMap EcalPedestals
Definition: EcalPedestals.h:50
HLT_FULL_cff.activeBXs
activeBXs
Definition: HLT_FULL_cff.py:8183
EcalUncalibRecHitRatioMethodAlgo
Definition: EcalUncalibRecHitRatioMethodAlgo.h:32
EcalEndcap
Definition: EcalSubdetector.h:10
EcalUncalibRecHitMultiFitAlgo::setPrefitMaxChiSq
void setPrefitMaxChiSq(double x)
Definition: EcalUncalibRecHitMultiFitAlgo.h:33
EcalWeightSet::getWeightsBeforeGainSwitch
EcalWeightMatrix & getWeightsBeforeGainSwitch()
Definition: EcalWeightSet.h:26
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG61pEE_
double outOfTimeThreshG61pEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:145
EcalUncalibRecHitMultiFitAlgo::setDynamicPedestals
void setDynamicPedestals(bool b)
Definition: EcalUncalibRecHitMultiFitAlgo.h:34
EcalTBWeights::EcalTDCId
int EcalTDCId
Definition: EcalTBWeights.h:17
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
EcalCondObjectContainer::Item
T Item
Definition: EcalCondObjectContainer.h:15
EcalWeightXtalGroups
EcalCondObjectContainer< EcalXtalGroupId > EcalWeightXtalGroups
Definition: EcalWeightXtalGroups.h:12
EcalPulseCovariances
EcalPulseCovariancesMap EcalPulseCovariances
Definition: EcalPulseCovariances.h:22
edmplugin::PluginFactory
Definition: PluginFactory.h:34
EcalUncalibRecHitMultiFitAlgo::setMitigateBadSamples
void setMitigateBadSamples(bool b)
Definition: EcalUncalibRecHitMultiFitAlgo.h:35
EcalUncalibRecHitWorkerMultiFit::dynamicPedestalsEE_
bool dynamicPedestalsEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:113
EEDetId::hashedIndex
int hashedIndex() const
Definition: EEDetId.h:183
EcalUncalibRecHitWorkerMultiFit::ebSpikeThresh_
double ebSpikeThresh_
Definition: EcalUncalibRecHitWorkerMultiFit.h:149
createfilelist.int
int
Definition: createfilelist.py:10
EcalUncalibRecHitWorkerMultiFit::EEamplitudeFitParameters_
std::vector< double > EEamplitudeFitParameters_
Definition: EcalUncalibRecHitWorkerMultiFit.h:128
EcalUncalibRecHitWorkerMultiFit::EBtimeNconst_
double EBtimeNconst_
Definition: EcalUncalibRecHitWorkerMultiFit.h:137
edm::DataFrameContainer::begin
const_iterator begin() const
The iterator returned can not safely be used across threads.
Definition: DataFrameContainer.h:149
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:148
EcalUncalibRecHitWorkerMultiFit::bunchSpacing_
edm::EDGetTokenT< unsigned int > bunchSpacing_
Definition: EcalUncalibRecHitWorkerMultiFit.h:90
EcalSamplesCorrelation::EBG1SamplesCorrelation
std::vector< double > EBG1SamplesCorrelation
Definition: EcalSamplesCorrelation.h:24
EcalCondDBWriter_cfi.pedestal
pedestal
Definition: EcalCondDBWriter_cfi.py:49
edm::EventSetup
Definition: EventSetup.h:57
edm::ParameterSetDescription::addNode
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
Definition: ParameterSetDescription.cc:41
EcalUncalibRecHitWorkerMultiFit::weightsMethod
Definition: EcalUncalibRecHitWorkerMultiFit.h:97
EcalUncalibRecHitWorkerMultiFit::pulseConvariancesToken_
edm::ESGetToken< EcalPulseCovariances, EcalPulseCovariancesRcd > pulseConvariancesToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:75
EcalUncalibRecHitMultiFitAlgo::setSelectiveBadSampleCriteria
void setSelectiveBadSampleCriteria(bool b)
Definition: EcalUncalibRecHitMultiFitAlgo.h:36
EcalSamplesCorrelation::EEG12SamplesCorrelation
std::vector< double > EEG12SamplesCorrelation
Definition: EcalSamplesCorrelation.h:26
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
EcalUncalibRecHitWorkerMultiFit::EBamplitudeFitParameters_
std::vector< double > EBamplitudeFitParameters_
Definition: EcalUncalibRecHitWorkerMultiFit.h:127
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
EcalUncalibRecHitWorkerMultiFit::noisecor
const SampleMatrix & noisecor(bool barrel, int gain) const
Definition: EcalUncalibRecHitWorkerMultiFit.h:79
EcalUncalibRecHitMultiFitAlgo::setDoPrefit
void setDoPrefit(bool b)
Definition: EcalUncalibRecHitMultiFitAlgo.h:32
BXVector::resize
void resize(int bx, unsigned size)
EcalTBWeights::EcalTBWeightMap
std::map< std::pair< EcalXtalGroupId, EcalTDCId >, EcalWeightSet > EcalTBWeightMap
Definition: EcalTBWeights.h:18
FullSampleVector
Eigen::Matrix< double, FullSampleVectorSize, 1 > FullSampleVector
Definition: EigenMatrixTypes.h:13
EcalTimeCalibConstantsRcd
Definition: EcalTimeCalibConstantsRcd.h:5
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
EcalWeightSet
Definition: EcalWeightSet.h:17
EcalUncalibRecHitMultiFitAlgo::disableErrorCalculation
void disableErrorCalculation()
Definition: EcalUncalibRecHitMultiFitAlgo.h:31
EcalUncalibRecHitRatioMethodAlgo::init
void init(const C &dataFrame, const EcalSampleMask &sampleMask, const double *pedestals, const double *pedestalRMSes, const double *gainRatios)
Definition: EcalUncalibRecHitRatioMethodAlgo.h:96
EcalUncalibRecHitWorkerMultiFit::peds
edm::ESHandle< EcalPedestals > peds
Definition: EcalUncalibRecHitWorkerMultiFit.h:66
EcalUncalibRecHitWorkerMultiFit::pulseshapes
edm::ESHandle< EcalPulseShapes > pulseshapes
Definition: EcalUncalibRecHitWorkerMultiFit.h:72
EcalUncalibRecHitMultiFitAlgo::setSimplifiedNoiseModelForGainSwitch
void setSimplifiedNoiseModelForGainSwitch(bool b)
Definition: EcalUncalibRecHitMultiFitAlgo.h:38
EcalUncalibRecHitWorkerMultiFit::prefitMaxChiSqEE_
double prefitMaxChiSqEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:111
EcalUncalibRecHitWorkerFactory.h
EcalDigiCollection
Definition: EcalDigiCollections.h:46
EcalUncalibRecHitWorkerMultiFit::eePulseShape_
std::vector< double > eePulseShape_
Definition: EcalUncalibRecHitWorkerMultiFit.h:159
EcalUncalibRecHitWorkerMultiFit::ratioMethod_endcap_
EcalUncalibRecHitRatioMethodAlgo< EEDataFrame > ratioMethod_endcap_
Definition: EcalUncalibRecHitWorkerMultiFit.h:133
EcalUncalibRecHitWorkerMultiFit::weights
const EcalWeightSet::EcalWeightMatrix * weights[2]
Definition: EcalUncalibRecHitWorkerMultiFit.h:105
EcalUncalibRecHitWorkerMultiFit::EBtimeFitParameters_
std::vector< double > EBtimeFitParameters_
Definition: EcalUncalibRecHitWorkerMultiFit.h:125
EcalUncalibRecHitWorkerMultiFit::itimeToken_
edm::ESGetToken< EcalTimeCalibConstants, EcalTimeCalibConstantsRcd > itimeToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:155
EcalPulseShapesRcd
Definition: EcalPulseShapesRcd.h:5
EcalMGPAGainRatio::gain6Over1
float gain6Over1() const
Definition: EcalMGPAGainRatio.h:20
EcalUncalibRecHitWorkerMultiFit::outOfTimeThreshG61mEB_
double outOfTimeThreshG61mEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:142
EcalUncalibRecHitWorkerMultiFit::weightsMethod_barrel_
EcalUncalibRecHitTimeWeightsAlgo< EBDataFrame > weightsMethod_barrel_
Definition: EcalUncalibRecHitWorkerMultiFit.h:106
EcalPulseShape::TEMPLATESAMPLES
static const int TEMPLATESAMPLES
Definition: EcalPulseShapes.h:10
EcalUncalibRecHitWorkerMultiFit::selectiveBadSampleCriteriaEE_
bool selectiveBadSampleCriteriaEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:119
EventSetup.h
EcalUncalibratedRecHit::kSaturated
Definition: EcalUncalibratedRecHit.h:15
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EcalPulseShapes
EcalPulseShapesMap EcalPulseShapes
Definition: EcalPulseShapes.h:23
EcalUncalibRecHitWorkerMultiFit::EEtimeFitParameters_
std::vector< double > EEtimeFitParameters_
Definition: EcalUncalibRecHitWorkerMultiFit.h:126
EcalUncalibRecHitWorkerMultiFit::pedsToken_
edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > pedsToken_
Definition: EcalUncalibRecHitWorkerMultiFit.h:67
EcalUncalibRecHitWorkerMultiFit::wgts
edm::ESHandle< EcalTBWeights > wgts
Definition: EcalUncalibRecHitWorkerMultiFit.h:103
BXVector::size
unsigned size(int bx) const
EcalUncalibRecHitRatioMethodAlgo::fixMGPAslew
bool fixMGPAslew(const C &dataFrame)
Definition: EcalUncalibRecHitRatioMethodAlgo.h:179
EcalXtalGroupId::id
unsigned int id() const
Definition: EcalXtalGroupId.h:22
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
EcalCondObjectContainer::const_iterator
std::vector< Item >::const_iterator const_iterator
Definition: EcalCondObjectContainer.h:19
EcalUncalibRecHitWorkerMultiFit::chi2ThreshEB_
double chi2ThreshEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:164
mps_fire.result
result
Definition: mps_fire.py:311
EcalUncalibRecHitWorkerMultiFit::timeCorrBias_
edm::ESHandle< EcalTimeBiasCorrections > timeCorrBias_
Definition: EcalUncalibRecHitWorkerMultiFit.h:151
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
EcalUncalibRecHitWorkerMultiFit::ratioMethod
Definition: EcalUncalibRecHitWorkerMultiFit.h:97
EcalPulseCovariancesRcd
Definition: EcalPulseCovariancesRcd.h:5
EcalSamplesCorrelation::EBG6SamplesCorrelation
std::vector< double > EBG6SamplesCorrelation
Definition: EcalSamplesCorrelation.h:23
EcalWeightXtalGroupsRcd
Definition: EcalWeightXtalGroupsRcd.h:5
ParameterSet.h
EcalUncalibRecHitWorkerMultiFit::ebPulseShape_
std::vector< double > ebPulseShape_
Definition: EcalUncalibRecHitWorkerMultiFit.h:158
EcalPedestalsRcd
Definition: EcalPedestalsRcd.h:5
EcalTimeCalibConstants
EcalTimeCalibConstantMap EcalTimeCalibConstants
Definition: EcalTimeCalibConstants.h:12
EcalTimeBiasCorrections::EBTimeCorrShiftBins
std::vector< float > EBTimeCorrShiftBins
Definition: EcalTimeBiasCorrections.h:24
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
EcalUncalibRecHitWorkerMultiFit::useLumiInfoRunHeader_
bool useLumiInfoRunHeader_
Definition: EcalUncalibRecHitWorkerMultiFit.h:86
EcalUncalibRecHitMultiFitAlgo::setGainSwitchUseMaxSample
void setGainSwitchUseMaxSample(bool b)
Definition: EcalUncalibRecHitMultiFitAlgo.h:39
EcalUncalibratedRecHit::kHasSwitchToGain1
Definition: EcalUncalibratedRecHit.h:19
edm::Event
Definition: Event.h:73
EcalUncalibRecHitWorkerMultiFit::gainSwitchUseMaxSampleEB_
bool gainSwitchUseMaxSampleEB_
Definition: EcalUncalibRecHitWorkerMultiFit.h:116
ecalpyutils::hashedIndex
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:38
edm::ParameterDescription
Definition: ParameterDescription.h:110
EcalSamplesCorrelation::EEG6SamplesCorrelation
std::vector< double > EEG6SamplesCorrelation
Definition: EcalSamplesCorrelation.h:27
EcalUncalibRecHitWorkerMultiFit::getAlgoDescription
edm::ParameterSetDescription getAlgoDescription() override
Definition: EcalUncalibRecHitWorkerMultiFit.cc:490
edm::DataFrameContainer::end
const_iterator end() const
Definition: DataFrameContainer.h:152
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
EcalUncalibRecHitWorkerMultiFit::bunchSpacingManual_
int bunchSpacingManual_
Definition: EcalUncalibRecHitWorkerMultiFit.h:89
EcalTimeCalibConstant
float EcalTimeCalibConstant
Definition: EcalTimeCalibConstants.h:10
EcalTBWeights
Definition: EcalTBWeights.h:15
EcalMGPAGainRatio
Definition: EcalMGPAGainRatio.h:13
EcalUncalibRecHitWorkerMultiFit::amplitudeThreshEE_
double amplitudeThreshEE_
Definition: EcalUncalibRecHitWorkerMultiFit.h:148
edm::DataFrameContainer::size
size_type size() const
Definition: DataFrameContainer.h:162
EcalUncalibRecHitWorkerBaseClass
Definition: EcalUncalibRecHitWorkerBaseClass.h:16
EcalSamplesCorrelation
Definition: EcalSamplesCorrelation.h:16