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