CMS 3D CMS Logo

EcalUncalibRecHitWorkerGlobal.cc
Go to the documentation of this file.
2 
7 
16 
19 
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 
128 
129 // check saturation: 5 samples with gainId = 0
130 template < class C >
132 {
133  //bool saturated_ = 0;
134  int cnt;
135  for (int j = 0; j < C::MAXSAMPLES - 5; ++j) {
136  cnt = 0;
137  for (int i = j; i < (j + 5) && i < C::MAXSAMPLES; ++i) {
138  if ( dataFrame.sample(i).gainId() == 0 ) ++cnt;
139  }
140  if ( cnt == 5 ) return j-1 ; // the last unsaturated sample
141  }
142  return -1; // no saturation found
143 }
144 
155  float ampli,
156  const std::vector<float>& amplitudeBins,
157  const std::vector<float>& shiftBins) {
158 
159  // computed initially in ns. Than turned in the BX's, as
160  // EcalUncalibratedRecHit need be.
161  double theCorrection = 0;
162 
163  // sanity check for arrays
164  if (amplitudeBins.empty()) {
165  edm::LogError("EcalRecHitError")
166  << "timeCorrAmplitudeBins is empty, forcing no time bias corrections.";
167 
168  return 0;
169  }
170 
171  if (amplitudeBins.size() != shiftBins.size()) {
172  edm::LogError("EcalRecHitError")
173  << "Size of timeCorrAmplitudeBins different from "
174  "timeCorrShiftBins. Forcing no time bias corrections. ";
175 
176  return 0;
177  }
178 
179  int myBin = -1;
180  for (int bin = 0; bin < (int) amplitudeBins.size(); bin++) {
181  if (ampli > amplitudeBins.at(bin)) {
182  myBin = bin;
183  } else {
184  break;
185  }
186  }
187 
188  if (myBin == -1) {
189  theCorrection = shiftBins.at(0);
190  } else if (myBin == ((int)(amplitudeBins.size() - 1))) {
191  theCorrection = shiftBins.at(myBin);
192  } else if (-1 < myBin && myBin < ((int) amplitudeBins.size() - 1)) {
193  // interpolate linearly between two assingned points
194  theCorrection = (shiftBins.at(myBin + 1) - shiftBins.at(myBin));
195  theCorrection *= (((double) ampli) - amplitudeBins.at(myBin)) /
196  (amplitudeBins.at(myBin + 1) - amplitudeBins.at(myBin));
197  theCorrection += shiftBins.at(myBin);
198  } else {
199  edm::LogError("EcalRecHitError")
200  << "Assigning time correction impossible. Setting it to 0 ";
201  theCorrection = 0.;
202  }
203 
204  // convert ns into clocks
205  return theCorrection / 25.;
206 }
207 
208 
209 
210 bool
214 {
215  DetId detid(itdg->id());
216 
217  const EcalSampleMask *sampleMask_ = sampleMaskHand_.product();
218 
219  // intelligence for recHit computation
220  EcalUncalibratedRecHit uncalibRecHit;
221 
222 
223  const EcalPedestals::Item * aped = nullptr;
224  const EcalMGPAGainRatio * aGain = nullptr;
225  const EcalXtalGroupId * gid = nullptr;
226  float offsetTime = 0;
227 
228  if (detid.subdetId()==EcalEndcap) {
229  unsigned int hashedIndex = EEDetId(detid).hashedIndex();
230  aped = &peds->endcap(hashedIndex);
231  aGain = &gains->endcap(hashedIndex);
232  gid = &grps->endcap(hashedIndex);
233  offsetTime = offtime->getEEValue();
234  } else {
235  unsigned int hashedIndex = EBDetId(detid).hashedIndex();
236  aped = &peds->barrel(hashedIndex);
237  aGain = &gains->barrel(hashedIndex);
238  gid = &grps->barrel(hashedIndex);
239  offsetTime = offtime->getEBValue();
240  }
241 
242  pedVec[0] = aped->mean_x12;
243  pedVec[1] = aped->mean_x6;
244  pedVec[2] = aped->mean_x1;
245  pedRMSVec[0] = aped->rms_x12;
246  pedRMSVec[1] = aped->rms_x6;
247  pedRMSVec[2] = aped->rms_x1;
248  gainRatios[0] = 1.;
249  gainRatios[1] = aGain->gain12Over6();
250  gainRatios[2] = aGain->gain6Over1()*aGain->gain12Over6();
251 
252  // compute the right bin of the pulse shape using time calibration constants
254  EcalTimeCalibConstant itimeconst = 0;
255  if( it != itime->end() ) {
256  itimeconst = (*it);
257  } else {
258  edm::LogError("EcalRecHitError") << "No time intercalib const found for xtal "
259  << detid.rawId()
260  << "! something wrong with EcalTimeCalibConstants in your DB? ";
261  }
262 
263 
264  // === amplitude computation ===
265  int leadingSample = -1;
266  if (detid.subdetId()==EcalEndcap) {
267  leadingSample = ((EcalDataFrame)(*itdg)).lastUnsaturatedSample();
268  } else {
269  leadingSample = ((EcalDataFrame)(*itdg)).lastUnsaturatedSample();
270  }
271 
272  if ( leadingSample == 4 ) { // saturation on the expected max sample
273  uncalibRecHit = EcalUncalibratedRecHit( (*itdg).id(), 4095*12, 0, 0, 0);
275  // do not propagate the default chi2 = -1 value to the calib rechit (mapped to 64), set it to 0 when saturation
276  uncalibRecHit.setChi2(0);
277  } else if ( leadingSample >= 0 ) { // saturation on other samples: cannot extrapolate from the fourth one
278  double pedestal = 0.;
279  double gainratio = 1.;
280  int gainId = ((EcalDataFrame)(*itdg)).sample(5).gainId();
281 
282  if (gainId==0 || gainId==3) {
283  pedestal = aped->mean_x1;
284  gainratio = aGain->gain6Over1()*aGain->gain12Over6();
285  }
286  else if (gainId==1) {
287  pedestal = aped->mean_x12;
288  gainratio = 1.;
289  }
290  else if (gainId==2) {
291  pedestal = aped->mean_x6;
292  gainratio = aGain->gain12Over6();
293  }
294  double amplitude = ((double)(((EcalDataFrame)(*itdg)).sample(5).adc()) - pedestal) * gainratio;
295  uncalibRecHit = EcalUncalibratedRecHit( (*itdg).id(), amplitude, 0, 0, 0);
297  // do not propagate the default chi2 = -1 value to the calib rechit (mapped to 64), set it to 0 when saturation
298  uncalibRecHit.setChi2(0);
299  } else {
300  // weights method
301  EcalTBWeights::EcalTDCId tdcid(1);
302  EcalTBWeights::EcalTBWeightMap const & wgtsMap = wgts->getMap();
303  EcalTBWeights::EcalTBWeightMap::const_iterator wit;
304  wit = wgtsMap.find( std::make_pair(*gid,tdcid) );
305  if( wit == wgtsMap.end() ) {
306  edm::LogError("EcalUncalibRecHitError") << "No weights found for EcalGroupId: "
307  << gid->id() << " and EcalTDCId: " << tdcid
308  << "\n skipping digi with id: " << detid.rawId();
309 
310  return false;
311  }
312  const EcalWeightSet& wset = wit->second; // this is the EcalWeightSet
313 
316 
317  weights[0] = &mat1;
318  weights[1] = &mat2;
319 
320  // get uncalibrated recHit from weights
321  if (detid.subdetId()==EcalEndcap) {
323  } else {
325  }
326 
327  // === time computation ===
328  // ratio method
329  float const clockToNsConstant = 25.;
330  if (detid.subdetId()==EcalEndcap) {
331  ratioMethod_endcap_.init( *itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios );
335  double theTimeCorrectionEE = timeCorrection(uncalibRecHit.amplitude(),
337 
338  uncalibRecHit.setJitter( crh.timeMax - 5 + theTimeCorrectionEE);
339  uncalibRecHit.setJitterError( std::sqrt(pow(crh.timeError,2) + std::pow(EEtimeConstantTerm_,2)/std::pow(clockToNsConstant,2)) );
340  // consider flagging as kOutOfTime only if above noise
341  if (uncalibRecHit.amplitude() > pedRMSVec[0] * amplitudeThreshEE_){
342  float outOfTimeThreshP = outOfTimeThreshG12pEE_;
343  float outOfTimeThreshM = outOfTimeThreshG12mEE_;
344  // determine if gain has switched away from gainId==1 (x12 gain)
345  // and determine cuts (number of 'sigmas') to ose for kOutOfTime
346  // >3k ADC is necessasry condition for gain switch to occur
347  if (uncalibRecHit.amplitude() > 3000.){
348  for (int iSample = 0; iSample < EEDataFrame::MAXSAMPLES; iSample++) {
349  int GainId = ((EcalDataFrame)(*itdg)).sample(iSample).gainId();
350  if (GainId!=1) {
351  outOfTimeThreshP = outOfTimeThreshG61pEE_;
352  outOfTimeThreshM = outOfTimeThreshG61mEE_;
353  break;
354  }
355  }}
356  float correctedTime = (crh.timeMax-5) * clockToNsConstant + itimeconst + offsetTime;
357  float cterm = EEtimeConstantTerm_;
358  float sigmaped = pedRMSVec[0]; // approx for lower gains
359  float nterm = EEtimeNconst_*sigmaped/uncalibRecHit.amplitude();
360  float sigmat = std::sqrt( nterm*nterm + cterm*cterm );
361  if ( ( correctedTime > sigmat*outOfTimeThreshP ) ||
362  ( correctedTime < (-1.*sigmat*outOfTimeThreshM) ))
363  { uncalibRecHit.setFlagBit( EcalUncalibratedRecHit::kOutOfTime ); }
364  }
365 
366  } else {
367  ratioMethod_barrel_.init( *itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios );
372 
373  double theTimeCorrectionEB = timeCorrection(uncalibRecHit.amplitude(),
375 
376  uncalibRecHit.setJitter( crh.timeMax - 5 + theTimeCorrectionEB);
377 
378  uncalibRecHit.setJitterError( std::sqrt(std::pow(crh.timeError,2) + std::pow(EBtimeConstantTerm_,2)/std::pow(clockToNsConstant,2)) );
379  // consider flagging as kOutOfTime only if above noise
380  if (uncalibRecHit.amplitude() > pedRMSVec[0] * amplitudeThreshEB_){
381  float outOfTimeThreshP = outOfTimeThreshG12pEB_;
382  float outOfTimeThreshM = outOfTimeThreshG12mEB_;
383  // determine if gain has switched away from gainId==1 (x12 gain)
384  // and determine cuts (number of 'sigmas') to ose for kOutOfTime
385  // >3k ADC is necessasry condition for gain switch to occur
386  if (uncalibRecHit.amplitude() > 3000.){
387  for (int iSample = 0; iSample < EBDataFrame::MAXSAMPLES; iSample++) {
388  int GainId = ((EcalDataFrame)(*itdg)).sample(iSample).gainId();
389  if (GainId!=1) {
390  outOfTimeThreshP = outOfTimeThreshG61pEB_;
391  outOfTimeThreshM = outOfTimeThreshG61mEB_;
392  break;}
393  } }
394  float correctedTime = (crh.timeMax-5) * clockToNsConstant + itimeconst + offsetTime;
395  float cterm = EBtimeConstantTerm_;
396  float sigmaped = pedRMSVec[0]; // approx for lower gains
397  float nterm = EBtimeNconst_*sigmaped/uncalibRecHit.amplitude();
398  float sigmat = std::sqrt( nterm*nterm + cterm*cterm );
399  if ( ( correctedTime > sigmat*outOfTimeThreshP ) ||
400  ( correctedTime < (-1.*sigmat*outOfTimeThreshM) ))
401  { uncalibRecHit.setFlagBit( EcalUncalibratedRecHit::kOutOfTime ); }
402  }
403  }
404 
405  // === chi2express ===
406  if (detid.subdetId()==EcalEndcap) {
407 
408  double amplitude = uncalibRecHit.amplitude();
409  double amplitudeOutOfTime = 0.;
410  double jitter= uncalibRecHit.jitter();
411 
412 
413 
415  *itdg,
416  amplitude,
417  (itimeconst + offsetTime),
418  amplitudeOutOfTime,
419  jitter,
420  pedVec,
421  pedRMSVec,
422  gainRatios,
425  );
426  double chi2 = chi2expressEE_.chi2();
427  uncalibRecHit.setChi2(chi2);
428 
429  if(kPoorRecoFlagEE_)
430  {
431 
432  if (chi2>chi2ThreshEE_) {
433 
434  // first check if all samples are ok, if not don't use chi2 to flag
435  bool samplesok = true;
436  for (int sample =0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
437  if (!sampleMask_->useSampleEE(sample)) {
438  samplesok = false;
439  break;
440  }
441  }
442  if (samplesok) uncalibRecHit.setFlagBit(EcalUncalibratedRecHit::kPoorReco);
443  }
444 
445 
446  }
447 
448  } else {
449  double amplitude = uncalibRecHit.amplitude();
450  double amplitudeOutOfTime = 0.;
451  double jitter= uncalibRecHit.jitter();
452 
454  *itdg,
455  amplitude,
456  (itimeconst + offsetTime),
457  amplitudeOutOfTime,
458  jitter,
459  pedVec,
460  pedRMSVec,
461  gainRatios,
464  );
465  double chi2 = chi2expressEB_.chi2();
466  uncalibRecHit.setChi2(chi2);
467 
468  if(kPoorRecoFlagEB_)
469  {
470 
471  if(chi2>chi2ThreshEB_){
472  // first check if all samples are ok, if not don't use chi2 to flag
473  bool samplesok = true;
474  for (int sample =0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
475  if (!sampleMask_->useSampleEB(sample)) {
476  samplesok = false;
477  break;
478  }
479  }
480  if (samplesok) uncalibRecHit.setFlagBit(EcalUncalibratedRecHit::kPoorReco);
481  }
482 
483  }
484  }
485  }
486 
487  // set flags if gain switch has occurred
488  if( ((EcalDataFrame)(*itdg)).hasSwitchToGain6() ) uncalibRecHit.setFlagBit( EcalUncalibratedRecHit::kHasSwitchToGain6 );
489  if( ((EcalDataFrame)(*itdg)).hasSwitchToGain1() ) uncalibRecHit.setFlagBit( EcalUncalibratedRecHit::kHasSwitchToGain1 );
490 
491  // put the recHit in the collection
492  if (detid.subdetId()==EcalEndcap) {
493  result.push_back( uncalibRecHit );
494  } else {
495  result.push_back( uncalibRecHit );
496  }
497 
498  return true;
499 }
500 
503 
505  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
506  edm::ParameterDescription<std::vector<double>>("EBtimeFitParameters", {-2.015452,3.130702,-12.3473,41.88921,-82.83944,91.01147,-50.35761,11.05621}, true) and
507  edm::ParameterDescription<double>("outOfTimeThresholdGain61pEB", 5, true) and
508  edm::ParameterDescription<double>("amplitudeThresholdEE", 10, true) and
509  edm::ParameterDescription<double>("EBtimeConstantTerm", 0.6, true) and
510  edm::ParameterDescription<double>("outOfTimeThresholdGain61pEE", 1000, true) and
511  edm::ParameterDescription<double>("ebSpikeThreshold", 1.042, true) and
512  edm::ParameterDescription<double>("EBtimeNconst", 28.5, true) and
513  edm::ParameterDescription<bool>("kPoorRecoFlagEB", true, true) and
514  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
515  edm::ParameterDescription<double>("EBtimeFitLimits_Lower", 0.2, true) and
516  edm::ParameterDescription<bool>("kPoorRecoFlagEE", false, true) and
517  edm::ParameterDescription<double>("chi2ThreshEB_", 36.0, true) and
518  edm::ParameterDescription<std::vector<double>>("EEtimeFitParameters", {-2.390548,3.553628,-17.62341,67.67538,-133.213,140.7432,-75.41106,16.20277}, true) and
519  edm::ParameterDescription<double>("outOfTimeThresholdGain61mEE", 1000, true) and
520  edm::ParameterDescription<std::vector<double>>("EEchi2Parameters", {2.122,0.022,2.122,0.022}, true) and
521  edm::ParameterDescription<double>("outOfTimeThresholdGain12mEE", 1000, true) and
522  edm::ParameterDescription<double>("outOfTimeThresholdGain12mEB", 5, true) and
523  edm::ParameterDescription<double>("EEtimeFitLimits_Upper", 1.4, true) and
524  edm::ParameterDescription<double>("EEtimeFitLimits_Lower", 0.2, true) and
525  edm::ParameterDescription<std::vector<double>>("EEamplitudeFitParameters", {1.89,1.4}, true) and
526  edm::ParameterDescription<std::vector<double>>("EBamplitudeFitParameters", {1.138,1.652}, true) and
527  edm::ParameterDescription<double>("amplitudeThresholdEB", 10, true) and
528  edm::ParameterDescription<double>("outOfTimeThresholdGain12pEE", 1000, true) and
529  edm::ParameterDescription<double>("outOfTimeThresholdGain12pEB", 5, true) and
530  edm::ParameterDescription<double>("EEtimeNconst", 31.8, true) and
531  edm::ParameterDescription<double>("outOfTimeThresholdGain61mEB", 5, true) and
532  edm::ParameterDescription<std::vector<double>>("EBchi2Parameters", {2.122,0.022,2.122,0.022}, true) and
533  edm::ParameterDescription<double>("EEtimeConstantTerm", 1.0, true) and
534  edm::ParameterDescription<double>("chi2ThreshEE_", 95.0, true) and
535  edm::ParameterDescription<double>("EBtimeFitLimits_Upper", 1.4, true));
536 
537  return psd;
538 }
539 
540 
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:86
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)
int gainId(sample_type sample)
get the gainId (2 bits)
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
bin
set the eta bin as selection string.
Definition: DetId.h:18
int hashedIndex() const
Definition: EEDetId.h:182
EcalWeightMatrix & getWeightsBeforeGainSwitch()
Definition: EcalWeightSet.h:29
const T & get() const
Definition: EventSetup.h:59
std::vector< Item >::const_iterator const_iterator
float gain12Over6() const
const EcalWeightSet::EcalWeightMatrix * weights[2]
float EcalTimeCalibConstant
edm::ESHandle< EcalTimeCalibConstants > itime
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)
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
static const int MAXSAMPLES
Definition: EcalDataFrame.h:48
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40