73 std::unique_ptr<AbsHFPhase1Algo>
reco_;
77 std::unique_ptr<HcalHF_S9S1algorithm>
hfS9S1_;
78 std::unique_ptr<HcalHF_S9S1algorithm>
hfS8S1_;
79 std::unique_ptr<HcalHF_PETalgorithm>
hfPET_;
95 <<
"Invalid HFPhase1Reconstructor algorithm configuration" 102 hfS9S1_ = std::make_unique<HcalHF_S9S1algorithm>(
103 psS9S1.
getParameter<std::vector<double> >(
"short_optimumSlope"),
104 psS9S1.
getParameter<std::vector<double> >(
"shortEnergyParams"),
105 psS9S1.
getParameter<std::vector<double> >(
"shortETParams"),
106 psS9S1.
getParameter<std::vector<double> >(
"long_optimumSlope"),
107 psS9S1.
getParameter<std::vector<double> >(
"longEnergyParams"),
108 psS9S1.
getParameter<std::vector<double> >(
"longETParams"),
113 hfS8S1_ = std::make_unique<HcalHF_S9S1algorithm>(
114 psS8S1.getParameter<std::vector<double> >(
"short_optimumSlope"),
115 psS8S1.getParameter<std::vector<double> >(
"shortEnergyParams"),
116 psS8S1.getParameter<std::vector<double> >(
"shortETParams"),
117 psS8S1.getParameter<std::vector<double> >(
"long_optimumSlope"),
118 psS8S1.getParameter<std::vector<double> >(
"longEnergyParams"),
119 psS8S1.getParameter<std::vector<double> >(
"longETParams"),
120 psS8S1.getParameter<
int>(
"HcalAcceptSeverityLevel"),
121 psS8S1.getParameter<
bool>(
"isS8S1") );
124 hfPET_ = std::make_unique<HcalHF_PETalgorithm>(
125 psPET.getParameter<std::vector<double> >(
"short_R"),
126 psPET.getParameter<std::vector<double> >(
"shortEnergyParams"),
127 psPET.getParameter<std::vector<double> >(
"shortETParams"),
128 psPET.getParameter<std::vector<double> >(
"long_R"),
129 psPET.getParameter<std::vector<double> >(
"longEnergyParams"),
130 psPET.getParameter<std::vector<double> >(
"longETParams"),
131 psPET.getParameter<
int>(
"HcalAcceptSeverityLevel"),
132 psPET.getParameter<std::vector<double> >(
"short_R_29"),
133 psPET.getParameter<std::vector<double> >(
"long_R_29") );
141 produces<HFRecHitCollection>();
157 if (
reco_->isConfigurable())
162 <<
"Invalid HFPhase1Reconstructor \"algoConfigClass\" parameter value \"" 166 <<
"Failed to configure HFPhase1Reconstructor algorithm from EventSetup" 194 std::unique_ptr<HFRecHitCollection> rec(std::make_unique<HFRecHitCollection>());
195 rec->reserve(preRecHits->
size());
199 it != preRecHits->
end(); ++it)
204 const bool thisIsSingleAnodePMT =
false;
207 bool taggedBadByDb[2] = {
false,
false};
213 anodeIds[0] = it->id();
215 for (
unsigned i=0;
i<2; ++
i)
225 taggedBadByDb[0] =
b;
226 taggedBadByDb[1] =
b;
233 taggedBadByDb, thisIsSingleAnodePMT);
252 int depth=
i->id().depth();
253 int ieta=
i->id().ieta();
255 if (depth==2 ||
abs(ieta)==29 )
256 hfPET_->HFSetFlagFromPET(*
i, *rec, myqual, mySeverity);
262 int depth=
i->id().depth();
263 int ieta=
i->id().ieta();
265 if (depth==2 ||
abs(ieta)==29 )
266 hfS8S1_->HFSetFlagFromS9S1(*
i, *rec, myqual, mySeverity);
272 int depth=
i->id().depth();
273 int ieta=
i->id().ieta();
275 if (depth==1 &&
abs(ieta)!=29 )
276 hfS9S1_->HFSetFlagFromS9S1(*
i, *rec, myqual, mySeverity);
284 #define add_param_set(name) \ 285 edm::ParameterSetDescription name; \ 286 name.setAllowAnything(); \ 287 desc.add<edm::ParameterSetDescription>(#name, name) 297 desc.
add<
bool>(
"setNoiseFlags");
298 desc.
add<
bool>(
"useChannelQualityFromDB");
299 desc.
add<
bool>(
"checkChannelQualityForDepth3and4");
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
std::string algoConfigClass_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::vector< HFPreRecHit >::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)
uint32_t rawId() const
get the raw id
std::unique_ptr< HcalHF_PETalgorithm > hfPET_
#define add_param_set(name)
virtual void produce(edm::Event &, const edm::EventSetup &) override
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
std::unique_ptr< HcalHF_S9S1algorithm > hfS8S1_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< HFRecHit >::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