CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
EcalRecHitWorkerRecover Class Reference

#include <EcalRecHitWorkerRecover.h>

Inheritance diagram for EcalRecHitWorkerRecover:
EcalRecHitWorkerBaseClass

Public Member Functions

 EcalRecHitWorkerRecover (const edm::ParameterSet &, edm::ConsumesCollector &c)
 
bool run (const edm::Event &evt, const EcalUncalibratedRecHit &uncalibRH, EcalRecHitCollection &result) override
 
void set (const edm::EventSetup &es) override
 
 ~EcalRecHitWorkerRecover () override
 
- Public Member Functions inherited from EcalRecHitWorkerBaseClass
 EcalRecHitWorkerBaseClass (const edm::ParameterSet &)
 
 EcalRecHitWorkerBaseClass (const edm::ParameterSet &, edm::ConsumesCollector &c)
 
virtual ~EcalRecHitWorkerBaseClass ()
 

Protected Member Functions

bool alreadyInserted (const DetId &id)
 
bool checkChannelStatus (const DetId &id, const std::vector< int > &statusestoexclude)
 
float estimateEnergy (int ieta, EcalRecHitCollection *hits, const std::set< DetId > &sId, const std::vector< DetId > &vId)
 
void insertRecHit (const EcalRecHit &hit, EcalRecHitCollection &collection)
 
float recCheckCalib (float energy, int ieta)
 

Protected Attributes

edm::ESHandle< CaloGeometrycaloGeometry_
 
edm::ESHandle< CaloTopologycaloTopology_
 
edm::ESHandle< EcalChannelStatuschStatus_
 
std::vector< int > dbStatusToBeExcludedEB_
 
std::vector< int > dbStatusToBeExcludedEE_
 
EcalDeadChannelRecoveryAlgos< EBDetIdebDeadChannelCorrector
 
const CaloSubdetectorGeometryebGeom_
 
const EcalElectronicsMappingecalMapping_
 
EcalTPGScale ecalScale_
 
EcalDeadChannelRecoveryAlgos< EEDetIdeeDeadChannelCorrector
 
const CaloGeometrygeo_
 
bool killDeadChannels_
 
edm::ESHandle< EcalLaserDbServicelaser
 
double logWarningEtThreshold_EB_FE_
 
double logWarningEtThreshold_EE_FE_
 
edm::ESHandle< CaloSubdetectorGeometrypEBGeom_
 
edm::ESHandle< EcalElectronicsMappingpEcalMapping_
 
std::unique_ptr< EcalRecHitSimpleAlgorechitMaker_
 
bool recoverEBFE_
 
bool recoverEBIsolatedChannels_
 
bool recoverEBVFE_
 
std::set< DetIdrecoveredDetIds_EB_
 
std::set< DetIdrecoveredDetIds_EE_
 
bool recoverEEFE_
 
bool recoverEEIsolatedChannels_
 
bool recoverEEVFE_
 
std::string singleRecoveryMethod_
 
double singleRecoveryThreshold_
 
double sum8RecoveryThreshold_
 
edm::EDGetTokenT< EcalTrigPrimDigiCollectiontpDigiToken_
 
EcalTPGScale tpgscale_
 
edm::ESHandle< EcalTrigTowerConstituentsMapttMap_
 

Additional Inherited Members

- Public Types inherited from EcalRecHitWorkerBaseClass
enum  RecoveryFlags {
  EB_single, EE_single, EB_VFE, EE_VFE,
  EB_FE, EE_FE
}
 

Detailed Description

Algorithms to recover dead channels

Definition at line 30 of file EcalRecHitWorkerRecover.h.

Constructor & Destructor Documentation

◆ EcalRecHitWorkerRecover()

EcalRecHitWorkerRecover::EcalRecHitWorkerRecover ( const edm::ParameterSet ps,
edm::ConsumesCollector c 
)

Definition at line 21 of file EcalRecHitWorkerRecover.cc.

23  rechitMaker_ = std::make_unique<EcalRecHitSimpleAlgo>();
24  // isolated channel recovery
25  singleRecoveryMethod_ = ps.getParameter<std::string>("singleChannelRecoveryMethod");
26  singleRecoveryThreshold_ = ps.getParameter<double>("singleChannelRecoveryThreshold");
27  sum8RecoveryThreshold_ = ps.getParameter<double>("sum8ChannelRecoveryThreshold");
28  killDeadChannels_ = ps.getParameter<bool>("killDeadChannels");
29  recoverEBIsolatedChannels_ = ps.getParameter<bool>("recoverEBIsolatedChannels");
30  recoverEEIsolatedChannels_ = ps.getParameter<bool>("recoverEEIsolatedChannels");
31  recoverEBVFE_ = ps.getParameter<bool>("recoverEBVFE");
32  recoverEEVFE_ = ps.getParameter<bool>("recoverEEVFE");
33  recoverEBFE_ = ps.getParameter<bool>("recoverEBFE");
34  recoverEEFE_ = ps.getParameter<bool>("recoverEEFE");
35 
36  dbStatusToBeExcludedEE_ = ps.getParameter<std::vector<int> >("dbStatusToBeExcludedEE");
37  dbStatusToBeExcludedEB_ = ps.getParameter<std::vector<int> >("dbStatusToBeExcludedEB");
38 
39  logWarningEtThreshold_EB_FE_ = ps.getParameter<double>("logWarningEtThreshold_EB_FE");
40  logWarningEtThreshold_EE_FE_ = ps.getParameter<double>("logWarningEtThreshold_EE_FE");
41 
42  tpDigiToken_ =
43  c.consumes<EcalTrigPrimDigiCollection>(ps.getParameter<edm::InputTag>("triggerPrimitiveDigiCollection"));
44 
47 }

References HltBtagPostValidation_cff::c, dbStatusToBeExcludedEB_, dbStatusToBeExcludedEE_, ebDeadChannelCorrector, edm::ParameterSet::getParameter(), killDeadChannels_, logWarningEtThreshold_EB_FE_, logWarningEtThreshold_EE_FE_, rechitMaker_, recoverEBFE_, recoverEBIsolatedChannels_, recoverEBVFE_, recoverEEFE_, recoverEEIsolatedChannels_, recoverEEVFE_, EcalDeadChannelRecoveryAlgos< DetIdT >::setParameters(), singleRecoveryMethod_, singleRecoveryThreshold_, AlCaHLTBitMon_QueryRunRegistry::string, sum8RecoveryThreshold_, and tpDigiToken_.

◆ ~EcalRecHitWorkerRecover()

EcalRecHitWorkerRecover::~EcalRecHitWorkerRecover ( )
inlineoverride

Definition at line 33 of file EcalRecHitWorkerRecover.h.

33 {};

Member Function Documentation

◆ alreadyInserted()

bool EcalRecHitWorkerRecover::alreadyInserted ( const DetId id)
protected

Definition at line 407 of file EcalRecHitWorkerRecover.cc.

407  {
408  bool res = false;
409  if (id.subdetId() == EcalBarrel) {
410  res = (recoveredDetIds_EB_.find(id) != recoveredDetIds_EB_.end());
411  } else if (id.subdetId() == EcalEndcap) {
412  res = (recoveredDetIds_EE_.find(id) != recoveredDetIds_EE_.end());
413  } else {
414  edm::LogError("EcalRecHitWorkerRecover::InvalidDetId") << "Invalid DetId " << id.rawId();
415  }
416  return res;
417 }

References EcalBarrel, EcalEndcap, recoveredDetIds_EB_, and recoveredDetIds_EE_.

Referenced by insertRecHit(), and run().

◆ checkChannelStatus()

bool EcalRecHitWorkerRecover::checkChannelStatus ( const DetId id,
const std::vector< int > &  statusestoexclude 
)
protected

Definition at line 426 of file EcalRecHitWorkerRecover.cc.

426  {
427  if (!chStatus_.isValid())
428  edm::LogError("ObjectNotFound") << "Channel Status not set";
429 
431  uint16_t dbStatus = 0;
432  if (chIt != chStatus_->end()) {
433  dbStatus = chIt->getEncodedStatusCode();
434  } else {
435  edm::LogError("ObjectNotFound") << "No channel status found for xtal " << id.rawId()
436  << "! something wrong with EcalChannelStatus in your DB? ";
437  }
438 
439  for (std::vector<int>::const_iterator status = statusestoexclude.begin(); status != statusestoexclude.end();
440  ++status) {
441  if (*status == dbStatus)
442  return false;
443  }
444 
445  return true;
446 }

References chStatus_, and mps_update::status.

Referenced by run().

◆ estimateEnergy()

float EcalRecHitWorkerRecover::estimateEnergy ( int  ieta,
EcalRecHitCollection hits,
const std::set< DetId > &  sId,
const std::vector< DetId > &  vId 
)
protected

Definition at line 356 of file EcalRecHitWorkerRecover.cc.

359  {
360  float xtalE = 0;
361  int count = 0;
362  for (std::vector<DetId>::const_iterator vIdit = vId.begin(); vIdit != vId.end(); ++vIdit) {
363  std::set<DetId>::const_iterator sIdit = sId.find(*vIdit);
364  if (sIdit == sId.end()) {
365  float energy = hits->find(*vIdit)->energy();
366  float eta = geo_->getPosition(*vIdit).eta();
367  float pf = 1.0 / cosh(eta);
368  xtalE += energy * pf;
369  count++;
370  }
371  }
372 
373  if (count == 0) { // If there are no overlapping crystals return saturated value.
374 
375  double etsat = tpgscale_.getTPGInGeV(0xFF,
376  ttMap_->towerOf(*vId.begin())); // get saturation value for the first
377  // constituent, for the others it's the same
378 
379  return etsat / cosh(ieta) * (ieta > 26 ? 2 : 1); // account for duplicated TT in EE for ieta>26
380  } else
381  return xtalE * ((vId.size() / (float)count) - 1) * (ieta > 26 ? 2 : 1);
382 }

References KineDebug3::count(), HCALHighEnergyHPDFilter_cfi::energy, PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), dqmMemoryStats::float, geo_, CaloGeometry::getPosition(), EcalTPGScale::getTPGInGeV(), hfClusterShapes_cfi::hits, LEDCalibrationChannels::ieta, packedPFCandidateRefMixer_cfi::pf, EcalTrigTowerConstituentsMap::towerOf(), tpgscale_, and ttMap_.

Referenced by run().

◆ insertRecHit()

void EcalRecHitWorkerRecover::insertRecHit ( const EcalRecHit hit,
EcalRecHitCollection collection 
)
protected

Definition at line 384 of file EcalRecHitWorkerRecover.cc.

384  {
385  // skip already inserted DetId's and raise a log warning
386  if (alreadyInserted(hit.id())) {
387  edm::LogWarning("EcalRecHitWorkerRecover") << "DetId already recovered! Skipping...";
388  return;
389  }
391  if (it == collection.end()) {
392  // insert the hit in the collection
393  collection.push_back(hit);
394  } else {
395  // overwrite existing recHit
396  *it = hit;
397  }
398  if (hit.id().subdetId() == EcalBarrel) {
399  recoveredDetIds_EB_.insert(hit.id());
400  } else if (hit.id().subdetId() == EcalEndcap) {
401  recoveredDetIds_EE_.insert(hit.id());
402  } else {
403  edm::LogError("EcalRecHitWorkerRecover::InvalidDetId") << "Invalid DetId " << hit.id().rawId();
404  }
405 }

References alreadyInserted(), universalConfigTemplate::collection, EcalBarrel, EcalEndcap, hit::id, recoveredDetIds_EB_, and recoveredDetIds_EE_.

Referenced by run().

◆ recCheckCalib()

float EcalRecHitWorkerRecover::recCheckCalib ( float  energy,
int  ieta 
)
protected

Definition at line 421 of file EcalRecHitWorkerRecover.cc.

421 { return eTT; }

◆ run()

bool EcalRecHitWorkerRecover::run ( const edm::Event evt,
const EcalUncalibratedRecHit uncalibRH,
EcalRecHitCollection result 
)
overridevirtual

Implements EcalRecHitWorkerBaseClass.

Definition at line 67 of file EcalRecHitWorkerRecover.cc.

69  {
70  DetId detId = uncalibRH.id();
71  uint32_t flags = (0xF & uncalibRH.flags());
72 
73  // get laser coefficient
74  //float lasercalib = laser->getLaserCorrection( detId, evt.time());
75 
76  // killDeadChannels_ = true, means explicitely kill dead channels even if the recovered energies are computed in the code
77  // if you don't want to store the recovered energies in the rechit you can produce LogWarnings if logWarningEtThreshold_EB(EE)_FE>0
78  // logWarningEtThreshold_EB(EE)_FE_<0 will not compute the recovered energies at all (faster)
79 
80  if (killDeadChannels_) {
85  EcalRecHit hit(detId, 0., 0., EcalRecHit::kDead);
86  hit.setFlag(EcalRecHit::kDead);
87  insertRecHit(hit, result); // insert trivial rechit with kDead flag
88  return true;
89  }
91  EcalTrigTowerDetId ttDetId(((EBDetId)detId).tower());
92  std::vector<DetId> vid = ttMap_->constituentsOf(ttDetId);
93  for (std::vector<DetId>::const_iterator dit = vid.begin(); dit != vid.end(); ++dit) {
94  EcalRecHit hit((*dit), 0., 0., EcalRecHit::kDead);
95  hit.setFlag(EcalRecHit::kDead);
96  insertRecHit(hit, result); // insert trivial rechit with kDead flag
97  }
99  return true; // if you don't want log warning just return true
100  }
102  EEDetId id(detId);
103  EcalScDetId sc(1 + (id.ix() - 1) / 5, 1 + (id.iy() - 1) / 5, id.zside());
104  std::vector<DetId> eeC;
105  for (int dx = 1; dx <= 5; ++dx) {
106  for (int dy = 1; dy <= 5; ++dy) {
107  int ix = (sc.ix() - 1) * 5 + dx;
108  int iy = (sc.iy() - 1) * 5 + dy;
109  int iz = sc.zside();
110  if (EEDetId::validDetId(ix, iy, iz)) {
111  eeC.push_back(EEDetId(ix, iy, iz));
112  }
113  }
114  }
115  for (size_t i = 0; i < eeC.size(); ++i) {
116  EcalRecHit hit(eeC[i], 0., 0., EcalRecHit::kDead);
117  hit.setFlag(EcalRecHit::kDead);
118  insertRecHit(hit, result); // insert trivial rechit with kDead flag
119  }
121  return true; // if you don't want log warning just return true
122  }
123  }
124 
126  // recover as single dead channel
128 
129  // channel recovery. Accepted new RecHit has the flag AcceptRecHit=TRUE
130  bool AcceptRecHit = true;
131  float ebEn = ebDeadChannelCorrector.correct(
133  EcalRecHit hit(detId, ebEn, 0., EcalRecHit::kDead);
134 
135  if (hit.energy() != 0 and AcceptRecHit == true) {
137  } else {
138  // recovery failed
139  hit.setFlag(EcalRecHit::kDead);
140  }
142 
144  // recover as single dead channel
146 
147  // channel recovery. Accepted new RecHit has the flag AcceptRecHit=TRUE
148  bool AcceptRecHit = true;
149  float eeEn = eeDeadChannelCorrector.correct(
151  EcalRecHit hit(detId, eeEn, 0., EcalRecHit::kDead);
152  if (hit.energy() != 0 and AcceptRecHit == true) {
154  } else {
155  // recovery failed
156  hit.setFlag(EcalRecHit::kDead);
157  }
159 
160  } else if (flags == EcalRecHitWorkerRecover::EB_VFE) {
161  // recover as dead VFE
162  EcalRecHit hit(detId, 0., 0.);
163  hit.setFlag(EcalRecHit::kDead);
164  // recovery not implemented
166  } else if (flags == EcalRecHitWorkerRecover::EB_FE) {
167  // recover as dead TT
168 
169  EcalTrigTowerDetId ttDetId(((EBDetId)detId).tower());
171  evt.getByToken(tpDigiToken_, pTPDigis);
172  const EcalTrigPrimDigiCollection* tpDigis = nullptr;
173  tpDigis = pTPDigis.product();
174 
176  // recover the whole trigger tower
177  if (tp != tpDigis->end()) {
178  //std::vector<DetId> vid = ecalMapping_->dccTowerConstituents( ecalMapping_->DCCid( ttDetId ), ecalMapping_->iTT( ttDetId ) );
179  std::vector<DetId> vid = ttMap_->constituentsOf(ttDetId);
180  float tpEt = ecalScale_.getTPGInGeV(tp->compressedEt(), tp->id());
181  float tpEtThreshEB = logWarningEtThreshold_EB_FE_;
182  if (tpEt > tpEtThreshEB) {
183  edm::LogWarning("EnergyInDeadEB_FE") << "TP energy in the dead TT = " << tpEt << " at " << ttDetId;
184  }
186  // democratic energy sharing
187 
188  for (std::vector<DetId>::const_iterator dit = vid.begin(); dit != vid.end(); ++dit) {
189  if (alreadyInserted(*dit))
190  continue;
191  float theta = ebGeom_->getGeometry(*dit)->getPosition().theta();
192  float tpEt = ecalScale_.getTPGInGeV(tp->compressedEt(), tp->id());
194  EcalRecHit hit(*dit, tpEt / ((float)vid.size()) / sin(theta), 0.);
196  if (tp->compressedEt() == 0xFF)
197  hit.setFlag(EcalRecHit::kTPSaturated);
198  if (tp->sFGVB())
199  hit.setFlag(EcalRecHit::kL1SpikeFlag);
201  }
202  }
203  } else {
204  // tp not found => recovery failed
205  std::vector<DetId> vid = ttMap_->constituentsOf(ttDetId);
206  for (std::vector<DetId>::const_iterator dit = vid.begin(); dit != vid.end(); ++dit) {
207  if (alreadyInserted(*dit))
208  continue;
209  EcalRecHit hit(*dit, 0., 0.);
210  hit.setFlag(EcalRecHit::kDead);
212  }
213  }
214  }
215  } else if (flags == EcalRecHitWorkerRecover::EE_FE) {
216  // Structure for recovery:
217  // ** SC --> EEDetId constituents (eeC) --> associated Trigger Towers (aTT) --> EEDetId constituents (aTTC)
218  // ** energy for a SC EEDetId = [ sum_aTT(energy) - sum_aTTC(energy) ] / N_eeC
219  // .. i.e. the total energy of the TTs covering the SC minus
220  // .. the energy of the recHits in the TTs but not in the SC
221  //std::vector<DetId> vid = ecalMapping_->dccTowerConstituents( ecalMapping_->DCCid( ttDetId ), ecalMapping_->iTT( ttDetId ) );
222  // due to lack of implementation of the EcalTrigTowerDetId ix,iy methods in EE we compute Et recovered energies (in EB we compute E)
223 
224  EEDetId eeId(detId);
225  EcalScDetId sc((eeId.ix() - 1) / 5 + 1, (eeId.iy() - 1) / 5 + 1, eeId.zside());
226  std::set<DetId> eeC;
227  for (int dx = 1; dx <= 5; ++dx) {
228  for (int dy = 1; dy <= 5; ++dy) {
229  int ix = (sc.ix() - 1) * 5 + dx;
230  int iy = (sc.iy() - 1) * 5 + dy;
231  int iz = sc.zside();
232  if (EEDetId::validDetId(ix, iy, iz)) {
233  EEDetId id(ix, iy, iz);
235  eeC.insert(id);
236  } // check status
237  }
238  }
239  }
240 
242  evt.getByToken(tpDigiToken_, pTPDigis);
243  const EcalTrigPrimDigiCollection* tpDigis = nullptr;
244  tpDigis = pTPDigis.product();
245 
246  // associated trigger towers
247  std::set<EcalTrigTowerDetId> aTT;
248  for (std::set<DetId>::const_iterator it = eeC.begin(); it != eeC.end(); ++it) {
249  aTT.insert(ttMap_->towerOf(*it));
250  }
251  // associated trigger towers: total energy
252  float totE = 0;
253  // associated trigger towers: EEDetId constituents
254  std::set<DetId> aTTC;
255  bool atLeastOneTPSaturated = false;
256  for (std::set<EcalTrigTowerDetId>::const_iterator it = aTT.begin(); it != aTT.end(); ++it) {
257  // add the energy of this trigger tower
259  if (itTP != tpDigis->end()) {
260  std::vector<DetId> v = ttMap_->constituentsOf(*it);
261 
262  // from the constituents, remove dead channels
263  std::vector<DetId>::iterator ttcons = v.begin();
264  while (ttcons != v.end()) {
266  ttcons = v.erase(ttcons);
267  } else {
268  ++ttcons;
269  }
270  } // while
271 
272  if (itTP->compressedEt() == 0xFF) { // In the case of a saturated trigger tower, a fraction
273  atLeastOneTPSaturated =
274  true; //of the saturated energy is put in: number of xtals in dead region/total xtals in TT *63.75
275 
276  //Alternative recovery algorithm that I will now investigate.
277  //Estimate energy sums the energy in the working channels, then decides how much energy
278  //to put here depending on that. Duncan 20101203
279 
280  totE += estimateEnergy(itTP->id().ietaAbs(), &result, eeC, v);
281 
282  /*
283  These commented out lines use
284  64GeV*fraction of the TT overlapping the dead FE
285 
286  int count = 0;
287  for (std::vector<DetId>::const_iterator idsit = v.begin(); idsit != v.end(); ++ idsit){
288  std::set<DetId>::const_iterator itFind = eeC.find(*idsit);
289  if (itFind != eeC.end())
290  ++count;
291  }
292  //std::cout << count << ", " << v.size() << std::endl;
293  totE+=((float)count/(float)v.size())* ((it->ietaAbs()>26)?2*ecalScale_.getTPGInGeV( itTP->compressedEt(), itTP->id() ):ecalScale_.getTPGInGeV( itTP->compressedEt(), itTP->id() ));*/
294  } else {
295  totE += ((it->ietaAbs() > 26) ? 2 : 1) * ecalScale_.getTPGInGeV(itTP->compressedEt(), itTP->id());
296  }
297 
298  // get the trigger tower constituents
299 
300  if (itTP->compressedEt() == 0) { // If there's no energy in TT, the constituents are removed from the recovery.
301  for (size_t i = 0; i < v.size(); ++i)
302  eeC.erase(v[i]);
303  } else if (itTP->compressedEt() != 0xFF) {
304  //If it's saturated the energy has already been determined, so we do not want to subtract any channels
305  for (size_t j = 0; j < v.size(); ++j) {
306  aTTC.insert(v[j]);
307  }
308  }
309  }
310  }
311  // remove crystals of dead SC
312  // (this step is not needed if sure that SC crystals are not
313  // in the recHit collection)
314 
315  for (std::set<DetId>::const_iterator it = eeC.begin(); it != eeC.end(); ++it) {
316  aTTC.erase(*it);
317  }
318  // compute the total energy for the dead SC
319  const EcalRecHitCollection* hits = &result;
320  for (std::set<DetId>::const_iterator it = aTTC.begin(); it != aTTC.end(); ++it) {
322  if (jt != hits->end()) {
323  float energy = jt->energy(); // Correct conversion to Et
324  float eta = geo_->getPosition(jt->id()).eta();
325  float pf = 1.0 / cosh(eta);
326  // use Et instead of E, consistent with the Et estimation of the associated TT
327  totE -= energy * pf;
328  }
329  }
330 
331  float scEt = totE;
332  float scEtThreshEE = logWarningEtThreshold_EE_FE_;
333  if (scEt > scEtThreshEE) {
334  edm::LogWarning("EnergyInDeadEE_FE") << "TP energy in the dead TT = " << scEt << " at " << sc;
335  }
336 
337  // assign the energy to the SC crystals
338  if (!killDeadChannels_ || recoverEEFE_) { // if eeC is empty, i.e. there are no hits
339  // in the tower, nothing is returned. No negative values from noise.
340  for (std::set<DetId>::const_iterator it = eeC.begin(); it != eeC.end(); ++it) {
341  float eta = geo_->getPosition(*it).eta(); //Convert back to E from Et for the recovered hits
342  float pf = 1.0 / cosh(eta);
343  EcalRecHit hit(*it, totE / ((float)eeC.size() * pf), 0);
344 
345  if (atLeastOneTPSaturated)
346  hit.setFlag(EcalRecHit::kTPSaturated);
349 
350  } // for
351  } // if
352  }
353  return true;
354 }

References alreadyInserted(), caloTopology_, checkChannelStatus(), EcalTrigTowerConstituentsMap::constituentsOf(), EcalDeadChannelRecoveryAlgos< DetIdT >::correct(), dbStatusToBeExcludedEB_, dbStatusToBeExcludedEE_, PVValHelper::dx, PVValHelper::dy, EcalRecHitWorkerBaseClass::EB_FE, EcalRecHitWorkerBaseClass::EB_single, EcalRecHitWorkerBaseClass::EB_VFE, ebDeadChannelCorrector, ebGeom_, ecalScale_, EcalRecHitWorkerBaseClass::EE_FE, EcalRecHitWorkerBaseClass::EE_single, EcalRecHitWorkerBaseClass::EE_VFE, eeDeadChannelCorrector, edm::SortedCollection< T, SORT >::end(), HCALHighEnergyHPDFilter_cfi::energy, estimateEnergy(), PVValHelper::eta, PV3DBase< T, PVType, FrameType >::eta(), edm::SortedCollection< T, SORT >::find(), EcalUncalibratedRecHit::flags(), HLT_2018_cff::flags, geo_, edm::Event::getByToken(), CaloSubdetectorGeometry::getGeometry(), CaloGeometry::getPosition(), EcalTPGScale::getTPGInGeV(), hfClusterShapes_cfi::hits, mps_fire::i, triggerObjects_cff::id, EcalUncalibratedRecHit::id(), insertRecHit(), EcalScDetId::ix(), EEDetId::ix(), EcalScDetId::iy(), EEDetId::iy(), dqmiolumiharvest::j, EcalRecHit::kDead, killDeadChannels_, EcalRecHit::kL1SpikeFlag, EcalRecHit::kNeighboursRecovered, EcalRecHit::kTowerRecovered, EcalRecHit::kTPSaturated, logWarningEtThreshold_EB_FE_, logWarningEtThreshold_EE_FE_, packedPFCandidateRefMixer_cfi::pf, edm::Handle< T >::product(), edm::ESHandle< T >::product(), recoverEBFE_, recoverEBIsolatedChannels_, recoverEBVFE_, recoverEEFE_, recoverEEIsolatedChannels_, recoverEEVFE_, mps_fire::result, EcalDeadChannelRecoveryAlgos< DetIdT >::setCaloTopology(), funct::sin(), singleRecoveryMethod_, singleRecoveryThreshold_, sum8RecoveryThreshold_, theta(), hgcalTowerProducer_cfi::tower, EcalTrigTowerConstituentsMap::towerOf(), cmsswSequenceInfo::tp, tpDigiToken_, ttMap_, findQualityFiles::v, EEDetId::validDetId(), EcalScDetId::zside(), EEDetId::zside(), and ecaldqm::zside().

◆ set()

void EcalRecHitWorkerRecover::set ( const edm::EventSetup es)
overridevirtual

Member Data Documentation

◆ caloGeometry_

edm::ESHandle<CaloGeometry> EcalRecHitWorkerRecover::caloGeometry_
protected

Definition at line 49 of file EcalRecHitWorkerRecover.h.

Referenced by set().

◆ caloTopology_

edm::ESHandle<CaloTopology> EcalRecHitWorkerRecover::caloTopology_
protected

Definition at line 48 of file EcalRecHitWorkerRecover.h.

Referenced by run(), and set().

◆ chStatus_

edm::ESHandle<EcalChannelStatus> EcalRecHitWorkerRecover::chStatus_
protected

Definition at line 50 of file EcalRecHitWorkerRecover.h.

Referenced by checkChannelStatus(), and set().

◆ dbStatusToBeExcludedEB_

std::vector<int> EcalRecHitWorkerRecover::dbStatusToBeExcludedEB_
protected

Definition at line 67 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ dbStatusToBeExcludedEE_

std::vector<int> EcalRecHitWorkerRecover::dbStatusToBeExcludedEE_
protected

Definition at line 66 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ ebDeadChannelCorrector

EcalDeadChannelRecoveryAlgos<EBDetId> EcalRecHitWorkerRecover::ebDeadChannelCorrector
protected

Definition at line 90 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ ebGeom_

const CaloSubdetectorGeometry* EcalRecHitWorkerRecover::ebGeom_
protected

Definition at line 80 of file EcalRecHitWorkerRecover.h.

Referenced by run(), and set().

◆ ecalMapping_

const EcalElectronicsMapping* EcalRecHitWorkerRecover::ecalMapping_
protected

Definition at line 73 of file EcalRecHitWorkerRecover.h.

Referenced by set().

◆ ecalScale_

EcalTPGScale EcalRecHitWorkerRecover::ecalScale_
protected

Definition at line 70 of file EcalRecHitWorkerRecover.h.

Referenced by run(), and set().

◆ eeDeadChannelCorrector

EcalDeadChannelRecoveryAlgos<EEDetId> EcalRecHitWorkerRecover::eeDeadChannelCorrector
protected

Definition at line 91 of file EcalRecHitWorkerRecover.h.

Referenced by run().

◆ geo_

const CaloGeometry* EcalRecHitWorkerRecover::geo_
protected

Definition at line 81 of file EcalRecHitWorkerRecover.h.

Referenced by estimateEnergy(), run(), and set().

◆ killDeadChannels_

bool EcalRecHitWorkerRecover::killDeadChannels_
protected

Definition at line 55 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ laser

edm::ESHandle<EcalLaserDbService> EcalRecHitWorkerRecover::laser
protected

Definition at line 45 of file EcalRecHitWorkerRecover.h.

Referenced by set().

◆ logWarningEtThreshold_EB_FE_

double EcalRecHitWorkerRecover::logWarningEtThreshold_EB_FE_
protected

Definition at line 74 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ logWarningEtThreshold_EE_FE_

double EcalRecHitWorkerRecover::logWarningEtThreshold_EE_FE_
protected

Definition at line 75 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ pEBGeom_

edm::ESHandle<CaloSubdetectorGeometry> EcalRecHitWorkerRecover::pEBGeom_
protected

Definition at line 79 of file EcalRecHitWorkerRecover.h.

Referenced by set().

◆ pEcalMapping_

edm::ESHandle<EcalElectronicsMapping> EcalRecHitWorkerRecover::pEcalMapping_
protected

Definition at line 72 of file EcalRecHitWorkerRecover.h.

Referenced by set().

◆ rechitMaker_

std::unique_ptr<EcalRecHitSimpleAlgo> EcalRecHitWorkerRecover::rechitMaker_
protected

Definition at line 83 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover().

◆ recoverEBFE_

bool EcalRecHitWorkerRecover::recoverEBFE_
protected

Definition at line 61 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ recoverEBIsolatedChannels_

bool EcalRecHitWorkerRecover::recoverEBIsolatedChannels_
protected

Definition at line 57 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ recoverEBVFE_

bool EcalRecHitWorkerRecover::recoverEBVFE_
protected

Definition at line 59 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ recoveredDetIds_EB_

std::set<DetId> EcalRecHitWorkerRecover::recoveredDetIds_EB_
protected

Definition at line 85 of file EcalRecHitWorkerRecover.h.

Referenced by alreadyInserted(), insertRecHit(), and set().

◆ recoveredDetIds_EE_

std::set<DetId> EcalRecHitWorkerRecover::recoveredDetIds_EE_
protected

Definition at line 86 of file EcalRecHitWorkerRecover.h.

Referenced by alreadyInserted(), insertRecHit(), and set().

◆ recoverEEFE_

bool EcalRecHitWorkerRecover::recoverEEFE_
protected

Definition at line 62 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ recoverEEIsolatedChannels_

bool EcalRecHitWorkerRecover::recoverEEIsolatedChannels_
protected

Definition at line 58 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ recoverEEVFE_

bool EcalRecHitWorkerRecover::recoverEEVFE_
protected

Definition at line 60 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ singleRecoveryMethod_

std::string EcalRecHitWorkerRecover::singleRecoveryMethod_
protected

Definition at line 54 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ singleRecoveryThreshold_

double EcalRecHitWorkerRecover::singleRecoveryThreshold_
protected

Definition at line 52 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ sum8RecoveryThreshold_

double EcalRecHitWorkerRecover::sum8RecoveryThreshold_
protected

Definition at line 53 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ tpDigiToken_

edm::EDGetTokenT<EcalTrigPrimDigiCollection> EcalRecHitWorkerRecover::tpDigiToken_
protected

Definition at line 71 of file EcalRecHitWorkerRecover.h.

Referenced by EcalRecHitWorkerRecover(), and run().

◆ tpgscale_

EcalTPGScale EcalRecHitWorkerRecover::tpgscale_
protected

Definition at line 88 of file EcalRecHitWorkerRecover.h.

Referenced by estimateEnergy(), and set().

◆ ttMap_

edm::ESHandle<EcalTrigTowerConstituentsMap> EcalRecHitWorkerRecover::ttMap_
protected

Definition at line 77 of file EcalRecHitWorkerRecover.h.

Referenced by estimateEnergy(), run(), and set().

EcalRecHitWorkerBaseClass::EE_VFE
Definition: EcalRecHitWorkerBaseClass.h:15
EcalTPGScale::getTPGInGeV
double getTPGInGeV(const EcalTriggerPrimitiveDigi &tpDigi)
Definition: EcalTPGScale.cc:18
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
EcalRecHit::kNeighboursRecovered
Definition: EcalRecHit.h:29
EcalRecHitWorkerRecover::checkChannelStatus
bool checkChannelStatus(const DetId &id, const std::vector< int > &statusestoexclude)
Definition: EcalRecHitWorkerRecover.cc:426
EcalRecHit
Definition: EcalRecHit.h:15
EcalRecHit::kTPSaturated
Definition: EcalRecHit.h:33
mps_fire.i
i
Definition: mps_fire.py:355
edm::SortedCollection::const_iterator
std::vector< T >::const_iterator const_iterator
Definition: SortedCollection.h:80
EcalDeadChannelRecoveryAlgos::setParameters
void setParameters(const edm::ParameterSet &ps)
Definition: EcalDeadChannelRecoveryAlgos.cc:17
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
hit::id
unsigned int id
Definition: SiStripHitEffFromCalibTree.cc:92
EcalRecHitWorkerRecover::pEcalMapping_
edm::ESHandle< EcalElectronicsMapping > pEcalMapping_
Definition: EcalRecHitWorkerRecover.h:72
edm::Handle::product
T const * product() const
Definition: Handle.h:70
EcalRecHitWorkerRecover::chStatus_
edm::ESHandle< EcalChannelStatus > chStatus_
Definition: EcalRecHitWorkerRecover.h:50
EcalRecHitWorkerRecover::eeDeadChannelCorrector
EcalDeadChannelRecoveryAlgos< EEDetId > eeDeadChannelCorrector
Definition: EcalRecHitWorkerRecover.h:91
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
vid
Definition: VIDCutFlowResult.h:25
EcalRecHitWorkerRecover::recoverEEIsolatedChannels_
bool recoverEEIsolatedChannels_
Definition: EcalRecHitWorkerRecover.h:58
EcalRecHit::kL1SpikeFlag
Definition: EcalRecHit.h:34
mps_update.status
status
Definition: mps_update.py:69
CaloGeometry::getPosition
GlobalPoint getPosition(const DetId &id) const
Get the position of a given detector id.
Definition: CaloGeometry.cc:50
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
EcalRecHitWorkerRecover::recoveredDetIds_EB_
std::set< DetId > recoveredDetIds_EB_
Definition: EcalRecHitWorkerRecover.h:85
EBDetId
Definition: EBDetId.h:17
EcalRecHitWorkerRecover::dbStatusToBeExcludedEE_
std::vector< int > dbStatusToBeExcludedEE_
Definition: EcalRecHitWorkerRecover.h:66
EcalRecHitWorkerBaseClass::EB_single
Definition: EcalRecHitWorkerBaseClass.h:15
EcalRecHitWorkerRecover::singleRecoveryThreshold_
double singleRecoveryThreshold_
Definition: EcalRecHitWorkerRecover.h:52
hgcalTowerProducer_cfi.tower
tower
Definition: hgcalTowerProducer_cfi.py:3
EcalRecHitWorkerRecover::logWarningEtThreshold_EB_FE_
double logWarningEtThreshold_EB_FE_
Definition: EcalRecHitWorkerRecover.h:74
edm::SortedCollection
Definition: SortedCollection.h:49
EcalRecHitWorkerRecover::insertRecHit
void insertRecHit(const EcalRecHit &hit, EcalRecHitCollection &collection)
Definition: EcalRecHitWorkerRecover.cc:384
EcalRecHitWorkerRecover::logWarningEtThreshold_EE_FE_
double logWarningEtThreshold_EE_FE_
Definition: EcalRecHitWorkerRecover.h:75
EcalRecHitWorkerRecover::recoverEEVFE_
bool recoverEEVFE_
Definition: EcalRecHitWorkerRecover.h:60
EcalRecHitWorkerRecover::caloTopology_
edm::ESHandle< CaloTopology > caloTopology_
Definition: EcalRecHitWorkerRecover.h:48
EcalDeadChannelRecoveryAlgos::correct
float correct(const DetIdT id, const EcalRecHitCollection &hit_collection, std::string algo, double single8Cut, double sum8Cut, bool *accFlag)
Definition: EcalDeadChannelRecoveryAlgos.cc:27
EcalTPGScale::setEventSetup
void setEventSetup(const edm::EventSetup &evtSetup)
Definition: EcalTPGScale.cc:16
CaloTopologyRecord
Definition: CaloTopologyRecord.h:10
EcalRecHitWorkerRecover::alreadyInserted
bool alreadyInserted(const DetId &id)
Definition: EcalRecHitWorkerRecover.cc:407
EcalRecHitWorkerRecover::rechitMaker_
std::unique_ptr< EcalRecHitSimpleAlgo > rechitMaker_
Definition: EcalRecHitWorkerRecover.h:83
EcalTrigTowerDetId
Definition: EcalTrigTowerDetId.h:14
findQualityFiles.v
v
Definition: findQualityFiles.py:179
EcalRecHit::kTowerRecovered
Definition: EcalRecHit.h:30
edm::Handle
Definition: AssociativeIterator.h:50
EcalBarrelGeometryRecord
Definition: EcalBarrelGeometryRecord.h:23
EcalBarrel
Definition: EcalSubdetector.h:10
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
EcalRecHitWorkerRecover::tpgscale_
EcalTPGScale tpgscale_
Definition: EcalRecHitWorkerRecover.h:88
DetId
Definition: DetId.h:17
EcalRecHitWorkerBaseClass::EB_FE
Definition: EcalRecHitWorkerBaseClass.h:15
edm::EventSetup::get
T get() const
Definition: EventSetup.h:73
EcalRecHitWorkerRecover::ecalScale_
EcalTPGScale ecalScale_
Definition: EcalRecHitWorkerRecover.h:70
PVValHelper::eta
Definition: PVValidationHelpers.h:69
EcalScDetId
Definition: EcalScDetId.h:24
EcalRecHitWorkerRecover::estimateEnergy
float estimateEnergy(int ieta, EcalRecHitCollection *hits, const std::set< DetId > &sId, const std::vector< DetId > &vId)
Definition: EcalRecHitWorkerRecover.cc:356
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:528
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
EcalLaserDbRecord
Definition: EcalLaserDbRecord.h:19
EEDetId
Definition: EEDetId.h:14
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
EcalRecHitWorkerRecover::geo_
const CaloGeometry * geo_
Definition: EcalRecHitWorkerRecover.h:81
EcalEndcap
Definition: EcalSubdetector.h:10
edm::LogWarning
Definition: MessageLogger.h:141
EcalRecHitWorkerRecover::ttMap_
edm::ESHandle< EcalTrigTowerConstituentsMap > ttMap_
Definition: EcalRecHitWorkerRecover.h:77
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
edm::LogError
Definition: MessageLogger.h:183
EcalRecHitWorkerRecover::tpDigiToken_
edm::EDGetTokenT< EcalTrigPrimDigiCollection > tpDigiToken_
Definition: EcalRecHitWorkerRecover.h:71
EcalUncalibratedRecHit::id
DetId id() const
Definition: EcalUncalibratedRecHit.h:38
EcalChannelStatusRcd
Definition: EcalChannelStatusRcd.h:5
EcalRecHitWorkerRecover::recoveredDetIds_EE_
std::set< DetId > recoveredDetIds_EE_
Definition: EcalRecHitWorkerRecover.h:86
EcalRecHitWorkerRecover::ebGeom_
const CaloSubdetectorGeometry * ebGeom_
Definition: EcalRecHitWorkerRecover.h:80
edm::SortedCollection< EcalRecHit >::iterator
std::vector< EcalRecHit >::iterator iterator
Definition: SortedCollection.h:81
KineDebug3::count
void count()
Definition: KinematicConstrainedVertexUpdatorT.h:21
edm::SortedCollection::end
const_iterator end() const
Definition: SortedCollection.h:267
EcalRecHitWorkerRecover::pEBGeom_
edm::ESHandle< CaloSubdetectorGeometry > pEBGeom_
Definition: EcalRecHitWorkerRecover.h:79
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
EcalRecHitWorkerBaseClass::EE_FE
Definition: EcalRecHitWorkerBaseClass.h:15
universalConfigTemplate.collection
collection
Definition: universalConfigTemplate.py:81
PVValHelper::dy
Definition: PVValidationHelpers.h:49
CaloSubdetectorGeometry::getGeometry
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
Definition: CaloSubdetectorGeometry.cc:36
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
EcalRecHit::kDead
Definition: EcalRecHit.h:31
get
#define get
res
Definition: Electron.h:6
EcalTrigTowerConstituentsMap::towerOf
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
Definition: EcalTrigTowerConstituentsMap.cc:11
EcalRecHitWorkerRecover::recoverEBIsolatedChannels_
bool recoverEBIsolatedChannels_
Definition: EcalRecHitWorkerRecover.h:57
EcalRecHitWorkerRecover::sum8RecoveryThreshold_
double sum8RecoveryThreshold_
Definition: EcalRecHitWorkerRecover.h:53
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
edm::SortedCollection::find
iterator find(key_type k)
Definition: SortedCollection.h:240
EcalRecHitWorkerRecover::recoverEBFE_
bool recoverEBFE_
Definition: EcalRecHitWorkerRecover.h:61
EcalMappingRcd
Definition: EcalMappingRcd.h:15
EcalDeadChannelRecoveryAlgos::setCaloTopology
void setCaloTopology(const CaloTopology *topology)
Definition: EcalDeadChannelRecoveryAlgos.cc:22
EcalRecHitWorkerRecover::recoverEEFE_
bool recoverEEFE_
Definition: EcalRecHitWorkerRecover.h:62
EcalTrigTowerConstituentsMap::constituentsOf
std::vector< DetId > constituentsOf(const EcalTrigTowerDetId &id) const
Get the constituent detids for this tower id.
Definition: EcalTrigTowerConstituentsMap.cc:162
EcalRecHitWorkerRecover::ebDeadChannelCorrector
EcalDeadChannelRecoveryAlgos< EBDetId > ebDeadChannelCorrector
Definition: EcalRecHitWorkerRecover.h:90
EcalRecHitWorkerBaseClass::EcalRecHitWorkerBaseClass
EcalRecHitWorkerBaseClass(const edm::ParameterSet &, edm::ConsumesCollector &c)
Definition: EcalRecHitWorkerBaseClass.h:17
packedPFCandidateRefMixer_cfi.pf
pf
Definition: packedPFCandidateRefMixer_cfi.py:4
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
EcalRecHitWorkerRecover::laser
edm::ESHandle< EcalLaserDbService > laser
Definition: EcalRecHitWorkerRecover.h:45
EcalRecHitWorkerRecover::dbStatusToBeExcludedEB_
std::vector< int > dbStatusToBeExcludedEB_
Definition: EcalRecHitWorkerRecover.h:67
EcalRecHitWorkerBaseClass::EB_VFE
Definition: EcalRecHitWorkerBaseClass.h:15
EEDetId::validDetId
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
EcalRecHitWorkerRecover::singleRecoveryMethod_
std::string singleRecoveryMethod_
Definition: EcalRecHitWorkerRecover.h:54
EcalCondObjectContainer< EcalChannelStatusCode >::const_iterator
std::vector< Item >::const_iterator const_iterator
Definition: EcalCondObjectContainer.h:19
mps_fire.result
result
Definition: mps_fire.py:303
EcalRecHitWorkerBaseClass::EE_single
Definition: EcalRecHitWorkerBaseClass.h:15
EcalRecHitWorkerRecover::ecalMapping_
const EcalElectronicsMapping * ecalMapping_
Definition: EcalRecHitWorkerRecover.h:73
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
EcalRecHitWorkerRecover::killDeadChannels_
bool killDeadChannels_
Definition: EcalRecHitWorkerRecover.h:55
HLT_2018_cff.flags
flags
Definition: HLT_2018_cff.py:11758
edm::InputTag
Definition: InputTag.h:15
PVValHelper::dx
Definition: PVValidationHelpers.h:48
EcalUncalibratedRecHit::flags
uint32_t flags() const
Definition: EcalUncalibratedRecHit.h:35
IdealGeometryRecord
Definition: IdealGeometryRecord.h:27
hit
Definition: SiStripHitEffFromCalibTree.cc:88
EcalRecHitWorkerRecover::caloGeometry_
edm::ESHandle< CaloGeometry > caloGeometry_
Definition: EcalRecHitWorkerRecover.h:49
EcalRecHitWorkerRecover::recoverEBVFE_
bool recoverEBVFE_
Definition: EcalRecHitWorkerRecover.h:59