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")),
44 if (!strcasecmp(subd.c_str(),
"HO")) {
46 produces<HORecHitCollection>();
48 else if (!strcasecmp(subd.c_str(),
"HBHE")) {
50 produces<HBHERecHitCollection>();
52 else if (!strcasecmp(subd.c_str(),
"HF")) {
54 produces<HFRecHitCollection>();
57 std::cout <<
"HcalSimpleReconstructor is not associated with a specific subdetector!" << std::endl;
65 desc.
add<
bool>(
"applyTimeSlewM3",
true);
66 desc.
add<
double>(
"pedestalUpperLimit", 2.7);
67 desc.
add<
int>(
"timeSlewParsType",3);
68 desc.
add<std::vector<double>>(
"timeSlewPars", { 12.2999, -2.19142, 0, 12.2999, -2.19142, 0, 12.2999, -2.19142, 0 });
69 desc.
add<
double>(
"respCorrM3", 1.0);
70 descriptions.
add(
"simpleHbhereco",desc);
102 template<
class DIGICOLL,
class RECHITCOLL>
113 auto rec = std::make_unique<RECHITCOLL>();
114 rec->reserve(digi->size());
118 typename DIGICOLL::const_iterator
i;
119 for (i=digi->begin(); i!=digi->end(); i++) {
124 if (i->zsMarkAndPass())
continue;
150 process<HBHEDigiCollection, HBHERecHitCollection>(
e, eventSetup,
tok_hbhe_);
152 process<HFDigiCollection, HFRecHitCollection>(
e, eventSetup,
tok_hf_);
154 process<HODigiCollection, HORecHitCollection>(
e, eventSetup,
tok_ho_);
156 process<HcalCalibDigiCollection, HcalCalibRecHitCollection>(
e, eventSetup,
tok_calib_);
edm::InputTag inputLabel_
unsigned int firstSample() const
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
HBHERecHit reconstruct(const HBHEDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
void setMeth3Params(bool iApplyTimeSlew, float iPedSubThreshold, int iTimeSlewParsType, std::vector< double > iTimeSlewPars, double irespCorrM3)
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)
virtual ~HcalSimpleReconstructor()
void process(edm::Event &e, const edm::EventSetup &c, const edm::EDGetTokenT< DIGICOLL > &tok)
const Item * getValues(DetId fId, bool throwOnFail=true) const
virtual void produce(edm::Event &e, const edm::EventSetup &c) override final
virtual void endRun(edm::Run const &r, edm::EventSetup const &es) override final
uint32_t rawId() const
get the raw id
HcalOtherSubdetector subdetOther_
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
HcalTopology * theTopology
ParameterDescriptionBase * add(U const &iLabel, T const &value)
unsigned int samplesToAdd() const
edm::EDGetTokenT< HFDigiCollection > tok_hf_
edm::EDGetTokenT< HODigiCollection > tok_ho_
void setForData(int runnum)
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_
virtual void beginRun(edm::Run const &r, edm::EventSetup const &es) override final
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
T const * product() const
void setTopo(const HcalTopology *topo)