15 reco_(conf.getParameter<bool>(
"correctForTimeslew"),
16 conf.getParameter<bool>(
"correctForPhaseContainment"),conf.getParameter<double>(
"correctionPhaseNS")),
18 inputLabel_(conf.getParameter<edm::InputTag>(
"digiLabel")),
19 dropZSmarkedPassed_(conf.getParameter<bool>(
"dropZSmarkedPassed")),
20 firstSample_(conf.getParameter<int>(
"firstSample")),
21 samplesToAdd_(conf.getParameter<int>(
"samplesToAdd")),
22 tsFromDB_(conf.getParameter<bool>(
"tsFromDB")),
39 if(!strcasecmp(subd.c_str(),
"upgradeHBHE")) {
41 produces<HBHERecHitCollection>();
43 else if (!strcasecmp(subd.c_str(),
"upgradeHF")) {
45 produces<HFRecHitCollection>();
47 else if (!strcasecmp(subd.c_str(),
"HO")) {
49 produces<HORecHitCollection>();
51 else if (!strcasecmp(subd.c_str(),
"HBHE")) {
54 produces<HBHERecHitCollection>();
57 else if (!strcasecmp(subd.c_str(),
"HF")) {
60 produces<HFRecHitCollection>();
64 std::cout <<
"HcalSimpleReconstructor is not associated with a specific subdetector!" << std::endl;
98 template<
class DIGICOLL,
class RECHITCOLL>
109 std::auto_ptr<RECHITCOLL> rec(
new RECHITCOLL);
110 rec->reserve(digi->size());
114 typename DIGICOLL::const_iterator
i;
115 for (i=digi->begin(); i!=digi->end(); i++) {
120 if (i->zsMarkAndPass())
continue;
123 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
124 const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
153 rec->reserve(digi->size());
159 for (i=digi->begin(); i!=digi->end(); i++) {
164 if (i->zsMarkAndPass())
continue;
167 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
168 const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
191 rec->reserve(digi->size());
197 for (i=digi->begin(); i!=digi->end(); i++) {
202 if (i->zsMarkAndPass())
continue;
205 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
206 const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
236 process<HBHEDigiCollection, HBHERecHitCollection>(
e, eventSetup,
tok_hbhe_);
238 process<HFDigiCollection, HFRecHitCollection>(
e, eventSetup,
tok_hf_);
240 process<HODigiCollection, HORecHitCollection>(
e, eventSetup,
tok_ho_);
242 process<HcalCalibDigiCollection, HcalCalibRecHitCollection>(
e, eventSetup,
tok_calib_);
edm::InputTag inputLabel_
unsigned int firstSample() const
T getParameter(std::string const &) const
edm::EDGetTokenT< HBHEUpgradeDigiCollection > tok_hbheUp_
HBHERecHit reconstruct(const HBHEDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
HcalSimpleReconstructor(const edm::ParameterSet &ps)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void beginRun(edm::EventSetup const &es)
virtual ~HcalSimpleReconstructor()
virtual void beginRun(edm::Run const &r, edm::EventSetup const &es) overridefinal
void process(edm::Event &e, const edm::EventSetup &c, const edm::EDGetTokenT< DIGICOLL > &tok)
std::vector< HcalUpgradeDataFrame >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
edm::EDGetTokenT< HFUpgradeDigiCollection > tok_hfUp_
uint32_t rawId() const
get the raw id
HcalOtherSubdetector subdetOther_
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
HFRecHit reconstructHFUpgrade(const HcalUpgradeDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
HcalTopology * theTopology
unsigned int samplesToAdd() const
edm::EDGetTokenT< HFDigiCollection > tok_hf_
edm::EDGetTokenT< HODigiCollection > tok_ho_
virtual void produce(edm::Event &e, const edm::EventSetup &c) overridefinal
void setForData(int runnum)
T const * product() const
HBHERecHit reconstructHBHEUpgrade(const HcalUpgradeDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
void processUpgrade(edm::Event &e, const edm::EventSetup &c)
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
volatile std::atomic< bool > shutdown_flag false
void setTopo(const HcalTopology *topo)
virtual void endRun(edm::Run const &r, edm::EventSetup const &es) overridefinal