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 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")),
48 if (!strcasecmp(subd.c_str(),
"ZDC")) {
51 produces<ZDCRecHitCollection>();
52 }
else if (!strcasecmp(subd.c_str(),
"CALIB")) {
55 produces<HcalCalibRecHitCollection>();
57 std::cout <<
"ZdcHitReconstructor is not associated with a specific subdetector!" << std::endl;
96 std::vector<unsigned int> mySignalTS;
97 std::vector<unsigned int> myNoiseTS;
103 if(digi->size() == 0) {
105 if(digi->size() == 0)
106 edm::LogInfo(
"ZdcHitReconstructor") <<
"No ZDC info found in either castorDigis or hcalDigis." << std::endl;
111 rec->reserve(digi->size());
114 for (i=digi->begin(); i!=digi->end(); i++) {
121 if (i->zsMarkAndPass())
continue;
123 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
124 const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
132 myNoiseTS = myParams->
noiseTS();
134 rec->push_back(
reco_.
reconstruct(*i,myNoiseTS,mySignalTS,coder,calibrations));
135 (rec->back()).setFlags(0);
142 for (
unsigned int xx=0; xx<
AuxTSvec_.size() && xx<4;++xx)
145 auxflag+=(i->sample(
AuxTSvec_[xx]).adc())<<(7*xx);
149 auxflag+=((i->sample(
AuxTSvec_[0]).capid())<<28);
150 (rec->back()).setAux(auxflag);
T getParameter(std::string const &) const
std::vector< unsigned int > signalTS() const
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
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
HcalOtherSubdetector subdetOther_
virtual void beginRun(edm::Run const &r, edm::EventSetup const &es) overridefinal
HcalLongRecoParams * myobject
bool dropChannel(const uint32_t &mystatus) const
void setSaturationFlag(HBHERecHit &rechit, const HBHEDataFrame &digi)
HcalADCSaturationFlag * saturationFlagSetter_
edm::EDGetTokenT< ZDCDigiCollection > tok_input_castor
static const int SubdetectorId
ZdcHitReconstructor(const edm::ParameterSet &ps)
T const * product() const
std::vector< int > AuxTSvec_
std::vector< unsigned int > noiseTS() const
virtual ~ZdcHitReconstructor()
virtual void produce(edm::Event &e, const edm::EventSetup &c) overridefinal
uint32_t getValue() const
virtual void endRun(edm::Run const &r, edm::EventSetup const &es) overridefinal
void setTopo(const HcalTopology *topo)