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  // check on cells to be ignored and dropped: (rof,20.Feb.09)
306  const HcalChannelStatus* mydigistatus=myqual->getValues(detcell.rawId());
307  if (mySeverity->dropChannel(mydigistatus->getValue() ) ) continue;
309  if (i->zsMarkAndPass()) continue;
310 
311  const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell);
312  const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
313  const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
314  HcalCoderDb coder (*channelCoder, *shape);
315 
316  rec->push_back(reco_.reconstruct(*i,first,toadd,coder,calibrations));
317 
318  // Set auxiliary flag
319  int auxflag=0;
320  int fTS = firstAuxTS_;
321  if (fTS<0) fTS=0; //silly protection against negative time slice values
322  for (int xx=fTS; xx<fTS+4 && xx<i->size();++xx)
323  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
324  // bits 28 and 29 are reserved for capid of the first time slice saved in aux
325  auxflag+=((i->sample(fTS).capid())<<28);
326  (rec->back()).setAux(auxflag);
327  // (rec->back()).setFlags(0); Don't want to do this because the algorithm
328  // can already set some flags
329  // Fill Presample ADC flag
330  if (fTS>0)
331  (rec->back()).setFlagField((i->sample(fTS-1).adc()), HcalCaloFlagLabels::PresampleADC,7);
332 
335  if (correctTiming_)
336  HcalTimingCorrector::Correct(rec->back(), *i, favorite_capid);
337  }
338  // return result
339  e.put(std::move(rec));
340 
341  // HF -------------------------------------------------------------------
342  } else if (subdet_==HcalForward) {
344  e.getByToken(tok_hf_,digi);
345 
346 
348  // create empty output
349  auto rec = std::make_unique<HFRecHitCollection>();
350  rec->reserve(digi->size());
351  // run the algorithm
353 
354  // Vote on majority TS0 CapId
355  int favorite_capid = 0;
356  if (correctTiming_) {
357  long capid_votes[4] = {0,0,0,0};
358  for (i=digi->begin(); i!=digi->end(); i++) {
359  capid_votes[(*i)[0].capid()]++;
360  }
361  for (int k = 0; k < 4; k++)
362  if (capid_votes[k] > capid_votes[favorite_capid])
363  favorite_capid = k;
364  }
365 
366  for (i=digi->begin(); i!=digi->end(); i++) {
367  HcalDetId cell = i->id();
368  DetId detcell=(DetId)cell;
369 
371  const HcalRecoParam* param_ts = paramTS->getValues(detcell.rawId());
372  if(tsFromDB_) {
373  firstSample_ = param_ts->firstSample();
374  samplesToAdd_ = param_ts->samplesToAdd();
375  }
376  if(recoParamsFromDB_) {
377  bool correctForTimeslew=param_ts->correctForTimeslew();
379  float phaseNS=param_ts->correctionPhaseNS();
381  correctTiming_ = param_ts->correctTiming();
382  firstAuxTS_ = param_ts->firstAuxTS();
383  int pileupCleaningID = param_ts->pileupCleaningID();
384  reco_.setRecoParams(correctForTimeslew,correctForPhaseContainment,useLeakCorrection_,pileupCleaningID,phaseNS);
385  }
386  }
387 
388  int first = firstSample_;
389  int toadd = samplesToAdd_;
390 
391  // check on cells to be ignored and dropped: (rof,20.Feb.09)
392  const HcalChannelStatus* mydigistatus=myqual->getValues(detcell.rawId());
393  if (mySeverity->dropChannel(mydigistatus->getValue() ) ) continue;
395  if (i->zsMarkAndPass()) continue;
396 
397  const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell);
398  const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
399  const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
400  HcalCoderDb coder (*channelCoder, *shape);
401 
402  // Set HFDigiTime flag values from digiTimeFromDB_
403  if (digiTimeFromDB_==true && hfdigibit_!=nullptr)
404  {
405  const HcalFlagHFDigiTimeParam* hfDTparam = HFDigiTimeParams->getValues(detcell.rawId());
407  hfDTparam->HFdigiflagSamplesToAdd(),
408  hfDTparam->HFdigiflagExpectedPeak(),
409  hfDTparam->HFdigiflagMinEThreshold(),
410  hfDTparam->HFdigiflagCoefficients()
411  );
412  }
413 
414  //std::cout << "TOADDHF " << toadd << " " << first << " " << std::endl;
415  rec->push_back(reco_.reconstruct(*i,first,toadd,coder,calibrations));
416 
417  // Set auxiliary flag
418  int auxflag=0;
419  int fTS = firstAuxTS_;
420  if (fTS<0) fTS=0; // silly protection against negative time slice values
421  for (int xx=fTS; xx<fTS+4 && xx<i->size();++xx)
422  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
423  // bits 28 and 29 are reserved for capid of the first time slice saved in aux
424  auxflag+=((i->sample(fTS).capid())<<28);
425  (rec->back()).setAux(auxflag);
426 
427  // (rec->back()).setFlags(0); Don't want to do this because the algorithm
428  // can already set some flags
429 
430  // Fill Presample ADC flag
431  if (fTS>0)
432  (rec->back()).setFlagField((i->sample(fTS-1).adc()), HcalCaloFlagLabels::PresampleADC,7);
433 
434  // This calls the code for setting the HF noise bit determined from digi shape
435  if (setNoiseFlags_)
436  hfdigibit_->hfSetFlagFromDigi(rec->back(),*i,coder,calibrations);
441  if (correctTiming_)
442  HcalTimingCorrector::Correct(rec->back(), *i, favorite_capid);
443  } // for (i=digi->begin(); i!=digi->end(); i++) -- loop on all HF digis
444 
445  // The following flags require the full set of rechits
446  // These need to be set consecutively, so an energy check should be the first
447  // test performed on these hits (to minimize the loop time)
448  if (setNoiseFlags_)
449  {
450  // Step 1: Set PET flag (short fibers of |ieta|==29)
451  // Neighbor/partner channels that are flagged by Pulse Shape algorithm (HFDigiTime)
452  // won't be considered in these calculations
453  for (HFRecHitCollection::iterator i = rec->begin();i!=rec->end();++i)
454  {
455  int depth=i->id().depth();
456  int ieta=i->id().ieta();
457  // Short fibers and all channels at |ieta|=29 use PET settings in Algo 3
458  if (depth==2 || abs(ieta)==29 )
459  hfPET_->HFSetFlagFromPET(*i,*rec,myqual,mySeverity);
460  }
461 
462  // Step 2: Set S8S1 flag (short fibers or |ieta|==29)
463  for (HFRecHitCollection::iterator i = rec->begin();i!=rec->end();++i)
464  {
465  int depth=i->id().depth();
466  int ieta=i->id().ieta();
467  // Short fibers and all channels at |ieta|=29 use PET settings in Algo 3
468  if (depth==2 || abs(ieta)==29 )
469  hfS8S1_->HFSetFlagFromS9S1(*i,*rec,myqual,mySeverity);
470  }
471 
472  // Set 3: Set S9S1 flag (long fibers)
473  for (HFRecHitCollection::iterator i = rec->begin();i!=rec->end();++i)
474  {
475  int depth=i->id().depth();
476  int ieta=i->id().ieta();
477  // Short fibers and all channels at |ieta|=29 use PET settings in Algo 3
478  if (depth==1 && abs(ieta)!=29 )
479  hfS9S1_->HFSetFlagFromS9S1(*i,*rec,myqual, mySeverity);
480  }
481  }
482 
483  // return result
484  e.put(std::move(rec));
485  } else if (subdet_==HcalOther && subdetOther_==HcalCalibration) {
487  e.getByToken(tok_calib_,digi);
488 
489  // create empty output
490  auto rec = std::make_unique<HcalCalibRecHitCollection>();
491  rec->reserve(digi->size());
492  // run the algorithm
493  int first = firstSample_;
494  int toadd = samplesToAdd_;
495 
497  for (i=digi->begin(); i!=digi->end(); i++) {
498  HcalCalibDetId cell = i->id();
499  // HcalDetId cellh = i->id();
500  DetId detcell=(DetId)cell;
501  // check on cells to be ignored and dropped: (rof,20.Feb.09)
502  const HcalChannelStatus* mydigistatus=myqual->getValues(detcell.rawId());
503  if (mySeverity->dropChannel(mydigistatus->getValue() ) ) continue;
505  if (i->zsMarkAndPass()) continue;
506 
507  const HcalCalibrations& calibrations=conditions->getHcalCalibrations(cell);
508  const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
509  const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
510  HcalCoderDb coder (*channelCoder, *shape);
511 
512  // firstSample & samplesToAdd
513  if(tsFromDB_) {
514  const HcalRecoParam* param_ts = paramTS->getValues(detcell.rawId());
515  first = param_ts->firstSample();
516  toadd = param_ts->samplesToAdd();
517  }
518  rec->push_back(reco_.reconstruct(*i,first,toadd,coder,calibrations));
519 
520  /*
521  // Flag setting not available for calibration rechits
522  // Set auxiliary flag
523  int auxflag=0;
524  int fTS = firstAuxTS_;
525  for (int xx=fTS; xx<fTS+4 && xx<i->size();++xx)
526  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
527  // bits 28 and 29 are reserved for capid of the first time slice saved in aux
528  auxflag+=((i->sample(fTS).capid())<<28);
529  (rec->back()).setAux(auxflag);
530 
531  (rec->back()).setFlags(0); // Not yet implemented for HcalCalibRecHit
532  */
533  }
534  // return result
535  e.put(std::move(rec));
536  }
537  }
538  //DL delete myqual;
539 } // void HcalHitReconstructor::produce(...)
unsigned int firstSample() const
Definition: HcalRecoParam.h:32
T getParameter(std::string const &) const
void HFSetFlagFromS9S1(HFRecHit &hf, HFRecHitCollection &rec, const HcalChannelQuality *myqual, const HcalSeverityLevelComputer *mySeverity)
HcalRecoParams * paramTS
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
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:186
void setHFTimingTrustFlag(HFRecHit &rechit, const HFDataFrame &digi)
unsigned int pileupCleaningID() const
Definition: HcalRecoParam.h:44
HcalADCSaturationFlag * saturationFlagSetter_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
void produce(edm::Event &e, const edm::EventSetup &c) override
uint32_t HFdigiflagSamplesToAdd() const
void beginRun(edm::EventSetup const &es)
bool correctForPhaseContainment() const
Definition: HcalRecoParam.h:29
void hfSetFlagFromDigi(HFRecHit &hf, const HFDataFrame &digi, const HcalCoder &coder, const HcalCalibrations &calib)
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)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
std::string dataOOTCorrectionCategory_
std::unique_ptr< HcalFlagHFDigiTimeParams > HFDigiTimeParams
bool correctForTimeslew() const
Definition: HcalRecoParam.h:38
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
bool correctTiming() const
Definition: HcalRecoParam.h:40
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HcalHFStatusBitFromDigis * hfdigibit_
bool dropChannel(const uint32_t &mystatus) const
uint32_t HFdigiflagExpectedPeak() const
HFRecHit reconstruct(const HFDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
void setSaturationFlag(HBHERecHit &rechit, const HBHEDataFrame &digi)
unsigned int samplesToAdd() const
Definition: HcalRecoParam.h:33
edm::EDGetTokenT< HODigiCollection > tok_ho_
HcalHitReconstructor(const edm::ParameterSet &ps)
float correctionPhaseNS() const
Definition: HcalRecoParam.h:31
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
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 T & get() const
Definition: EventSetup.h:58
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_
static void Correct(HBHERecHit &rechit, const HBHEDataFrame &digi, int favorite_capid)
unsigned int firstAuxTS() const
Definition: HcalRecoParam.h:41
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:86
def move(src, dest)
Definition: eostools.py:510
void setTopo(const HcalTopology *topo)
const_iterator begin() const
Definition: Run.h:43
HcalSimpleRecAlgo reco_
double HFdigiflagMinEThreshold() const
bool useLeakCorrection() const
Definition: HcalRecoParam.h:36