17 reco_(conf.getParameter<bool>(
"correctForTimeslew"),
18 conf.getParameter<bool>(
"correctForPhaseContainment"),conf.getParameter<double>(
"correctionPhaseNS")),
20 inputLabel_(conf.getParameter<edm::
InputTag>(
"digiLabel")),
21 dropZSmarkedPassed_(conf.getParameter<bool>(
"dropZSmarkedPassed")),
22 firstSample_(conf.getParameter<int>(
"firstSample")),
23 samplesToAdd_(conf.getParameter<int>(
"samplesToAdd")),
24 tsFromDB_(conf.getParameter<bool>(
"tsFromDB")),
51 if(!strcasecmp(subd.c_str(),
"upgradeHBHE")) {
53 produces<HBHERecHitCollection>();
55 else if (!strcasecmp(subd.c_str(),
"upgradeHF")) {
57 produces<HFRecHitCollection>();
59 else if (!strcasecmp(subd.c_str(),
"HFQIE10")) {
61 produces<HFRecHitCollection>();
63 else if (!strcasecmp(subd.c_str(),
"HO")) {
65 produces<HORecHitCollection>();
67 else if (!strcasecmp(subd.c_str(),
"HBHE")) {
70 produces<HBHERecHitCollection>();
73 else if (!strcasecmp(subd.c_str(),
"HF")) {
76 produces<HFRecHitCollection>();
80 std::cout <<
"HcalSimpleReconstructor is not associated with a specific subdetector!" << std::endl;
88 desc.
add<
int>(
"pedestalSubtractionType", 1);
89 desc.
add<
double>(
"pedestalUpperLimit", 2.7);
90 desc.
add<
int>(
"timeSlewParsType",3);
91 desc.
add<std::vector<double>>(
"timeSlewPars", { 12.2999, -2.19142, 0, 12.2999, -2.19142, 0, 12.2999, -2.19142, 0 });
92 desc.
add<
double>(
"respCorrM3", 0.95);
93 descriptions.
add(
"simpleHbhereco",desc);
125 template<
class DIGICOLL,
class RECHITCOLL>
136 std::auto_ptr<RECHITCOLL> rec(
new RECHITCOLL);
137 rec->reserve(digi->size());
141 typename DIGICOLL::const_iterator
i;
142 for (i=digi->begin(); i!=digi->end(); i++) {
147 if (i->zsMarkAndPass())
continue;
150 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
151 const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
180 rec->reserve(digi->size());
186 for (i=digi->begin(); i!=digi->end(); i++) {
191 if (i->zsMarkAndPass())
continue;
194 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
195 const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
218 rec->reserve(digi->size());
224 for (i=digi->begin(); i!=digi->end(); i++) {
229 if (i->zsMarkAndPass())
continue;
232 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
233 const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
255 rec->reserve(digi->size());
273 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
274 const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
304 process<HBHEDigiCollection, HBHERecHitCollection>(
e, eventSetup,
tok_hbhe_);
306 process<HFDigiCollection, HFRecHitCollection>(
e, eventSetup,
tok_hf_);
308 process<HODigiCollection, HORecHitCollection>(
e, eventSetup,
tok_ho_);
310 process<HcalCalibDigiCollection, HcalCalibRecHitCollection>(
e, eventSetup,
tok_calib_);
void setMeth3Params(int iPedSubMethod, float iPedSubThreshold, int iTimeSlewParsType, std::vector< double > iTimeSlewPars, double irespCorrM3)
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
boost::transform_iterator< IterHelp, boost::counting_iterator< int > > const_iterator
HcalSimpleReconstructor(const edm::ParameterSet &ps)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void setAllowAnything()
allow any parameter label/value pairs
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void beginRun(edm::EventSetup const &es)
edm::EDGetTokenT< QIE10DigiCollection > tok_hfQIE10_
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
bool zsMarkAndPass() const
HcalTopology * theTopology
ParameterDescriptionBase * add(U const &iLabel, T const &value)
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
HFRecHit reconstructQIE10(const QIE10DataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
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 add(std::string const &label, ParameterSetDescription const &psetDescription)
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