CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalUncalibRecHitWorkerMultiFit.cc
Go to the documentation of this file.
2 
8 
17 
18 
21  noisecorEBg12(SampleMatrix::Zero()), noisecorEEg12(SampleMatrix::Zero()),
22  noisecorEBg6(SampleMatrix::Zero()), noisecorEEg6(SampleMatrix::Zero()),
23  noisecorEBg1(SampleMatrix::Zero()), noisecorEEg1(SampleMatrix::Zero()),
24  fullpulseEB(FullSampleVector::Zero()),fullpulseEE(FullSampleVector::Zero()),
25  fullpulsecovEB(FullSampleMatrix::Zero()),fullpulsecovEE(FullSampleMatrix::Zero()) {
26 
27  // get the pulse shape, amplitude covariances and noise correlations
28  EcalPulseShapeParameters_ = ps.getParameter<edm::ParameterSet>("EcalPulseShapeParameters");
30 
31  // get the BX for the pulses to be activated
32  std::vector<int32_t> activeBXs = ps.getParameter< std::vector<int32_t> >("activeBXs");
33  activeBX.resize(activeBXs.size());
34  for (unsigned int ibx=0; ibx<activeBXs.size(); ++ibx) {
35  activeBX.coeffRef(ibx) = activeBXs[ibx];
36  }
37 
38  // uncertainty calculation (CPU intensive)
39  ampErrorCalculation_ = ps.getParameter<bool>("ampErrorCalculation");
40  useLumiInfoRunHeader_ = ps.getParameter<bool>("useLumiInfoRunHeader");
41 
42  if (useLumiInfoRunHeader_) {
43  bunchSpacing_ = c.consumes<int>(edm::InputTag("addPileupInfo","bunchSpacing"));
44  }
45 
46  // algorithm to be used for timing
47  timealgo_ = ps.getParameter<std::string>("timealgo");
48 
49  // ratio method parameters
50  EBtimeFitParameters_ = ps.getParameter<std::vector<double> >("EBtimeFitParameters");
51  EEtimeFitParameters_ = ps.getParameter<std::vector<double> >("EEtimeFitParameters");
52  EBamplitudeFitParameters_ = ps.getParameter<std::vector<double> >("EBamplitudeFitParameters");
53  EEamplitudeFitParameters_ = ps.getParameter<std::vector<double> >("EEamplitudeFitParameters");
54  EBtimeFitLimits_.first = ps.getParameter<double>("EBtimeFitLimits_Lower");
55  EBtimeFitLimits_.second = ps.getParameter<double>("EBtimeFitLimits_Upper");
56  EEtimeFitLimits_.first = ps.getParameter<double>("EEtimeFitLimits_Lower");
57  EEtimeFitLimits_.second = ps.getParameter<double>("EEtimeFitLimits_Upper");
58  EBtimeConstantTerm_=ps.getParameter<double>("EBtimeConstantTerm");
59  EEtimeConstantTerm_=ps.getParameter<double>("EEtimeConstantTerm");
60 
61  // leading edge parameters
62  ebPulseShape_ = ps.getParameter<std::vector<double> >("ebPulseShape");
63  eePulseShape_ = ps.getParameter<std::vector<double> >("eePulseShape");
64 
65  // chi2 parameters for flags determination
66  kPoorRecoFlagEB_ = ps.getParameter<bool>("kPoorRecoFlagEB");
67  kPoorRecoFlagEE_ = ps.getParameter<bool>("kPoorRecoFlagEE");;
68  chi2ThreshEB_=ps.getParameter<double>("chi2ThreshEB_");
69  chi2ThreshEE_=ps.getParameter<double>("chi2ThreshEE_");
70 
71 }
72 
73 
74 
75 // EcalUncalibRecHitWorkerMultiFit::EcalUncalibRecHitWorkerMultiFit(const edm::ParameterSet&ps) :
76 // EcalUncalibRecHitWorkerBaseClass(ps)
77 // {
78 // // ratio method parameters
79 // EBtimeFitParameters_ = ps.getParameter<std::vector<double> >("EBtimeFitParameters");
80 // EEtimeFitParameters_ = ps.getParameter<std::vector<double> >("EEtimeFitParameters");
81 // EBamplitudeFitParameters_ = ps.getParameter<std::vector<double> >("EBamplitudeFitParameters");
82 // EEamplitudeFitParameters_ = ps.getParameter<std::vector<double> >("EEamplitudeFitParameters");
83 // EBtimeFitLimits_.first = ps.getParameter<double>("EBtimeFitLimits_Lower");
84 // EBtimeFitLimits_.second = ps.getParameter<double>("EBtimeFitLimits_Upper");
85 // EEtimeFitLimits_.first = ps.getParameter<double>("EEtimeFitLimits_Lower");
86 // EEtimeFitLimits_.second = ps.getParameter<double>("EEtimeFitLimits_Upper");
87 // EBtimeConstantTerm_=ps.getParameter<double>("EBtimeConstantTerm");
88 // EEtimeConstantTerm_=ps.getParameter<double>("EEtimeConstantTerm");
89 //
90 // // leading edge parameters
91 // ebPulseShape_ = ps.getParameter<std::vector<double> >("ebPulseShape");
92 // eePulseShape_ = ps.getParameter<std::vector<double> >("eePulseShape");
93 //
94 // }
95 
96 
97 
98 
99 
100 
101 
102 
103 
104 
105 
106 
107 
108 void
110 {
111 
112  // common setup
113  es.get<EcalGainRatiosRcd>().get(gains);
114  es.get<EcalPedestalsRcd>().get(peds);
115 
116  // for the multifit method
118 
119  // weights parameters for the time
120  es.get<EcalWeightXtalGroupsRcd>().get(grps);
121  es.get<EcalTBWeightsRcd>().get(wgts);
122 
123  // which of the samples need be used
125 
126  // for the ratio method
127 
128  // for the leading edge method
131 
132  // for the time correction methods
134 }
135 
136 void
138 {
139 
140  if (useLumiInfoRunHeader_) {
141 
142  int bunchspacing = 450;
143 
144  if (evt.isRealData()) {
145  edm::RunNumber_t run = evt.run();
146  if (run == 178003 ||
147  run == 178004 ||
148  run == 209089 ||
149  run == 209106 ||
150  run == 209109 ||
151  run == 209146 ||
152  run == 209148 ||
153  run == 209151) {
154  bunchspacing = 25;
155  }
156  else {
157  bunchspacing = 50;
158  }
159  }
160  else {
161  edm::Handle<int> bunchSpacingH;
162  evt.getByToken(bunchSpacing_,bunchSpacingH);
163  bunchspacing = *bunchSpacingH;
164  }
165 
166  if (bunchspacing == 25) {
167  activeBX.resize(10);
168  activeBX << -5,-4,-3,-2,-1,0,1,2,3,4;
169  }
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 }
178 
189  float ampli,
190  const std::vector<float>& amplitudeBins,
191  const std::vector<float>& shiftBins) {
192 
193  // computed initially in ns. Than turned in the BX's, as
194  // EcalUncalibratedRecHit need be.
195  double theCorrection = 0;
196 
197  // sanity check for arrays
198  if (amplitudeBins.size() == 0) {
199  edm::LogError("EcalRecHitError")
200  << "timeCorrAmplitudeBins is empty, forcing no time bias corrections.";
201 
202  return 0;
203  }
204 
205  if (amplitudeBins.size() != shiftBins.size()) {
206  edm::LogError("EcalRecHitError")
207  << "Size of timeCorrAmplitudeBins different from "
208  "timeCorrShiftBins. Forcing no time bias corrections. ";
209 
210  return 0;
211  }
212 
213  int myBin = -1;
214  for (int bin = 0; bin < (int) amplitudeBins.size(); bin++) {
215  if (ampli > amplitudeBins.at(bin)) {
216  myBin = bin;
217  } else {
218  break;
219  }
220  }
221 
222  if (myBin == -1) {
223  theCorrection = shiftBins.at(0);
224  } else if (myBin == ((int)(amplitudeBins.size() - 1))) {
225  theCorrection = shiftBins.at(myBin);
226  } else if (-1 < myBin && myBin < ((int) amplitudeBins.size() - 1)) {
227  // interpolate linearly between two assingned points
228  theCorrection = (shiftBins.at(myBin + 1) - shiftBins.at(myBin));
229  theCorrection *= (((double) ampli) - amplitudeBins.at(myBin)) /
230  (amplitudeBins.at(myBin + 1) - amplitudeBins.at(myBin));
231  theCorrection += shiftBins.at(myBin);
232  } else {
233  edm::LogError("EcalRecHitError")
234  << "Assigning time correction impossible. Setting it to 0 ";
235  theCorrection = 0.;
236  }
237 
238  // convert ns into clocks
239  return theCorrection / 25.;
240 }
241 
242 
243 
244 bool
248 {
249  DetId detid(itdg->id());
250 
251  const EcalSampleMask *sampleMask_ = sampleMaskHand_.product();
252 
253  // intelligence for recHit computation
254  EcalUncalibratedRecHit uncalibRecHit;
255 
256 
257  const EcalPedestals::Item * aped = 0;
258  const EcalMGPAGainRatio * aGain = 0;
259  const EcalXtalGroupId * gid = 0;
260 
261  if (detid.subdetId()==EcalEndcap) {
262  unsigned int hashedIndex = EEDetId(detid).hashedIndex();
263  aped = &peds->endcap(hashedIndex);
264  aGain = &gains->endcap(hashedIndex);
265  gid = &grps->endcap(hashedIndex);
266  } else {
267  unsigned int hashedIndex = EBDetId(detid).hashedIndex();
268  aped = &peds->barrel(hashedIndex);
269  aGain = &gains->barrel(hashedIndex);
270  gid = &grps->barrel(hashedIndex);
271  }
272 
273  pedVec[0] = aped->mean_x12;
274  pedVec[1] = aped->mean_x6;
275  pedVec[2] = aped->mean_x1;
276  pedRMSVec[0] = aped->rms_x12;
277  pedRMSVec[1] = aped->rms_x6;
278  pedRMSVec[2] = aped->rms_x1;
279  gainRatios[0] = 1.;
280  gainRatios[1] = aGain->gain12Over6();
281  gainRatios[2] = aGain->gain6Over1()*aGain->gain12Over6();
282 
283 
284  // === amplitude computation ===
285  int leadingSample = ((EcalDataFrame)(*itdg)).lastUnsaturatedSample();
286 
287  if ( leadingSample >= 0 ) { // saturation
288  if ( leadingSample != 4 ) {
289  // all samples different from the fifth are not reliable for the amplitude estimation
290  // put by default the energy at the saturation threshold and flag as saturated
291  float sratio = 1;
292  if ( detid.subdetId()==EcalBarrel) {
293  sratio = ebPulseShape_[5] / ebPulseShape_[4];
294  } else {
295  sratio = eePulseShape_[5] / eePulseShape_[4];
296  }
297  uncalibRecHit = EcalUncalibratedRecHit( (*itdg).id(), 4095*12*sratio, 0, 0, 0);
299  } else {
300  // float clockToNsConstant = 25.;
301  // reconstruct the rechit
302  if (detid.subdetId()==EcalEndcap) {
304  // float mult = (float)eePulseShape_.size() / (float)(*itdg).size();
305  // bin (or some analogous mapping) will be used instead of the leadingSample
306  //int bin = (int)(( (mult * leadingSample + mult/2) * clockToNsConstant + itimeconst ) / clockToNsConstant);
307  // bin is not uset for the moment
309  uncalibRecHit = leadingEdgeMethod_endcap_.makeRecHit(*itdg, pedVec, gainRatios, 0, 0);
312  } else {
314  // float mult = (float)ebPulseShape_.size() / (float)(*itdg).size();
315  // bin (or some analogous mapping) will be used instead of the leadingSample
316  //int bin = (int)(( (mult * leadingSample + mult/2) * clockToNsConstant + itimeconst ) / clockToNsConstant);
317  // bin is not uset for the moment
319  uncalibRecHit = leadingEdgeMethod_barrel_.makeRecHit(*itdg, pedVec, gainRatios, 0, 0);
322  }
323  }
324  // do not propagate the default chi2 = -1 value to the calib rechit (mapped to 64), set it to 0 when saturation
325  uncalibRecHit.setChi2(0);
326  } else {
327  // multifit
328  bool barrel = detid.subdetId()==EcalBarrel;
329  int gain = 12;
330  if (((EcalDataFrame)(*itdg)).hasSwitchToGain6()) {
331  gain = 6;
332  }
333  if (((EcalDataFrame)(*itdg)).hasSwitchToGain1()) {
334  gain = 1;
335  }
336  const SampleMatrix &noisecormat = noisecor(barrel,gain);
337  const FullSampleVector &fullpulse = barrel ? fullpulseEB : fullpulseEE;
338  const FullSampleMatrix &fullpulsecov = barrel ? fullpulsecovEB : fullpulsecovEE;
339 
340  uncalibRecHit = multiFitMethod_.makeRecHit(*itdg, aped, aGain, noisecormat,fullpulse,fullpulsecov,activeBX);
341 
342  // === time computation ===
343  if(timealgo_.compare("RatioMethod")==0) {
344  // ratio method
345  float const clockToNsConstant = 25.;
346  if (detid.subdetId()==EcalEndcap) {
347  ratioMethod_endcap_.init( *itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios );
351  double theTimeCorrectionEE = timeCorrection(uncalibRecHit.amplitude(),
352  timeCorrBias_->EETimeCorrAmplitudeBins, timeCorrBias_->EETimeCorrShiftBins);
353 
354  uncalibRecHit.setJitter( crh.timeMax - 5 + theTimeCorrectionEE);
355  uncalibRecHit.setJitterError( std::sqrt(pow(crh.timeError,2) + std::pow(EEtimeConstantTerm_,2)/std::pow(clockToNsConstant,2)) );
356 
357  } else {
358  ratioMethod_barrel_.init( *itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios );
363 
364  double theTimeCorrectionEB = timeCorrection(uncalibRecHit.amplitude(),
365  timeCorrBias_->EBTimeCorrAmplitudeBins, timeCorrBias_->EBTimeCorrShiftBins);
366 
367  uncalibRecHit.setJitter( crh.timeMax - 5 + theTimeCorrectionEB);
368 
369  uncalibRecHit.setJitterError( std::sqrt(std::pow(crh.timeError,2) + std::pow(EBtimeConstantTerm_,2)/std::pow(clockToNsConstant,2)) );
370  }
371  } else if(timealgo_.compare("WeightsMethod")==0) {
372  // weights method on the PU subtracted pulse shape
373  std::vector<double> amplitudes;
374  for(unsigned int ibx=0; ibx<activeBX.size(); ++ibx) amplitudes.push_back(uncalibRecHit.outOfTimeAmplitude(ibx));
375 
376  EcalTBWeights::EcalTDCId tdcid(1);
377  EcalTBWeights::EcalTBWeightMap const & wgtsMap = wgts->getMap();
378  EcalTBWeights::EcalTBWeightMap::const_iterator wit;
379  wit = wgtsMap.find( std::make_pair(*gid,tdcid) );
380  if( wit == wgtsMap.end() ) {
381  edm::LogError("EcalUncalibRecHitError") << "No weights found for EcalGroupId: "
382  << gid->id() << " and EcalTDCId: " << tdcid
383  << "\n skipping digi with id: " << detid.rawId();
384 
385  return false;
386  }
387  const EcalWeightSet& wset = wit->second; // this is the EcalWeightSet
388 
391 
392  weights[0] = &mat1;
393  weights[1] = &mat2;
394 
395  double timerh;
396  if (detid.subdetId()==EcalEndcap) {
397  timerh = weightsMethod_endcap_.time( *itdg, amplitudes, aped, aGain, fullpulse, weights);
398  } else {
399  timerh = weightsMethod_barrel_.time( *itdg, amplitudes, aped, aGain, fullpulse, weights);
400  }
401  uncalibRecHit.setJitter( timerh );
402  uncalibRecHit.setJitterError( 0. ); // not computed with weights
403  } else if(timealgo_.compare("None")==0) {
404  uncalibRecHit.setJitter( 0. );
405  uncalibRecHit.setJitterError( 0. );
406  } else {
407  edm::LogError("EcalUncalibRecHitError") << "No time estimation algorithm called "
408  << timealgo_
409  << "\n setting jitter to 0. and jitter uncertainty to 10000. ";
410 
411  uncalibRecHit.setJitter( 0. );
412  uncalibRecHit.setJitterError( 10000. );
413  }
414  }
415 
416  // set flags if gain switch has occurred
417  if( ((EcalDataFrame)(*itdg)).hasSwitchToGain6() ) uncalibRecHit.setFlagBit( EcalUncalibratedRecHit::kHasSwitchToGain6 );
418  if( ((EcalDataFrame)(*itdg)).hasSwitchToGain1() ) uncalibRecHit.setFlagBit( EcalUncalibratedRecHit::kHasSwitchToGain1 );
419 
420  // set quality flags based on chi2 of the the fit
421  /*
422  if(detid.subdetId()==EcalEndcap) {
423  if(kPoorRecoFlagEE_ && uncalibRecHit.chi2()>chi2ThreshEE_) {
424  bool samplesok = true;
425  for (int sample =0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
426  if (!sampleMask_->useSampleEE(sample)) {
427  samplesok = false;
428  break;
429  }
430  }
431  if (samplesok) uncalibRecHit.setFlagBit(EcalUncalibratedRecHit::kPoorReco);
432  }
433  } else {
434  if(kPoorRecoFlagEB_ && uncalibRecHit.chi2()>chi2ThreshEB_) {
435  bool samplesok = true;
436  for (int sample =0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
437  if (!sampleMask_->useSampleEB(sample)) {
438  samplesok = false;
439  break;
440  }
441  }
442  if (samplesok) uncalibRecHit.setFlagBit(EcalUncalibratedRecHit::kPoorReco);
443  }
444  }
445  */
446 
447  // put the recHit in the collection
448  if (detid.subdetId()==EcalEndcap) {
449  result.push_back( uncalibRecHit );
450  } else {
451  result.push_back( uncalibRecHit );
452  }
453 
454  return true;
455 }
456 
457 
459  if (barrel) {
460  if (gain==6) {
461  return noisecorEBg6;
462  }
463  else if (gain==1) {
464  return noisecorEBg1;
465  }
466  else {
467  return noisecorEBg12;
468  }
469  }
470  else {
471  if (gain==6) {
472  return noisecorEEg6;
473  }
474  else if (gain==1) {
475  return noisecorEEg1;
476  }
477  else {
478  return noisecorEEg12;
479  }
480  }
481 
482  return noisecorEBg12;
483 
484 }
485 
487 
488  const std::vector<double> ebCorMatG12 = params.getParameter< std::vector<double> >("EBCorrNoiseMatrixG12");
489  const std::vector<double> eeCorMatG12 = params.getParameter< std::vector<double> >("EECorrNoiseMatrixG12");
490  const std::vector<double> ebCorMatG06 = params.getParameter< std::vector<double> >("EBCorrNoiseMatrixG06");
491  const std::vector<double> eeCorMatG06 = params.getParameter< std::vector<double> >("EECorrNoiseMatrixG06");
492  const std::vector<double> ebCorMatG01 = params.getParameter< std::vector<double> >("EBCorrNoiseMatrixG01");
493  const std::vector<double> eeCorMatG01 = params.getParameter< std::vector<double> >("EECorrNoiseMatrixG01");
494 
495  int nnoise = ebCorMatG12.size();
496 
497  // fill correlation matrices: noise (HF (+) LF)
498  for (int i=0; i<nnoise; ++i) {
499  for (int j=0; j<nnoise; ++j) {
500  int vidx = std::abs(j-i);
501  noisecorEBg12(i,j) = ebCorMatG12[vidx];
502  noisecorEEg12(i,j) = eeCorMatG12[vidx];
503  noisecorEBg6(i,j) = ebCorMatG06[vidx];
504  noisecorEEg6(i,j) = eeCorMatG06[vidx];
505  noisecorEBg1(i,j) = ebCorMatG01[vidx];
506  noisecorEEg1(i,j) = eeCorMatG01[vidx];
507  }
508  }
509 
510  // fill shape: from simulation for samples 3-9, from alpha/beta shape for 10-14
511  const std::vector<double> ebPulse = params.getParameter< std::vector<double> >("EBPulseShapeTemplate");
512  const std::vector<double> eePulse = params.getParameter< std::vector<double> >("EEPulseShapeTemplate");
513  int nShapeSamples = ebPulse.size();
514  for (int i=0; i<nShapeSamples; ++i) {
515  fullpulseEB(i+7) = ebPulse[i];
516  fullpulseEE(i+7) = eePulse[i];
517  }
518 
519  const std::vector<double> ebPulseCov = params.getParameter< std::vector<double> >("EBPulseShapeCovariance");
520  const std::vector<double> eePulseCov = params.getParameter< std::vector<double> >("EEPulseShapeCovariance");
521  for(int k=0; k<std::pow(nShapeSamples,2); ++k) {
522  int i = k/nShapeSamples;
523  int j = k%nShapeSamples;
524  fullpulsecovEB(i+7,j+7) = ebPulseCov[k];
525  fullpulsecovEE(i+7,j+7) = eePulseCov[k];
526  }
527 
528 }
529 
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
std::map< std::pair< EcalXtalGroupId, EcalTDCId >, EcalWeightSet > EcalTBWeightMap
Definition: EcalTBWeights.h:21
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
int hashedIndex() const
get a compact index for arrays
Definition: EBDetId.h:86
void computeAmplitude(std::vector< double > &amplitudeFitParameters)
EcalUncalibRecHitWorkerMultiFit(const edm::ParameterSet &, edm::ConsumesCollector &c)
unsigned size(int bx) const
EcalUncalibRecHitMultiFitAlgo multiFitMethod_
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
const SampleMatrix & noisecor(bool barrel, int gain) const
void setJitter(float jitter)
EcalUncalibRecHitTimeWeightsAlgo< EEDataFrame > weightsMethod_endcap_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
EcalUncalibRecHitLeadingEdgeAlgo< EBDataFrame > leadingEdgeMethod_barrel_
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.
EcalUncalibratedRecHit makeRecHit(const EcalDataFrame &dataFrame, const EcalPedestals::Item *aped, const EcalMGPAGainRatio *aGain, const SampleMatrix &noisecor, const FullSampleVector &fullpulse, const FullSampleMatrix &fullpulsecov, const BXVector &activeBX)
compute rechits
void computeTime(std::vector< double > &timeFitParameters, std::pair< double, double > &timeFitLimits, std::vector< double > &amplitudeFitParameters)
edm::ESHandle< EcalWeightXtalGroups > grps
void push_back(T const &t)
void setJitterError(float jitterErr)
Eigen::Matrix< double, 19, 19 > FullSampleMatrix
bool isRealData() const
Definition: EventBase.h:60
EcalUncalibRecHitRatioMethodAlgo< EBDataFrame > ratioMethod_barrel_
void setPulseShape(std::vector< double > &shape)
const unsigned int id() const
bool run(const edm::Event &evt, const EcalDigiCollection::const_iterator &digi, EcalUncalibratedRecHitCollection &result) override
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:42
float outOfTimeAmplitude(int bx) const
EcalUncalibRecHitRatioMethodAlgo< EEDataFrame > ratioMethod_endcap_
T sqrt(T t)
Definition: SSEVec.h:48
tuple result
Definition: query.py:137
RunNumber_t run() const
Definition: Event.h:85
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int j
Definition: DBlmapReader.cc:9
edm::ESHandle< EcalTimeCalibConstants > itime
double timeCorrection(float ampli, const std::vector< float > &amplitudeBins, const std::vector< float > &shiftBins)
float gain6Over1() const
Eigen::Matrix< double, 19, 1 > FullSampleVector
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.
edm::ESHandle< EcalTimeBiasCorrections > timeCorrBias_
Definition: DetId.h:18
EcalUncalibRecHitLeadingEdgeAlgo< EEDataFrame > leadingEdgeMethod_endcap_
void set(const edm::EventSetup &es) override
int hashedIndex() const
Definition: EEDetId.h:182
EcalWeightMatrix & getWeightsBeforeGainSwitch()
Definition: EcalWeightSet.h:29
const T & get() const
Definition: EventSetup.h:55
void resize(int bx, unsigned size)
T const * product() const
Definition: ESHandle.h:86
float gain12Over6() const
EcalUncalibRecHitTimeWeightsAlgo< EBDataFrame > weightsMethod_barrel_
edm::ESHandle< EcalTimeOffsetConstant > offtime
math::Matrix< 3, 10 >::type EcalWeightMatrix
Definition: EcalWeightSet.h:22
#define DEFINE_EDM_PLUGIN(factory, type, name)
unsigned int RunNumber_t
edm::ESHandle< EcalSampleMask > sampleMaskHand_
const EcalWeightSet::EcalWeightMatrix * weights[2]
Eigen::Matrix< double, 10, 10 > SampleMatrix
void init(const C &dataFrame, const EcalSampleMask &sampleMask, const double *pedestals, const double *pedestalRMSes, const double *gainRatios)
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void fillInputs(const edm::ParameterSet &params)