CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
EcalUncalibRecHitWorkerGlobal Class Reference

#include <EcalUncalibRecHitWorkerGlobal.h>

Inheritance diagram for EcalUncalibRecHitWorkerGlobal:
EcalUncalibRecHitWorkerRunOneDigiBase EcalUncalibRecHitWorkerBaseClass

Public Member Functions

 EcalUncalibRecHitWorkerGlobal ()
 
 EcalUncalibRecHitWorkerGlobal (const edm::ParameterSet &, edm::ConsumesCollector &c)
 
edm::ParameterSetDescription getAlgoDescription () override
 
bool run (const edm::Event &evt, const EcalDigiCollection::const_iterator &digi, EcalUncalibratedRecHitCollection &result) override
 
void set (const edm::EventSetup &es) override
 
 ~EcalUncalibRecHitWorkerGlobal () override
 
- Public Member Functions inherited from EcalUncalibRecHitWorkerRunOneDigiBase
 EcalUncalibRecHitWorkerRunOneDigiBase ()
 
 EcalUncalibRecHitWorkerRunOneDigiBase (const edm::ParameterSet &p)
 
 EcalUncalibRecHitWorkerRunOneDigiBase (const edm::ParameterSet &p, edm::ConsumesCollector &c)
 
void run (const edm::Event &evt, const EcalDigiCollection &digis, EcalUncalibratedRecHitCollection &result) override
 
 ~EcalUncalibRecHitWorkerRunOneDigiBase () override
 
- Public Member Functions inherited from EcalUncalibRecHitWorkerBaseClass
 EcalUncalibRecHitWorkerBaseClass ()
 
 EcalUncalibRecHitWorkerBaseClass (const edm::ParameterSet &)
 
 EcalUncalibRecHitWorkerBaseClass (const edm::ParameterSet &, edm::ConsumesCollector &c)
 
virtual void set (const edm::Event &evt)
 
virtual ~EcalUncalibRecHitWorkerBaseClass ()
 

Protected Member Functions

template<class C >
int isSaturated (const C &digi)
 
double timeCorrection (float ampli, const std::vector< float > &amplitudeBins, const std::vector< float > &shiftBins)
 

Protected Attributes

double amplitudeThreshEB_
 
double amplitudeThreshEE_
 
const EcalWeightSet::EcalChi2WeightMatrixchi2mat [2]
 
double chi2ThreshEB_
 
double chi2ThreshEE_
 
std::vector< double > EBamplitudeFitParameters_
 
std::vector< double > EBchi2Parameters_
 
std::vector< double > ebPulseShape_
 
double ebSpikeThresh_
 
double EBtimeConstantTerm_
 
std::pair< double, double > EBtimeFitLimits_
 
std::vector< double > EBtimeFitParameters_
 
double EBtimeNconst_
 
std::vector< double > EEamplitudeFitParameters_
 
std::vector< double > EEchi2Parameters_
 
std::vector< double > eePulseShape_
 
double EEtimeConstantTerm_
 
std::pair< double, double > EEtimeFitLimits_
 
std::vector< double > EEtimeFitParameters_
 
double EEtimeNconst_
 
double gainRatios [3]
 
edm::ESHandle< EcalGainRatiosgains_
 
edm::ESHandle< EcalWeightXtalGroupsgrps_
 
edm::ESHandle< EcalTimeCalibConstantsitime_
 
bool kPoorRecoFlagEB_
 
bool kPoorRecoFlagEE_
 
edm::ESHandle< EcalTimeOffsetConstantofftime_
 
double outOfTimeThreshG12mEB_
 
double outOfTimeThreshG12mEE_
 
double outOfTimeThreshG12pEB_
 
double outOfTimeThreshG12pEE_
 
double outOfTimeThreshG61mEB_
 
double outOfTimeThreshG61mEE_
 
double outOfTimeThreshG61pEB_
 
double outOfTimeThreshG61pEE_
 
double pedRMSVec [3]
 
edm::ESHandle< EcalPedestalspeds_
 
double pedVec [3]
 
EcalUncalibRecHitRatioMethodAlgo< EBDataFrameratioMethod_barrel_
 
EcalUncalibRecHitRatioMethodAlgo< EEDataFrameratioMethod_endcap_
 
edm::ESHandle< EcalSampleMasksampleMaskHand_
 
EBShape testbeamEBShape
 
EEShape testbeamEEShape
 
edm::ESHandle< EcalTimeBiasCorrectionstimeCorrBias_
 
edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcdtokenGains_
 
edm::ESGetToken< EcalWeightXtalGroups, EcalWeightXtalGroupsRcdtokenGrps_
 
edm::ESGetToken< EcalTimeCalibConstants, EcalTimeCalibConstantsRcdtokenItime_
 
edm::ESGetToken< EcalTimeOffsetConstant, EcalTimeOffsetConstantRcdtokenOfftime_
 
edm::ESGetToken< EcalPedestals, EcalPedestalsRcdtokenPeds_
 
edm::ESGetToken< EcalSampleMask, EcalSampleMaskRcdtokenSampleMask_
 
edm::ESGetToken< EcalTimeBiasCorrections, EcalTimeBiasCorrectionsRcdtokenTimeCorrBias_
 
edm::ESGetToken< EcalTBWeights, EcalTBWeightsRcdtokenWgts_
 
const EcalWeightSet::EcalWeightMatrixweights [2]
 
EcalUncalibRecHitRecWeightsAlgo< EBDataFrameweightsMethod_barrel_
 
EcalUncalibRecHitRecWeightsAlgo< EEDataFrameweightsMethod_endcap_
 
edm::ESHandle< EcalTBWeightswgts_
 

Detailed Description

Definition at line 44 of file EcalUncalibRecHitWorkerGlobal.h.

Constructor & Destructor Documentation

◆ EcalUncalibRecHitWorkerGlobal() [1/2]

EcalUncalibRecHitWorkerGlobal::EcalUncalibRecHitWorkerGlobal ( const edm::ParameterSet ps,
edm::ConsumesCollector c 
)

Definition at line 11 of file EcalUncalibRecHitWorkerGlobal.cc.

17  testbeamEEShape(EEShape(true)),
18  testbeamEBShape(EBShape(true)),
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 
57  chi2ThreshEB_ = ps.getParameter<double>("chi2ThreshEB_");
58  chi2ThreshEE_ = ps.getParameter<double>("chi2ThreshEE_");
59  EBchi2Parameters_ = ps.getParameter<std::vector<double>>("EBchi2Parameters");
60  EEchi2Parameters_ = ps.getParameter<std::vector<double>>("EEchi2Parameters");
61 }

References amplitudeThreshEB_, amplitudeThreshEE_, chi2ThreshEB_, chi2ThreshEE_, EBamplitudeFitParameters_, EBchi2Parameters_, ebPulseShape_, ebSpikeThresh_, EBtimeConstantTerm_, EBtimeFitLimits_, EBtimeFitParameters_, EBtimeNconst_, EEamplitudeFitParameters_, EEchi2Parameters_, eePulseShape_, EEtimeConstantTerm_, EEtimeFitLimits_, EEtimeFitParameters_, EEtimeNconst_, edm::ParameterSet::getParameter(), kPoorRecoFlagEB_, kPoorRecoFlagEE_, outOfTimeThreshG12mEB_, outOfTimeThreshG12mEE_, outOfTimeThreshG12pEB_, outOfTimeThreshG12pEE_, outOfTimeThreshG61mEB_, outOfTimeThreshG61mEE_, outOfTimeThreshG61pEB_, and outOfTimeThreshG61pEE_.

◆ EcalUncalibRecHitWorkerGlobal() [2/2]

EcalUncalibRecHitWorkerGlobal::EcalUncalibRecHitWorkerGlobal ( )
inline

Definition at line 47 of file EcalUncalibRecHitWorkerGlobal.h.

47 : testbeamEEShape(EEShape(true)), testbeamEBShape(EBShape(true)) { ; }

◆ ~EcalUncalibRecHitWorkerGlobal()

EcalUncalibRecHitWorkerGlobal::~EcalUncalibRecHitWorkerGlobal ( )
inlineoverride

Definition at line 48 of file EcalUncalibRecHitWorkerGlobal.h.

48 {};

Member Function Documentation

◆ getAlgoDescription()

edm::ParameterSetDescription EcalUncalibRecHitWorkerGlobal::getAlgoDescription ( )
overridevirtual

Implements EcalUncalibRecHitWorkerBaseClass.

Definition at line 441 of file EcalUncalibRecHitWorkerGlobal.cc.

441  {
443  psd.addNode(
444  edm::ParameterDescription<std::vector<double>>(
445  "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
446  edm::ParameterDescription<std::vector<double>>(
447  "EBtimeFitParameters",
448  {-2.015452, 3.130702, -12.3473, 41.88921, -82.83944, 91.01147, -50.35761, 11.05621},
449  true) and
450  edm::ParameterDescription<double>("outOfTimeThresholdGain61pEB", 5, true) and
451  edm::ParameterDescription<double>("amplitudeThresholdEE", 10, true) and
452  edm::ParameterDescription<double>("EBtimeConstantTerm", 0.6, true) and
453  edm::ParameterDescription<double>("outOfTimeThresholdGain61pEE", 1000, true) and
454  edm::ParameterDescription<double>("ebSpikeThreshold", 1.042, true) and
455  edm::ParameterDescription<double>("EBtimeNconst", 28.5, true) and
456  edm::ParameterDescription<bool>("kPoorRecoFlagEB", true, true) and
457  edm::ParameterDescription<std::vector<double>>(
458  "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
459  edm::ParameterDescription<double>("EBtimeFitLimits_Lower", 0.2, true) and
460  edm::ParameterDescription<bool>("kPoorRecoFlagEE", false, true) and
461  edm::ParameterDescription<double>("chi2ThreshEB_", 36.0, true) and
462  edm::ParameterDescription<std::vector<double>>(
463  "EEtimeFitParameters",
464  {-2.390548, 3.553628, -17.62341, 67.67538, -133.213, 140.7432, -75.41106, 16.20277},
465  true) and
466  edm::ParameterDescription<double>("outOfTimeThresholdGain61mEE", 1000, true) and
467  edm::ParameterDescription<std::vector<double>>("EEchi2Parameters", {2.122, 0.022, 2.122, 0.022}, true) and
468  edm::ParameterDescription<double>("outOfTimeThresholdGain12mEE", 1000, true) and
469  edm::ParameterDescription<double>("outOfTimeThresholdGain12mEB", 5, true) and
470  edm::ParameterDescription<double>("EEtimeFitLimits_Upper", 1.4, true) and
471  edm::ParameterDescription<double>("EEtimeFitLimits_Lower", 0.2, true) and
472  edm::ParameterDescription<std::vector<double>>("EEamplitudeFitParameters", {1.89, 1.4}, true) and
473  edm::ParameterDescription<std::vector<double>>("EBamplitudeFitParameters", {1.138, 1.652}, true) and
474  edm::ParameterDescription<double>("amplitudeThresholdEB", 10, true) and
475  edm::ParameterDescription<double>("outOfTimeThresholdGain12pEE", 1000, true) and
476  edm::ParameterDescription<double>("outOfTimeThresholdGain12pEB", 5, true) and
477  edm::ParameterDescription<double>("EEtimeNconst", 31.8, true) and
478  edm::ParameterDescription<double>("outOfTimeThresholdGain61mEB", 5, true) and
479  edm::ParameterDescription<std::vector<double>>("EBchi2Parameters", {2.122, 0.022, 2.122, 0.022}, true) and
480  edm::ParameterDescription<double>("EEtimeConstantTerm", 1.0, true) and
481  edm::ParameterDescription<double>("chi2ThreshEE_", 95.0, true) and
482  edm::ParameterDescription<double>("EBtimeFitLimits_Upper", 1.4, true));
483 
484  return psd;
485 }

References edm::ParameterSetDescription::addNode().

◆ isSaturated()

template<class C >
int EcalUncalibRecHitWorkerGlobal::isSaturated ( const C &  digi)
protected

Definition at line 90 of file EcalUncalibRecHitWorkerGlobal.cc.

90  {
91  //bool saturated_ = 0;
92  int cnt;
93  for (int j = 0; j < C::MAXSAMPLES - 5; ++j) {
94  cnt = 0;
95  for (int i = j; i < (j + 5) && i < C::MAXSAMPLES; ++i) {
96  if (dataFrame.sample(i).gainId() == 0)
97  ++cnt;
98  }
99  if (cnt == 5)
100  return j - 1; // the last unsaturated sample
101  }
102  return -1; // no saturation found
103 }

References mps_fire::i, and dqmiolumiharvest::j.

◆ run()

bool EcalUncalibRecHitWorkerGlobal::run ( const edm::Event evt,
const EcalDigiCollection::const_iterator digi,
EcalUncalibratedRecHitCollection result 
)
overridevirtual

Implements EcalUncalibRecHitWorkerRunOneDigiBase.

Definition at line 163 of file EcalUncalibRecHitWorkerGlobal.cc.

165  {
166  DetId detid(itdg->id());
167 
168  const EcalSampleMask* sampleMask_ = sampleMaskHand_.product();
169 
170  // intelligence for recHit computation
171  EcalUncalibratedRecHit uncalibRecHit;
172 
173  const EcalPedestals::Item* aped = nullptr;
174  const EcalMGPAGainRatio* aGain = nullptr;
175  const EcalXtalGroupId* gid = nullptr;
176  float offsetTime = 0;
177 
178  if (detid.subdetId() == EcalEndcap) {
179  unsigned int hashedIndex = EEDetId(detid).hashedIndex();
180  aped = &peds_->endcap(hashedIndex);
181  aGain = &gains_->endcap(hashedIndex);
182  gid = &grps_->endcap(hashedIndex);
183  offsetTime = offtime_->getEEValue();
184  } else {
185  unsigned int hashedIndex = EBDetId(detid).hashedIndex();
186  aped = &peds_->barrel(hashedIndex);
187  aGain = &gains_->barrel(hashedIndex);
188  gid = &grps_->barrel(hashedIndex);
189  offsetTime = offtime_->getEBValue();
190  }
191 
192  pedVec[0] = aped->mean_x12;
193  pedVec[1] = aped->mean_x6;
194  pedVec[2] = aped->mean_x1;
195  pedRMSVec[0] = aped->rms_x12;
196  pedRMSVec[1] = aped->rms_x6;
197  pedRMSVec[2] = aped->rms_x1;
198  gainRatios[0] = 1.;
199  gainRatios[1] = aGain->gain12Over6();
200  gainRatios[2] = aGain->gain6Over1() * aGain->gain12Over6();
201 
202  // compute the right bin of the pulse shape using time calibration constants
204  EcalTimeCalibConstant itimeconst = 0;
205  if (it != itime_->end()) {
206  itimeconst = (*it);
207  } else {
208  edm::LogError("EcalRecHitError") << "No time intercalib const found for xtal " << detid.rawId()
209  << "! something wrong with EcalTimeCalibConstants in your DB? ";
210  }
211 
212  // === amplitude computation ===
213  int leadingSample = -1;
214  if (detid.subdetId() == EcalEndcap) {
215  leadingSample = ((EcalDataFrame)(*itdg)).lastUnsaturatedSample();
216  } else {
217  leadingSample = ((EcalDataFrame)(*itdg)).lastUnsaturatedSample();
218  }
219 
220  if (leadingSample == 4) { // saturation on the expected max sample
221  uncalibRecHit = EcalUncalibratedRecHit((*itdg).id(), 4095 * 12, 0, 0, 0);
223  // do not propagate the default chi2 = -1 value to the calib rechit (mapped to 64), set it to 0 when saturation
224  uncalibRecHit.setChi2(0);
225  } else if (leadingSample >= 0) { // saturation on other samples: cannot extrapolate from the fourth one
226  double pedestal = 0.;
227  double gainratio = 1.;
228  int gainId = ((EcalDataFrame)(*itdg)).sample(5).gainId();
229 
230  if (gainId == 0 || gainId == 3) {
231  pedestal = aped->mean_x1;
232  gainratio = aGain->gain6Over1() * aGain->gain12Over6();
233  } else if (gainId == 1) {
234  pedestal = aped->mean_x12;
235  gainratio = 1.;
236  } else if (gainId == 2) {
237  pedestal = aped->mean_x6;
238  gainratio = aGain->gain12Over6();
239  }
240  double amplitude = ((double)(((EcalDataFrame)(*itdg)).sample(5).adc()) - pedestal) * gainratio;
241  uncalibRecHit = EcalUncalibratedRecHit((*itdg).id(), amplitude, 0, 0, 0);
243  // do not propagate the default chi2 = -1 value to the calib rechit (mapped to 64), set it to 0 when saturation
244  uncalibRecHit.setChi2(0);
245  } else {
246  // weights method
247  EcalTBWeights::EcalTDCId tdcid(1);
248  EcalTBWeights::EcalTBWeightMap const& wgtsMap = wgts_->getMap();
249  EcalTBWeights::EcalTBWeightMap::const_iterator wit;
250  wit = wgtsMap.find(std::make_pair(*gid, tdcid));
251  if (wit == wgtsMap.end()) {
252  edm::LogError("EcalUncalibRecHitError")
253  << "No weights found for EcalGroupId: " << gid->id() << " and EcalTDCId: " << tdcid
254  << "\n skipping digi with id: " << detid.rawId();
255 
256  return false;
257  }
258  const EcalWeightSet& wset = wit->second; // this is the EcalWeightSet
259 
262 
263  weights[0] = &mat1;
264  weights[1] = &mat2;
265 
266  // get uncalibrated recHit from weights
267  if (detid.subdetId() == EcalEndcap) {
269  } else {
271  }
272 
273  // === time computation ===
274  // ratio method
275  float const clockToNsConstant = 25.;
276  if (detid.subdetId() == EcalEndcap) {
277  ratioMethod_endcap_.init(*itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios);
281  double theTimeCorrectionEE = timeCorrection(
283 
284  uncalibRecHit.setJitter(crh.timeMax - 5 + theTimeCorrectionEE);
285  uncalibRecHit.setJitterError(
286  std::sqrt(pow(crh.timeError, 2) + std::pow(EEtimeConstantTerm_, 2) / std::pow(clockToNsConstant, 2)));
287  // consider flagging as kOutOfTime only if above noise
288  if (uncalibRecHit.amplitude() > pedRMSVec[0] * amplitudeThreshEE_) {
289  float outOfTimeThreshP = outOfTimeThreshG12pEE_;
290  float outOfTimeThreshM = outOfTimeThreshG12mEE_;
291  // determine if gain has switched away from gainId==1 (x12 gain)
292  // and determine cuts (number of 'sigmas') to ose for kOutOfTime
293  // >3k ADC is necessasry condition for gain switch to occur
294  if (uncalibRecHit.amplitude() > 3000.) {
295  for (int iSample = 0; iSample < EEDataFrame::MAXSAMPLES; iSample++) {
296  int GainId = ((EcalDataFrame)(*itdg)).sample(iSample).gainId();
297  if (GainId != 1) {
298  outOfTimeThreshP = outOfTimeThreshG61pEE_;
299  outOfTimeThreshM = outOfTimeThreshG61mEE_;
300  break;
301  }
302  }
303  }
304  float correctedTime = (crh.timeMax - 5) * clockToNsConstant + itimeconst + offsetTime;
305  float cterm = EEtimeConstantTerm_;
306  float sigmaped = pedRMSVec[0]; // approx for lower gains
307  float nterm = EEtimeNconst_ * sigmaped / uncalibRecHit.amplitude();
308  float sigmat = std::sqrt(nterm * nterm + cterm * cterm);
309  if ((correctedTime > sigmat * outOfTimeThreshP) || (correctedTime < (-1. * sigmat * outOfTimeThreshM))) {
311  }
312  }
313 
314  } else {
315  ratioMethod_barrel_.init(*itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios);
320 
321  double theTimeCorrectionEB = timeCorrection(
323 
324  uncalibRecHit.setJitter(crh.timeMax - 5 + theTimeCorrectionEB);
325 
326  uncalibRecHit.setJitterError(
327  std::sqrt(std::pow(crh.timeError, 2) + std::pow(EBtimeConstantTerm_, 2) / std::pow(clockToNsConstant, 2)));
328  // consider flagging as kOutOfTime only if above noise
329  if (uncalibRecHit.amplitude() > pedRMSVec[0] * amplitudeThreshEB_) {
330  float outOfTimeThreshP = outOfTimeThreshG12pEB_;
331  float outOfTimeThreshM = outOfTimeThreshG12mEB_;
332  // determine if gain has switched away from gainId==1 (x12 gain)
333  // and determine cuts (number of 'sigmas') to ose for kOutOfTime
334  // >3k ADC is necessasry condition for gain switch to occur
335  if (uncalibRecHit.amplitude() > 3000.) {
336  for (int iSample = 0; iSample < EBDataFrame::MAXSAMPLES; iSample++) {
337  int GainId = ((EcalDataFrame)(*itdg)).sample(iSample).gainId();
338  if (GainId != 1) {
339  outOfTimeThreshP = outOfTimeThreshG61pEB_;
340  outOfTimeThreshM = outOfTimeThreshG61mEB_;
341  break;
342  }
343  }
344  }
345  float correctedTime = (crh.timeMax - 5) * clockToNsConstant + itimeconst + offsetTime;
346  float cterm = EBtimeConstantTerm_;
347  float sigmaped = pedRMSVec[0]; // approx for lower gains
348  float nterm = EBtimeNconst_ * sigmaped / uncalibRecHit.amplitude();
349  float sigmat = std::sqrt(nterm * nterm + cterm * cterm);
350  if ((correctedTime > sigmat * outOfTimeThreshP) || (correctedTime < (-1. * sigmat * outOfTimeThreshM))) {
352  }
353  }
354  }
355 
356  // === chi2express ===
357  if (detid.subdetId() == EcalEndcap) {
358  double amplitude = uncalibRecHit.amplitude();
359  double amplitudeOutOfTime = 0.;
360  double jitter = uncalibRecHit.jitter();
361 
362  EcalUncalibRecHitRecChi2Algo<EEDataFrame> chi2expressEE_(*itdg,
363  amplitude,
364  (itimeconst + offsetTime),
365  amplitudeOutOfTime,
366  jitter,
367  pedVec,
368  pedRMSVec,
369  gainRatios,
372  double chi2 = chi2expressEE_.chi2();
373  uncalibRecHit.setChi2(chi2);
374 
375  if (kPoorRecoFlagEE_) {
376  if (chi2 > chi2ThreshEE_) {
377  // first check if all samples are ok, if not don't use chi2 to flag
378  bool samplesok = true;
379  for (int sample = 0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
380  if (!sampleMask_->useSampleEE(sample)) {
381  samplesok = false;
382  break;
383  }
384  }
385  if (samplesok)
387  }
388  }
389 
390  } else {
391  double amplitude = uncalibRecHit.amplitude();
392  double amplitudeOutOfTime = 0.;
393  double jitter = uncalibRecHit.jitter();
394 
395  EcalUncalibRecHitRecChi2Algo<EBDataFrame> chi2expressEB_(*itdg,
396  amplitude,
397  (itimeconst + offsetTime),
398  amplitudeOutOfTime,
399  jitter,
400  pedVec,
401  pedRMSVec,
402  gainRatios,
405  double chi2 = chi2expressEB_.chi2();
406  uncalibRecHit.setChi2(chi2);
407 
408  if (kPoorRecoFlagEB_) {
409  if (chi2 > chi2ThreshEB_) {
410  // first check if all samples are ok, if not don't use chi2 to flag
411  bool samplesok = true;
412  for (int sample = 0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
413  if (!sampleMask_->useSampleEB(sample)) {
414  samplesok = false;
415  break;
416  }
417  }
418  if (samplesok)
420  }
421  }
422  }
423  }
424 
425  // set flags if gain switch has occurred
426  if (((EcalDataFrame)(*itdg)).hasSwitchToGain6())
428  if (((EcalDataFrame)(*itdg)).hasSwitchToGain1())
430 
431  // put the recHit in the collection
432  if (detid.subdetId() == EcalEndcap) {
433  result.push_back(uncalibRecHit);
434  } else {
435  result.push_back(uncalibRecHit);
436  }
437 
438  return true;
439 }

References CustomPhysics_cfi::amplitude, EcalUncalibratedRecHit::amplitude(), amplitudeThreshEB_, amplitudeThreshEE_, hltPixelTracks_cff::chi2, EcalUncalibRecHitRecChi2Algo< C >::chi2(), chi2ThreshEB_, chi2ThreshEE_, EcalUncalibRecHitRatioMethodAlgo< C >::computeAmplitude(), EcalUncalibRecHitRatioMethodAlgo< C >::computeTime(), EBamplitudeFitParameters_, EBchi2Parameters_, EBtimeConstantTerm_, EcalTimeBiasCorrections::EBTimeCorrAmplitudeBins, EcalTimeBiasCorrections::EBTimeCorrShiftBins, EBtimeFitLimits_, EBtimeFitParameters_, EBtimeNconst_, EcalEndcap, EEamplitudeFitParameters_, EEchi2Parameters_, EEtimeConstantTerm_, EcalTimeBiasCorrections::EETimeCorrAmplitudeBins, EcalTimeBiasCorrections::EETimeCorrShiftBins, EEtimeFitLimits_, EEtimeFitParameters_, EEtimeNconst_, EcalUncalibRecHitRatioMethodAlgo< C >::fixMGPAslew(), EcalMGPAGainRatio::gain12Over6(), EcalMGPAGainRatio::gain6Over1(), ecalLiteDTU::gainId(), gainRatios, gains_, EcalUncalibRecHitRatioMethodAlgo< C >::getCalculatedRecHit(), EcalTimeOffsetConstant::getEBValue(), EcalTimeOffsetConstant::getEEValue(), EcalTBWeights::getMap(), EcalWeightSet::getWeightsAfterGainSwitch(), EcalWeightSet::getWeightsBeforeGainSwitch(), grps_, ecalpyutils::hashedIndex(), EBDetId::hashedIndex(), EEDetId::hashedIndex(), EcalXtalGroupId::id(), EcalUncalibRecHitRatioMethodAlgo< C >::init(), itime_, EcalUncalibratedRecHit::jitter(), EcalUncalibratedRecHit::kHasSwitchToGain1, EcalUncalibratedRecHit::kHasSwitchToGain6, EcalUncalibratedRecHit::kOutOfTime, EcalUncalibratedRecHit::kPoorReco, kPoorRecoFlagEB_, kPoorRecoFlagEE_, EcalUncalibratedRecHit::kSaturated, EcalUncalibRecHitRecWeightsAlgo< C >::makeRecHit(), EcalDataFrame::MAXSAMPLES, offtime_, outOfTimeThreshG12mEB_, outOfTimeThreshG12mEE_, outOfTimeThreshG12pEB_, outOfTimeThreshG12pEE_, outOfTimeThreshG61mEB_, outOfTimeThreshG61mEE_, outOfTimeThreshG61pEB_, outOfTimeThreshG61pEE_, EcalCondDBWriter_cfi::pedestal, pedRMSVec, peds_, pedVec, funct::pow(), edm::ESHandle< T >::product(), ratioMethod_barrel_, ratioMethod_endcap_, mps_fire::result, simplePhotonAnalyzer_cfi::sample, sampleMaskHand_, EcalUncalibratedRecHit::setChi2(), EcalUncalibratedRecHit::setFlagBit(), EcalUncalibratedRecHit::setJitter(), EcalUncalibratedRecHit::setJitterError(), mathSSE::sqrt(), testbeamEBShape, testbeamEEShape, timeCorrBias_, timeCorrection(), weights, weightsMethod_barrel_, weightsMethod_endcap_, and wgts_.

◆ set()

void EcalUncalibRecHitWorkerGlobal::set ( const edm::EventSetup es)
overridevirtual

Implements EcalUncalibRecHitWorkerBaseClass.

Definition at line 63 of file EcalUncalibRecHitWorkerGlobal.cc.

63  {
64  // common setup
67 
68  // for the weights method
71 
72  // which of the samples need be used
74 
75  // for the ratio method
76 
79 
80  // for the time correction methods
82 
83  // for the DB Ecal Pulse Sim Shape
86 }

References gains_, edm::EventSetup::getHandle(), grps_, itime_, offtime_, peds_, sampleMaskHand_, EcalShapeBase::setEventSetup(), testbeamEBShape, testbeamEEShape, timeCorrBias_, tokenGains_, tokenGrps_, tokenItime_, tokenOfftime_, tokenPeds_, tokenSampleMask_, tokenTimeCorrBias_, tokenWgts_, and wgts_.

◆ timeCorrection()

double EcalUncalibRecHitWorkerGlobal::timeCorrection ( float  ampli,
const std::vector< float > &  amplitudeBins,
const std::vector< float > &  shiftBins 
)
protected

Amplitude-dependent time corrections; EE and EB have separate corrections: EXtimeCorrAmplitudes (ADC) and EXtimeCorrShifts (ns) need to have the same number of elements Bins must be ordered in amplitude. First-last bins take care of under-overflows.

The algorithm is the same for EE and EB, only the correction vectors are different.

Returns
Jitter (in clock cycles) which will be added to UncalibRechit.setJitter(), 0 if no correction is applied.

Definition at line 114 of file EcalUncalibRecHitWorkerGlobal.cc.

116  {
117  // computed initially in ns. Than turned in the BX's, as
118  // EcalUncalibratedRecHit need be.
119  double theCorrection = 0;
120 
121  // sanity check for arrays
122  if (amplitudeBins.empty()) {
123  edm::LogError("EcalRecHitError") << "timeCorrAmplitudeBins is empty, forcing no time bias corrections.";
124 
125  return 0;
126  }
127 
128  if (amplitudeBins.size() != shiftBins.size()) {
129  edm::LogError("EcalRecHitError") << "Size of timeCorrAmplitudeBins different from "
130  "timeCorrShiftBins. Forcing no time bias corrections. ";
131 
132  return 0;
133  }
134 
135  int myBin = -1;
136  for (int bin = 0; bin < (int)amplitudeBins.size(); bin++) {
137  if (ampli > amplitudeBins.at(bin)) {
138  myBin = bin;
139  } else {
140  break;
141  }
142  }
143 
144  if (myBin == -1) {
145  theCorrection = shiftBins.at(0);
146  } else if (myBin == ((int)(amplitudeBins.size() - 1))) {
147  theCorrection = shiftBins.at(myBin);
148  } else if (-1 < myBin && myBin < ((int)amplitudeBins.size() - 1)) {
149  // interpolate linearly between two assingned points
150  theCorrection = (shiftBins.at(myBin + 1) - shiftBins.at(myBin));
151  theCorrection *=
152  (((double)ampli) - amplitudeBins.at(myBin)) / (amplitudeBins.at(myBin + 1) - amplitudeBins.at(myBin));
153  theCorrection += shiftBins.at(myBin);
154  } else {
155  edm::LogError("EcalRecHitError") << "Assigning time correction impossible. Setting it to 0 ";
156  theCorrection = 0.;
157  }
158 
159  // convert ns into clocks
160  return theCorrection / 25.;
161 }

References newFWLiteAna::bin, and createfilelist::int.

Referenced by run().

Member Data Documentation

◆ amplitudeThreshEB_

double EcalUncalibRecHitWorkerGlobal::amplitudeThreshEB_
protected

Definition at line 111 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ amplitudeThreshEE_

double EcalUncalibRecHitWorkerGlobal::amplitudeThreshEE_
protected

Definition at line 112 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ chi2mat

const EcalWeightSet::EcalChi2WeightMatrix* EcalUncalibRecHitWorkerGlobal::chi2mat[2]
protected

Definition at line 78 of file EcalUncalibRecHitWorkerGlobal.h.

◆ chi2ThreshEB_

double EcalUncalibRecHitWorkerGlobal::chi2ThreshEB_
protected

Definition at line 128 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ chi2ThreshEE_

double EcalUncalibRecHitWorkerGlobal::chi2ThreshEE_
protected

Definition at line 129 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EBamplitudeFitParameters_

std::vector<double> EcalUncalibRecHitWorkerGlobal::EBamplitudeFitParameters_
protected

Definition at line 91 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EBchi2Parameters_

std::vector<double> EcalUncalibRecHitWorkerGlobal::EBchi2Parameters_
protected

Definition at line 130 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ ebPulseShape_

std::vector<double> EcalUncalibRecHitWorkerGlobal::ebPulseShape_
protected

Definition at line 122 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal().

◆ ebSpikeThresh_

double EcalUncalibRecHitWorkerGlobal::ebSpikeThresh_
protected

Definition at line 113 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal().

◆ EBtimeConstantTerm_

double EcalUncalibRecHitWorkerGlobal::EBtimeConstantTerm_
protected

Definition at line 99 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EBtimeFitLimits_

std::pair<double, double> EcalUncalibRecHitWorkerGlobal::EBtimeFitLimits_
protected

Definition at line 93 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EBtimeFitParameters_

std::vector<double> EcalUncalibRecHitWorkerGlobal::EBtimeFitParameters_
protected

Definition at line 89 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EBtimeNconst_

double EcalUncalibRecHitWorkerGlobal::EBtimeNconst_
protected

Definition at line 100 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EEamplitudeFitParameters_

std::vector<double> EcalUncalibRecHitWorkerGlobal::EEamplitudeFitParameters_
protected

Definition at line 92 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EEchi2Parameters_

std::vector<double> EcalUncalibRecHitWorkerGlobal::EEchi2Parameters_
protected

Definition at line 131 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ eePulseShape_

std::vector<double> EcalUncalibRecHitWorkerGlobal::eePulseShape_
protected

Definition at line 123 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal().

◆ EEtimeConstantTerm_

double EcalUncalibRecHitWorkerGlobal::EEtimeConstantTerm_
protected

Definition at line 101 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EEtimeFitLimits_

std::pair<double, double> EcalUncalibRecHitWorkerGlobal::EEtimeFitLimits_
protected

Definition at line 94 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EEtimeFitParameters_

std::vector<double> EcalUncalibRecHitWorkerGlobal::EEtimeFitParameters_
protected

Definition at line 90 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EEtimeNconst_

double EcalUncalibRecHitWorkerGlobal::EEtimeNconst_
protected

Definition at line 102 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ gainRatios

double EcalUncalibRecHitWorkerGlobal::gainRatios[3]
protected

Definition at line 60 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ gains_

edm::ESHandle<EcalGainRatios> EcalUncalibRecHitWorkerGlobal::gains_
protected

Definition at line 65 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ grps_

edm::ESHandle<EcalWeightXtalGroups> EcalUncalibRecHitWorkerGlobal::grps_
protected

Definition at line 75 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ itime_

edm::ESHandle<EcalTimeCalibConstants> EcalUncalibRecHitWorkerGlobal::itime_
protected

Definition at line 120 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ kPoorRecoFlagEB_

bool EcalUncalibRecHitWorkerGlobal::kPoorRecoFlagEB_
protected

Definition at line 126 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ kPoorRecoFlagEE_

bool EcalUncalibRecHitWorkerGlobal::kPoorRecoFlagEE_
protected

Definition at line 127 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ offtime_

edm::ESHandle<EcalTimeOffsetConstant> EcalUncalibRecHitWorkerGlobal::offtime_
protected

Definition at line 121 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ outOfTimeThreshG12mEB_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12mEB_
protected

Definition at line 104 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ outOfTimeThreshG12mEE_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12mEE_
protected

Definition at line 108 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ outOfTimeThreshG12pEB_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12pEB_
protected

Definition at line 103 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ outOfTimeThreshG12pEE_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12pEE_
protected

Definition at line 107 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ outOfTimeThreshG61mEB_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61mEB_
protected

Definition at line 106 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ outOfTimeThreshG61mEE_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61mEE_
protected

Definition at line 110 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ outOfTimeThreshG61pEB_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61pEB_
protected

Definition at line 105 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ outOfTimeThreshG61pEE_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61pEE_
protected

Definition at line 109 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ pedRMSVec

double EcalUncalibRecHitWorkerGlobal::pedRMSVec[3]
protected

Definition at line 59 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ peds_

edm::ESHandle<EcalPedestals> EcalUncalibRecHitWorkerGlobal::peds_
protected

Definition at line 64 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ pedVec

double EcalUncalibRecHitWorkerGlobal::pedVec[3]
protected

Definition at line 58 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ ratioMethod_barrel_

EcalUncalibRecHitRatioMethodAlgo<EBDataFrame> EcalUncalibRecHitWorkerGlobal::ratioMethod_barrel_
protected

Definition at line 96 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ ratioMethod_endcap_

EcalUncalibRecHitRatioMethodAlgo<EEDataFrame> EcalUncalibRecHitWorkerGlobal::ratioMethod_endcap_
protected

Definition at line 97 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ sampleMaskHand_

edm::ESHandle<EcalSampleMask> EcalUncalibRecHitWorkerGlobal::sampleMaskHand_
protected

Definition at line 86 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ testbeamEBShape

EBShape EcalUncalibRecHitWorkerGlobal::testbeamEBShape
protected

Definition at line 82 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ testbeamEEShape

EEShape EcalUncalibRecHitWorkerGlobal::testbeamEEShape
protected

Definition at line 81 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ timeCorrBias_

edm::ESHandle<EcalTimeBiasCorrections> EcalUncalibRecHitWorkerGlobal::timeCorrBias_
protected

Definition at line 116 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ tokenGains_

edm::ESGetToken<EcalGainRatios, EcalGainRatiosRcd> EcalUncalibRecHitWorkerGlobal::tokenGains_
protected

Definition at line 63 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by set().

◆ tokenGrps_

edm::ESGetToken<EcalWeightXtalGroups, EcalWeightXtalGroupsRcd> EcalUncalibRecHitWorkerGlobal::tokenGrps_
protected

Definition at line 73 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by set().

◆ tokenItime_

edm::ESGetToken<EcalTimeCalibConstants, EcalTimeCalibConstantsRcd> EcalUncalibRecHitWorkerGlobal::tokenItime_
protected

Definition at line 118 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by set().

◆ tokenOfftime_

edm::ESGetToken<EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd> EcalUncalibRecHitWorkerGlobal::tokenOfftime_
protected

Definition at line 119 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by set().

◆ tokenPeds_

edm::ESGetToken<EcalPedestals, EcalPedestalsRcd> EcalUncalibRecHitWorkerGlobal::tokenPeds_
protected

Definition at line 62 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by set().

◆ tokenSampleMask_

edm::ESGetToken<EcalSampleMask, EcalSampleMaskRcd> EcalUncalibRecHitWorkerGlobal::tokenSampleMask_
protected

Definition at line 85 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by set().

◆ tokenTimeCorrBias_

edm::ESGetToken<EcalTimeBiasCorrections, EcalTimeBiasCorrectionsRcd> EcalUncalibRecHitWorkerGlobal::tokenTimeCorrBias_
protected

Definition at line 115 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by set().

◆ tokenWgts_

edm::ESGetToken<EcalTBWeights, EcalTBWeightsRcd> EcalUncalibRecHitWorkerGlobal::tokenWgts_
protected

Definition at line 74 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by set().

◆ weights

const EcalWeightSet::EcalWeightMatrix* EcalUncalibRecHitWorkerGlobal::weights[2]
protected

Definition at line 77 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ weightsMethod_barrel_

EcalUncalibRecHitRecWeightsAlgo<EBDataFrame> EcalUncalibRecHitWorkerGlobal::weightsMethod_barrel_
protected

Definition at line 79 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ weightsMethod_endcap_

EcalUncalibRecHitRecWeightsAlgo<EEDataFrame> EcalUncalibRecHitWorkerGlobal::weightsMethod_endcap_
protected

Definition at line 80 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ wgts_

edm::ESHandle<EcalTBWeights> EcalUncalibRecHitWorkerGlobal::wgts_
protected

Definition at line 76 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

EcalDataFrame::MAXSAMPLES
static constexpr int MAXSAMPLES
Definition: EcalDataFrame.h:48
EcalUncalibratedRecHit::kHasSwitchToGain6
Definition: EcalUncalibratedRecHit.h:18
EcalUncalibRecHitRatioMethodAlgo::computeAmplitude
void computeAmplitude(std::vector< double > &amplitudeFitParameters)
Definition: EcalUncalibRecHitRatioMethodAlgo.h:527
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
EcalUncalibratedRecHit::setChi2
void setChi2(float chi2)
Definition: EcalUncalibratedRecHit.h:44
EcalTimeOffsetConstantRcd
Definition: EcalTimeOffsetConstantRcd.h:5
EcalUncalibRecHitWorkerGlobal::grps_
edm::ESHandle< EcalWeightXtalGroups > grps_
Definition: EcalUncalibRecHitWorkerGlobal.h:75
EcalTBWeights::getMap
const EcalTBWeightMap & getMap() const
Definition: EcalTBWeights.h:28
EcalShapeBase::setEventSetup
void setEventSetup(const edm::EventSetup &evtSetup)
Definition: EcalShapeBase.cc:19
ecalLiteDTU::gainId
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
Definition: EcalLiteDTUSample.h:14
mps_fire.i
i
Definition: mps_fire.py:428
CustomPhysics_cfi.amplitude
amplitude
Definition: CustomPhysics_cfi.py:12
EcalUncalibRecHitWorkerGlobal::tokenGrps_
edm::ESGetToken< EcalWeightXtalGroups, EcalWeightXtalGroupsRcd > tokenGrps_
Definition: EcalUncalibRecHitWorkerGlobal.h:73
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61pEE_
double outOfTimeThreshG61pEE_
Definition: EcalUncalibRecHitWorkerGlobal.h:109
EcalUncalibRecHitWorkerGlobal::testbeamEEShape
EEShape testbeamEEShape
Definition: EcalUncalibRecHitWorkerGlobal.h:81
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
EcalUncalibRecHitWorkerGlobal::tokenItime_
edm::ESGetToken< EcalTimeCalibConstants, EcalTimeCalibConstantsRcd > tokenItime_
Definition: EcalUncalibRecHitWorkerGlobal.h:118
EcalUncalibRecHitWorkerGlobal::timeCorrBias_
edm::ESHandle< EcalTimeBiasCorrections > timeCorrBias_
Definition: EcalUncalibRecHitWorkerGlobal.h:116
EcalUncalibRecHitWorkerGlobal::tokenPeds_
edm::ESGetToken< EcalPedestals, EcalPedestalsRcd > tokenPeds_
Definition: EcalUncalibRecHitWorkerGlobal.h:62
EBShape
Definition: EBShape.h:6
EcalUncalibRecHitRecChi2Algo
Definition: EcalUncalibRecHitRecChi2Algo.h:24
EcalUncalibratedRecHit::amplitude
float amplitude() const
Definition: EcalUncalibratedRecHit.h:28
EBDetId
Definition: EBDetId.h:17
EcalUncalibRecHitWorkerGlobal::eePulseShape_
std::vector< double > eePulseShape_
Definition: EcalUncalibRecHitWorkerGlobal.h:123
EcalUncalibRecHitWorkerGlobal::tokenSampleMask_
edm::ESGetToken< EcalSampleMask, EcalSampleMaskRcd > tokenSampleMask_
Definition: EcalUncalibRecHitWorkerGlobal.h:85
EcalUncalibRecHitWorkerGlobal::timeCorrection
double timeCorrection(float ampli, const std::vector< float > &amplitudeBins, const std::vector< float > &shiftBins)
Definition: EcalUncalibRecHitWorkerGlobal.cc:114
EcalUncalibRecHitWorkerGlobal::chi2ThreshEE_
double chi2ThreshEE_
Definition: EcalUncalibRecHitWorkerGlobal.h:129
EcalSampleMask
Definition: EcalSampleMask.h:16
EcalTimeBiasCorrectionsRcd
Definition: EcalTimeBiasCorrectionsRcd.h:12
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
EcalTimeOffsetConstant::getEEValue
float getEEValue() const
Definition: EcalTimeOffsetConstant.h:21
EcalUncalibRecHitWorkerGlobal::offtime_
edm::ESHandle< EcalTimeOffsetConstant > offtime_
Definition: EcalUncalibRecHitWorkerGlobal.h:121
EcalUncalibRecHitWorkerGlobal::weightsMethod_barrel_
EcalUncalibRecHitRecWeightsAlgo< EBDataFrame > weightsMethod_barrel_
Definition: EcalUncalibRecHitWorkerGlobal.h:79
EcalTimeOffsetConstant
Definition: EcalTimeOffsetConstant.h:13
EcalUncalibRecHitWorkerGlobal::testbeamEBShape
EBShape testbeamEBShape
Definition: EcalUncalibRecHitWorkerGlobal.h:82
EcalUncalibRecHitWorkerGlobal::EEchi2Parameters_
std::vector< double > EEchi2Parameters_
Definition: EcalUncalibRecHitWorkerGlobal.h:131
EcalTimeOffsetConstant::getEBValue
float getEBValue() const
Definition: EcalTimeOffsetConstant.h:20
EcalUncalibRecHitRatioMethodAlgo::getCalculatedRecHit
CalculatedRecHit getCalculatedRecHit()
Definition: EcalUncalibRecHitRatioMethodAlgo.h:75
EcalUncalibRecHitWorkerGlobal::tokenGains_
edm::ESGetToken< EcalGainRatios, EcalGainRatiosRcd > tokenGains_
Definition: EcalUncalibRecHitWorkerGlobal.h:63
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
EcalUncalibRecHitWorkerGlobal::pedRMSVec
double pedRMSVec[3]
Definition: EcalUncalibRecHitWorkerGlobal.h:59
EcalUncalibRecHitWorkerGlobal::gainRatios
double gainRatios[3]
Definition: EcalUncalibRecHitWorkerGlobal.h:60
EcalDataFrame
Definition: EcalDataFrame.h:16
EcalCondObjectContainer
Definition: EcalCondObjectContainer.h:13
EcalUncalibRecHitWorkerGlobal::kPoorRecoFlagEB_
bool kPoorRecoFlagEB_
Definition: EcalUncalibRecHitWorkerGlobal.h:126
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
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61mEB_
double outOfTimeThreshG61mEB_
Definition: EcalUncalibRecHitWorkerGlobal.h:106
EcalUncalibRecHitWorkerGlobal::ratioMethod_endcap_
EcalUncalibRecHitRatioMethodAlgo< EEDataFrame > ratioMethod_endcap_
Definition: EcalUncalibRecHitWorkerGlobal.h:97
EcalTimeBiasCorrections::EETimeCorrAmplitudeBins
std::vector< float > EETimeCorrAmplitudeBins
Definition: EcalTimeBiasCorrections.h:26
EcalTBWeightsRcd
Definition: EcalTBWeightsRcd.h:5
EcalTimeBiasCorrections::EETimeCorrShiftBins
std::vector< float > EETimeCorrShiftBins
Definition: EcalTimeBiasCorrections.h:27
EcalUncalibratedRecHit::setFlagBit
void setFlagBit(Flags flag)
Definition: EcalUncalibratedRecHit.cc:99
EcalUncalibRecHitWorkerGlobal::EEtimeConstantTerm_
double EEtimeConstantTerm_
Definition: EcalUncalibRecHitWorkerGlobal.h:101
EcalWeightSet::EcalWeightMatrix
math::Matrix< 3, 10 >::type EcalWeightMatrix
Definition: EcalWeightSet.h:19
DetId
Definition: DetId.h:17
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12pEE_
double outOfTimeThreshG12pEE_
Definition: EcalUncalibRecHitWorkerGlobal.h:107
EcalUncalibRecHitWorkerGlobal::EBtimeFitParameters_
std::vector< double > EBtimeFitParameters_
Definition: EcalUncalibRecHitWorkerGlobal.h:89
EcalUncalibRecHitWorkerGlobal::EBtimeConstantTerm_
double EBtimeConstantTerm_
Definition: EcalUncalibRecHitWorkerGlobal.h:99
EcalUncalibratedRecHit::kPoorReco
Definition: EcalUncalibratedRecHit.h:14
EcalSampleMaskRcd
Definition: EcalSampleMaskRcd.h:5
EcalUncalibratedRecHit::kOutOfTime
Definition: EcalUncalibratedRecHit.h:16
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
EcalTimeBiasCorrections::EBTimeCorrAmplitudeBins
std::vector< float > EBTimeCorrAmplitudeBins
Definition: EcalTimeBiasCorrections.h:23
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12mEE_
double outOfTimeThreshG12mEE_
Definition: EcalUncalibRecHitWorkerGlobal.h:108
EcalUncalibRecHitWorkerGlobal::tokenTimeCorrBias_
edm::ESGetToken< EcalTimeBiasCorrections, EcalTimeBiasCorrectionsRcd > tokenTimeCorrBias_
Definition: EcalUncalibRecHitWorkerGlobal.h:115
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61pEB_
double outOfTimeThreshG61pEB_
Definition: EcalUncalibRecHitWorkerGlobal.h:105
EcalUncalibRecHitWorkerGlobal::EBtimeNconst_
double EBtimeNconst_
Definition: EcalUncalibRecHitWorkerGlobal.h:100
EcalUncalibRecHitWorkerGlobal::ebPulseShape_
std::vector< double > ebPulseShape_
Definition: EcalUncalibRecHitWorkerGlobal.h:122
EcalWeightSet::getWeightsAfterGainSwitch
EcalWeightMatrix & getWeightsAfterGainSwitch()
Definition: EcalWeightSet.h:27
EEShape
Definition: EEShape.h:6
EcalUncalibratedRecHit::setJitter
void setJitter(float jitter)
Definition: EcalUncalibratedRecHit.h:43
EcalTimeBiasCorrections
Definition: EcalTimeBiasCorrections.h:16
EcalMGPAGainRatio::gain12Over6
float gain12Over6() const
Definition: EcalMGPAGainRatio.h:19
EEDetId
Definition: EEDetId.h:14
EcalGainRatiosRcd
Definition: EcalGainRatiosRcd.h:5
EcalUncalibRecHitRatioMethodAlgo
Definition: EcalUncalibRecHitRatioMethodAlgo.h:32
EcalEndcap
Definition: EcalSubdetector.h:10
EcalWeightSet::getWeightsBeforeGainSwitch
EcalWeightMatrix & getWeightsBeforeGainSwitch()
Definition: EcalWeightSet.h:26
EcalTBWeights::EcalTDCId
int EcalTDCId
Definition: EcalTBWeights.h:17
EcalUncalibRecHitWorkerGlobal::chi2ThreshEB_
double chi2ThreshEB_
Definition: EcalUncalibRecHitWorkerGlobal.h:128
EcalUncalibRecHitWorkerGlobal::amplitudeThreshEB_
double amplitudeThreshEB_
Definition: EcalUncalibRecHitWorkerGlobal.h:111
EcalCondObjectContainer::Item
T Item
Definition: EcalCondObjectContainer.h:15
EcalUncalibRecHitWorkerGlobal::ratioMethod_barrel_
EcalUncalibRecHitRatioMethodAlgo< EBDataFrame > ratioMethod_barrel_
Definition: EcalUncalibRecHitWorkerGlobal.h:96
EcalUncalibRecHitWorkerGlobal::EBamplitudeFitParameters_
std::vector< double > EBamplitudeFitParameters_
Definition: EcalUncalibRecHitWorkerGlobal.h:91
EEDetId::hashedIndex
int hashedIndex() const
Definition: EEDetId.h:183
EcalUncalibRecHitWorkerGlobal::EBchi2Parameters_
std::vector< double > EBchi2Parameters_
Definition: EcalUncalibRecHitWorkerGlobal.h:130
createfilelist.int
int
Definition: createfilelist.py:10
EcalUncalibRecHitWorkerGlobal::weights
const EcalWeightSet::EcalWeightMatrix * weights[2]
Definition: EcalUncalibRecHitWorkerGlobal.h:77
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61mEE_
double outOfTimeThreshG61mEE_
Definition: EcalUncalibRecHitWorkerGlobal.h:110
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:155
EcalUncalibRecHitWorkerRunOneDigiBase::EcalUncalibRecHitWorkerRunOneDigiBase
EcalUncalibRecHitWorkerRunOneDigiBase()
Definition: EcalUncalibRecHitWorkerRunOneDigiBase.h:15
EcalUncalibRecHitWorkerGlobal::gains_
edm::ESHandle< EcalGainRatios > gains_
Definition: EcalUncalibRecHitWorkerGlobal.h:65
EcalCondDBWriter_cfi.pedestal
pedestal
Definition: EcalCondDBWriter_cfi.py:49
edm::ParameterSetDescription::addNode
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
Definition: ParameterSetDescription.cc:41
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
EcalUncalibRecHitWorkerGlobal::peds_
edm::ESHandle< EcalPedestals > peds_
Definition: EcalUncalibRecHitWorkerGlobal.h:64
EcalTBWeights::EcalTBWeightMap
std::map< std::pair< EcalXtalGroupId, EcalTDCId >, EcalWeightSet > EcalTBWeightMap
Definition: EcalTBWeights.h:18
EcalTimeCalibConstantsRcd
Definition: EcalTimeCalibConstantsRcd.h:5
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
EcalWeightSet
Definition: EcalWeightSet.h:17
EcalUncalibratedRecHit
Definition: EcalUncalibratedRecHit.h:8
EcalUncalibRecHitRatioMethodAlgo::init
void init(const C &dataFrame, const EcalSampleMask &sampleMask, const double *pedestals, const double *pedestalRMSes, const double *gainRatios)
Definition: EcalUncalibRecHitRatioMethodAlgo.h:96
EcalUncalibRecHitWorkerGlobal::EBtimeFitLimits_
std::pair< double, double > EBtimeFitLimits_
Definition: EcalUncalibRecHitWorkerGlobal.h:93
EcalUncalibratedRecHit::setJitterError
void setJitterError(float jitterErr)
Definition: EcalUncalibratedRecHit.cc:45
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12mEB_
double outOfTimeThreshG12mEB_
Definition: EcalUncalibRecHitWorkerGlobal.h:104
EcalUncalibRecHitWorkerGlobal::tokenOfftime_
edm::ESGetToken< EcalTimeOffsetConstant, EcalTimeOffsetConstantRcd > tokenOfftime_
Definition: EcalUncalibRecHitWorkerGlobal.h:119
EcalMGPAGainRatio::gain6Over1
float gain6Over1() const
Definition: EcalMGPAGainRatio.h:20
EcalUncalibRecHitWorkerGlobal::wgts_
edm::ESHandle< EcalTBWeights > wgts_
Definition: EcalUncalibRecHitWorkerGlobal.h:76
EcalUncalibRecHitRecWeightsAlgo::makeRecHit
virtual EcalUncalibratedRecHit makeRecHit(const C &dataFrame, const double *pedestals, const double *pedestalsRMS, const double *gainRatios, const EcalWeightSet::EcalWeightMatrix **weights, const EcalShapeBase &testbeamPulseShape)
Compute parameters.
Definition: EcalUncalibRecHitRecWeightsAlgo.h:30
EcalUncalibratedRecHit::kSaturated
Definition: EcalUncalibratedRecHit.h:15
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EcalUncalibRecHitWorkerGlobal::sampleMaskHand_
edm::ESHandle< EcalSampleMask > sampleMaskHand_
Definition: EcalUncalibRecHitWorkerGlobal.h:86
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
EcalUncalibRecHitWorkerGlobal::amplitudeThreshEE_
double amplitudeThreshEE_
Definition: EcalUncalibRecHitWorkerGlobal.h:112
EcalUncalibRecHitWorkerGlobal::kPoorRecoFlagEE_
bool kPoorRecoFlagEE_
Definition: EcalUncalibRecHitWorkerGlobal.h:127
mps_fire.result
result
Definition: mps_fire.py:311
EcalUncalibratedRecHit::jitter
float jitter() const
Definition: EcalUncalibratedRecHit.h:31
EcalUncalibRecHitWorkerGlobal::EEtimeFitParameters_
std::vector< double > EEtimeFitParameters_
Definition: EcalUncalibRecHitWorkerGlobal.h:90
EcalUncalibRecHitWorkerGlobal::pedVec
double pedVec[3]
Definition: EcalUncalibRecHitWorkerGlobal.h:58
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12pEB_
double outOfTimeThreshG12pEB_
Definition: EcalUncalibRecHitWorkerGlobal.h:103
EcalWeightXtalGroupsRcd
Definition: EcalWeightXtalGroupsRcd.h:5
EcalUncalibRecHitWorkerGlobal::itime_
edm::ESHandle< EcalTimeCalibConstants > itime_
Definition: EcalUncalibRecHitWorkerGlobal.h:120
EcalUncalibRecHitWorkerGlobal::tokenWgts_
edm::ESGetToken< EcalTBWeights, EcalTBWeightsRcd > tokenWgts_
Definition: EcalUncalibRecHitWorkerGlobal.h:74
EcalPedestalsRcd
Definition: EcalPedestalsRcd.h:5
EcalTimeBiasCorrections::EBTimeCorrShiftBins
std::vector< float > EBTimeCorrShiftBins
Definition: EcalTimeBiasCorrections.h:24
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
EcalUncalibratedRecHit::kHasSwitchToGain1
Definition: EcalUncalibratedRecHit.h:19
EcalUncalibRecHitWorkerGlobal::EEtimeNconst_
double EEtimeNconst_
Definition: EcalUncalibRecHitWorkerGlobal.h:102
EcalUncalibRecHitWorkerGlobal::EEamplitudeFitParameters_
std::vector< double > EEamplitudeFitParameters_
Definition: EcalUncalibRecHitWorkerGlobal.h:92
ecalpyutils::hashedIndex
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:38
edm::ParameterDescription
Definition: ParameterDescription.h:110
EcalUncalibRecHitWorkerGlobal::EEtimeFitLimits_
std::pair< double, double > EEtimeFitLimits_
Definition: EcalUncalibRecHitWorkerGlobal.h:94
EcalUncalibRecHitWorkerGlobal::ebSpikeThresh_
double ebSpikeThresh_
Definition: EcalUncalibRecHitWorkerGlobal.h:113
EcalTimeCalibConstant
float EcalTimeCalibConstant
Definition: EcalTimeCalibConstants.h:10
EcalTBWeights
Definition: EcalTBWeights.h:15
EcalMGPAGainRatio
Definition: EcalMGPAGainRatio.h:13
EcalUncalibRecHitWorkerGlobal::weightsMethod_endcap_
EcalUncalibRecHitRecWeightsAlgo< EEDataFrame > weightsMethod_endcap_
Definition: EcalUncalibRecHitWorkerGlobal.h:80