18 : reco_(conf.getParameter<
bool>(
"correctForTimeslew"),
19 conf.getParameter<
bool>(
"correctForPhaseContainment"),
20 conf.getParameter<double>(
"correctionPhaseNS"),
21 conf.getParameter<
int>(
"recoMethod"),
22 conf.getParameter<
int>(
"lowGainOffset"),
23 conf.getParameter<double>(
"lowGainFrac")),
24 saturationFlagSetter_(nullptr),
26 correctTiming_(conf.getParameter<
bool>(
"correctTiming")),
27 setNoiseFlags_(conf.getParameter<
bool>(
"setNoiseFlags")),
28 setHSCPFlags_(conf.getParameter<
bool>(
"setHSCPFlags")),
29 setSaturationFlags_(conf.getParameter<
bool>(
"setSaturationFlags")),
30 setTimingTrustFlags_(conf.getParameter<
bool>(
"setTimingTrustFlags")),
31 dropZSmarkedPassed_(conf.getParameter<
bool>(
"dropZSmarkedPassed")),
32 AuxTSvec_(conf.getParameter<
std::
vector<
int> >(
"AuxTSvec")) {
43 if (!strcasecmp(subd.c_str(),
"ZDC")) {
46 produces<ZDCRecHitCollection>();
47 }
else if (!strcasecmp(subd.c_str(),
"CALIB")) {
50 produces<HcalCalibRecHitCollection>();
52 std::cout <<
"ZdcHitReconstructor is not associated with a specific subdetector!" << std::endl;
56 htopoToken_ = esConsumes<HcalTopology, HcalRecNumberingRecord, edm::Transition::BeginRun>();
57 paramsToken_ = esConsumes<HcalLongRecoParams, HcalLongRecoParamsRcd, edm::Transition::BeginRun>();
60 sevToken_ = esConsumes<HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd>();
81 std::vector<unsigned int> mySignalTS;
82 std::vector<unsigned int> myNoiseTS;
92 edm::LogInfo(
"ZdcHitReconstructor") <<
"No ZDC info found in either castorDigis or hcalDigis." << std::endl;
98 auto rec = std::make_unique<ZDCRecHitCollection>();
99 rec->reserve(digi->
size());
110 if (
i->zsMarkAndPass())
122 myNoiseTS = myParams->
noiseTS();
125 (rec->back()).setFlags(0);
140 auxflag += ((
i->sample(
AuxTSvec_[0]).capid()) << 28);
141 (rec->back()).setAux(auxflag);
T getParameter(std::string const &) const
edm::ESGetToken< HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd > sevToken_
void produce(edm::Event &e, const edm::EventSetup &c) final
std::vector< T >::const_iterator const_iterator
edm::ESGetToken< HcalLongRecoParams, HcalLongRecoParamsRcd > paramsToken_
edm::EDGetTokenT< ZDCDigiCollection > tok_input_hcal
const Item * getValues(DetId fId, bool throwOnFail=true) const
std::unique_ptr< HcalLongRecoParams > longRecoParams_
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > qualToken_
HcalOtherSubdetector subdetOther_
bool getData(T &iHolder) const
const_iterator begin() const
ZDCRecHit reconstruct(const ZDCDataFrame &digi, const std::vector< unsigned int > &myNoiseTS, const std::vector< unsigned int > &mySignalTS, const HcalCoder &coder, const HcalCalibrations &calibs) const
void setSaturationFlag(HBHERecHit &rechit, const HBHEDataFrame &digi)
HcalADCSaturationFlag * saturationFlagSetter_
uint32_t getValue() const
edm::EDGetTokenT< ZDCDigiCollection > tok_input_castor
const_iterator end() const
static const int SubdetectorId
ZdcHitReconstructor(const edm::ParameterSet &ps)
constexpr uint32_t rawId() const
get the raw id
edm::ESGetToken< HcalDbService, HcalDbRecord > conditionsToken_
std::vector< unsigned int > signalTS() const
std::vector< int > AuxTSvec_
void endRun(edm::Run const &r, edm::EventSetup const &es) final
void beginRun(edm::Run const &r, edm::EventSetup const &es) final
~ZdcHitReconstructor() override
std::vector< unsigned int > noiseTS() const
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > htopoToken_
bool dropChannel(const uint32_t &mystatus) const