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())
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);
edm::InputTag inputLabel_
~HcalSimpleReconstructor() override
T getParameter(std::string const &) const
std::unique_ptr< HcalRecoParams > paramTS_
edm::ESGetToken< HcalRecoParams, HcalRecoParamsRcd > paramsToken_
HcalSimpleReconstructor(const edm::ParameterSet &ps)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void beginRun(edm::EventSetup const &es)
constexpr unsigned int firstSample() const
void process(edm::Event &e, const edm::EventSetup &c, const edm::EDGetTokenT< DIGICOLL > &tok)
HcalOtherSubdetector subdetOther_
void produce(edm::Event &e, const edm::EventSetup &c) final
void beginRun(edm::Run const &r, edm::EventSetup const &es) final
edm::ESGetToken< HcalTopology, HcalRecNumberingRecord > htopoToken_
bool getData(T &iHolder) const
edm::ESGetToken< HcalDbService, HcalDbRecord > conditionsToken_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< HFDigiCollection > tok_hf_
edm::EDGetTokenT< HODigiCollection > tok_ho_
constexpr uint32_t rawId() const
get the raw id
constexpr unsigned int samplesToAdd() const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
HFRecHit reconstruct(const HFDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
void endRun(edm::Run const &r, edm::EventSetup const &es) final