CMS 3D CMS Logo

HcalHitReconstructor.cc
Go to the documentation of this file.
1 #include "HcalHitReconstructor.h"
21 #include <iostream>
22 #include <fstream>
23 
24 /* Hcal Hit reconstructor allows for CaloRecHits with status words */
25 
27  : reco_(conf.getParameter<bool>("correctForTimeslew"),
28  conf.getParameter<bool>("correctForPhaseContainment"),
29  conf.getParameter<double>("correctionPhaseNS")),
30  det_(DetId::Hcal),
31  inputLabel_(conf.getParameter<edm::InputTag>("digiLabel")),
32  correctTiming_(conf.getParameter<bool>("correctTiming")),
33  setNoiseFlags_(conf.getParameter<bool>("setNoiseFlags")),
34  setHSCPFlags_(conf.getParameter<bool>("setHSCPFlags")),
35  setSaturationFlags_(conf.getParameter<bool>("setSaturationFlags")),
36  setTimingTrustFlags_(conf.getParameter<bool>("setTimingTrustFlags")),
37  setPulseShapeFlags_(conf.getParameter<bool>("setPulseShapeFlags")),
38  setNegativeFlags_(false),
39  dropZSmarkedPassed_(conf.getParameter<bool>("dropZSmarkedPassed")),
40  firstAuxTS_(conf.getParameter<int>("firstAuxTS")),
41  firstSample_(conf.getParameter<int>("firstSample")),
42  samplesToAdd_(conf.getParameter<int>("samplesToAdd")),
43  tsFromDB_(conf.getParameter<bool>("tsFromDB")),
44  useLeakCorrection_(conf.getParameter<bool>("useLeakCorrection")),
45  dataOOTCorrectionName_(""),
46  dataOOTCorrectionCategory_("Data"),
47  mcOOTCorrectionName_(""),
48  mcOOTCorrectionCategory_("MC"),
49  setPileupCorrection_(nullptr),
50  paramTS(nullptr)
51 
52 {
53  // register for data access
54  tok_ho_ = consumes<HODigiCollection>(inputLabel_);
55  tok_hf_ = consumes<HFDigiCollection>(inputLabel_);
56  tok_calib_ = consumes<HcalCalibDigiCollection>(inputLabel_);
57 
58  std::string subd = conf.getParameter<std::string>("Subdetector");
59  //Set all FlagSetters to 0
60  /* Important to do this! Otherwise, if the setters are turned off,
61  the "if (XSetter_) delete XSetter_;" commands can crash
62  */
63 
64  recoParamsFromDB_ = conf.getParameter<bool>("recoParamsFromDB");
65  // recoParamsFromDB_ = false ; // trun off for now.
66 
67  // std::cout<<" HcalHitReconstructor recoParamsFromDB_ "<<recoParamsFromDB_<<std::endl;
68 
69  if (conf.existsAs<bool>("setNegativeFlags"))
70  setNegativeFlags_ = conf.getParameter<bool>("setNegativeFlags");
71 
72  hfdigibit_ = nullptr;
73 
74  hfS9S1_ = nullptr;
75  hfS8S1_ = nullptr;
76  hfPET_ = nullptr;
77  saturationFlagSetter_ = nullptr;
78  HFTimingTrustFlagSetter_ = nullptr;
79  digiTimeFromDB_ = false; // only need for HF
80 
81  if (setSaturationFlags_) {
82  const edm::ParameterSet& pssat = conf.getParameter<edm::ParameterSet>("saturationParameters");
83  saturationFlagSetter_ = new HcalADCSaturationFlag(pssat.getParameter<int>("maxADCvalue"));
84  }
85 
86  if (!strcasecmp(subd.c_str(), "HO")) {
88  // setPileupCorrection_ = &HcalSimpleRecAlgo::setHOPileupCorrection;
89  setPileupCorrection_ = nullptr;
90  produces<HORecHitCollection>();
91  } else if (!strcasecmp(subd.c_str(), "HF")) {
93  // setPileupCorrection_ = &HcalSimpleRecAlgo::setHFPileupCorrection;
94  setPileupCorrection_ = nullptr;
95  digiTimeFromDB_ = conf.getParameter<bool>("digiTimeFromDB");
96 
98  const edm::ParameterSet& pstrust = conf.getParameter<edm::ParameterSet>("hfTimingTrustParameters");
99  HFTimingTrustFlagSetter_ = new HFTimingTrustFlag(pstrust.getParameter<int>("hfTimingTrustLevel1"),
100  pstrust.getParameter<int>("hfTimingTrustLevel2"));
101  }
102 
103  if (setNoiseFlags_) {
104  const edm::ParameterSet& psdigi = conf.getParameter<edm::ParameterSet>("digistat");
105  const edm::ParameterSet& psTimeWin = conf.getParameter<edm::ParameterSet>("HFInWindowStat");
106  hfdigibit_ = new HcalHFStatusBitFromDigis(psdigi, psTimeWin);
107 
108  const edm::ParameterSet& psS9S1 = conf.getParameter<edm::ParameterSet>("S9S1stat");
109  hfS9S1_ = new HcalHF_S9S1algorithm(psS9S1.getParameter<std::vector<double> >("short_optimumSlope"),
110  psS9S1.getParameter<std::vector<double> >("shortEnergyParams"),
111  psS9S1.getParameter<std::vector<double> >("shortETParams"),
112  psS9S1.getParameter<std::vector<double> >("long_optimumSlope"),
113  psS9S1.getParameter<std::vector<double> >("longEnergyParams"),
114  psS9S1.getParameter<std::vector<double> >("longETParams"),
115  psS9S1.getParameter<int>("HcalAcceptSeverityLevel"),
116  psS9S1.getParameter<bool>("isS8S1"));
117 
118  const edm::ParameterSet& psS8S1 = conf.getParameter<edm::ParameterSet>("S8S1stat");
119  hfS8S1_ = new HcalHF_S9S1algorithm(psS8S1.getParameter<std::vector<double> >("short_optimumSlope"),
120  psS8S1.getParameter<std::vector<double> >("shortEnergyParams"),
121  psS8S1.getParameter<std::vector<double> >("shortETParams"),
122  psS8S1.getParameter<std::vector<double> >("long_optimumSlope"),
123  psS8S1.getParameter<std::vector<double> >("longEnergyParams"),
124  psS8S1.getParameter<std::vector<double> >("longETParams"),
125  psS8S1.getParameter<int>("HcalAcceptSeverityLevel"),
126  psS8S1.getParameter<bool>("isS8S1"));
127 
128  const edm::ParameterSet& psPET = conf.getParameter<edm::ParameterSet>("PETstat");
129  hfPET_ = new HcalHF_PETalgorithm(psPET.getParameter<std::vector<double> >("short_R"),
130  psPET.getParameter<std::vector<double> >("shortEnergyParams"),
131  psPET.getParameter<std::vector<double> >("shortETParams"),
132  psPET.getParameter<std::vector<double> >("long_R"),
133  psPET.getParameter<std::vector<double> >("longEnergyParams"),
134  psPET.getParameter<std::vector<double> >("longETParams"),
135  psPET.getParameter<int>("HcalAcceptSeverityLevel"),
136  psPET.getParameter<std::vector<double> >("short_R_29"),
137  psPET.getParameter<std::vector<double> >("long_R_29"));
138  }
139  produces<HFRecHitCollection>();
140  } else if (!strcasecmp(subd.c_str(), "ZDC")) {
141  det_ = DetId::Calo;
143  produces<ZDCRecHitCollection>();
144  } else if (!strcasecmp(subd.c_str(), "CALIB")) {
145  subdet_ = HcalOther;
147  produces<HcalCalibRecHitCollection>();
148  } else {
149  edm::LogWarning("Configuration") << "HcalHitReconstructor is not associated with a specific subdetector!"
150  << std::endl;
151  }
152 
153  // If no valid OOT pileup correction name specified,
154  // disable the correction
155  if (conf.existsAs<std::string>("dataOOTCorrectionName"))
156  dataOOTCorrectionName_ = conf.getParameter<std::string>("dataOOTCorrectionName");
157  if (conf.existsAs<std::string>("dataOOTCorrectionCategory"))
158  dataOOTCorrectionCategory_ = conf.getParameter<std::string>("dataOOTCorrectionCategory");
159  if (conf.existsAs<std::string>("mcOOTCorrectionName"))
160  mcOOTCorrectionName_ = conf.getParameter<std::string>("mcOOTCorrectionName");
161  if (conf.existsAs<std::string>("mcOOTCorrectionCategory"))
162  mcOOTCorrectionCategory_ = conf.getParameter<std::string>("mcOOTCorrectionCategory");
163  if (dataOOTCorrectionName_.empty() && mcOOTCorrectionName_.empty())
164  setPileupCorrection_ = nullptr;
165 }
166 
168  delete hfdigibit_;
169 
170  delete hfS9S1_;
171  delete hfS8S1_;
172  delete hfPET_;
173  delete saturationFlagSetter_;
175 
176  delete paramTS;
177 }
178 
181  es.get<HcalRecNumberingRecord>().get(htopo);
182 
183  if (tsFromDB_ == true || recoParamsFromDB_ == true) {
185  es.get<HcalRecoParamsRcd>().get(p);
186  paramTS = new HcalRecoParams(*p.product());
187  paramTS->setTopo(htopo.product());
188 
189  // std::cout<<" skdump in HcalHitReconstructor::beginRun dupm RecoParams "<<std::endl;
190  // std::ofstream skfile("skdumpRecoParamsNewFormat.txt");
191  // HcalDbASCIIIO::dumpObject(skfile, (*paramTS) );
192  }
193 
194  if (digiTimeFromDB_ == true) {
198  HFDigiTimeParams->setTopo(htopo.product());
199  }
200 
201  reco_.beginRun(es);
202 }
203 
205  if (tsFromDB_ == true) {
206  delete paramTS;
207  paramTS = nullptr;
208  }
209  if (digiTimeFromDB_ == true) {
210  //DL delete HFDigiTimeParams; HFDigiTimeParams = 0;
211  }
212  reco_.endRun();
213 }
214 
216  // get conditions
218  eventSetup.get<HcalRecNumberingRecord>().get(topo);
219 
220  edm::ESHandle<HcalDbService> conditions;
221  eventSetup.get<HcalDbRecord>().get(conditions);
222 
223  if (useLeakCorrection_)
225 
227  eventSetup.get<HcalChannelQualityRcd>().get("withTopo", p);
228  const HcalChannelQuality* myqual = p.product();
229 
231  eventSetup.get<HcalSeverityLevelComputerRcd>().get(mycomputer);
232  const HcalSeverityLevelComputer* mySeverity = mycomputer.product();
233 
234  // GET THE BEAM CROSSING INFO HERE, WHEN WE UNDERSTAND HOW THINGS WORK.
235  // Then, call "setBXInfo" method of the reco_ object.
236  // Also remember to call SetBXInfo in the negative energy flag setter.
237 
238  if (det_ == DetId::Hcal) {
239  // HO ------------------------------------------------------------------
240  if (subdet_ == HcalOuter) {
242  e.getByToken(tok_ho_, digi);
243 
244  // create empty output
245  auto rec = std::make_unique<HORecHitCollection>();
246  rec->reserve(digi->size());
247  // run the algorithm
249 
250  // Vote on majority TS0 CapId
251  int favorite_capid = 0;
252  if (correctTiming_) {
253  long capid_votes[4] = {0, 0, 0, 0};
254  for (i = digi->begin(); i != digi->end(); i++) {
255  capid_votes[(*i)[0].capid()]++;
256  }
257  for (int k = 0; k < 4; k++)
258  if (capid_votes[k] > capid_votes[favorite_capid])
259  favorite_capid = k;
260  }
261 
262  for (i = digi->begin(); i != digi->end(); i++) {
263  HcalDetId cell = i->id();
264  DetId detcell = (DetId)cell;
265  // firstSample & samplesToAdd
266  if (tsFromDB_ || recoParamsFromDB_) {
267  const HcalRecoParam* param_ts = paramTS->getValues(detcell.rawId());
268  if (tsFromDB_) {
269  firstSample_ = param_ts->firstSample();
270  samplesToAdd_ = param_ts->samplesToAdd();
271  }
272  if (recoParamsFromDB_) {
273  bool correctForTimeslew = param_ts->correctForTimeslew();
275  float phaseNS = param_ts->correctionPhaseNS();
277  correctTiming_ = param_ts->correctTiming();
278  firstAuxTS_ = param_ts->firstAuxTS();
279  int pileupCleaningID = param_ts->pileupCleaningID();
282  }
283  }
284 
285  int first = firstSample_;
286  int toadd = samplesToAdd_;
287 
288  if (first >= i->size() || first < 0)
289  edm::LogWarning("Configuration")
290  << "HcalHitReconstructor: illegal firstSample" << first << " in subdet " << subdet_ << std::endl;
291 
292  // check on cells to be ignored and dropped: (rof,20.Feb.09)
293  const HcalChannelStatus* mydigistatus = myqual->getValues(detcell.rawId());
294  if (mySeverity->dropChannel(mydigistatus->getValue()))
295  continue;
297  if (i->zsMarkAndPass())
298  continue;
299 
300  const HcalCalibrations& calibrations = conditions->getHcalCalibrations(cell);
301  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
302  const HcalQIEShape* shape = conditions->getHcalShape(channelCoder);
303  HcalCoderDb coder(*channelCoder, *shape);
304 
305  rec->push_back(reco_.reconstruct(*i, first, toadd, coder, calibrations));
306 
307  // Set auxiliary flag
308  int auxflag = 0;
309  int fTS = firstAuxTS_;
310  if (fTS < 0)
311  fTS = 0; //silly protection against negative time slice values
312  for (int xx = fTS; xx < fTS + 4 && xx < i->size(); ++xx)
313  auxflag += (i->sample(xx).adc())
314  << (7 *
315  (xx - fTS)); // store the time slices in the first 28 bits of aux, a set of 4 7-bit adc values
316  // bits 28 and 29 are reserved for capid of the first time slice saved in aux
317  auxflag += ((i->sample(fTS).capid()) << 28);
318  (rec->back()).setAux(auxflag);
319  // (rec->back()).setFlags(0); Don't want to do this because the algorithm
320  // can already set some flags
321  // Fill Presample ADC flag
322  if (fTS > 0)
323  (rec->back()).setFlagField((i->sample(fTS - 1).adc()), HcalCaloFlagLabels::PresampleADC, 7);
324 
326  saturationFlagSetter_->setSaturationFlag(rec->back(), *i);
327  if (correctTiming_)
328  HcalTimingCorrector::Correct(rec->back(), *i, favorite_capid);
329  }
330  // return result
331  e.put(std::move(rec));
332 
333  // HF -------------------------------------------------------------------
334  } else if (subdet_ == HcalForward) {
336  e.getByToken(tok_hf_, digi);
337 
339  // create empty output
340  auto rec = std::make_unique<HFRecHitCollection>();
341  rec->reserve(digi->size());
342  // run the algorithm
344 
345  // Vote on majority TS0 CapId
346  int favorite_capid = 0;
347  if (correctTiming_) {
348  long capid_votes[4] = {0, 0, 0, 0};
349  for (i = digi->begin(); i != digi->end(); i++) {
350  capid_votes[(*i)[0].capid()]++;
351  }
352  for (int k = 0; k < 4; k++)
353  if (capid_votes[k] > capid_votes[favorite_capid])
354  favorite_capid = k;
355  }
356 
357  for (i = digi->begin(); i != digi->end(); i++) {
358  HcalDetId cell = i->id();
359  DetId detcell = (DetId)cell;
360 
361  if (tsFromDB_ || recoParamsFromDB_) {
362  const HcalRecoParam* param_ts = paramTS->getValues(detcell.rawId());
363  if (tsFromDB_) {
364  firstSample_ = param_ts->firstSample();
365  samplesToAdd_ = param_ts->samplesToAdd();
366  }
367  if (recoParamsFromDB_) {
368  bool correctForTimeslew = param_ts->correctForTimeslew();
370  float phaseNS = param_ts->correctionPhaseNS();
372  correctTiming_ = param_ts->correctTiming();
373  firstAuxTS_ = param_ts->firstAuxTS();
374  int pileupCleaningID = param_ts->pileupCleaningID();
377  }
378  }
379 
380  int first = firstSample_;
381  int toadd = samplesToAdd_;
382 
383  if (first >= i->size() || first < 0)
384  edm::LogWarning("Configuration")
385  << "HcalHitReconstructor: illegal firstSample" << first << " in subdet " << subdet_ << std::endl;
386 
387  // check on cells to be ignored and dropped: (rof,20.Feb.09)
388  const HcalChannelStatus* mydigistatus = myqual->getValues(detcell.rawId());
389  if (mySeverity->dropChannel(mydigistatus->getValue()))
390  continue;
392  if (i->zsMarkAndPass())
393  continue;
394 
395  const HcalCalibrations& calibrations = conditions->getHcalCalibrations(cell);
396  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
397  const HcalQIEShape* shape = conditions->getHcalShape(channelCoder);
398  HcalCoderDb coder(*channelCoder, *shape);
399 
400  // Set HFDigiTime flag values from digiTimeFromDB_
401  if (digiTimeFromDB_ == true && hfdigibit_ != nullptr) {
402  const HcalFlagHFDigiTimeParam* hfDTparam = HFDigiTimeParams->getValues(detcell.rawId());
404  hfDTparam->HFdigiflagSamplesToAdd(),
405  hfDTparam->HFdigiflagExpectedPeak(),
406  hfDTparam->HFdigiflagMinEThreshold(),
407  hfDTparam->HFdigiflagCoefficients());
408  }
409 
410  //std::cout << "TOADDHF " << toadd << " " << first << " " << std::endl;
411  rec->push_back(reco_.reconstruct(*i, first, toadd, coder, calibrations));
412 
413  // Set auxiliary flag
414  int auxflag = 0;
415  int fTS = firstAuxTS_;
416  if (fTS < 0)
417  fTS = 0; // silly protection against negative time slice values
418  for (int xx = fTS; xx < fTS + 4 && xx < i->size(); ++xx)
419  auxflag += (i->sample(xx).adc())
420  << (7 *
421  (xx - fTS)); // store the time slices in the first 28 bits of aux, a set of 4 7-bit adc values
422  // bits 28 and 29 are reserved for capid of the first time slice saved in aux
423  auxflag += ((i->sample(fTS).capid()) << 28);
424  (rec->back()).setAux(auxflag);
425 
426  // (rec->back()).setFlags(0); Don't want to do this because the algorithm
427  // can already set some flags
428 
429  // Fill Presample ADC flag
430  if (fTS > 0)
431  (rec->back()).setFlagField((i->sample(fTS - 1).adc()), HcalCaloFlagLabels::PresampleADC, 7);
432 
433  // This calls the code for setting the HF noise bit determined from digi shape
434  if (setNoiseFlags_)
435  hfdigibit_->hfSetFlagFromDigi(rec->back(), *i, coder, calibrations);
437  saturationFlagSetter_->setSaturationFlag(rec->back(), *i);
440  if (correctTiming_)
441  HcalTimingCorrector::Correct(rec->back(), *i, favorite_capid);
442  } // for (i=digi->begin(); i!=digi->end(); i++) -- loop on all HF digis
443 
444  // The following flags require the full set of rechits
445  // These need to be set consecutively, so an energy check should be the first
446  // test performed on these hits (to minimize the loop time)
447  if (setNoiseFlags_) {
448  // Step 1: Set PET flag (short fibers of |ieta|==29)
449  // Neighbor/partner channels that are flagged by Pulse Shape algorithm (HFDigiTime)
450  // won't be considered in these calculations
451  for (HFRecHitCollection::iterator i = rec->begin(); i != rec->end(); ++i) {
452  int depth = i->id().depth();
453  int ieta = i->id().ieta();
454  // Short fibers and all channels at |ieta|=29 use PET settings in Algo 3
455  if (depth == 2 || abs(ieta) == 29)
456  hfPET_->HFSetFlagFromPET(*i, *rec, myqual, mySeverity);
457  }
458 
459  // Step 2: Set S8S1 flag (short fibers or |ieta|==29)
460  for (HFRecHitCollection::iterator i = rec->begin(); i != rec->end(); ++i) {
461  int depth = i->id().depth();
462  int ieta = i->id().ieta();
463  // Short fibers and all channels at |ieta|=29 use PET settings in Algo 3
464  if (depth == 2 || abs(ieta) == 29)
465  hfS8S1_->HFSetFlagFromS9S1(*i, *rec, myqual, mySeverity);
466  }
467 
468  // Set 3: Set S9S1 flag (long fibers)
469  for (HFRecHitCollection::iterator i = rec->begin(); i != rec->end(); ++i) {
470  int depth = i->id().depth();
471  int ieta = i->id().ieta();
472  // Short fibers and all channels at |ieta|=29 use PET settings in Algo 3
473  if (depth == 1 && abs(ieta) != 29)
474  hfS9S1_->HFSetFlagFromS9S1(*i, *rec, myqual, mySeverity);
475  }
476  }
477 
478  // return result
479  e.put(std::move(rec));
480  } else if (subdet_ == HcalOther && subdetOther_ == HcalCalibration) {
482  e.getByToken(tok_calib_, digi);
483 
484  // create empty output
485  auto rec = std::make_unique<HcalCalibRecHitCollection>();
486  rec->reserve(digi->size());
487  // run the algorithm
488  int first = firstSample_;
489  int toadd = samplesToAdd_;
490 
492  for (i = digi->begin(); i != digi->end(); i++) {
493  HcalCalibDetId cell = i->id();
494  // HcalDetId cellh = i->id();
495  DetId detcell = (DetId)cell;
496  // check on cells to be ignored and dropped: (rof,20.Feb.09)
497  const HcalChannelStatus* mydigistatus = myqual->getValues(detcell.rawId());
498  if (mySeverity->dropChannel(mydigistatus->getValue()))
499  continue;
501  if (i->zsMarkAndPass())
502  continue;
503 
504  const HcalCalibrations& calibrations = conditions->getHcalCalibrations(cell);
505  const HcalQIECoder* channelCoder = conditions->getHcalCoder(cell);
506  const HcalQIEShape* shape = conditions->getHcalShape(channelCoder);
507  HcalCoderDb coder(*channelCoder, *shape);
508 
509  // firstSample & samplesToAdd
510  if (tsFromDB_) {
511  const HcalRecoParam* param_ts = paramTS->getValues(detcell.rawId());
512  first = param_ts->firstSample();
513  toadd = param_ts->samplesToAdd();
514  }
515  rec->push_back(reco_.reconstruct(*i, first, toadd, coder, calibrations));
516 
517  /*
518  // Flag setting not available for calibration rechits
519  // Set auxiliary flag
520  int auxflag=0;
521  int fTS = firstAuxTS_;
522  for (int xx=fTS; xx<fTS+4 && xx<i->size();++xx)
523  auxflag+=(i->sample(xx).adc())<<(7*(xx-fTS)); // store the time slices in the first 28 bits of aux, a set of 4 7-bit adc values
524  // bits 28 and 29 are reserved for capid of the first time slice saved in aux
525  auxflag+=((i->sample(fTS).capid())<<28);
526  (rec->back()).setAux(auxflag);
527 
528  (rec->back()).setFlags(0); // Not yet implemented for HcalCalibRecHit
529  */
530  }
531  // return result
532  e.put(std::move(rec));
533  }
534  }
535  //DL delete myqual;
536 } // void HcalHitReconstructor::produce(...)
HcalOther
Definition: HcalAssistant.h:38
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
Handle.h
HcalRecoParam::correctionPhaseNS
constexpr float correctionPhaseNS() const
Definition: HcalRecoParam.h:30
HcalHitReconstructor::endRun
void endRun(edm::Run const &r, edm::EventSetup const &es) final
Definition: HcalHitReconstructor.cc:204
electrons_cff.bool
bool
Definition: electrons_cff.py:372
mps_fire.i
i
Definition: mps_fire.py:355
HcalFlagHFDigiTimeParam::HFdigiflagCoefficients
std::vector< double > HFdigiflagCoefficients() const
Definition: HcalFlagHFDigiTimeParam.h:62
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
funct::false
false
Definition: Factorize.h:34
HcalCondObjectContainerBase::setTopo
void setTopo(const HcalTopology *topo)
Definition: HcalCondObjectContainerBase.cc:17
ESHandle.h
HcalChannelQualityRcd
Definition: HcalChannelQualityRcd.h:8
edm::Run
Definition: Run.h:45
HcalFlagHFDigiTimeParam::HFdigiflagSamplesToAdd
uint32_t HFdigiflagSamplesToAdd() const
Definition: HcalFlagHFDigiTimeParam.h:59
HcalCalibDetId
Definition: HcalCalibDetId.h:45
edm
HLT enums.
Definition: AlignableModifier.h:19
HcalHitReconstructor::HFTimingTrustFlagSetter_
HFTimingTrustFlag * HFTimingTrustFlagSetter_
Definition: HcalHitReconstructor.h:55
HcalTimingCorrector::Correct
static void Correct(HBHERecHit &rechit, const HBHEDataFrame &digi, int favorite_capid)
Definition: HcalTimingCorrector.cc:57
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
HcalHF_S9S1algorithm
Definition: HcalHF_S9S1algorithm.h:21
HcalHitReconstructor::~HcalHitReconstructor
~HcalHitReconstructor() override
Definition: HcalHitReconstructor.cc:167
HcalHF_S9S1algorithm::HFSetFlagFromS9S1
void HFSetFlagFromS9S1(HFRecHit &hf, HFRecHitCollection &rec, const HcalChannelQuality *myqual, const HcalSeverityLevelComputer *mySeverity)
Definition: HcalHF_S9S1algorithm.cc:81
DetId::Hcal
Definition: DetId.h:28
HcalHitReconstructor::saturationFlagSetter_
HcalADCSaturationFlag * saturationFlagSetter_
Definition: HcalHitReconstructor.h:54
edm::SortedCollection::size
size_type size() const
Definition: SortedCollection.h:215
HcalRecNumberingRecord.h
AlignmentProducer_cff.calibrations
calibrations
Definition: AlignmentProducer_cff.py:59
HcalSimpleRecAlgo::beginRun
void beginRun(edm::EventSetup const &es)
Definition: HcalSimpleRecAlgo.cc:31
HcalHitReconstructor::subdet_
int subdet_
Definition: HcalHitReconstructor.h:62
HcalChannelQuality
Definition: HcalChannelQuality.h:17
HcalHitReconstructor::useLeakCorrection_
bool useLeakCorrection_
Definition: HcalHitReconstructor.h:88
edm::ParameterSet::existsAs
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:160
edm::Handle
Definition: AssociativeIterator.h:50
HcalHitReconstructor::tsFromDB_
bool tsFromDB_
Definition: HcalHitReconstructor.h:83
DetId::Calo
Definition: DetId.h:29
HcalHFStatusBitFromDigis::hfSetFlagFromDigi
void hfSetFlagFromDigi(HFRecHit &hf, const HFDataFrame &digi, const HcalCoder &coder, const HcalCalibrations &calib)
Definition: HcalHFStatusBitFromDigis.cc:73
dqmdumpme.first
first
Definition: dqmdumpme.py:55
HcalCondObjectContainer::getValues
const Item * getValues(DetId fId, bool throwOnFail=true) const
Definition: HcalCondObjectContainer.h:159
HcalDbService::getHcalShape
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:326
HcalCoderDb.h
HcalHitReconstructor::paramTS
HcalRecoParams * paramTS
Definition: HcalHitReconstructor.h:97
HcalHF_PETalgorithm::HFSetFlagFromPET
void HFSetFlagFromPET(HFRecHit &hf, HFRecHitCollection &rec, const HcalChannelQuality *myqual, const HcalSeverityLevelComputer *mySeverity)
Definition: HcalHF_PETalgorithm.cc:67
HcalDbService::getHcalCalibrations
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:65
OOTPileupCorrData.h
HcalHitReconstructor::setNoiseFlags_
bool setNoiseFlags_
Definition: HcalHitReconstructor.h:70
HcalHitReconstructor.h
HcalFlagHFDigiTimeParam::HFdigiflagExpectedPeak
uint32_t HFdigiflagExpectedPeak() const
Definition: HcalFlagHFDigiTimeParam.h:60
HcalHitReconstructor::recoParamsFromDB_
bool recoParamsFromDB_
Definition: HcalHitReconstructor.h:84
HcalDbService::getHcalCoder
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
Definition: HcalDbService.cc:319
DetId
Definition: DetId.h:17
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
HcalRecoParam
Definition: HcalRecoParam.h:16
HcalHitReconstructor::HFDigiTimeParams
std::unique_ptr< HcalFlagHFDigiTimeParams > HFDigiTimeParams
Definition: HcalHitReconstructor.h:98
HcalHitReconstructor::firstAuxTS_
int firstAuxTS_
Definition: HcalHitReconstructor.h:78
edm::SortedCollection::begin
const_iterator begin() const
Definition: SortedCollection.h:262
HcalRecoParam::correctForPhaseContainment
constexpr bool correctForPhaseContainment() const
Definition: HcalRecoParam.h:28
HcalChannelStatus
Definition: HcalChannelStatus.h:13
HcalHitReconstructor::mcOOTCorrectionName_
std::string mcOOTCorrectionName_
Definition: HcalHitReconstructor.h:93
HcalRecoParam::useLeakCorrection
constexpr bool useLeakCorrection() const
Definition: HcalRecoParam.h:35
HcalHitReconstructor::samplesToAdd_
int samplesToAdd_
Definition: HcalHitReconstructor.h:82
HcalSeverityLevelComputer
Definition: HcalSeverityLevelComputer.h:24
edm::ESHandle< HcalTopology >
HcalHitReconstructor::dropZSmarkedPassed_
bool dropZSmarkedPassed_
Definition: HcalHitReconstructor.h:76
HcalHitReconstructor::firstSample_
int firstSample_
Definition: HcalHitReconstructor.h:81
HcalADCSaturationFlag::setSaturationFlag
void setSaturationFlag(HBHERecHit &rechit, const HBHEDataFrame &digi)
Definition: HcalADCSaturationFlag.cc:33
HcalOuter
Definition: HcalAssistant.h:35
HcalHitReconstructor::setSaturationFlags_
bool setSaturationFlags_
Definition: HcalHitReconstructor.h:72
HcalCalibration
Definition: HcalAssistant.h:40
HcalHitReconstructor::digiTimeFromDB_
bool digiTimeFromDB_
Definition: HcalHitReconstructor.h:85
HcalOOTPileupCorrectionRcd.h
HcalZDCDetId::SubdetectorId
static const int SubdetectorId
Definition: HcalZDCDetId.h:25
dqmdumpme.k
k
Definition: dqmdumpme.py:60
HcalDbRecord.h
HcalCalibrations
Definition: HcalCalibrations.h:9
HcalHitReconstructor::HcalHitReconstructor
HcalHitReconstructor(const edm::ParameterSet &ps)
Definition: HcalHitReconstructor.cc:26
HcalRecoParam::samplesToAdd
constexpr unsigned int samplesToAdd() const
Definition: HcalRecoParam.h:32
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
HcalRecNumberingRecord
Definition: HcalRecNumberingRecord.h:23
HcalSeverityLevelComputer::dropChannel
bool dropChannel(const uint32_t &mystatus) const
Definition: HcalSeverityLevelComputer.cc:395
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalSeverityLevelComputerRcd.h
HcalHitReconstructor::produce
void produce(edm::Event &e, const edm::EventSetup &c) override
Definition: HcalHitReconstructor.cc:215
edm::LogWarning
Definition: MessageLogger.h:141
HcalChannelStatus::getValue
uint32_t getValue() const
Definition: HcalChannelStatus.h:60
HcalFrontEndMap.h
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
HcalOOTPileupCompatibilityRcd.h
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
HcalHitReconstructor::hfS9S1_
HcalHF_S9S1algorithm * hfS9S1_
Definition: HcalHitReconstructor.h:57
HcalRecoParam::correctTiming
constexpr bool correctTiming() const
Definition: HcalRecoParam.h:39
HcalHitReconstructor::setNegativeFlags_
bool setNegativeFlags_
Definition: HcalHitReconstructor.h:75
HcalHitReconstructor::tok_ho_
edm::EDGetTokenT< HODigiCollection > tok_ho_
Definition: HcalHitReconstructor.h:65
HcalFlagHFDigiTimeParam
Definition: HcalFlagHFDigiTimeParam.h:25
HcalHFStatusBitFromDigis::resetParamsFromDB
void resetParamsFromDB(int firstSample, int samplesToAdd, int expectedPeak, double minthreshold, const std::vector< double > &coef)
Definition: HcalHFStatusBitFromDigis.cc:55
edm::SortedCollection::iterator
std::vector< T >::iterator iterator
Definition: SortedCollection.h:81
HcalADCSaturationFlag
Definition: HcalADCSaturationFlag.h:23
castor_dqm_sourceclient-live_cfg.correctForPhaseContainment
correctForPhaseContainment
Definition: castor_dqm_sourceclient-live_cfg.py:59
HcalHitReconstructor::hfdigibit_
HcalHFStatusBitFromDigis * hfdigibit_
Definition: HcalHitReconstructor.h:56
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
HcalHitReconstructor::tok_calib_
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
Definition: HcalHitReconstructor.h:67
HcalHitReconstructor::dataOOTCorrectionCategory_
std::string dataOOTCorrectionCategory_
Definition: HcalHitReconstructor.h:92
HcalDetId
Definition: HcalDetId.h:12
createfilelist.int
int
Definition: createfilelist.py:10
HcalSimpleRecAlgo::setRecoParams
void setRecoParams(bool correctForTimeslew, bool correctForPulse, bool setLeakCorrection, int pileupCleaningID, float phaseNS)
Definition: HcalSimpleRecAlgo.cc:43
HcalHFStatusBitFromDigis
Definition: HcalHFStatusBitFromDigis.h:18
HcalHitReconstructor::det_
DetId::Detector det_
Definition: HcalHitReconstructor.h:61
edm::EventSetup
Definition: EventSetup.h:57
get
#define get
HcalSimpleRecAlgo::setLeakCorrection
void setLeakCorrection()
Definition: HcalSimpleRecAlgo.cc:52
HcalHitReconstructor::inputLabel_
edm::InputTag inputLabel_
Definition: HcalHitReconstructor.h:64
HcalHitReconstructor::setPileupCorrection_
SetCorrectionFcn setPileupCorrection_
Definition: HcalHitReconstructor.h:95
HcalQIECoder
Definition: HcalQIECoder.h:20
HcalHitReconstructor::hfPET_
HcalHF_PETalgorithm * hfPET_
Definition: HcalHitReconstructor.h:59
alignCSCRings.r
r
Definition: alignCSCRings.py:93
OOTPileupCorrectionColl.h
HcalForward
Definition: HcalAssistant.h:36
HcalHitReconstructor::reco_
HcalSimpleRecAlgo reco_
Definition: HcalHitReconstructor.h:53
HcalHitReconstructor::setTimingTrustFlags_
bool setTimingTrustFlags_
Definition: HcalHitReconstructor.h:73
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
HcalRecoParam::firstSample
constexpr unsigned int firstSample() const
Definition: HcalRecoParam.h:31
HcalTopology.h
HcalFlagHFDigiTimeParams
Definition: HcalFlagHFDigiTimeParams.h:9
eostools.move
def move(src, dest)
Definition: eostools.py:511
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HcalHitReconstructor::hfS8S1_
HcalHF_S9S1algorithm * hfS8S1_
Definition: HcalHitReconstructor.h:58
HcalDbASCIIIO.h
HcalCaloFlagLabels::HFTimingTrustFlag
HFTimingTrustFlag
Definition: HcalCaloFlagLabels.h:32
castor_dqm_sourceclient-live_cfg.correctForTimeslew
correctForTimeslew
Definition: castor_dqm_sourceclient-live_cfg.py:60
HBHENegativeEFilterRcd.h
HcalHitReconstructor::subdetOther_
HcalOtherSubdetector subdetOther_
Definition: HcalHitReconstructor.h:63
HcalHitReconstructor::beginRun
void beginRun(edm::Run const &r, edm::EventSetup const &es) final
Definition: HcalHitReconstructor.cc:179
HcalRecoParams
Definition: HcalRecoParams.h:9
HcalRecoParam::firstAuxTS
constexpr unsigned int firstAuxTS() const
Definition: HcalRecoParam.h:40
HcalRecoParamsRcd
Definition: HcalRecoParamsRcd.h:6
EventSetup.h
HcalRecHitCollections.h
HcalFlagHFDigiTimeParamsRcd
Definition: HcalFlagHFDigiTimeParamsRcd.h:6
HcalSeverityLevelComputer.h
HcalQIEShape
Definition: HcalQIEShape.h:17
HcalFlagHFDigiTimeParam::HFdigiflagFirstSample
uint32_t HFdigiflagFirstSample() const
Definition: HcalFlagHFDigiTimeParam.h:58
HcalCoderDb
Definition: HcalCoderDb.h:15
HcalHitReconstructor::correctTiming_
bool correctTiming_
Definition: HcalHitReconstructor.h:69
HcalCaloFlagLabels::PresampleADC
Definition: HcalCaloFlagLabels.h:55
HcalHitReconstructor::dataOOTCorrectionName_
std::string dataOOTCorrectionName_
Definition: HcalHitReconstructor.h:91
HcalHF_PETalgorithm
Definition: HcalHF_PETalgorithm.h:21
HcalFlagHFDigiTimeParam::HFdigiflagMinEThreshold
double HFdigiflagMinEThreshold() const
Definition: HcalFlagHFDigiTimeParam.h:61
HcalSimpleRecAlgo::endRun
void endRun()
Definition: HcalSimpleRecAlgo.cc:39
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HcalDbRecord
Definition: HcalDbRecord.h:30
HcalRecoParam::pileupCleaningID
constexpr unsigned int pileupCleaningID() const
Definition: HcalRecoParam.h:43
edm::Event
Definition: Event.h:73
HcalSimpleRecAlgo::reconstruct
HFRecHit reconstruct(const HFDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
Definition: HcalSimpleRecAlgo.cc:378
EDCollection.h
HcalFrontEndMapRcd.h
HcalRecoParam::correctForTimeslew
constexpr bool correctForTimeslew() const
Definition: HcalRecoParam.h:37
HcalSeverityLevelComputerRcd
Definition: HcalSeverityLevelComputerRcd.h:23
HFTimingTrustFlag::setHFTimingTrustFlag
void setHFTimingTrustFlag(HFRecHit &rechit, const HFDataFrame &digi)
Definition: HFTimingTrustFlag.cc:129
geometryCSVtoXML.xx
xx
Definition: geometryCSVtoXML.py:19
HcalHitReconstructor::tok_hf_
edm::EDGetTokenT< HFDigiCollection > tok_hf_
Definition: HcalHitReconstructor.h:66
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
HcalHitReconstructor::mcOOTCorrectionCategory_
std::string mcOOTCorrectionCategory_
Definition: HcalHitReconstructor.h:94