17 : reco_(conf.getParameter<
bool>(
"correctForTimeslew"),
18 conf.getParameter<
bool>(
"correctForPhaseContainment"),
19 conf.getParameter<double>(
"correctionPhaseNS")),
21 inputLabel_(conf.getParameter<
edm::
InputTag>(
"digiLabel")),
22 dropZSmarkedPassed_(conf.getParameter<
bool>(
"dropZSmarkedPassed")),
23 firstSample_(conf.getParameter<
int>(
"firstSample")),
24 samplesToAdd_(conf.getParameter<
int>(
"samplesToAdd")),
25 tsFromDB_(conf.getParameter<
bool>(
"tsFromDB")),
34 if (!strcasecmp(subd.c_str(),
"HO")) {
36 produces<HORecHitCollection>();
37 }
else if (!strcasecmp(subd.c_str(),
"HF")) {
39 produces<HFRecHitCollection>();
41 std::cout <<
"HcalSimpleReconstructor is not associated with a specific subdetector!" << std::endl;
72 template <
class DIGICOLL,
class RECHITCOLL>
84 auto rec = std::make_unique<RECHITCOLL>();
85 rec->reserve(digi->size());
89 typename DIGICOLL::const_iterator
i;
90 for (i = digi->begin(); i != digi->end(); i++) {
95 if (i->zsMarkAndPass())
118 process<HFDigiCollection, HFRecHitCollection>(
e, eventSetup,
tok_hf_);
120 process<HODigiCollection, HORecHitCollection>(
e, eventSetup,
tok_ho_);
122 process<HcalCalibDigiCollection, HcalCalibRecHitCollection>(
e, eventSetup,
tok_calib_);
130 descHO.
add<
double>(
"correctionPhaseNS", 13.0);
132 descHO.
add<
bool>(
"tsFromDB",
true);
133 descHO.
add<
int>(
"samplesToAdd", 4);
135 descHO.
add<
bool>(
"correctForTimeslew",
true);
136 descHO.
add<
bool>(
"dropZSmarkedPassed",
true);
137 descHO.
add<
bool>(
"correctForPhaseContainment",
true);
138 descHO.
add<
int>(
"firstSample", 4);
139 descriptions.
add(
"hosimplereco", descHO);
143 descHF.
add<
double>(
"correctionPhaseNS", 0.0);
145 descHF.
add<
bool>(
"tsFromDB",
true);
146 descHF.
add<
int>(
"samplesToAdd", 2);
148 descHF.
add<
bool>(
"correctForTimeslew",
false);
149 descHF.
add<
bool>(
"dropZSmarkedPassed",
true);
150 descHF.
add<
bool>(
"correctForPhaseContainment",
false);
151 descHF.
add<
int>(
"firstSample", 4);
152 descriptions.
add(
"hfsimplereco", descHF);
edm::InputTag inputLabel_
T getParameter(std::string const &) const
~HcalSimpleReconstructor() override
constexpr unsigned int samplesToAdd() const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
HcalSimpleReconstructor(const edm::ParameterSet &ps)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void beginRun(edm::EventSetup const &es)
constexpr uint32_t rawId() const
get the raw id
void process(edm::Event &e, const edm::EventSetup &c, const edm::EDGetTokenT< DIGICOLL > &tok)
const Item * getValues(DetId fId, bool throwOnFail=true) const
HcalOtherSubdetector subdetOther_
void produce(edm::Event &e, const edm::EventSetup &c) final
void beginRun(edm::Run const &r, edm::EventSetup const &es) final
HcalTopology * theTopology
HFRecHit reconstruct(const HFDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< HFDigiCollection > tok_hf_
edm::EDGetTokenT< HODigiCollection > tok_ho_
const HcalQIECoder * getHcalCoder(const HcalGenericDetId &fId) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const HcalQIEShape * getHcalShape(const HcalGenericDetId &fId) const
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
void endRun(edm::Run const &r, edm::EventSetup const &es) final
T const * product() const
void setTopo(const HcalTopology *topo)
constexpr unsigned int firstSample() const