CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalUncalibRecHitWorkerGlobal.cc
Go to the documentation of this file.
2 
7 
16 
19 {
20  // ratio method parameters
21  EBtimeFitParameters_ = ps.getParameter<std::vector<double> >("EBtimeFitParameters");
22  EEtimeFitParameters_ = ps.getParameter<std::vector<double> >("EEtimeFitParameters");
23  EBamplitudeFitParameters_ = ps.getParameter<std::vector<double> >("EBamplitudeFitParameters");
24  EEamplitudeFitParameters_ = ps.getParameter<std::vector<double> >("EEamplitudeFitParameters");
25  EBtimeFitLimits_.first = ps.getParameter<double>("EBtimeFitLimits_Lower");
26  EBtimeFitLimits_.second = ps.getParameter<double>("EBtimeFitLimits_Upper");
27  EEtimeFitLimits_.first = ps.getParameter<double>("EEtimeFitLimits_Lower");
28  EEtimeFitLimits_.second = ps.getParameter<double>("EEtimeFitLimits_Upper");
29  EBtimeConstantTerm_=ps.getParameter<double>("EBtimeConstantTerm");
30  EBtimeNconst_=ps.getParameter<double>("EBtimeNconst");
31  EEtimeConstantTerm_=ps.getParameter<double>("EEtimeConstantTerm");
32  EEtimeNconst_=ps.getParameter<double>("EEtimeNconst");
33  outOfTimeThreshG12pEB_ = ps.getParameter<double>("outOfTimeThresholdGain12pEB");
34  outOfTimeThreshG12mEB_ = ps.getParameter<double>("outOfTimeThresholdGain12mEB");
35  outOfTimeThreshG61pEB_ = ps.getParameter<double>("outOfTimeThresholdGain61pEB");
36  outOfTimeThreshG61mEB_ = ps.getParameter<double>("outOfTimeThresholdGain61mEB");
37  outOfTimeThreshG12pEE_ = ps.getParameter<double>("outOfTimeThresholdGain12pEE");
38  outOfTimeThreshG12mEE_ = ps.getParameter<double>("outOfTimeThresholdGain12mEE");
39  outOfTimeThreshG61pEE_ = ps.getParameter<double>("outOfTimeThresholdGain61pEE");
40  outOfTimeThreshG61mEE_ = ps.getParameter<double>("outOfTimeThresholdGain61mEE");
41  amplitudeThreshEB_ = ps.getParameter<double>("amplitudeThresholdEB");
42  amplitudeThreshEE_ = ps.getParameter<double>("amplitudeThresholdEE");
43 
44  // spike threshold
45  ebSpikeThresh_ = ps.getParameter<double>("ebSpikeThreshold");
46  // leading edge parameters
47  ebPulseShape_ = ps.getParameter<std::vector<double> >("ebPulseShape");
48  eePulseShape_ = ps.getParameter<std::vector<double> >("eePulseShape");
49  // chi2 parameters
50  kPoorRecoFlagEB_ = ps.getParameter<bool>("kPoorRecoFlagEB");
51  kPoorRecoFlagEE_ = ps.getParameter<bool>("kPoorRecoFlagEE");;
52  chi2ThreshEB_=ps.getParameter<double>("chi2ThreshEB_");
53  chi2ThreshEE_=ps.getParameter<double>("chi2ThreshEE_");
54  EBchi2Parameters_ = ps.getParameter<std::vector<double> >("EBchi2Parameters");
55  EEchi2Parameters_ = ps.getParameter<std::vector<double> >("EEchi2Parameters");
56 }
57 
58 
59 
62 {
63  // ratio method parameters
64  EBtimeFitParameters_ = ps.getParameter<std::vector<double> >("EBtimeFitParameters");
65  EEtimeFitParameters_ = ps.getParameter<std::vector<double> >("EEtimeFitParameters");
66  EBamplitudeFitParameters_ = ps.getParameter<std::vector<double> >("EBamplitudeFitParameters");
67  EEamplitudeFitParameters_ = ps.getParameter<std::vector<double> >("EEamplitudeFitParameters");
68  EBtimeFitLimits_.first = ps.getParameter<double>("EBtimeFitLimits_Lower");
69  EBtimeFitLimits_.second = ps.getParameter<double>("EBtimeFitLimits_Upper");
70  EEtimeFitLimits_.first = ps.getParameter<double>("EEtimeFitLimits_Lower");
71  EEtimeFitLimits_.second = ps.getParameter<double>("EEtimeFitLimits_Upper");
72  EBtimeConstantTerm_=ps.getParameter<double>("EBtimeConstantTerm");
73  EBtimeNconst_=ps.getParameter<double>("EBtimeNconst");
74  EEtimeConstantTerm_=ps.getParameter<double>("EEtimeConstantTerm");
75  EEtimeNconst_=ps.getParameter<double>("EEtimeNconst");
76  outOfTimeThreshG12pEB_ = ps.getParameter<double>("outOfTimeThresholdGain12pEB");
77  outOfTimeThreshG12mEB_ = ps.getParameter<double>("outOfTimeThresholdGain12mEB");
78  outOfTimeThreshG61pEB_ = ps.getParameter<double>("outOfTimeThresholdGain61pEB");
79  outOfTimeThreshG61mEB_ = ps.getParameter<double>("outOfTimeThresholdGain61mEB");
80  outOfTimeThreshG12pEE_ = ps.getParameter<double>("outOfTimeThresholdGain12pEE");
81  outOfTimeThreshG12mEE_ = ps.getParameter<double>("outOfTimeThresholdGain12mEE");
82  outOfTimeThreshG61pEE_ = ps.getParameter<double>("outOfTimeThresholdGain61pEE");
83  outOfTimeThreshG61mEE_ = ps.getParameter<double>("outOfTimeThresholdGain61mEE");
84  amplitudeThreshEB_ = ps.getParameter<double>("amplitudeThresholdEB");
85  amplitudeThreshEE_ = ps.getParameter<double>("amplitudeThresholdEE");
86 
87  // spike threshold
88  ebSpikeThresh_ = ps.getParameter<double>("ebSpikeThreshold");
89  // leading edge parameters
90  ebPulseShape_ = ps.getParameter<std::vector<double> >("ebPulseShape");
91  eePulseShape_ = ps.getParameter<std::vector<double> >("eePulseShape");
92  // chi2 parameters
93  kPoorRecoFlagEB_ = ps.getParameter<bool>("kPoorRecoFlagEB");
94  kPoorRecoFlagEE_ = ps.getParameter<bool>("kPoorRecoFlagEE");;
95  chi2ThreshEB_=ps.getParameter<double>("chi2ThreshEB_");
96  chi2ThreshEE_=ps.getParameter<double>("chi2ThreshEE_");
97  EBchi2Parameters_ = ps.getParameter<std::vector<double> >("EBchi2Parameters");
98  EEchi2Parameters_ = ps.getParameter<std::vector<double> >("EEchi2Parameters");
99 }
100 
101 
102 
103 
104 
105 
106 
107 
108 
109 
110 
111 
112 
113 void
115 {
116  // common setup
117  es.get<EcalGainRatiosRcd>().get(gains);
118  es.get<EcalPedestalsRcd>().get(peds);
119 
120  // for the weights method
121  es.get<EcalWeightXtalGroupsRcd>().get(grps);
122  es.get<EcalTBWeightsRcd>().get(wgts);
123 
124  // which of the samples need be used
126 
127  // for the ratio method
128 
129  // for the leading edge method
132 
133  // for the time correction methods
135 }
136 
137 
138 // check saturation: 5 samples with gainId = 0
139 template < class C >
141 {
142  //bool saturated_ = 0;
143  int cnt;
144  for (int j = 0; j < C::MAXSAMPLES - 5; ++j) {
145  cnt = 0;
146  for (int i = j; i < (j + 5) && i < C::MAXSAMPLES; ++i) {
147  if ( dataFrame.sample(i).gainId() == 0 ) ++cnt;
148  }
149  if ( cnt == 5 ) return j-1 ; // the last unsaturated sample
150  }
151  return -1; // no saturation found
152 }
153 
164  float ampli,
165  const std::vector<float>& amplitudeBins,
166  const std::vector<float>& shiftBins) {
167 
168  // computed initially in ns. Than turned in the BX's, as
169  // EcalUncalibratedRecHit need be.
170  double theCorrection = 0;
171 
172  // sanity check for arrays
173  if (amplitudeBins.size() == 0) {
174  edm::LogError("EcalRecHitError")
175  << "timeCorrAmplitudeBins is empty, forcing no time bias corrections.";
176 
177  return 0;
178  }
179 
180  if (amplitudeBins.size() != shiftBins.size()) {
181  edm::LogError("EcalRecHitError")
182  << "Size of timeCorrAmplitudeBins different from "
183  "timeCorrShiftBins. Forcing no time bias corrections. ";
184 
185  return 0;
186  }
187 
188  int myBin = -1;
189  for (int bin = 0; bin < (int) amplitudeBins.size(); bin++) {
190  if (ampli > amplitudeBins.at(bin)) {
191  myBin = bin;
192  } else {
193  break;
194  }
195  }
196 
197  if (myBin == -1) {
198  theCorrection = shiftBins.at(0);
199  } else if (myBin == ((int)(amplitudeBins.size() - 1))) {
200  theCorrection = shiftBins.at(myBin);
201  } else if (-1 < myBin && myBin < ((int) amplitudeBins.size() - 1)) {
202  // interpolate linearly between two assingned points
203  theCorrection = (shiftBins.at(myBin + 1) - shiftBins.at(myBin));
204  theCorrection *= (((double) ampli) - amplitudeBins.at(myBin)) /
205  (amplitudeBins.at(myBin + 1) - amplitudeBins.at(myBin));
206  theCorrection += shiftBins.at(myBin);
207  } else {
208  edm::LogError("EcalRecHitError")
209  << "Assigning time correction impossible. Setting it to 0 ";
210  theCorrection = 0.;
211  }
212 
213  // convert ns into clocks
214  return theCorrection / 25.;
215 }
216 
217 
218 
219 bool
223 {
224  DetId detid(itdg->id());
225 
226  const EcalSampleMask *sampleMask_ = sampleMaskHand_.product();
227 
228  // intelligence for recHit computation
229  EcalUncalibratedRecHit uncalibRecHit;
230 
231 
232  const EcalPedestals::Item * aped = 0;
233  const EcalMGPAGainRatio * aGain = 0;
234  const EcalXtalGroupId * gid = 0;
235  float offsetTime = 0;
236 
237  if (detid.subdetId()==EcalEndcap) {
238  unsigned int hashedIndex = EEDetId(detid).hashedIndex();
239  aped = &peds->endcap(hashedIndex);
240  aGain = &gains->endcap(hashedIndex);
241  gid = &grps->endcap(hashedIndex);
242  offsetTime = offtime->getEEValue();
243  } else {
244  unsigned int hashedIndex = EBDetId(detid).hashedIndex();
245  aped = &peds->barrel(hashedIndex);
246  aGain = &gains->barrel(hashedIndex);
247  gid = &grps->barrel(hashedIndex);
248  offsetTime = offtime->getEBValue();
249  }
250 
251  pedVec[0] = aped->mean_x12;
252  pedVec[1] = aped->mean_x6;
253  pedVec[2] = aped->mean_x1;
254  pedRMSVec[0] = aped->rms_x12;
255  pedRMSVec[1] = aped->rms_x6;
256  pedRMSVec[2] = aped->rms_x1;
257  gainRatios[0] = 1.;
258  gainRatios[1] = aGain->gain12Over6();
259  gainRatios[2] = aGain->gain6Over1()*aGain->gain12Over6();
260 
261  // compute the right bin of the pulse shape using time calibration constants
263  EcalTimeCalibConstant itimeconst = 0;
264  if( it != itime->end() ) {
265  itimeconst = (*it);
266  } else {
267  edm::LogError("EcalRecHitError") << "No time intercalib const found for xtal "
268  << detid.rawId()
269  << "! something wrong with EcalTimeCalibConstants in your DB? ";
270  }
271 
272 
273  // === amplitude computation ===
274  int leadingSample = -1;
275  if (detid.subdetId()==EcalEndcap) {
276  leadingSample = ((EcalDataFrame)(*itdg)).lastUnsaturatedSample();
277  } else {
278  leadingSample = ((EcalDataFrame)(*itdg)).lastUnsaturatedSample();
279  }
280 
281  if ( leadingSample >= 0 ) { // saturation
282  if ( leadingSample != 4 ) {
283  // all samples different from the fifth are not reliable for the amplitude estimation
284  // put by default the energy at the saturation threshold and flag as saturated
285  float sratio = 1;
286  if ( detid.subdetId()==EcalBarrel) {
287  sratio = ebPulseShape_[5] / ebPulseShape_[4];
288  } else {
289  sratio = eePulseShape_[5] / eePulseShape_[4];
290  }
291  uncalibRecHit = EcalUncalibratedRecHit( (*itdg).id(), 4095*12*sratio, 0, 0, 0);
293  } else {
294  // float clockToNsConstant = 25.;
295  // reconstruct the rechit
296  if (detid.subdetId()==EcalEndcap) {
298  // float mult = (float)eePulseShape_.size() / (float)(*itdg).size();
299  // bin (or some analogous mapping) will be used instead of the leadingSample
300  //int bin = (int)(( (mult * leadingSample + mult/2) * clockToNsConstant + itimeconst ) / clockToNsConstant);
301  // bin is not uset for the moment
303  uncalibRecHit = leadingEdgeMethod_endcap_.makeRecHit(*itdg, pedVec, gainRatios, 0, 0);
306  } else {
308  // float mult = (float)ebPulseShape_.size() / (float)(*itdg).size();
309  // bin (or some analogous mapping) will be used instead of the leadingSample
310  //int bin = (int)(( (mult * leadingSample + mult/2) * clockToNsConstant + itimeconst ) / clockToNsConstant);
311  // bin is not uset for the moment
313  uncalibRecHit = leadingEdgeMethod_barrel_.makeRecHit(*itdg, pedVec, gainRatios, 0, 0);
316  }
317  }
318  // do not propagate the default chi2 = -1 value to the calib rechit (mapped to 64), set it to 0 when saturation
319  uncalibRecHit.setChi2(0);
320  uncalibRecHit.setOutOfTimeChi2(0);
321  } else {
322  // weights method
323  EcalTBWeights::EcalTDCId tdcid(1);
324  EcalTBWeights::EcalTBWeightMap const & wgtsMap = wgts->getMap();
325  EcalTBWeights::EcalTBWeightMap::const_iterator wit;
326  wit = wgtsMap.find( std::make_pair(*gid,tdcid) );
327  if( wit == wgtsMap.end() ) {
328  edm::LogError("EcalUncalibRecHitError") << "No weights found for EcalGroupId: "
329  << gid->id() << " and EcalTDCId: " << tdcid
330  << "\n skipping digi with id: " << detid.rawId();
331 
332  return false;
333  }
334  const EcalWeightSet& wset = wit->second; // this is the EcalWeightSet
335 
338 
339  weights[0] = &mat1;
340  weights[1] = &mat2;
341 
342  // get uncalibrated recHit from weights
343  if (detid.subdetId()==EcalEndcap) {
345  } else {
347  }
348 
349  // === time computation ===
350  // ratio method
351  float const clockToNsConstant = 25.;
352  if (detid.subdetId()==EcalEndcap) {
353  ratioMethod_endcap_.init( *itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios );
357  double theTimeCorrectionEE = timeCorrection(uncalibRecHit.amplitude(),
358  timeCorrBias_->EETimeCorrAmplitudeBins, timeCorrBias_->EETimeCorrShiftBins);
359 
360  uncalibRecHit.setJitter( crh.timeMax - 5 + theTimeCorrectionEE);
361  uncalibRecHit.setJitterError( std::sqrt(pow(crh.timeError,2) + std::pow(EEtimeConstantTerm_,2)/std::pow(clockToNsConstant,2)) );
362  uncalibRecHit.setOutOfTimeEnergy( crh.amplitudeMax );
363  // consider flagging as kOutOfTime only if above noise
364  if (uncalibRecHit.amplitude() > pedRMSVec[0] * amplitudeThreshEE_){
365  float outOfTimeThreshP = outOfTimeThreshG12pEE_;
366  float outOfTimeThreshM = outOfTimeThreshG12mEE_;
367  // determine if gain has switched away from gainId==1 (x12 gain)
368  // and determine cuts (number of 'sigmas') to ose for kOutOfTime
369  // >3k ADC is necessasry condition for gain switch to occur
370  if (uncalibRecHit.amplitude() > 3000.){
371  for (int iSample = 0; iSample < EEDataFrame::MAXSAMPLES; iSample++) {
372  int GainId = ((EcalDataFrame)(*itdg)).sample(iSample).gainId();
373  if (GainId!=1) {
374  outOfTimeThreshP = outOfTimeThreshG61pEE_;
375  outOfTimeThreshM = outOfTimeThreshG61mEE_;
376  break;
377  }
378  }}
379  float correctedTime = (crh.timeMax-5) * clockToNsConstant + itimeconst + offsetTime;
380  float cterm = EEtimeConstantTerm_;
381  float sigmaped = pedRMSVec[0]; // approx for lower gains
382  float nterm = EEtimeNconst_*sigmaped/uncalibRecHit.amplitude();
383  float sigmat = std::sqrt( nterm*nterm + cterm*cterm );
384  if ( ( correctedTime > sigmat*outOfTimeThreshP ) ||
385  ( correctedTime < (-1.*sigmat*outOfTimeThreshM) ))
386  { uncalibRecHit.setFlagBit( EcalUncalibratedRecHit::kOutOfTime ); }
387  }
388 
389  } else {
390  ratioMethod_barrel_.init( *itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios );
395 
396  double theTimeCorrectionEB = timeCorrection(uncalibRecHit.amplitude(),
397  timeCorrBias_->EBTimeCorrAmplitudeBins, timeCorrBias_->EBTimeCorrShiftBins);
398 
399  uncalibRecHit.setJitter( crh.timeMax - 5 + theTimeCorrectionEB);
400 
401  uncalibRecHit.setJitterError( std::sqrt(std::pow(crh.timeError,2) + std::pow(EBtimeConstantTerm_,2)/std::pow(clockToNsConstant,2)) );
402  uncalibRecHit.setOutOfTimeEnergy( crh.amplitudeMax );
403  // consider flagging as kOutOfTime only if above noise
404  if (uncalibRecHit.amplitude() > pedRMSVec[0] * amplitudeThreshEB_){
405  float outOfTimeThreshP = outOfTimeThreshG12pEB_;
406  float outOfTimeThreshM = outOfTimeThreshG12mEB_;
407  // determine if gain has switched away from gainId==1 (x12 gain)
408  // and determine cuts (number of 'sigmas') to ose for kOutOfTime
409  // >3k ADC is necessasry condition for gain switch to occur
410  if (uncalibRecHit.amplitude() > 3000.){
411  for (int iSample = 0; iSample < EBDataFrame::MAXSAMPLES; iSample++) {
412  int GainId = ((EcalDataFrame)(*itdg)).sample(iSample).gainId();
413  if (GainId!=1) {
414  outOfTimeThreshP = outOfTimeThreshG61pEB_;
415  outOfTimeThreshM = outOfTimeThreshG61mEB_;
416  break;}
417  } }
418  float correctedTime = (crh.timeMax-5) * clockToNsConstant + itimeconst + offsetTime;
419  float cterm = EBtimeConstantTerm_;
420  float sigmaped = pedRMSVec[0]; // approx for lower gains
421  float nterm = EBtimeNconst_*sigmaped/uncalibRecHit.amplitude();
422  float sigmat = std::sqrt( nterm*nterm + cterm*cterm );
423  if ( ( correctedTime > sigmat*outOfTimeThreshP ) ||
424  ( correctedTime < (-1.*sigmat*outOfTimeThreshM) ))
425  { uncalibRecHit.setFlagBit( EcalUncalibratedRecHit::kOutOfTime ); }
426  }
427  }
428 
429  // === chi2express ===
430  if (detid.subdetId()==EcalEndcap) {
431 
432  double amplitude = uncalibRecHit.amplitude();
433  double amplitudeOutOfTime = uncalibRecHit.outOfTimeEnergy();
434  double jitter= uncalibRecHit.jitter();
435 
436 
437 
439  *itdg,
440  amplitude,
441  (itimeconst + offsetTime),
442  amplitudeOutOfTime,
443  jitter,
444  pedVec,
445  pedRMSVec,
446  gainRatios,
449  );
450  double chi2 = chi2expressEE_.chi2();
451  uncalibRecHit.setChi2(chi2);
452  double chi2OutOfTime = chi2expressEE_.chi2OutOfTime();
453  uncalibRecHit.setOutOfTimeChi2(chi2OutOfTime);
454 
455  if(kPoorRecoFlagEE_)
456  {
457 
458  if (chi2>chi2ThreshEE_) {
459 
460  // first check if all samples are ok, if not don't use chi2 to flag
461  bool samplesok = true;
462  for (int sample =0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
463  if (!sampleMask_->useSampleEE(sample)) {
464  samplesok = false;
465  break;
466  }
467  }
468  if (samplesok) uncalibRecHit.setFlagBit(EcalUncalibratedRecHit::kPoorReco);
469  }
470 
471 
472  }
473 
474  } else {
475  double amplitude = uncalibRecHit.amplitude();
476  double amplitudeOutOfTime = uncalibRecHit.outOfTimeEnergy();
477  double jitter= uncalibRecHit.jitter();
478 
480  *itdg,
481  amplitude,
482  (itimeconst + offsetTime),
483  amplitudeOutOfTime,
484  jitter,
485  pedVec,
486  pedRMSVec,
487  gainRatios,
490  );
491  double chi2 = chi2expressEB_.chi2();
492  uncalibRecHit.setChi2(chi2);
493  double chi2OutOfTime = chi2expressEB_.chi2OutOfTime();
494  uncalibRecHit.setOutOfTimeChi2(chi2OutOfTime);
495 
496  if(kPoorRecoFlagEB_)
497  {
498 
499  if(chi2>chi2ThreshEB_){
500  // first check if all samples are ok, if not don't use chi2 to flag
501  bool samplesok = true;
502  for (int sample =0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
503  if (!sampleMask_->useSampleEB(sample)) {
504  samplesok = false;
505  break;
506  }
507  }
508  if (samplesok) uncalibRecHit.setFlagBit(EcalUncalibratedRecHit::kPoorReco);
509  }
510 
511  }
512  }
513  }
514 
515  // set flags if gain switch has occurred
516  if( ((EcalDataFrame)(*itdg)).hasSwitchToGain6() ) uncalibRecHit.setFlagBit( EcalUncalibratedRecHit::kHasSwitchToGain6 );
517  if( ((EcalDataFrame)(*itdg)).hasSwitchToGain1() ) uncalibRecHit.setFlagBit( EcalUncalibratedRecHit::kHasSwitchToGain1 );
518 
519  // put the recHit in the collection
520  if (detid.subdetId()==EcalEndcap) {
521  result.push_back( uncalibRecHit );
522  } else {
523  result.push_back( uncalibRecHit );
524  }
525 
526  return true;
527 }
528 
edm::ESHandle< EcalTimeOffsetConstant > offtime
std::map< std::pair< EcalXtalGroupId, EcalTDCId >, EcalWeightSet > EcalTBWeightMap
Definition: EcalTBWeights.h:21
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
edm::ESHandle< EcalTimeBiasCorrections > timeCorrBias_
bool run(const edm::Event &evt, const EcalDigiCollection::const_iterator &digi, EcalUncalibratedRecHitCollection &result)
int hashedIndex() const
get a compact index for arrays
Definition: EBDetId.h:86
void computeAmplitude(std::vector< double > &amplitudeFitParameters)
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_
void setJitterError(float jitterErr)
std::pair< double, double > EEtimeFitLimits_
void setPulseShape(std::vector< double > &shape)
EcalUncalibRecHitRatioMethodAlgo< EEDataFrame > ratioMethod_endcap_
const unsigned int id() const
EcalUncalibRecHitLeadingEdgeAlgo< EBDataFrame > leadingEdgeMethod_barrel_
void setOutOfTimeChi2(float chi2)
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:42
EcalUncalibRecHitRatioMethodAlgo< EBDataFrame > ratioMethod_barrel_
edm::ESHandle< EcalGainRatios > gains
EcalUncalibRecHitLeadingEdgeAlgo< EEDataFrame > leadingEdgeMethod_endcap_
T sqrt(T t)
Definition: SSEVec.h:48
edm::ESHandle< EcalPedestals > peds
tuple result
Definition: query.py:137
virtual EcalUncalibratedRecHit makeRecHit(const C &dataFrame, const double *pedestals, const double *pedestalsRMS, const double *gainRatios, const EcalWeightSet::EcalWeightMatrix **weights, const EcalShapeBase &testbeamPulseShape)
Compute parameters.
int j
Definition: DBlmapReader.cc:9
edm::ESHandle< EcalTBWeights > wgts
float gain6Over1() const
edm::ESHandle< EcalWeightXtalGroups > grps
EcalUncalibRecHitWorkerGlobal(const edm::ParameterSet &, edm::ConsumesCollector &c)
EcalWeightMatrix & getWeightsAfterGainSwitch()
Definition: EcalWeightSet.h:30
virtual EcalUncalibratedRecHit makeRecHit(const C &dataFrame, const double *pedestals, const double *gainRatios, const EcalWeightSet::EcalWeightMatrix **weights, const EcalWeightSet::EcalChi2WeightMatrix **chi2Matrix)
Compute parameters.
Definition: DetId.h:18
int hashedIndex() const
Definition: EEDetId.h:182
EcalWeightMatrix & getWeightsBeforeGainSwitch()
Definition: EcalWeightSet.h:29
const T & get() const
Definition: EventSetup.h:55
std::vector< Item >::const_iterator const_iterator
T const * product() const
Definition: ESHandle.h:62
float gain12Over6() const
const EcalWeightSet::EcalWeightMatrix * weights[2]
float EcalTimeCalibConstant
void set(const edm::EventSetup &es)
edm::ESHandle< EcalTimeCalibConstants > itime
EcalUncalibRecHitRecWeightsAlgo< EEDataFrame > weightsMethod_endcap_
math::Matrix< 3, 10 >::type EcalWeightMatrix
Definition: EcalWeightSet.h:22
#define DEFINE_EDM_PLUGIN(factory, type, name)
void setOutOfTimeEnergy(float energy)
edm::ESHandle< EcalSampleMask > sampleMaskHand_
void init(const C &dataFrame, const EcalSampleMask &sampleMask, const double *pedestals, const double *pedestalRMSes, const double *gainRatios)
static const int MAXSAMPLES
Definition: EcalDataFrame.h:48
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40