19 reco_(conf.getParameter<
bool>(
"correctForTimeslew"),
20 conf.getParameter<
bool>(
"correctForPhaseContainment"),
21 conf.getParameter<double>(
"correctionPhaseNS"),
22 conf.getParameter<
int>(
"recoMethod"),
23 conf.getParameter<
int>(
"lowGainOffset"),
24 conf.getParameter<double>(
"lowGainFrac")),
26 HFTimingTrustFlagSetter_(
nullptr),
28 hbheTimingShapedFlagSetter_(
nullptr),
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 dropZSmarkedPassed_(conf.getParameter<
bool>(
"dropZSmarkedPassed")),
38 AuxTSvec_(conf.getParameter<
std::vector<
int> >(
"AuxTSvec")),
54 if (!strcasecmp(subd.c_str(),
"ZDC")) {
57 produces<ZDCRecHitCollection>();
58 }
else if (!strcasecmp(subd.c_str(),
"CALIB")) {
61 produces<HcalCalibRecHitCollection>();
63 std::cout <<
"ZdcHitReconstructor is not associated with a specific subdetector!" << std::endl;
105 std::vector<unsigned int> mySignalTS;
106 std::vector<unsigned int> myNoiseTS;
116 edm::LogInfo(
"ZdcHitReconstructor") <<
"No ZDC info found in either castorDigis or hcalDigis." << std::endl;
122 auto rec = std::make_unique<ZDCRecHitCollection>();
123 rec->reserve(digi->
size());
126 for (i=digi->
begin(); i!=digi->
end(); i++) {
133 if (i->zsMarkAndPass())
continue;
144 myNoiseTS = myParams->
noiseTS();
146 rec->push_back(
reco_.
reconstruct(*i,myNoiseTS,mySignalTS,coder,calibrations));
147 (rec->back()).setFlags(0);
161 auxflag+=((i->sample(
AuxTSvec_[0]).capid())<<28);
162 (rec->back()).setAux(auxflag);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
std::vector< unsigned int > signalTS() const
void produce(edm::Event &e, const edm::EventSetup &c) final
HcalTopology * theTopology
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< ZDCDataFrame >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
edm::EDGetTokenT< ZDCDigiCollection > tok_input_hcal
uint32_t rawId() const
get the raw id
ZDCRecHit reconstruct(const ZDCDataFrame &digi, const std::vector< unsigned int > &myNoiseTS, const std::vector< unsigned int > &mySignalTS, const HcalCoder &coder, const HcalCalibrations &calibs) const
HcalOtherSubdetector subdetOther_
HcalLongRecoParams * myobject
bool dropChannel(const uint32_t &mystatus) const
void setSaturationFlag(HBHERecHit &rechit, const HBHEDataFrame &digi)
HcalADCSaturationFlag * saturationFlagSetter_
edm::EDGetTokenT< ZDCDigiCollection > tok_input_castor
const_iterator end() const
static const int SubdetectorId
ZdcHitReconstructor(const edm::ParameterSet &ps)
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
std::vector< int > AuxTSvec_
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
void endRun(edm::Run const &r, edm::EventSetup const &es) final
std::vector< unsigned int > noiseTS() const
uint32_t getValue() const
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
void beginRun(edm::Run const &r, edm::EventSetup const &es) final
T const * product() const
~ZdcHitReconstructor() override
void setTopo(const HcalTopology *topo)
const_iterator begin() const