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 &)
 
 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_
 
const EcalWeightSet::EcalWeightMatrixweights [2]
 
EcalUncalibRecHitRecWeightsAlgo< EBDataFrameweightsMethod_barrel_
 
EcalUncalibRecHitRecWeightsAlgo< EEDataFrameweightsMethod_endcap_
 
edm::ESHandle< EcalTBWeightswgts
 

Detailed Description

Definition at line 35 of file EcalUncalibRecHitWorkerGlobal.h.

Constructor & Destructor Documentation

◆ EcalUncalibRecHitWorkerGlobal() [1/3]

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

Definition at line 20 of file EcalUncalibRecHitWorkerGlobal.cc.

22  // ratio method parameters
23  EBtimeFitParameters_ = ps.getParameter<std::vector<double>>("EBtimeFitParameters");
24  EEtimeFitParameters_ = ps.getParameter<std::vector<double>>("EEtimeFitParameters");
25  EBamplitudeFitParameters_ = ps.getParameter<std::vector<double>>("EBamplitudeFitParameters");
26  EEamplitudeFitParameters_ = ps.getParameter<std::vector<double>>("EEamplitudeFitParameters");
27  EBtimeFitLimits_.first = ps.getParameter<double>("EBtimeFitLimits_Lower");
28  EBtimeFitLimits_.second = ps.getParameter<double>("EBtimeFitLimits_Upper");
29  EEtimeFitLimits_.first = ps.getParameter<double>("EEtimeFitLimits_Lower");
30  EEtimeFitLimits_.second = ps.getParameter<double>("EEtimeFitLimits_Upper");
31  EBtimeConstantTerm_ = ps.getParameter<double>("EBtimeConstantTerm");
32  EBtimeNconst_ = ps.getParameter<double>("EBtimeNconst");
33  EEtimeConstantTerm_ = ps.getParameter<double>("EEtimeConstantTerm");
34  EEtimeNconst_ = ps.getParameter<double>("EEtimeNconst");
35  outOfTimeThreshG12pEB_ = ps.getParameter<double>("outOfTimeThresholdGain12pEB");
36  outOfTimeThreshG12mEB_ = ps.getParameter<double>("outOfTimeThresholdGain12mEB");
37  outOfTimeThreshG61pEB_ = ps.getParameter<double>("outOfTimeThresholdGain61pEB");
38  outOfTimeThreshG61mEB_ = ps.getParameter<double>("outOfTimeThresholdGain61mEB");
39  outOfTimeThreshG12pEE_ = ps.getParameter<double>("outOfTimeThresholdGain12pEE");
40  outOfTimeThreshG12mEE_ = ps.getParameter<double>("outOfTimeThresholdGain12mEE");
41  outOfTimeThreshG61pEE_ = ps.getParameter<double>("outOfTimeThresholdGain61pEE");
42  outOfTimeThreshG61mEE_ = ps.getParameter<double>("outOfTimeThresholdGain61mEE");
43  amplitudeThreshEB_ = ps.getParameter<double>("amplitudeThresholdEB");
44  amplitudeThreshEE_ = ps.getParameter<double>("amplitudeThresholdEE");
45 
46  // spike threshold
47  ebSpikeThresh_ = ps.getParameter<double>("ebSpikeThreshold");
48 
49  ebPulseShape_ = ps.getParameter<std::vector<double>>("ebPulseShape");
50  eePulseShape_ = ps.getParameter<std::vector<double>>("eePulseShape");
51 
52  // chi2 parameters
53  kPoorRecoFlagEB_ = ps.getParameter<bool>("kPoorRecoFlagEB");
54  kPoorRecoFlagEE_ = ps.getParameter<bool>("kPoorRecoFlagEE");
55  ;
56  chi2ThreshEB_ = ps.getParameter<double>("chi2ThreshEB_");
57  chi2ThreshEE_ = ps.getParameter<double>("chi2ThreshEE_");
58  EBchi2Parameters_ = ps.getParameter<std::vector<double>>("EBchi2Parameters");
59  EEchi2Parameters_ = ps.getParameter<std::vector<double>>("EEchi2Parameters");
60 }

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/3]

EcalUncalibRecHitWorkerGlobal::EcalUncalibRecHitWorkerGlobal ( const edm::ParameterSet ps)

Definition at line 62 of file EcalUncalibRecHitWorkerGlobal.cc.

64  // ratio method parameters
65  EBtimeFitParameters_ = ps.getParameter<std::vector<double>>("EBtimeFitParameters");
66  EEtimeFitParameters_ = ps.getParameter<std::vector<double>>("EEtimeFitParameters");
67  EBamplitudeFitParameters_ = ps.getParameter<std::vector<double>>("EBamplitudeFitParameters");
68  EEamplitudeFitParameters_ = ps.getParameter<std::vector<double>>("EEamplitudeFitParameters");
69  EBtimeFitLimits_.first = ps.getParameter<double>("EBtimeFitLimits_Lower");
70  EBtimeFitLimits_.second = ps.getParameter<double>("EBtimeFitLimits_Upper");
71  EEtimeFitLimits_.first = ps.getParameter<double>("EEtimeFitLimits_Lower");
72  EEtimeFitLimits_.second = ps.getParameter<double>("EEtimeFitLimits_Upper");
73  EBtimeConstantTerm_ = ps.getParameter<double>("EBtimeConstantTerm");
74  EBtimeNconst_ = ps.getParameter<double>("EBtimeNconst");
75  EEtimeConstantTerm_ = ps.getParameter<double>("EEtimeConstantTerm");
76  EEtimeNconst_ = ps.getParameter<double>("EEtimeNconst");
77  outOfTimeThreshG12pEB_ = ps.getParameter<double>("outOfTimeThresholdGain12pEB");
78  outOfTimeThreshG12mEB_ = ps.getParameter<double>("outOfTimeThresholdGain12mEB");
79  outOfTimeThreshG61pEB_ = ps.getParameter<double>("outOfTimeThresholdGain61pEB");
80  outOfTimeThreshG61mEB_ = ps.getParameter<double>("outOfTimeThresholdGain61mEB");
81  outOfTimeThreshG12pEE_ = ps.getParameter<double>("outOfTimeThresholdGain12pEE");
82  outOfTimeThreshG12mEE_ = ps.getParameter<double>("outOfTimeThresholdGain12mEE");
83  outOfTimeThreshG61pEE_ = ps.getParameter<double>("outOfTimeThresholdGain61pEE");
84  outOfTimeThreshG61mEE_ = ps.getParameter<double>("outOfTimeThresholdGain61mEE");
85  amplitudeThreshEB_ = ps.getParameter<double>("amplitudeThresholdEB");
86  amplitudeThreshEE_ = ps.getParameter<double>("amplitudeThresholdEE");
87 
88  // spike threshold
89  ebSpikeThresh_ = ps.getParameter<double>("ebSpikeThreshold");
90 
91  ebPulseShape_ = ps.getParameter<std::vector<double>>("ebPulseShape");
92  eePulseShape_ = ps.getParameter<std::vector<double>>("eePulseShape");
93  // chi2 parameters
94  kPoorRecoFlagEB_ = ps.getParameter<bool>("kPoorRecoFlagEB");
95  kPoorRecoFlagEE_ = ps.getParameter<bool>("kPoorRecoFlagEE");
96  ;
97  chi2ThreshEB_ = ps.getParameter<double>("chi2ThreshEB_");
98  chi2ThreshEE_ = ps.getParameter<double>("chi2ThreshEE_");
99  EBchi2Parameters_ = ps.getParameter<std::vector<double>>("EBchi2Parameters");
100  EEchi2Parameters_ = ps.getParameter<std::vector<double>>("EEchi2Parameters");
101 }

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() [3/3]

EcalUncalibRecHitWorkerGlobal::EcalUncalibRecHitWorkerGlobal ( )
inline

Definition at line 39 of file EcalUncalibRecHitWorkerGlobal.h.

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

◆ ~EcalUncalibRecHitWorkerGlobal()

EcalUncalibRecHitWorkerGlobal::~EcalUncalibRecHitWorkerGlobal ( )
inlineoverride

Definition at line 40 of file EcalUncalibRecHitWorkerGlobal.h.

40 {};

Member Function Documentation

◆ getAlgoDescription()

edm::ParameterSetDescription EcalUncalibRecHitWorkerGlobal::getAlgoDescription ( )
overridevirtual

Implements EcalUncalibRecHitWorkerBaseClass.

Definition at line 481 of file EcalUncalibRecHitWorkerGlobal.cc.

481  {
483  psd.addNode(
484  edm::ParameterDescription<std::vector<double>>(
485  "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
486  edm::ParameterDescription<std::vector<double>>(
487  "EBtimeFitParameters",
488  {-2.015452, 3.130702, -12.3473, 41.88921, -82.83944, 91.01147, -50.35761, 11.05621},
489  true) and
490  edm::ParameterDescription<double>("outOfTimeThresholdGain61pEB", 5, true) and
491  edm::ParameterDescription<double>("amplitudeThresholdEE", 10, true) and
492  edm::ParameterDescription<double>("EBtimeConstantTerm", 0.6, true) and
493  edm::ParameterDescription<double>("outOfTimeThresholdGain61pEE", 1000, true) and
494  edm::ParameterDescription<double>("ebSpikeThreshold", 1.042, true) and
495  edm::ParameterDescription<double>("EBtimeNconst", 28.5, true) and
496  edm::ParameterDescription<bool>("kPoorRecoFlagEB", true, true) and
497  edm::ParameterDescription<std::vector<double>>(
498  "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
499  edm::ParameterDescription<double>("EBtimeFitLimits_Lower", 0.2, true) and
500  edm::ParameterDescription<bool>("kPoorRecoFlagEE", false, true) and
501  edm::ParameterDescription<double>("chi2ThreshEB_", 36.0, true) and
502  edm::ParameterDescription<std::vector<double>>(
503  "EEtimeFitParameters",
504  {-2.390548, 3.553628, -17.62341, 67.67538, -133.213, 140.7432, -75.41106, 16.20277},
505  true) and
506  edm::ParameterDescription<double>("outOfTimeThresholdGain61mEE", 1000, true) and
507  edm::ParameterDescription<std::vector<double>>("EEchi2Parameters", {2.122, 0.022, 2.122, 0.022}, true) and
508  edm::ParameterDescription<double>("outOfTimeThresholdGain12mEE", 1000, true) and
509  edm::ParameterDescription<double>("outOfTimeThresholdGain12mEB", 5, true) and
510  edm::ParameterDescription<double>("EEtimeFitLimits_Upper", 1.4, true) and
511  edm::ParameterDescription<double>("EEtimeFitLimits_Lower", 0.2, true) and
512  edm::ParameterDescription<std::vector<double>>("EEamplitudeFitParameters", {1.89, 1.4}, true) and
513  edm::ParameterDescription<std::vector<double>>("EBamplitudeFitParameters", {1.138, 1.652}, true) and
514  edm::ParameterDescription<double>("amplitudeThresholdEB", 10, true) and
515  edm::ParameterDescription<double>("outOfTimeThresholdGain12pEE", 1000, true) and
516  edm::ParameterDescription<double>("outOfTimeThresholdGain12pEB", 5, true) and
517  edm::ParameterDescription<double>("EEtimeNconst", 31.8, true) and
518  edm::ParameterDescription<double>("outOfTimeThresholdGain61mEB", 5, true) and
519  edm::ParameterDescription<std::vector<double>>("EBchi2Parameters", {2.122, 0.022, 2.122, 0.022}, true) and
520  edm::ParameterDescription<double>("EEtimeConstantTerm", 1.0, true) and
521  edm::ParameterDescription<double>("chi2ThreshEE_", 95.0, true) and
522  edm::ParameterDescription<double>("EBtimeFitLimits_Upper", 1.4, true));
523 
524  return psd;
525 }

References edm::ParameterSetDescription::addNode().

◆ isSaturated()

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

Definition at line 130 of file EcalUncalibRecHitWorkerGlobal.cc.

130  {
131  //bool saturated_ = 0;
132  int cnt;
133  for (int j = 0; j < C::MAXSAMPLES - 5; ++j) {
134  cnt = 0;
135  for (int i = j; i < (j + 5) && i < C::MAXSAMPLES; ++i) {
136  if (dataFrame.sample(i).gainId() == 0)
137  ++cnt;
138  }
139  if (cnt == 5)
140  return j - 1; // the last unsaturated sample
141  }
142  return -1; // no saturation found
143 }

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 203 of file EcalUncalibRecHitWorkerGlobal.cc.

205  {
206  DetId detid(itdg->id());
207 
208  const EcalSampleMask* sampleMask_ = sampleMaskHand_.product();
209 
210  // intelligence for recHit computation
211  EcalUncalibratedRecHit uncalibRecHit;
212 
213  const EcalPedestals::Item* aped = nullptr;
214  const EcalMGPAGainRatio* aGain = nullptr;
215  const EcalXtalGroupId* gid = nullptr;
216  float offsetTime = 0;
217 
218  if (detid.subdetId() == EcalEndcap) {
219  unsigned int hashedIndex = EEDetId(detid).hashedIndex();
220  aped = &peds->endcap(hashedIndex);
221  aGain = &gains->endcap(hashedIndex);
222  gid = &grps->endcap(hashedIndex);
223  offsetTime = offtime->getEEValue();
224  } else {
225  unsigned int hashedIndex = EBDetId(detid).hashedIndex();
226  aped = &peds->barrel(hashedIndex);
227  aGain = &gains->barrel(hashedIndex);
228  gid = &grps->barrel(hashedIndex);
229  offsetTime = offtime->getEBValue();
230  }
231 
232  pedVec[0] = aped->mean_x12;
233  pedVec[1] = aped->mean_x6;
234  pedVec[2] = aped->mean_x1;
235  pedRMSVec[0] = aped->rms_x12;
236  pedRMSVec[1] = aped->rms_x6;
237  pedRMSVec[2] = aped->rms_x1;
238  gainRatios[0] = 1.;
239  gainRatios[1] = aGain->gain12Over6();
240  gainRatios[2] = aGain->gain6Over1() * aGain->gain12Over6();
241 
242  // compute the right bin of the pulse shape using time calibration constants
244  EcalTimeCalibConstant itimeconst = 0;
245  if (it != itime->end()) {
246  itimeconst = (*it);
247  } else {
248  edm::LogError("EcalRecHitError") << "No time intercalib const found for xtal " << detid.rawId()
249  << "! something wrong with EcalTimeCalibConstants in your DB? ";
250  }
251 
252  // === amplitude computation ===
253  int leadingSample = -1;
254  if (detid.subdetId() == EcalEndcap) {
255  leadingSample = ((EcalDataFrame)(*itdg)).lastUnsaturatedSample();
256  } else {
257  leadingSample = ((EcalDataFrame)(*itdg)).lastUnsaturatedSample();
258  }
259 
260  if (leadingSample == 4) { // saturation on the expected max sample
261  uncalibRecHit = EcalUncalibratedRecHit((*itdg).id(), 4095 * 12, 0, 0, 0);
263  // do not propagate the default chi2 = -1 value to the calib rechit (mapped to 64), set it to 0 when saturation
264  uncalibRecHit.setChi2(0);
265  } else if (leadingSample >= 0) { // saturation on other samples: cannot extrapolate from the fourth one
266  double pedestal = 0.;
267  double gainratio = 1.;
268  int gainId = ((EcalDataFrame)(*itdg)).sample(5).gainId();
269 
270  if (gainId == 0 || gainId == 3) {
271  pedestal = aped->mean_x1;
272  gainratio = aGain->gain6Over1() * aGain->gain12Over6();
273  } else if (gainId == 1) {
274  pedestal = aped->mean_x12;
275  gainratio = 1.;
276  } else if (gainId == 2) {
277  pedestal = aped->mean_x6;
278  gainratio = aGain->gain12Over6();
279  }
280  double amplitude = ((double)(((EcalDataFrame)(*itdg)).sample(5).adc()) - pedestal) * gainratio;
281  uncalibRecHit = EcalUncalibratedRecHit((*itdg).id(), amplitude, 0, 0, 0);
283  // do not propagate the default chi2 = -1 value to the calib rechit (mapped to 64), set it to 0 when saturation
284  uncalibRecHit.setChi2(0);
285  } else {
286  // weights method
287  EcalTBWeights::EcalTDCId tdcid(1);
288  EcalTBWeights::EcalTBWeightMap const& wgtsMap = wgts->getMap();
289  EcalTBWeights::EcalTBWeightMap::const_iterator wit;
290  wit = wgtsMap.find(std::make_pair(*gid, tdcid));
291  if (wit == wgtsMap.end()) {
292  edm::LogError("EcalUncalibRecHitError")
293  << "No weights found for EcalGroupId: " << gid->id() << " and EcalTDCId: " << tdcid
294  << "\n skipping digi with id: " << detid.rawId();
295 
296  return false;
297  }
298  const EcalWeightSet& wset = wit->second; // this is the EcalWeightSet
299 
302 
303  weights[0] = &mat1;
304  weights[1] = &mat2;
305 
306  // get uncalibrated recHit from weights
307  if (detid.subdetId() == EcalEndcap) {
309  } else {
311  }
312 
313  // === time computation ===
314  // ratio method
315  float const clockToNsConstant = 25.;
316  if (detid.subdetId() == EcalEndcap) {
317  ratioMethod_endcap_.init(*itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios);
321  double theTimeCorrectionEE = timeCorrection(
323 
324  uncalibRecHit.setJitter(crh.timeMax - 5 + theTimeCorrectionEE);
325  uncalibRecHit.setJitterError(
326  std::sqrt(pow(crh.timeError, 2) + std::pow(EEtimeConstantTerm_, 2) / std::pow(clockToNsConstant, 2)));
327  // consider flagging as kOutOfTime only if above noise
328  if (uncalibRecHit.amplitude() > pedRMSVec[0] * amplitudeThreshEE_) {
329  float outOfTimeThreshP = outOfTimeThreshG12pEE_;
330  float outOfTimeThreshM = outOfTimeThreshG12mEE_;
331  // determine if gain has switched away from gainId==1 (x12 gain)
332  // and determine cuts (number of 'sigmas') to ose for kOutOfTime
333  // >3k ADC is necessasry condition for gain switch to occur
334  if (uncalibRecHit.amplitude() > 3000.) {
335  for (int iSample = 0; iSample < EEDataFrame::MAXSAMPLES; iSample++) {
336  int GainId = ((EcalDataFrame)(*itdg)).sample(iSample).gainId();
337  if (GainId != 1) {
338  outOfTimeThreshP = outOfTimeThreshG61pEE_;
339  outOfTimeThreshM = outOfTimeThreshG61mEE_;
340  break;
341  }
342  }
343  }
344  float correctedTime = (crh.timeMax - 5) * clockToNsConstant + itimeconst + offsetTime;
345  float cterm = EEtimeConstantTerm_;
346  float sigmaped = pedRMSVec[0]; // approx for lower gains
347  float nterm = EEtimeNconst_ * sigmaped / uncalibRecHit.amplitude();
348  float sigmat = std::sqrt(nterm * nterm + cterm * cterm);
349  if ((correctedTime > sigmat * outOfTimeThreshP) || (correctedTime < (-1. * sigmat * outOfTimeThreshM))) {
351  }
352  }
353 
354  } else {
355  ratioMethod_barrel_.init(*itdg, *sampleMask_, pedVec, pedRMSVec, gainRatios);
360 
361  double theTimeCorrectionEB = timeCorrection(
363 
364  uncalibRecHit.setJitter(crh.timeMax - 5 + theTimeCorrectionEB);
365 
366  uncalibRecHit.setJitterError(
367  std::sqrt(std::pow(crh.timeError, 2) + std::pow(EBtimeConstantTerm_, 2) / std::pow(clockToNsConstant, 2)));
368  // consider flagging as kOutOfTime only if above noise
369  if (uncalibRecHit.amplitude() > pedRMSVec[0] * amplitudeThreshEB_) {
370  float outOfTimeThreshP = outOfTimeThreshG12pEB_;
371  float outOfTimeThreshM = outOfTimeThreshG12mEB_;
372  // determine if gain has switched away from gainId==1 (x12 gain)
373  // and determine cuts (number of 'sigmas') to ose for kOutOfTime
374  // >3k ADC is necessasry condition for gain switch to occur
375  if (uncalibRecHit.amplitude() > 3000.) {
376  for (int iSample = 0; iSample < EBDataFrame::MAXSAMPLES; iSample++) {
377  int GainId = ((EcalDataFrame)(*itdg)).sample(iSample).gainId();
378  if (GainId != 1) {
379  outOfTimeThreshP = outOfTimeThreshG61pEB_;
380  outOfTimeThreshM = outOfTimeThreshG61mEB_;
381  break;
382  }
383  }
384  }
385  float correctedTime = (crh.timeMax - 5) * clockToNsConstant + itimeconst + offsetTime;
386  float cterm = EBtimeConstantTerm_;
387  float sigmaped = pedRMSVec[0]; // approx for lower gains
388  float nterm = EBtimeNconst_ * sigmaped / uncalibRecHit.amplitude();
389  float sigmat = std::sqrt(nterm * nterm + cterm * cterm);
390  if ((correctedTime > sigmat * outOfTimeThreshP) || (correctedTime < (-1. * sigmat * outOfTimeThreshM))) {
392  }
393  }
394  }
395 
396  // === chi2express ===
397  if (detid.subdetId() == EcalEndcap) {
398  double amplitude = uncalibRecHit.amplitude();
399  double amplitudeOutOfTime = 0.;
400  double jitter = uncalibRecHit.jitter();
401 
402  EcalUncalibRecHitRecChi2Algo<EEDataFrame> chi2expressEE_(*itdg,
403  amplitude,
404  (itimeconst + offsetTime),
405  amplitudeOutOfTime,
406  jitter,
407  pedVec,
408  pedRMSVec,
409  gainRatios,
412  double chi2 = chi2expressEE_.chi2();
413  uncalibRecHit.setChi2(chi2);
414 
415  if (kPoorRecoFlagEE_) {
416  if (chi2 > chi2ThreshEE_) {
417  // first check if all samples are ok, if not don't use chi2 to flag
418  bool samplesok = true;
419  for (int sample = 0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
420  if (!sampleMask_->useSampleEE(sample)) {
421  samplesok = false;
422  break;
423  }
424  }
425  if (samplesok)
427  }
428  }
429 
430  } else {
431  double amplitude = uncalibRecHit.amplitude();
432  double amplitudeOutOfTime = 0.;
433  double jitter = uncalibRecHit.jitter();
434 
435  EcalUncalibRecHitRecChi2Algo<EBDataFrame> chi2expressEB_(*itdg,
436  amplitude,
437  (itimeconst + offsetTime),
438  amplitudeOutOfTime,
439  jitter,
440  pedVec,
441  pedRMSVec,
442  gainRatios,
445  double chi2 = chi2expressEB_.chi2();
446  uncalibRecHit.setChi2(chi2);
447 
448  if (kPoorRecoFlagEB_) {
449  if (chi2 > chi2ThreshEB_) {
450  // first check if all samples are ok, if not don't use chi2 to flag
451  bool samplesok = true;
452  for (int sample = 0; sample < EcalDataFrame::MAXSAMPLES; ++sample) {
453  if (!sampleMask_->useSampleEB(sample)) {
454  samplesok = false;
455  break;
456  }
457  }
458  if (samplesok)
460  }
461  }
462  }
463  }
464 
465  // set flags if gain switch has occurred
466  if (((EcalDataFrame)(*itdg)).hasSwitchToGain6())
468  if (((EcalDataFrame)(*itdg)).hasSwitchToGain1())
470 
471  // put the recHit in the collection
472  if (detid.subdetId() == EcalEndcap) {
473  result.push_back(uncalibRecHit);
474  } else {
475  result.push_back(uncalibRecHit);
476  }
477 
478  return true;
479 }

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(), ecalMGPA::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, EcalPedestal::mean_x1, EcalPedestal::mean_x12, EcalPedestal::mean_x6, 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, EcalPedestal::rms_x1, EcalPedestal::rms_x12, EcalPedestal::rms_x6, 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 103 of file EcalUncalibRecHitWorkerGlobal.cc.

103  {
104  // common setup
106  es.get<EcalPedestalsRcd>().get(peds);
107 
108  // for the weights method
110  es.get<EcalTBWeightsRcd>().get(wgts);
111 
112  // which of the samples need be used
114 
115  // for the ratio method
116 
119 
120  // for the time correction methods
122 
123  // for the DB Ecal Pulse Sim Shape
126 }

References gains, edm::EventSetup::get(), get, grps, itime, offtime, peds, sampleMaskHand_, EcalShapeBase::setEventSetup(), testbeamEBShape, testbeamEEShape, timeCorrBias_, 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 154 of file EcalUncalibRecHitWorkerGlobal.cc.

156  {
157  // computed initially in ns. Than turned in the BX's, as
158  // EcalUncalibratedRecHit need be.
159  double theCorrection = 0;
160 
161  // sanity check for arrays
162  if (amplitudeBins.empty()) {
163  edm::LogError("EcalRecHitError") << "timeCorrAmplitudeBins is empty, forcing no time bias corrections.";
164 
165  return 0;
166  }
167 
168  if (amplitudeBins.size() != shiftBins.size()) {
169  edm::LogError("EcalRecHitError") << "Size of timeCorrAmplitudeBins different from "
170  "timeCorrShiftBins. Forcing no time bias corrections. ";
171 
172  return 0;
173  }
174 
175  int myBin = -1;
176  for (int bin = 0; bin < (int)amplitudeBins.size(); bin++) {
177  if (ampli > amplitudeBins.at(bin)) {
178  myBin = bin;
179  } else {
180  break;
181  }
182  }
183 
184  if (myBin == -1) {
185  theCorrection = shiftBins.at(0);
186  } else if (myBin == ((int)(amplitudeBins.size() - 1))) {
187  theCorrection = shiftBins.at(myBin);
188  } else if (-1 < myBin && myBin < ((int)amplitudeBins.size() - 1)) {
189  // interpolate linearly between two assingned points
190  theCorrection = (shiftBins.at(myBin + 1) - shiftBins.at(myBin));
191  theCorrection *=
192  (((double)ampli) - amplitudeBins.at(myBin)) / (amplitudeBins.at(myBin + 1) - amplitudeBins.at(myBin));
193  theCorrection += shiftBins.at(myBin);
194  } else {
195  edm::LogError("EcalRecHitError") << "Assigning time correction impossible. Setting it to 0 ";
196  theCorrection = 0.;
197  }
198 
199  // convert ns into clocks
200  return theCorrection / 25.;
201 }

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

Referenced by run().

Member Data Documentation

◆ amplitudeThreshEB_

double EcalUncalibRecHitWorkerGlobal::amplitudeThreshEB_
protected

Definition at line 98 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ amplitudeThreshEE_

double EcalUncalibRecHitWorkerGlobal::amplitudeThreshEE_
protected

Definition at line 99 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ chi2mat

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

Definition at line 66 of file EcalUncalibRecHitWorkerGlobal.h.

◆ chi2ThreshEB_

double EcalUncalibRecHitWorkerGlobal::chi2ThreshEB_
protected

Definition at line 112 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ chi2ThreshEE_

double EcalUncalibRecHitWorkerGlobal::chi2ThreshEE_
protected

Definition at line 113 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EBamplitudeFitParameters_

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

Definition at line 78 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EBchi2Parameters_

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

Definition at line 114 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ ebPulseShape_

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

Definition at line 106 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal().

◆ ebSpikeThresh_

double EcalUncalibRecHitWorkerGlobal::ebSpikeThresh_
protected

Definition at line 100 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal().

◆ EBtimeConstantTerm_

double EcalUncalibRecHitWorkerGlobal::EBtimeConstantTerm_
protected

Definition at line 86 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EBtimeFitLimits_

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

Definition at line 80 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EBtimeFitParameters_

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

Definition at line 76 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EBtimeNconst_

double EcalUncalibRecHitWorkerGlobal::EBtimeNconst_
protected

Definition at line 87 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EEamplitudeFitParameters_

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

Definition at line 79 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EEchi2Parameters_

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

Definition at line 115 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ eePulseShape_

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

Definition at line 107 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal().

◆ EEtimeConstantTerm_

double EcalUncalibRecHitWorkerGlobal::EEtimeConstantTerm_
protected

Definition at line 88 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EEtimeFitLimits_

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

Definition at line 81 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EEtimeFitParameters_

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

Definition at line 77 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ EEtimeNconst_

double EcalUncalibRecHitWorkerGlobal::EEtimeNconst_
protected

Definition at line 89 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ gainRatios

double EcalUncalibRecHitWorkerGlobal::gainRatios[3]
protected

Definition at line 52 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ gains

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

Definition at line 55 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ grps

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

Definition at line 63 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ itime

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

Definition at line 104 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ kPoorRecoFlagEB_

bool EcalUncalibRecHitWorkerGlobal::kPoorRecoFlagEB_
protected

Definition at line 110 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ kPoorRecoFlagEE_

bool EcalUncalibRecHitWorkerGlobal::kPoorRecoFlagEE_
protected

Definition at line 111 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ offtime

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

Definition at line 105 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ outOfTimeThreshG12mEB_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12mEB_
protected

Definition at line 91 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ outOfTimeThreshG12mEE_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12mEE_
protected

Definition at line 95 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ outOfTimeThreshG12pEB_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12pEB_
protected

Definition at line 90 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ outOfTimeThreshG12pEE_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12pEE_
protected

Definition at line 94 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ outOfTimeThreshG61mEB_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61mEB_
protected

Definition at line 93 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ outOfTimeThreshG61mEE_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61mEE_
protected

Definition at line 97 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ outOfTimeThreshG61pEB_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61pEB_
protected

Definition at line 92 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ outOfTimeThreshG61pEE_

double EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61pEE_
protected

Definition at line 96 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by EcalUncalibRecHitWorkerGlobal(), and run().

◆ pedRMSVec

double EcalUncalibRecHitWorkerGlobal::pedRMSVec[3]
protected

Definition at line 51 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ peds

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

Definition at line 54 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ pedVec

double EcalUncalibRecHitWorkerGlobal::pedVec[3]
protected

Definition at line 50 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ ratioMethod_barrel_

EcalUncalibRecHitRatioMethodAlgo<EBDataFrame> EcalUncalibRecHitWorkerGlobal::ratioMethod_barrel_
protected

Definition at line 83 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ ratioMethod_endcap_

EcalUncalibRecHitRatioMethodAlgo<EEDataFrame> EcalUncalibRecHitWorkerGlobal::ratioMethod_endcap_
protected

Definition at line 84 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ sampleMaskHand_

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

Definition at line 73 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ testbeamEBShape

EBShape EcalUncalibRecHitWorkerGlobal::testbeamEBShape
protected

Definition at line 70 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ testbeamEEShape

EEShape EcalUncalibRecHitWorkerGlobal::testbeamEEShape
protected

Definition at line 69 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ timeCorrBias_

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

Definition at line 102 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run(), and set().

◆ weights

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

Definition at line 65 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ weightsMethod_barrel_

EcalUncalibRecHitRecWeightsAlgo<EBDataFrame> EcalUncalibRecHitWorkerGlobal::weightsMethod_barrel_
protected

Definition at line 67 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ weightsMethod_endcap_

EcalUncalibRecHitRecWeightsAlgo<EEDataFrame> EcalUncalibRecHitWorkerGlobal::weightsMethod_endcap_
protected

Definition at line 68 of file EcalUncalibRecHitWorkerGlobal.h.

Referenced by run().

◆ wgts

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

Definition at line 64 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
EcalTBWeights::getMap
const EcalTBWeightMap & getMap() const
Definition: EcalTBWeights.h:28
EcalShapeBase::setEventSetup
void setEventSetup(const edm::EventSetup &evtSetup)
Definition: EcalShapeBase.cc:19
EcalUncalibRecHitWorkerGlobal::offtime
edm::ESHandle< EcalTimeOffsetConstant > offtime
Definition: EcalUncalibRecHitWorkerGlobal.h:105
mps_fire.i
i
Definition: mps_fire.py:355
CustomPhysics_cfi.amplitude
amplitude
Definition: CustomPhysics_cfi.py:12
EcalPedestal::mean_x6
float mean_x6
Definition: EcalPedestals.h:21
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61pEE_
double outOfTimeThreshG61pEE_
Definition: EcalUncalibRecHitWorkerGlobal.h:96
EcalUncalibRecHitWorkerGlobal::testbeamEEShape
EEShape testbeamEEShape
Definition: EcalUncalibRecHitWorkerGlobal.h:69
simplePhotonAnalyzer_cfi.sample
sample
Definition: simplePhotonAnalyzer_cfi.py:12
EcalUncalibRecHitWorkerGlobal::timeCorrBias_
edm::ESHandle< EcalTimeBiasCorrections > timeCorrBias_
Definition: EcalUncalibRecHitWorkerGlobal.h:102
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:107
EcalUncalibRecHitWorkerGlobal::timeCorrection
double timeCorrection(float ampli, const std::vector< float > &amplitudeBins, const std::vector< float > &shiftBins)
Definition: EcalUncalibRecHitWorkerGlobal.cc:154
EcalUncalibRecHitWorkerGlobal::chi2ThreshEE_
double chi2ThreshEE_
Definition: EcalUncalibRecHitWorkerGlobal.h:113
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::weightsMethod_barrel_
EcalUncalibRecHitRecWeightsAlgo< EBDataFrame > weightsMethod_barrel_
Definition: EcalUncalibRecHitWorkerGlobal.h:67
EcalUncalibRecHitWorkerGlobal::testbeamEBShape
EBShape testbeamEBShape
Definition: EcalUncalibRecHitWorkerGlobal.h:70
EcalUncalibRecHitWorkerGlobal::EEchi2Parameters_
std::vector< double > EEchi2Parameters_
Definition: EcalUncalibRecHitWorkerGlobal.h:115
EcalTimeOffsetConstant::getEBValue
float getEBValue() const
Definition: EcalTimeOffsetConstant.h:20
EcalUncalibRecHitRatioMethodAlgo::getCalculatedRecHit
CalculatedRecHit getCalculatedRecHit()
Definition: EcalUncalibRecHitRatioMethodAlgo.h:75
hltPixelTracks_cff.chi2
chi2
Definition: hltPixelTracks_cff.py:25
EcalUncalibRecHitWorkerGlobal::pedRMSVec
double pedRMSVec[3]
Definition: EcalUncalibRecHitWorkerGlobal.h:51
EcalUncalibRecHitWorkerGlobal::gainRatios
double gainRatios[3]
Definition: EcalUncalibRecHitWorkerGlobal.h:52
EcalDataFrame
Definition: EcalDataFrame.h:16
EcalUncalibRecHitWorkerGlobal::kPoorRecoFlagEB_
bool kPoorRecoFlagEB_
Definition: EcalUncalibRecHitWorkerGlobal.h:110
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:93
EcalUncalibRecHitWorkerGlobal::ratioMethod_endcap_
EcalUncalibRecHitRatioMethodAlgo< EEDataFrame > ratioMethod_endcap_
Definition: EcalUncalibRecHitWorkerGlobal.h:84
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:88
EcalPedestal::mean_x1
float mean_x1
Definition: EcalPedestals.h:23
EcalWeightSet::EcalWeightMatrix
math::Matrix< 3, 10 >::type EcalWeightMatrix
Definition: EcalWeightSet.h:19
DetId
Definition: DetId.h:17
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12pEE_
double outOfTimeThreshG12pEE_
Definition: EcalUncalibRecHitWorkerGlobal.h:94
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
EcalUncalibRecHitWorkerGlobal::EBtimeFitParameters_
std::vector< double > EBtimeFitParameters_
Definition: EcalUncalibRecHitWorkerGlobal.h:76
EcalUncalibRecHitWorkerGlobal::EBtimeConstantTerm_
double EBtimeConstantTerm_
Definition: EcalUncalibRecHitWorkerGlobal.h:86
EcalUncalibRecHitWorkerGlobal::gains
edm::ESHandle< EcalGainRatios > gains
Definition: EcalUncalibRecHitWorkerGlobal.h:55
EcalPedestal::mean_x12
float mean_x12
Definition: EcalPedestals.h:19
EcalUncalibratedRecHit::kPoorReco
Definition: EcalUncalibratedRecHit.h:14
EcalSampleMaskRcd
Definition: EcalSampleMaskRcd.h:5
EcalUncalibRecHitWorkerGlobal::grps
edm::ESHandle< EcalWeightXtalGroups > grps
Definition: EcalUncalibRecHitWorkerGlobal.h:63
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::peds
edm::ESHandle< EcalPedestals > peds
Definition: EcalUncalibRecHitWorkerGlobal.h:54
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12mEE_
double outOfTimeThreshG12mEE_
Definition: EcalUncalibRecHitWorkerGlobal.h:95
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61pEB_
double outOfTimeThreshG61pEB_
Definition: EcalUncalibRecHitWorkerGlobal.h:92
EcalPedestal::rms_x12
float rms_x12
Definition: EcalPedestals.h:20
EcalUncalibRecHitWorkerGlobal::EBtimeNconst_
double EBtimeNconst_
Definition: EcalUncalibRecHitWorkerGlobal.h:87
EcalUncalibRecHitWorkerGlobal::ebPulseShape_
std::vector< double > ebPulseShape_
Definition: EcalUncalibRecHitWorkerGlobal.h:106
EcalWeightSet::getWeightsAfterGainSwitch
EcalWeightMatrix & getWeightsAfterGainSwitch()
Definition: EcalWeightSet.h:27
EEShape
Definition: EEShape.h:6
EcalUncalibratedRecHit::setJitter
void setJitter(float jitter)
Definition: EcalUncalibratedRecHit.h:43
EcalUncalibRecHitWorkerGlobal::wgts
edm::ESHandle< EcalTBWeights > wgts
Definition: EcalUncalibRecHitWorkerGlobal.h:64
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:112
edm::LogError
Definition: MessageLogger.h:183
EcalUncalibRecHitWorkerGlobal::amplitudeThreshEB_
double amplitudeThreshEB_
Definition: EcalUncalibRecHitWorkerGlobal.h:98
EcalUncalibRecHitWorkerGlobal::ratioMethod_barrel_
EcalUncalibRecHitRatioMethodAlgo< EBDataFrame > ratioMethod_barrel_
Definition: EcalUncalibRecHitWorkerGlobal.h:83
EcalUncalibRecHitWorkerGlobal::EBamplitudeFitParameters_
std::vector< double > EBamplitudeFitParameters_
Definition: EcalUncalibRecHitWorkerGlobal.h:78
EEDetId::hashedIndex
int hashedIndex() const
Definition: EEDetId.h:183
EcalUncalibRecHitWorkerGlobal::EBchi2Parameters_
std::vector< double > EBchi2Parameters_
Definition: EcalUncalibRecHitWorkerGlobal.h:114
createfilelist.int
int
Definition: createfilelist.py:10
EcalUncalibRecHitWorkerGlobal::weights
const EcalWeightSet::EcalWeightMatrix * weights[2]
Definition: EcalUncalibRecHitWorkerGlobal.h:65
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG61mEE_
double outOfTimeThreshG61mEE_
Definition: EcalUncalibRecHitWorkerGlobal.h:97
EcalPedestal::rms_x1
float rms_x1
Definition: EcalPedestals.h:24
EcalUncalibRecHitWorkerRunOneDigiBase::EcalUncalibRecHitWorkerRunOneDigiBase
EcalUncalibRecHitWorkerRunOneDigiBase()
Definition: EcalUncalibRecHitWorkerRunOneDigiBase.h:15
EcalCondDBWriter_cfi.pedestal
pedestal
Definition: EcalCondDBWriter_cfi.py:49
edm::ParameterSetDescription::addNode
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
Definition: ParameterSetDescription.cc:41
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
get
#define get
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
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
EcalUncalibRecHitWorkerGlobal::EBtimeFitLimits_
std::pair< double, double > EBtimeFitLimits_
Definition: EcalUncalibRecHitWorkerGlobal.h:80
EcalUncalibratedRecHit::setJitterError
void setJitterError(float jitterErr)
Definition: EcalUncalibratedRecHit.cc:45
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12mEB_
double outOfTimeThreshG12mEB_
Definition: EcalUncalibRecHitWorkerGlobal.h:91
EcalMGPAGainRatio::gain6Over1
float gain6Over1() const
Definition: EcalMGPAGainRatio.h:20
EcalPedestal
Definition: EcalPedestals.h:8
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
EcalUncalibRecHitWorkerGlobal::sampleMaskHand_
edm::ESHandle< EcalSampleMask > sampleMaskHand_
Definition: EcalUncalibRecHitWorkerGlobal.h:73
EcalUncalibRecHitWorkerGlobal::itime
edm::ESHandle< EcalTimeCalibConstants > itime
Definition: EcalUncalibRecHitWorkerGlobal.h:104
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:30
EcalCondObjectContainer< float >::const_iterator
std::vector< Item >::const_iterator const_iterator
Definition: EcalCondObjectContainer.h:19
EcalUncalibRecHitWorkerGlobal::amplitudeThreshEE_
double amplitudeThreshEE_
Definition: EcalUncalibRecHitWorkerGlobal.h:99
EcalUncalibRecHitWorkerGlobal::kPoorRecoFlagEE_
bool kPoorRecoFlagEE_
Definition: EcalUncalibRecHitWorkerGlobal.h:111
mps_fire.result
result
Definition: mps_fire.py:303
EcalUncalibratedRecHit::jitter
float jitter() const
Definition: EcalUncalibratedRecHit.h:31
EcalUncalibRecHitWorkerGlobal::EEtimeFitParameters_
std::vector< double > EEtimeFitParameters_
Definition: EcalUncalibRecHitWorkerGlobal.h:77
EcalUncalibRecHitWorkerGlobal::pedVec
double pedVec[3]
Definition: EcalUncalibRecHitWorkerGlobal.h:50
EcalUncalibRecHitWorkerGlobal::outOfTimeThreshG12pEB_
double outOfTimeThreshG12pEB_
Definition: EcalUncalibRecHitWorkerGlobal.h:90
EcalWeightXtalGroupsRcd
Definition: EcalWeightXtalGroupsRcd.h:5
ecalMGPA::gainId
constexpr int gainId(sample_type sample)
get the gainId (2 bits)
Definition: EcalMGPASample.h:13
EcalPedestalsRcd
Definition: EcalPedestalsRcd.h:5
EcalTimeBiasCorrections::EBTimeCorrShiftBins
std::vector< float > EBTimeCorrShiftBins
Definition: EcalTimeBiasCorrections.h:24
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
EcalUncalibratedRecHit::kHasSwitchToGain1
Definition: EcalUncalibratedRecHit.h:19
EcalUncalibRecHitWorkerGlobal::EEtimeNconst_
double EEtimeNconst_
Definition: EcalUncalibRecHitWorkerGlobal.h:89
EcalUncalibRecHitWorkerGlobal::EEamplitudeFitParameters_
std::vector< double > EEamplitudeFitParameters_
Definition: EcalUncalibRecHitWorkerGlobal.h:79
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:81
EcalUncalibRecHitWorkerGlobal::ebSpikeThresh_
double ebSpikeThresh_
Definition: EcalUncalibRecHitWorkerGlobal.h:100
EcalTimeCalibConstant
float EcalTimeCalibConstant
Definition: EcalTimeCalibConstants.h:10
EcalPedestal::rms_x6
float rms_x6
Definition: EcalPedestals.h:22
EcalMGPAGainRatio
Definition: EcalMGPAGainRatio.h:13
EcalUncalibRecHitWorkerGlobal::weightsMethod_endcap_
EcalUncalibRecHitRecWeightsAlgo< EEDataFrame > weightsMethod_endcap_
Definition: EcalUncalibRecHitWorkerGlobal.h:68