263 auto rec = std::make_unique<HORecHitCollection>();
264 rec->reserve(digi->
size());
269 int favorite_capid = 0;
271 long capid_votes[4] = {0,0,0,0};
272 for (i=digi->
begin(); i!=digi->
end(); i++) {
273 capid_votes[(*i)[0].capid()]++;
275 for (
int k = 0;
k < 4;
k++)
276 if (capid_votes[
k] > capid_votes[favorite_capid])
280 for (i=digi->
begin(); i!=digi->
end(); i++) {
305 if(first >= i->size() || first < 0)
306 edm::LogWarning(
"Configuration") <<
"HcalHitReconstructor: illegal firstSample" << first <<
" in subdet " <<
subdet_ << std::endl;
312 if (i->zsMarkAndPass())
continue;
325 for (
int xx=fTS;
xx<fTS+4 &&
xx<i->size();++
xx)
326 auxflag+=(i->sample(
xx).adc())<<(7*(
xx-fTS));
328 auxflag+=((i->sample(fTS).capid())<<28);
329 (rec->back()).setAux(auxflag);
352 auto rec = std::make_unique<HFRecHitCollection>();
353 rec->reserve(digi->
size());
358 int favorite_capid = 0;
360 long capid_votes[4] = {0,0,0,0};
361 for (i=digi->
begin(); i!=digi->
end(); i++) {
362 capid_votes[(*i)[0].capid()]++;
364 for (
int k = 0;
k < 4;
k++)
365 if (capid_votes[
k] > capid_votes[favorite_capid])
369 for (i=digi->
begin(); i!=digi->
end(); i++) {
394 if(first >= i->size() || first < 0)
395 edm::LogWarning(
"Configuration") <<
"HcalHitReconstructor: illegal firstSample" << first <<
" in subdet " <<
subdet_ << std::endl;
401 if (i->zsMarkAndPass())
continue;
427 for (
int xx=fTS;
xx<fTS+4 &&
xx<i->size();++
xx)
428 auxflag+=(i->sample(
xx).adc())<<(7*(
xx-fTS));
430 auxflag+=((i->sample(fTS).capid())<<28);
431 (rec->back()).setAux(auxflag);
461 int depth=i->id().depth();
462 int ieta=i->id().ieta();
464 if (depth==2 ||
abs(ieta)==29 )
471 int depth=i->id().depth();
472 int ieta=i->id().ieta();
474 if (depth==2 ||
abs(ieta)==29 )
481 int depth=i->id().depth();
482 int ieta=i->id().ieta();
484 if (depth==1 &&
abs(ieta)!=29 )
496 auto rec = std::make_unique<HcalCalibRecHitCollection>();
497 rec->reserve(digi->
size());
503 for (i=digi->
begin(); i!=digi->
end(); i++) {
511 if (i->zsMarkAndPass())
continue;
void HFSetFlagFromS9S1(HFRecHit &hf, HFRecHitCollection &rec, const HcalChannelQuality *myqual, const HcalSeverityLevelComputer *mySeverity)
constexpr unsigned int samplesToAdd() const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
constexpr unsigned int pileupCleaningID() const
void setHFTimingTrustFlag(HFRecHit &rechit, const HFDataFrame &digi)
HcalADCSaturationFlag * saturationFlagSetter_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
uint32_t HFdigiflagSamplesToAdd() const
void hfSetFlagFromDigi(HFRecHit &hf, const HFDataFrame &digi, const HcalCoder &coder, const HcalCalibrations &calib)
constexpr uint32_t rawId() const
get the raw id
std::vector< HODataFrame >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
void resetParamsFromDB(int firstSample, int samplesToAdd, int expectedPeak, double minthreshold, const std::vector< double > &coef)
void HFSetFlagFromPET(HFRecHit &hf, HFRecHitCollection &rec, const HcalChannelQuality *myqual, const HcalSeverityLevelComputer *mySeverity)
constexpr float correctionPhaseNS() const
std::unique_ptr< HcalFlagHFDigiTimeParams > HFDigiTimeParams
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
Abs< T >::type abs(const T &t)
HcalHFStatusBitFromDigis * hfdigibit_
constexpr unsigned int firstAuxTS() const
bool dropChannel(const uint32_t &mystatus) const
uint32_t HFdigiflagExpectedPeak() const
constexpr bool correctTiming() const
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
edm::EDGetTokenT< HODigiCollection > tok_ho_
std::vector< HFRecHit >::iterator iterator
const_iterator end() const
std::vector< double > HFdigiflagCoefficients() const
HcalHF_PETalgorithm * hfPET_
constexpr bool correctForPhaseContainment() const
constexpr bool correctForTimeslew() const
HcalHF_S9S1algorithm * hfS9S1_
void setRecoParams(bool correctForTimeslew, bool correctForPulse, bool setLeakCorrection, int pileupCleaningID, float phaseNS)
uint32_t HFdigiflagFirstSample() const
correctForPhaseContainment
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
HcalHF_S9S1algorithm * hfS8S1_
HcalOtherSubdetector subdetOther_
static void Correct(HBHERecHit &rechit, const HBHEDataFrame &digi, int favorite_capid)
bool setTimingTrustFlags_
HFTimingTrustFlag * HFTimingTrustFlagSetter_
uint32_t getValue() const
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
edm::EDGetTokenT< HFDigiCollection > tok_hf_
T const * product() const
constexpr unsigned int firstSample() const
const_iterator begin() const
double HFdigiflagMinEThreshold() const