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")),
35 if (!strcasecmp(subd.c_str(),
"HO")) {
37 produces<HORecHitCollection>();
39 else if (!strcasecmp(subd.c_str(),
"HF")) {
41 produces<HFRecHitCollection>();
44 std::cout <<
"HcalSimpleReconstructor is not associated with a specific subdetector!" << std::endl;
78 template<
class DIGICOLL,
class RECHITCOLL>
89 auto rec = std::make_unique<RECHITCOLL>();
90 rec->reserve(digi->size());
94 typename DIGICOLL::const_iterator
i;
95 for (i=digi->begin(); i!=digi->end(); i++) {
100 if (i->zsMarkAndPass())
continue;
123 process<HFDigiCollection, HFRecHitCollection>(
e, eventSetup,
tok_hf_);
125 process<HODigiCollection, HORecHitCollection>(
e, eventSetup,
tok_ho_);
127 process<HcalCalibDigiCollection, HcalCalibRecHitCollection>(
e, eventSetup,
tok_calib_);
138 descHO.
add<
double>(
"correctionPhaseNS", 13.0);
140 descHO.
add<
bool>(
"tsFromDB",
true);
141 descHO.
add<
int>(
"samplesToAdd", 4);
143 descHO.
add<
bool>(
"correctForTimeslew",
true);
144 descHO.
add<
bool>(
"dropZSmarkedPassed",
true);
145 descHO.
add<
bool>(
"correctForPhaseContainment",
true);
146 descHO.
add<
int>(
"firstSample", 4);
147 descriptions.
add(
"hosimplereco", descHO);
151 descHF.
add<
double>(
"correctionPhaseNS", 0.0);
153 descHF.
add<
bool>(
"tsFromDB",
true);
154 descHF.
add<
int>(
"samplesToAdd", 2);
156 descHF.
add<
bool>(
"correctForTimeslew",
false);
157 descHF.
add<
bool>(
"dropZSmarkedPassed",
true);
158 descHF.
add<
bool>(
"correctForPhaseContainment",
false);
159 descHF.
add<
int>(
"firstSample", 4);
160 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