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