68 cleaningAlgo_ = std::make_unique<EcalCleaningAlgo>(cleaningPs);
85 ebUncalibRecHits = pEBUncalibRecHits.
product();
86 LogDebug(
"EcalRecHitDebug") <<
"total # EB uncalibrated rechits: " << ebUncalibRecHits->
size();
89 eeUncalibRecHits = pEEUncalibRecHits.
product();
90 LogDebug(
"EcalRecHitDebug") <<
"total # EE uncalibrated rechits: " << eeUncalibRecHits->
size();
93 auto ebRecHits = std::make_unique<EBRecHitCollection>();
94 auto eeRecHits = std::make_unique<EERecHitCollection>();
103 if (ebUncalibRecHits) {
107 worker_->run(evt, *it, *ebRecHits);
111 if (eeUncalibRecHits) {
115 worker_->run(evt, *it, *eeRecHits);
125 const std::set<EBDetId>* detIds =
nullptr;
132 for (std::set<EBDetId>::const_iterator it = detIds->begin(); it != detIds->end(); ++it) {
136 if (chit != chStatus->
end()) {
137 chStatusCode = *chit;
139 edm::LogError(
"EcalRecHitProducerError") <<
"No channel status found for xtal " << (*it).rawId()
140 <<
"! something wrong with EcalChannelStatus in your DB? ";
160 const std::set<EEDetId>* detIds =
nullptr;
168 for (std::set<EEDetId>::const_iterator it = detIds->begin(); it != detIds->end(); ++it) {
172 if (chit != chStatus->
end()) {
173 chStatusCode = *chit;
175 edm::LogError(
"EcalRecHitProducerError") <<
"No channel status found for xtal " << (*it).rawId()
176 <<
"! something wrong with EcalChannelStatus in your DB? ";
196 const std::set<EcalTrigTowerDetId>* ttIds =
nullptr;
202 for (std::set<EcalTrigTowerDetId>::const_iterator it = ttIds->begin(); it != ttIds->end(); ++it) {
204 int ieta = (((*it).ietaAbs() - 1) * 5 + 1) * (*it).zside();
205 int iphi = (((*it).iphi() - 1) * 5 + 11) % 360;
217 const std::set<EcalScDetId>* scIds =
nullptr;
223 for (std::set<EcalScDetId>::const_iterator it = scIds->begin(); it != scIds->end(); ++it) {
225 if (
EEDetId::validDetId(((*it).ix() - 1) * 5 + 1, ((*it).iy() - 1) * 5 + 1, (*it).zside())) {
250 LogInfo(
"EcalRecHitInfo") <<
"total # EB calibrated rechits: " << ebRecHits->size();
251 LogInfo(
"EcalRecHitInfo") <<
"total # EE calibrated rechits: " << eeRecHits->size();
259 desc.
add<
bool>(
"recoverEEVFE",
false);
261 desc.
add<
bool>(
"recoverEBIsolatedChannels",
false);
262 desc.
add<
bool>(
"recoverEBVFE",
false);
263 desc.
add<
bool>(
"laserCorrection",
true);
264 desc.
add<
double>(
"EBLaserMIN", 0.5);
265 desc.
add<
bool>(
"killDeadChannels",
true);
267 std::vector<int> temp1;
271 temp1.push_back(142);
272 desc.
add<std::vector<int>>(
"dbStatusToBeExcludedEB", temp1);
275 edm::InputTag(
"ecalMultiFitUncalibRecHit",
"EcalUncalibRecHitsEE"));
277 std::vector<int> temp1;
281 temp1.push_back(142);
282 desc.
add<std::vector<int>>(
"dbStatusToBeExcludedEE", temp1);
284 desc.
add<
double>(
"EELaserMIN", 0.5);
288 psd0.
add<
double>(
"e6e2thresh", 0.04);
289 psd0.
add<
double>(
"tightenCrack_e6e2_double", 3);
290 psd0.
add<
double>(
"e4e1Threshold_endcap", 0.3);
291 psd0.
add<
double>(
"tightenCrack_e4e1_single", 3);
292 psd0.
add<
double>(
"tightenCrack_e1_double", 2);
293 psd0.
add<
double>(
"cThreshold_barrel", 4);
294 psd0.
add<
double>(
"e4e1Threshold_barrel", 0.08);
295 psd0.
add<
double>(
"tightenCrack_e1_single", 2);
296 psd0.
add<
double>(
"e4e1_b_barrel", -0.024);
297 psd0.
add<
double>(
"e4e1_a_barrel", 0.04);
298 psd0.
add<
double>(
"ignoreOutOfTimeThresh", 1000000000.0);
299 psd0.
add<
double>(
"cThreshold_endcap", 15);
300 psd0.
add<
double>(
"e4e1_b_endcap", -0.0125);
301 psd0.
add<
double>(
"e4e1_a_endcap", 0.02);
302 psd0.
add<
double>(
"cThreshold_double", 10);
305 desc.
add<
double>(
"logWarningEtThreshold_EE_FE", 50);
307 desc.
add<
bool>(
"recoverEBFE",
true);
310 desc.
add<
double>(
"singleChannelRecoveryThreshold", 8);
311 desc.
add<
double>(
"sum8ChannelRecoveryThreshold", 0.);
313 edm::FileInPath(
"RecoLocalCalo/EcalDeadChannelRecoveryAlgos/data/BDTWeights/"
314 "bdtgAllRH_8GT700MeV_noCracks_ZskimData2017_v1.xml"));
316 edm::FileInPath(
"RecoLocalCalo/EcalDeadChannelRecoveryAlgos/data/BDTWeights/"
317 "bdtgAllRH_8GT700MeV_onlyCracks_ZskimData2017_v1.xml"));
319 std::vector<std::string> temp1;
321 temp1.push_back(
"kNoisy");
322 temp1.push_back(
"kNNoisy");
323 temp1.push_back(
"kFixedG6");
324 temp1.push_back(
"kFixedG1");
325 temp1.push_back(
"kFixedG0");
326 temp1.push_back(
"kNonRespondingIsolated");
327 temp1.push_back(
"kDeadVFE");
328 temp1.push_back(
"kDeadFE");
329 temp1.push_back(
"kNoDataNoTP");
330 desc.
add<std::vector<std::string>>(
"ChannelStatusToBeExcluded", temp1);
334 desc.
add<
bool>(
"recoverEEFE",
true);
335 desc.
add<
std::string>(
"singleChannelRecoveryMethod",
"NeuralNetworks");
336 desc.
add<
double>(
"EBLaserMAX", 3.0);
340 std::vector<std::string> temp2;
342 temp2.push_back(
"kOk");
343 temp2.push_back(
"kDAC");
344 temp2.push_back(
"kNoLaser");
345 temp2.push_back(
"kNoisy");
346 psd0.
add<std::vector<std::string>>(
"kGood", temp2);
349 std::vector<std::string> temp2;
351 temp2.push_back(
"kFixedG0");
352 temp2.push_back(
"kNonRespondingIsolated");
353 temp2.push_back(
"kDeadVFE");
354 psd0.
add<std::vector<std::string>>(
"kNeighboursRecovered", temp2);
357 std::vector<std::string> temp2;
359 temp2.push_back(
"kNoDataNoTP");
360 psd0.
add<std::vector<std::string>>(
"kDead", temp2);
363 std::vector<std::string> temp2;
365 temp2.push_back(
"kNNoisy");
366 temp2.push_back(
"kFixedG6");
367 temp2.push_back(
"kFixedG1");
368 psd0.
add<std::vector<std::string>>(
"kNoisy", temp2);
371 std::vector<std::string> temp2;
373 temp2.push_back(
"kDeadFE");
374 psd0.
add<std::vector<std::string>>(
"kTowerRecovered", temp2);
379 edm::InputTag(
"ecalMultiFitUncalibRecHit",
"EcalUncalibRecHitsEB"));
382 desc.
add<
double>(
"EELaserMAX", 8.0);
383 desc.
add<
double>(
"logWarningEtThreshold_EB_FE", 50);
384 desc.
add<
bool>(
"recoverEEIsolatedChannels",
false);
385 desc.
add<
bool>(
"skipTimeCalib",
false);
386 descriptions.
add(
"ecalRecHit", desc);