27 recoverEBIsolatedChannels_(ps.getParameter<
bool>(
"recoverEBIsolatedChannels")),
28 recoverEEIsolatedChannels_(ps.getParameter<
bool>(
"recoverEEIsolatedChannels")),
29 recoverEBVFE_(ps.getParameter<
bool>(
"recoverEBVFE")),
30 recoverEEVFE_(ps.getParameter<
bool>(
"recoverEEVFE")),
31 recoverEBFE_(ps.getParameter<
bool>(
"recoverEBFE")),
32 recoverEEFE_(ps.getParameter<
bool>(
"recoverEEFE")),
33 killDeadChannels_(ps.getParameter<
bool>(
"killDeadChannels")),
76 cleaningAlgo_ = std::make_unique<EcalCleaningAlgo>(cleaningPs);
85 auto ebRecHits = std::make_unique<EBRecHitCollection>();
86 auto eeRecHits = std::make_unique<EERecHitCollection>();
98 LogDebug(
"EcalRecHitDebug") <<
"total # EB uncalibrated rechits: " << ebUncalibRecHits.size();
101 for (
const auto& uncalibRecHit : ebUncalibRecHits) {
102 worker_->run(evt, uncalibRecHit, *ebRecHits);
109 LogDebug(
"EcalRecHitDebug") <<
"total # EE uncalibrated rechits: " << eeUncalibRecHits.size();
112 for (
const auto& uncalibRecHit : eeUncalibRecHits) {
113 worker_->run(evt, uncalibRecHit, *eeRecHits);
125 for (
const auto& detId : detIds) {
129 if (chit != chStatus.end()) {
130 chStatusCode = *chit;
132 edm::LogError(
"EcalRecHitProducerError") <<
"No channel status found for xtal " << detId.rawId()
133 <<
"! something wrong with EcalChannelStatus in your DB? ";
154 for (
const auto& detId : detIds) {
158 if (chit != chStatus.end()) {
159 chStatusCode = *chit;
161 edm::LogError(
"EcalRecHitProducerError") <<
"No channel status found for xtal " << detId.rawId()
162 <<
"! something wrong with EcalChannelStatus in your DB? ";
182 for (
const auto&
ttId : ttIds) {
184 int ieta = ((
ttId.ietaAbs() - 1) * 5 + 1) *
ttId.zside();
185 int iphi = ((
ttId.iphi() - 1) * 5 + 11) % 360;
197 for (
const auto& scId : scIds) {
223 LogInfo(
"EcalRecHitInfo") <<
"total # EB calibrated rechits: " << ebRecHits->size();
224 LogInfo(
"EcalRecHitInfo") <<
"total # EE calibrated rechits: " << eeRecHits->size();
232 desc.add<
bool>(
"recoverEEVFE",
false);
234 desc.add<
bool>(
"recoverEBIsolatedChannels",
false);
235 desc.add<
bool>(
"recoverEBVFE",
false);
236 desc.add<
bool>(
"laserCorrection",
true);
237 desc.add<
double>(
"EBLaserMIN", 0.5);
238 desc.add<
bool>(
"killDeadChannels",
true);
240 std::vector<int> temp1;
244 temp1.push_back(142);
245 desc.add<std::vector<int>>(
"dbStatusToBeExcludedEB", temp1);
248 edm::InputTag(
"ecalMultiFitUncalibRecHit",
"EcalUncalibRecHitsEE"));
250 std::vector<int> temp1;
254 temp1.push_back(142);
255 desc.add<std::vector<int>>(
"dbStatusToBeExcludedEE", temp1);
257 desc.add<
double>(
"EELaserMIN", 0.5);
261 psd0.
add<
double>(
"e6e2thresh", 0.04);
262 psd0.
add<
double>(
"tightenCrack_e6e2_double", 3);
263 psd0.
add<
double>(
"e4e1Threshold_endcap", 0.3);
264 psd0.
add<
double>(
"tightenCrack_e4e1_single", 3);
265 psd0.
add<
double>(
"tightenCrack_e1_double", 2);
266 psd0.
add<
double>(
"cThreshold_barrel", 4);
267 psd0.
add<
double>(
"e4e1Threshold_barrel", 0.08);
268 psd0.
add<
double>(
"tightenCrack_e1_single", 2);
269 psd0.
add<
double>(
"e4e1_b_barrel", -0.024);
270 psd0.
add<
double>(
"e4e1_a_barrel", 0.04);
271 psd0.
add<
double>(
"ignoreOutOfTimeThresh", 1000000000.0);
272 psd0.
add<
double>(
"cThreshold_endcap", 15);
273 psd0.
add<
double>(
"e4e1_b_endcap", -0.0125);
274 psd0.
add<
double>(
"e4e1_a_endcap", 0.02);
275 psd0.
add<
double>(
"cThreshold_double", 10);
278 desc.add<
double>(
"logWarningEtThreshold_EE_FE", 50);
280 desc.add<
bool>(
"recoverEBFE",
true);
283 desc.add<
double>(
"singleChannelRecoveryThreshold", 8);
284 desc.add<
double>(
"sum8ChannelRecoveryThreshold", 0.);
286 edm::FileInPath(
"RecoLocalCalo/EcalDeadChannelRecoveryAlgos/data/BDTWeights/" 287 "bdtgAllRH_8GT700MeV_noCracks_ZskimData2017_v1.xml"));
289 edm::FileInPath(
"RecoLocalCalo/EcalDeadChannelRecoveryAlgos/data/BDTWeights/" 290 "bdtgAllRH_8GT700MeV_onlyCracks_ZskimData2017_v1.xml"));
292 std::vector<std::string> temp1;
294 temp1.push_back(
"kNoisy");
295 temp1.push_back(
"kNNoisy");
296 temp1.push_back(
"kFixedG6");
297 temp1.push_back(
"kFixedG1");
298 temp1.push_back(
"kFixedG0");
299 temp1.push_back(
"kNonRespondingIsolated");
300 temp1.push_back(
"kDeadVFE");
301 temp1.push_back(
"kDeadFE");
302 temp1.push_back(
"kNoDataNoTP");
303 desc.add<std::vector<std::string>>(
"ChannelStatusToBeExcluded", temp1);
307 desc.add<
bool>(
"recoverEEFE",
true);
308 desc.add<
std::string>(
"singleChannelRecoveryMethod",
"NeuralNetworks");
309 desc.add<
double>(
"EBLaserMAX", 3.0);
313 std::vector<std::string> temp2;
315 temp2.push_back(
"kOk");
316 temp2.push_back(
"kDAC");
317 temp2.push_back(
"kNoLaser");
318 temp2.push_back(
"kNoisy");
319 psd0.
add<std::vector<std::string>>(
"kGood", temp2);
322 std::vector<std::string> temp2;
324 temp2.push_back(
"kFixedG0");
325 temp2.push_back(
"kNonRespondingIsolated");
326 temp2.push_back(
"kDeadVFE");
327 psd0.
add<std::vector<std::string>>(
"kNeighboursRecovered", temp2);
330 std::vector<std::string> temp2;
332 temp2.push_back(
"kNoDataNoTP");
333 psd0.
add<std::vector<std::string>>(
"kDead", temp2);
336 std::vector<std::string> temp2;
338 temp2.push_back(
"kNNoisy");
339 temp2.push_back(
"kFixedG6");
340 temp2.push_back(
"kFixedG1");
341 psd0.
add<std::vector<std::string>>(
"kNoisy", temp2);
344 std::vector<std::string> temp2;
346 temp2.push_back(
"kDeadFE");
347 psd0.
add<std::vector<std::string>>(
"kTowerRecovered", temp2);
352 edm::InputTag(
"ecalMultiFitUncalibRecHit",
"EcalUncalibRecHitsEB"));
355 desc.add<
double>(
"EELaserMAX", 8.0);
356 desc.add<
double>(
"logWarningEtThreshold_EB_FE", 50);
357 desc.add<
bool>(
"recoverEEIsolatedChannels",
false);
358 desc.add<
bool>(
"skipTimeCalib",
false);
359 descriptions.
add(
"ecalRecHit",
desc);
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const bool killDeadChannels_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void reserve(SetDescriptionEntries::size_type n)
bool get(ProductID const &oid, Handle< PROD > &result) const
std::unique_ptr< EcalCleaningAlgo > cleaningAlgo_
#define DEFINE_FWK_MODULE(type)
Log< level::Error, false > LogError
~EcalRecHitProducer() override
EcalRecHitProducer(const edm::ParameterSet &ps)
unsigned ttId(DetId const &, EcalElectronicsMapping const *)
const edm::EDPutTokenT< EBRecHitCollection > ebRecHitToken_
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > ecalChannelStatusToken_
const bool recoverEBIsolatedChannels_
bool getData(T &iHolder) const
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< EEUncalibratedRecHitCollection > eeUncalibRecHitToken_
const edm::EDPutTokenT< EERecHitCollection > eeRecHitToken_
static const int ETAPHIMODE
const bool recoverEEIsolatedChannels_
edm::EDGetTokenT< EBUncalibratedRecHitCollection > ebUncalibRecHitToken_
Log< level::Info, false > LogInfo
edm::EDGetTokenT< std::set< EBDetId > > ebDetIdToBeRecoveredToken_
std::unique_ptr< EcalRecHitWorkerBaseClass > workerRecover_
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
std::vector< Item >::const_iterator const_iterator
edm::EDGetTokenT< std::set< EcalScDetId > > eeFEToBeRecoveredToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Code getStatusCode() const
return decoded status
void produce(edm::Event &evt, const edm::EventSetup &es) override
std::unique_ptr< EcalRecHitWorkerBaseClass > worker_
edm::EDGetTokenT< std::set< EEDetId > > eeDetIdToBeRecoveredToken_
edm::EDGetTokenT< std::set< EcalTrigTowerDetId > > ebFEToBeRecoveredToken_