73 std::unique_ptr<AbsHFPhase1Algo>
reco_;
78 std::unique_ptr<HcalHF_S9S1algorithm>
hfS9S1_;
79 std::unique_ptr<HcalHF_S9S1algorithm>
hfS8S1_;
80 std::unique_ptr<HcalHF_PETalgorithm>
hfPET_;
93 : algoConfigClass_(conf.getParameter<
std::
string>(
"algoConfigClass")),
94 setNoiseFlags_(conf.getParameter<
bool>(
"setNoiseFlags")),
95 runHFStripFilter_(conf.getParameter<
bool>(
"runHFStripFilter")),
96 useChannelQualityFromDB_(conf.getParameter<
bool>(
"useChannelQualityFromDB")),
97 checkChannelQualityForDepth3and4_(conf.getParameter<
bool>(
"checkChannelQualityForDepth3and4")),
101 throw cms::Exception(
"HFPhase1BadConfig") <<
"Invalid HFPhase1Reconstructor algorithm configuration" << std::endl;
103 if (
reco_->isConfigurable()) {
106 <<
"Invalid HBHEPhase1Reconstructor \"algoConfigClass\" parameter value \"" <<
algoConfigClass_ <<
'"' 115 hfS9S1_ = std::make_unique<HcalHF_S9S1algorithm>(psS9S1.
getParameter<std::vector<double> >(
"short_optimumSlope"),
116 psS9S1.
getParameter<std::vector<double> >(
"shortEnergyParams"),
117 psS9S1.
getParameter<std::vector<double> >(
"shortETParams"),
118 psS9S1.
getParameter<std::vector<double> >(
"long_optimumSlope"),
119 psS9S1.
getParameter<std::vector<double> >(
"longEnergyParams"),
120 psS9S1.
getParameter<std::vector<double> >(
"longETParams"),
125 hfS8S1_ = std::make_unique<HcalHF_S9S1algorithm>(psS8S1.getParameter<std::vector<double> >(
"short_optimumSlope"),
126 psS8S1.getParameter<std::vector<double> >(
"shortEnergyParams"),
127 psS8S1.getParameter<std::vector<double> >(
"shortETParams"),
128 psS8S1.getParameter<std::vector<double> >(
"long_optimumSlope"),
129 psS8S1.getParameter<std::vector<double> >(
"longEnergyParams"),
130 psS8S1.getParameter<std::vector<double> >(
"longETParams"),
131 psS8S1.getParameter<
int>(
"HcalAcceptSeverityLevel"),
132 psS8S1.getParameter<
bool>(
"isS8S1"));
135 hfPET_ = std::make_unique<HcalHF_PETalgorithm>(psPET.getParameter<std::vector<double> >(
"short_R"),
136 psPET.getParameter<std::vector<double> >(
"shortEnergyParams"),
137 psPET.getParameter<std::vector<double> >(
"shortETParams"),
138 psPET.getParameter<std::vector<double> >(
"long_R"),
139 psPET.getParameter<std::vector<double> >(
"longEnergyParams"),
140 psPET.getParameter<std::vector<double> >(
"longETParams"),
141 psPET.getParameter<
int>(
"HcalAcceptSeverityLevel"),
142 psPET.getParameter<std::vector<double> >(
"short_R_29"),
143 psPET.getParameter<std::vector<double> >(
"long_R_29"));
156 produces<HFRecHitCollection>();
161 sevToken_ = esConsumes<HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd>();
170 if (
reco_->isConfigurable()) {
174 <<
"Failed to configure HFPhase1Reconstructor algorithm from EventSetup" << std::endl;
192 std::unique_ptr<HFRecHitCollection> rec(std::make_unique<HFRecHitCollection>());
193 rec->reserve(preRecHits->
size());
200 const bool thisIsSingleAnodePMT =
false;
203 bool taggedBadByDb[2] = {
false,
false};
207 anodeIds[0] = it->id();
209 for (
unsigned i = 0;
i < 2; ++
i) {
216 taggedBadByDb[0] =
b;
217 taggedBadByDb[1] =
b;
223 reco_->reconstruct(*it,
conditions->getHcalCalibrations(it->id()), taggedBadByDb, thisIsSingleAnodePMT);
240 int depth =
i->id().depth();
241 int ieta =
i->id().ieta();
244 hfPET_->HFSetFlagFromPET(*
i, *rec, myqual, mySeverity);
249 int depth =
i->id().depth();
250 int ieta =
i->id().ieta();
253 hfS8S1_->HFSetFlagFromS9S1(*
i, *rec, myqual, mySeverity);
258 int depth =
i->id().depth();
259 int ieta =
i->id().ieta();
262 hfS9S1_->HFSetFlagFromS9S1(*
i, *rec, myqual, mySeverity);
274 #define add_param_set(name) \ 275 edm::ParameterSetDescription name; \ 276 name.setAllowAnything(); \ 277 desc.add<edm::ParameterSetDescription>(#name, name) 285 desc.add<
bool>(
"setNoiseFlags");
286 desc.add<
bool>(
"runHFStripFilter",
false);
287 desc.add<
bool>(
"useChannelQualityFromDB");
288 desc.add<
bool>(
"checkChannelQualityForDepth3and4");
edm::ESGetToken< HFPhase1PMTParams, HFPhase1PMTParamsRcd > recoConfigToken_
~HFPhase1Reconstructor() override
edm::ESGetToken< HcalDbService, HcalDbRecord > conditionsToken_
T getParameter(std::string const &) const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
void beginRun(const edm::Run &, const edm::EventSetup &) override
std::string algoConfigClass_
static edm::ParameterSetDescription fillDescription()
std::vector< T >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
constexpr HcalDetId secondAnodeId() const
second PMT anode detId for HF dual channels
std::unique_ptr< HcalHF_PETalgorithm > hfPET_
#define add_param_set(name)
void produce(edm::Event &, const edm::EventSetup &) override
std::unique_ptr< HFStripFilter > hfStripFilter_
void addDefault(ParameterSetDescription const &psetDescription)
std::unique_ptr< AbsHcalAlgoData > recoConfig_
constexpr HcalDetId id() const
std::unique_ptr< AbsHFPhase1Algo > reco_
std::unique_ptr< AbsHFPhase1Algo > parseHFPhase1AlgoDescription(const edm::ParameterSet &ps)
Abs< T >::type abs(const T &t)
#define DEFINE_FWK_MODULE(type)
static std::unique_ptr< HFStripFilter > parseParameterSet(const edm::ParameterSet &ps)
std::unique_ptr< HcalHF_S9S1algorithm > hfS8S1_
const_iterator begin() const
uint32_t getValue() const
std::vector< T >::iterator iterator
const_iterator end() const
bool useChannelQualityFromDB_
bool checkChannelQualityForDepth3and4_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
constexpr uint32_t rawId() const
get the raw id
edm::ESGetToken< HcalChannelQuality, HcalChannelQualityRcd > qualToken_
HFPhase1Reconstructor(const edm::ParameterSet &)
edm::ESGetToken< HcalSeverityLevelComputer, HcalSeverityLevelComputerRcd > sevToken_
edm::ParameterSetDescription fillDescriptionForParseHFPhase1AlgoDescription()
edm::EDGetTokenT< HFPreRecHitCollection > tok_PreRecHit_
std::unique_ptr< HcalHF_S9S1algorithm > hfS9S1_
bool dropChannel(const uint32_t &mystatus) const