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")),
49 if(!strcasecmp(subd.c_str(),
"upgradeHBHE")) {
51 produces<HBHERecHitCollection>();
53 else if (!strcasecmp(subd.c_str(),
"upgradeHF")) {
55 produces<HFRecHitCollection>();
57 else if (!strcasecmp(subd.c_str(),
"HO")) {
59 produces<HORecHitCollection>();
61 else if (!strcasecmp(subd.c_str(),
"HBHE")) {
64 produces<HBHERecHitCollection>();
67 else if (!strcasecmp(subd.c_str(),
"HF")) {
70 produces<HFRecHitCollection>();
74 std::cout <<
"HcalSimpleReconstructor is not associated with a specific subdetector!" << std::endl;
82 desc.
add<
int>(
"pedestalSubtractionType", 1);
83 desc.
add<
double>(
"pedestalUpperLimit", 2.7);
84 desc.
add<
int>(
"timeSlewParsType",3);
85 desc.
add<std::vector<double>>(
"timeSlewPars", { 12.2999, -2.19142, 0, 12.2999, -2.19142, 0, 12.2999, -2.19142, 0 });
86 desc.
add<
double>(
"respCorrM3", 0.95);
87 descriptions.
add(
"simpleHbhereco",desc);
119 template<
class DIGICOLL,
class RECHITCOLL>
130 std::auto_ptr<RECHITCOLL> rec(
new RECHITCOLL);
131 rec->reserve(digi->size());
135 typename DIGICOLL::const_iterator
i;
136 for (i=digi->begin(); i!=digi->end(); i++) {
141 if (i->zsMarkAndPass())
continue;
144 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
145 const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
174 rec->reserve(digi->size());
180 for (i=digi->begin(); i!=digi->end(); i++) {
185 if (i->zsMarkAndPass())
continue;
188 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
189 const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
212 rec->reserve(digi->size());
218 for (i=digi->begin(); i!=digi->end(); i++) {
223 if (i->zsMarkAndPass())
continue;
226 const HcalQIECoder* channelCoder = conditions->getHcalCoder (cell);
227 const HcalQIEShape* shape = conditions->getHcalShape (channelCoder);
257 process<HBHEDigiCollection, HBHERecHitCollection>(
e, eventSetup,
tok_hbhe_);
259 process<HFDigiCollection, HFRecHitCollection>(
e, eventSetup,
tok_hf_);
261 process<HODigiCollection, HORecHitCollection>(
e, eventSetup,
tok_ho_);
263 process<HcalCalibDigiCollection, HcalCalibRecHitCollection>(
e, eventSetup,
tok_calib_);
void setMeth3Params(int iPedSubMethod, float iPedSubThreshold, int iTimeSlewParsType, std::vector< double > iTimeSlewPars, double irespCorrM3)
edm::InputTag inputLabel_
unsigned int firstSample() const
T getParameter(std::string const &) const
edm::EDGetTokenT< HBHEUpgradeDigiCollection > tok_hbheUp_
HBHERecHit reconstruct(const HBHEDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
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()
virtual void beginRun(edm::Run const &r, edm::EventSetup const &es) overridefinal
void process(edm::Event &e, const edm::EventSetup &c, const edm::EDGetTokenT< DIGICOLL > &tok)
std::vector< HcalUpgradeDataFrame >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
edm::EDGetTokenT< HFUpgradeDigiCollection > tok_hfUp_
uint32_t rawId() const
get the raw id
HcalOtherSubdetector subdetOther_
edm::EDGetTokenT< HBHEDigiCollection > tok_hbhe_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
HFRecHit reconstructHFUpgrade(const HcalUpgradeDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
HcalTopology * theTopology
ParameterDescriptionBase * add(U const &iLabel, T const &value)
unsigned int samplesToAdd() const
edm::EDGetTokenT< HFDigiCollection > tok_hf_
edm::EDGetTokenT< HODigiCollection > tok_ho_
virtual void produce(edm::Event &e, const edm::EventSetup &c) overridefinal
void setForData(int runnum)
T const * product() const
HBHERecHit reconstructHBHEUpgrade(const HcalUpgradeDataFrame &digi, int first, int toadd, const HcalCoder &coder, const HcalCalibrations &calibs) const
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void processUpgrade(edm::Event &e, const edm::EventSetup &c)
edm::EDGetTokenT< HcalCalibDigiCollection > tok_calib_
volatile std::atomic< bool > shutdown_flag false
void setTopo(const HcalTopology *topo)
virtual void endRun(edm::Run const &r, edm::EventSetup const &es) overridefinal