74 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_;
96 throw cms::Exception(
"HFPhase1BadConfig") <<
"Invalid HFPhase1Reconstructor algorithm configuration" << std::endl;
101 hfS9S1_ = std::make_unique<HcalHF_S9S1algorithm>(psS9S1.
getParameter<std::vector<double> >(
"short_optimumSlope"),
102 psS9S1.
getParameter<std::vector<double> >(
"shortEnergyParams"),
103 psS9S1.
getParameter<std::vector<double> >(
"shortETParams"),
104 psS9S1.
getParameter<std::vector<double> >(
"long_optimumSlope"),
105 psS9S1.
getParameter<std::vector<double> >(
"longEnergyParams"),
106 psS9S1.
getParameter<std::vector<double> >(
"longETParams"),
111 hfS8S1_ = std::make_unique<HcalHF_S9S1algorithm>(psS8S1.getParameter<std::vector<double> >(
"short_optimumSlope"),
112 psS8S1.getParameter<std::vector<double> >(
"shortEnergyParams"),
113 psS8S1.getParameter<std::vector<double> >(
"shortETParams"),
114 psS8S1.getParameter<std::vector<double> >(
"long_optimumSlope"),
115 psS8S1.getParameter<std::vector<double> >(
"longEnergyParams"),
116 psS8S1.getParameter<std::vector<double> >(
"longETParams"),
117 psS8S1.getParameter<
int>(
"HcalAcceptSeverityLevel"),
118 psS8S1.getParameter<
bool>(
"isS8S1"));
121 hfPET_ = std::make_unique<HcalHF_PETalgorithm>(psPET.getParameter<std::vector<double> >(
"short_R"),
122 psPET.getParameter<std::vector<double> >(
"shortEnergyParams"),
123 psPET.getParameter<std::vector<double> >(
"shortETParams"),
124 psPET.getParameter<std::vector<double> >(
"long_R"),
125 psPET.getParameter<std::vector<double> >(
"longEnergyParams"),
126 psPET.getParameter<std::vector<double> >(
"longETParams"),
127 psPET.getParameter<
int>(
"HcalAcceptSeverityLevel"),
128 psPET.getParameter<std::vector<double> >(
"short_R_29"),
129 psPET.getParameter<std::vector<double> >(
"long_R_29"));
142 produces<HFRecHitCollection>();
151 if (
reco_->isConfigurable()) {
155 <<
"Invalid HFPhase1Reconstructor \"algoConfigClass\" parameter value \"" <<
algoConfigClass_ <<
'"' 159 <<
"Failed to configure HFPhase1Reconstructor algorithm from EventSetup" << std::endl;
184 std::unique_ptr<HFRecHitCollection> rec(std::make_unique<HFRecHitCollection>());
185 rec->reserve(preRecHits->
size());
192 const bool thisIsSingleAnodePMT =
false;
195 bool taggedBadByDb[2] = {
false,
false};
199 anodeIds[0] = it->id();
201 for (
unsigned i = 0;
i < 2; ++
i) {
208 taggedBadByDb[0] =
b;
209 taggedBadByDb[1] =
b;
232 int depth =
i->id().depth();
233 int ieta =
i->id().ieta();
235 if (depth == 2 ||
abs(ieta) == 29)
236 hfPET_->HFSetFlagFromPET(*
i, *rec, myqual, mySeverity);
241 int depth =
i->id().depth();
242 int ieta =
i->id().ieta();
244 if (depth == 2 ||
abs(ieta) == 29)
245 hfS8S1_->HFSetFlagFromS9S1(*
i, *rec, myqual, mySeverity);
250 int depth =
i->id().depth();
251 int ieta =
i->id().ieta();
253 if (depth == 1 &&
abs(ieta) != 29)
254 hfS9S1_->HFSetFlagFromS9S1(*
i, *rec, myqual, mySeverity);
266 #define add_param_set(name) \ 267 edm::ParameterSetDescription name; \ 268 name.setAllowAnything(); \ 269 desc.add<edm::ParameterSetDescription>(#name, name) 277 desc.
add<
bool>(
"setNoiseFlags");
278 desc.
add<
bool>(
"runHFStripFilter",
false);
279 desc.
add<
bool>(
"useChannelQualityFromDB");
280 desc.
add<
bool>(
"checkChannelQualityForDepth3and4");
~HFPhase1Reconstructor() override
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void beginRun(const edm::Run &, const edm::EventSetup &) override
std::string algoConfigClass_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static edm::ParameterSetDescription fillDescription()
constexpr uint32_t rawId() const
get the raw id
std::vector< T >::const_iterator const_iterator
const Item * getValues(DetId fId, bool throwOnFail=true) const
std::unique_ptr< AbsHcalAlgoData > fetchHcalAlgoData(const std::string &className, const edm::EventSetup &es)
std::unique_ptr< HcalHF_PETalgorithm > hfPET_
#define add_param_set(name)
void produce(edm::Event &, const edm::EventSetup &) override
std::unique_ptr< HFStripFilter > hfStripFilter_
#define DEFINE_FWK_MODULE(type)
void addDefault(ParameterSetDescription const &psetDescription)
std::unique_ptr< AbsHcalAlgoData > recoConfig_
std::unique_ptr< AbsHFPhase1Algo > reco_
std::unique_ptr< AbsHFPhase1Algo > parseHFPhase1AlgoDescription(const edm::ParameterSet &ps)
Abs< T >::type abs(const T &t)
bool dropChannel(const uint32_t &mystatus) const
static std::unique_ptr< HFStripFilter > parseParameterSet(const edm::ParameterSet &ps)
std::unique_ptr< HcalHF_S9S1algorithm > hfS8S1_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< T >::iterator iterator
const_iterator end() const
bool useChannelQualityFromDB_
bool checkChannelQualityForDepth3and4_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
HFPhase1Reconstructor(const edm::ParameterSet &)
edm::ParameterSetDescription fillDescriptionForParseHFPhase1AlgoDescription()
uint32_t getValue() const
const HcalCalibrations & getHcalCalibrations(const HcalGenericDetId &fId) const
edm::EDGetTokenT< HFPreRecHitCollection > tok_PreRecHit_
std::unique_ptr< HcalHF_S9S1algorithm > hfS9S1_
T const * product() const
HcalDetId secondAnodeId() const
second PMT anode detId for HF dual channels
const_iterator begin() const