17 : reco_(conf.getParameter<
bool>(
"correctForTimeslew"),
18 conf.getParameter<
bool>(
"correctForPhaseContainment"),
19 conf.getParameter<double>(
"correctionPhaseNS"),
22 inputLabel_(conf.getParameter<
edm::
InputTag>(
"digiLabel")),
23 dropZSmarkedPassed_(conf.getParameter<
bool>(
"dropZSmarkedPassed")),
24 firstSample_(conf.getParameter<
int>(
"firstSample")),
25 samplesToAdd_(conf.getParameter<
int>(
"samplesToAdd")),
26 tsFromDB_(conf.getParameter<
bool>(
"tsFromDB")) {
33 if (!strcasecmp(subd.c_str(),
"HO")) {
35 produces<HORecHitCollection>();
36 }
else if (!strcasecmp(subd.c_str(),
"HF")) {
38 produces<HFRecHitCollection>();
40 std::cout <<
"HcalSimpleReconstructor is not associated with a specific subdetector!" << std::endl;
45 htopoToken_ = esConsumes<HcalTopology, HcalRecNumberingRecord, edm::Transition::BeginRun>();
46 paramsToken_ = esConsumes<HcalRecoParams, HcalRecoParamsRcd, edm::Transition::BeginRun>();
57 paramTS_ = std::make_unique<HcalRecoParams>(
p);
65 template <
class DIGICOLL,
class RECHITCOLL>
73 e.getByToken(tok, digi);
76 auto rec = std::make_unique<RECHITCOLL>();
77 rec->reserve(digi->size());
81 typename DIGICOLL::const_iterator
i;
82 for (
i = digi->begin();
i != digi->end();
i++) {
87 if (
i->zsMarkAndPass())
110 process<HFDigiCollection, HFRecHitCollection>(
e, eventSetup,
tok_hf_);
112 process<HODigiCollection, HORecHitCollection>(
e, eventSetup,
tok_ho_);
114 process<HcalCalibDigiCollection, HcalCalibRecHitCollection>(
e, eventSetup,
tok_calib_);
122 descHO.
add<
double>(
"correctionPhaseNS", 13.0);
124 descHO.
add<
bool>(
"tsFromDB",
true);
125 descHO.
add<
int>(
"samplesToAdd", 4);
127 descHO.
add<
bool>(
"correctForTimeslew",
true);
128 descHO.
add<
bool>(
"dropZSmarkedPassed",
true);
129 descHO.
add<
bool>(
"correctForPhaseContainment",
true);
130 descHO.
add<
int>(
"firstSample", 4);
131 descriptions.
add(
"hosimplereco", descHO);
135 descHF.
add<
double>(
"correctionPhaseNS", 0.0);
137 descHF.
add<
bool>(
"tsFromDB",
true);
138 descHF.
add<
int>(
"samplesToAdd", 2);
140 descHF.
add<
bool>(
"correctForTimeslew",
false);
141 descHF.
add<
bool>(
"dropZSmarkedPassed",
true);
142 descHF.
add<
bool>(
"correctForPhaseContainment",
false);
143 descHF.
add<
int>(
"firstSample", 4);
144 descriptions.
add(
"hfsimplereco", descHF);