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;
112 if(digi->
size() == 0) {
114 if(digi->
size() == 0)
115 edm::LogInfo(
"ZdcHitReconstructor") <<
"No ZDC info found in either castorDigis or hcalDigis." << std::endl;
119 auto rec = std::make_unique<ZDCRecHitCollection>();
120 rec->reserve(digi->
size());
123 for (i=digi->
begin(); i!=digi->
end(); i++) {
130 if (i->zsMarkAndPass())
continue;
141 myNoiseTS = myParams->
noiseTS();
143 rec->push_back(
reco_.
reconstruct(*i,myNoiseTS,mySignalTS,coder,calibrations));
144 (rec->back()).setFlags(0);
158 auxflag+=((i->sample(
AuxTSvec_[0]).capid())<<28);
159 (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
HcalTopology * theTopology
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual void endRun(edm::Run const &r, edm::EventSetup const &es) override final
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
virtual void produce(edm::Event &e, const edm::EventSetup &c) override final
static const int SubdetectorId
ZdcHitReconstructor(const edm::ParameterSet &ps)
virtual void beginRun(edm::Run const &r, edm::EventSetup const &es) override final
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
std::vector< int > AuxTSvec_
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
std::vector< unsigned int > noiseTS() const
virtual ~ZdcHitReconstructor()
uint32_t getValue() const
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
T const * product() const
void setTopo(const HcalTopology *topo)
const_iterator begin() const