75 cleaningAlgo_ = std::make_unique<EcalCleaningAlgo>(cleaningPs);
94 ebUncalibRecHits = pEBUncalibRecHits.
product();
95 LogDebug(
"EcalRecHitDebug") <<
"total # EB uncalibrated rechits: " << ebUncalibRecHits->
size();
100 eeUncalibRecHits = pEEUncalibRecHits.
product();
101 LogDebug(
"EcalRecHitDebug") <<
"total # EE uncalibrated rechits: " << eeUncalibRecHits->
size();
104 auto ebRecHits = std::make_unique<EBRecHitCollection>();
105 auto eeRecHits = std::make_unique<EERecHitCollection>();
116 if (ebUncalibRecHits)
120 worker_->run(evt, *it, *ebRecHits);
124 if (eeUncalibRecHits)
128 worker_->run(evt, *it, *eeRecHits);
139 const std::set<EBDetId> * detIds =
nullptr;
147 for( std::set<EBDetId>::const_iterator it = detIds->begin(); it != detIds->end(); ++it ) {
151 if ( chit != chStatus->
end() ) {
152 chStatusCode = *chit;
154 edm::LogError(
"EcalRecHitProducerError") <<
"No channel status found for xtal " 156 <<
"! something wrong with EcalChannelStatus in your DB? ";
176 const std::set<EEDetId> * detIds =
nullptr;
184 for( std::set<EEDetId>::const_iterator it = detIds->begin(); it != detIds->end(); ++it ) {
188 if ( chit != chStatus->
end() ) {
189 chStatusCode = *chit;
191 edm::LogError(
"EcalRecHitProducerError") <<
"No channel status found for xtal " 193 <<
"! something wrong with EcalChannelStatus in your DB? ";
212 const std::set<EcalTrigTowerDetId> * ttIds =
nullptr;
218 for( std::set<EcalTrigTowerDetId>::const_iterator it = ttIds->begin(); it != ttIds->end(); ++it ) {
220 int ieta = (((*it).ietaAbs()-1)*5+1)*(*it).zside();
221 int iphi = (((*it).iphi()-1)*5+11)%360;
222 if( iphi <= 0 ) iphi += 360;
232 const std::set<EcalScDetId> * scIds =
nullptr;
239 for( std::set<EcalScDetId>::const_iterator it = scIds->begin(); it != scIds->end(); ++it ) {
262 LogInfo(
"EcalRecHitInfo") <<
"total # EB calibrated rechits: " << ebRecHits->size();
263 LogInfo(
"EcalRecHitInfo") <<
"total # EE calibrated rechits: " << eeRecHits->size();
271 desc.
add<
bool>(
"recoverEEVFE",
false);
273 desc.
add<
bool>(
"recoverEBIsolatedChannels",
false);
274 desc.
add<
bool>(
"recoverEBVFE",
false);
275 desc.
add<
bool>(
"laserCorrection",
true);
276 desc.
add<
double>(
"EBLaserMIN",0.5);
277 desc.
add<
bool>(
"killDeadChannels",
true);
279 std::vector<int> temp1;
283 temp1.push_back(142);
284 desc.
add<std::vector<int> >(
"dbStatusToBeExcludedEB",temp1);
288 std::vector<int> temp1;
292 temp1.push_back(142);
293 desc.
add<std::vector<int> >(
"dbStatusToBeExcludedEE",temp1);
295 desc.
add<
double>(
"EELaserMIN",0.5);
299 psd0.
add<
double>(
"e6e2thresh",0.04);
300 psd0.
add<
double>(
"tightenCrack_e6e2_double",3);
301 psd0.
add<
double>(
"e4e1Threshold_endcap",0.3);
302 psd0.
add<
double>(
"tightenCrack_e4e1_single",3);
303 psd0.
add<
double>(
"tightenCrack_e1_double",2);
304 psd0.
add<
double>(
"cThreshold_barrel",4);
305 psd0.
add<
double>(
"e4e1Threshold_barrel",0.08);
306 psd0.
add<
double>(
"tightenCrack_e1_single",2);
307 psd0.
add<
double>(
"e4e1_b_barrel",-0.024);
308 psd0.
add<
double>(
"e4e1_a_barrel",0.04);
309 psd0.
add<
double>(
"ignoreOutOfTimeThresh",1000000000.0);
310 psd0.
add<
double>(
"cThreshold_endcap",15);
311 psd0.
add<
double>(
"e4e1_b_endcap",-0.0125);
312 psd0.
add<
double>(
"e4e1_a_endcap",0.02);
313 psd0.
add<
double>(
"cThreshold_double",10);
316 desc.
add<
double>(
"logWarningEtThreshold_EE_FE",50);
318 desc.
add<
bool>(
"recoverEBFE",
true);
321 desc.
add<
double>(
"singleChannelRecoveryThreshold",8);
323 std::vector<std::string> temp1;
325 temp1.push_back(
"kNoisy");
326 temp1.push_back(
"kNNoisy");
327 temp1.push_back(
"kFixedG6");
328 temp1.push_back(
"kFixedG1");
329 temp1.push_back(
"kFixedG0");
330 temp1.push_back(
"kNonRespondingIsolated");
331 temp1.push_back(
"kDeadVFE");
332 temp1.push_back(
"kDeadFE");
333 temp1.push_back(
"kNoDataNoTP");
334 desc.
add<std::vector<std::string> >(
"ChannelStatusToBeExcluded",temp1);
338 desc.
add<
bool>(
"recoverEEFE",
true);
339 desc.
add<
std::string>(
"singleChannelRecoveryMethod",
"NeuralNetworks");
340 desc.
add<
double>(
"EBLaserMAX",3.0);
344 std::vector<std::string> temp2;
346 temp2.push_back(
"kOk");
347 temp2.push_back(
"kDAC");
348 temp2.push_back(
"kNoLaser");
349 temp2.push_back(
"kNoisy");
350 psd0.
add<std::vector<std::string> >(
"kGood",temp2);
353 std::vector<std::string> temp2;
355 temp2.push_back(
"kFixedG0");
356 temp2.push_back(
"kNonRespondingIsolated");
357 temp2.push_back(
"kDeadVFE");
358 psd0.
add<std::vector<std::string> >(
"kNeighboursRecovered",temp2);
361 std::vector<std::string> temp2;
363 temp2.push_back(
"kNoDataNoTP");
364 psd0.
add<std::vector<std::string> >(
"kDead",temp2);
367 std::vector<std::string> temp2;
369 temp2.push_back(
"kNNoisy");
370 temp2.push_back(
"kFixedG6");
371 temp2.push_back(
"kFixedG1");
372 psd0.
add<std::vector<std::string> >(
"kNoisy",temp2);
375 std::vector<std::string> temp2;
377 temp2.push_back(
"kDeadFE");
378 psd0.
add<std::vector<std::string> >(
"kTowerRecovered",temp2);
385 desc.
add<
double>(
"EELaserMAX",8.0);
386 desc.
add<
double>(
"logWarningEtThreshold_EB_FE",50);
387 desc.
add<
bool>(
"recoverEEIsolatedChannels",
false);
388 desc.
add<
bool>(
"skipTimeCalib",
false);
389 descriptions.
add(
"ecalRecHit",desc);
std::string eeRechitCollection_
T getParameter(std::string const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void reserve(SetDescriptionEntries::size_type n)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::unique_ptr< EcalCleaningAlgo > cleaningAlgo_
Code getStatusCode() const
return decoded status
std::vector< T >::const_iterator const_iterator
bool recoverEEIsolatedChannels_
~EcalRecHitProducer() override
EcalRecHitProducer(const edm::ParameterSet &ps)
#define DEFINE_FWK_MODULE(type)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< EEUncalibratedRecHitCollection > eeUncalibRecHitToken_
edm::EDGetTokenT< std::set< EcalScDetId > > eeFEToBeRecoveredToken_
static const int ETAPHIMODE
edm::EDGetTokenT< EBUncalibratedRecHitCollection > ebUncalibRecHitToken_
const_iterator end() const
edm::EDGetTokenT< std::set< EBDetId > > ebDetIdToBeRecoveredToken_
T const * product() const
std::unique_ptr< EcalRecHitWorkerBaseClass > workerRecover_
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
std::string ebRechitCollection_
std::vector< Item >::const_iterator const_iterator
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void produce(edm::Event &evt, const edm::EventSetup &es) override
const_iterator find(uint32_t rawId) const
const_iterator end() const
std::unique_ptr< EcalRecHitWorkerBaseClass > worker_
edm::EDGetTokenT< std::set< EEDetId > > eeDetIdToBeRecoveredToken_
T get(const Candidate &c)
const_iterator begin() const
edm::EDGetTokenT< std::set< EcalTrigTowerDetId > > ebFEToBeRecoveredToken_
bool recoverEBIsolatedChannels_