CMS 3D CMS Logo

EcalDeadChannelRecoveryAlgos.cc
Go to the documentation of this file.
1 //
2 // Original Author: Stilianos Kesisoglou - Institute of Nuclear and Particle
3 // Physics NCSR Demokritos (Stilianos.Kesisoglou@cern.ch)
4 // Created: Wed Nov 21 11:24:39 EET 2012
5 //
6 // Nov 21 2012: First version of the code. Based on the old
7 // "EcalDeadChannelRecoveryAlgos.cc" code
8 // Feb 14 2013: Implementation of the criterion to select the "correct"
9 // max. cont. crystal.
10 //
11 
14 
15 template <typename T>
17  const CaloTopology *topo) {
18  nn.setCaloTopology(topo);
19 }
20 
21 template <typename T>
23  const T id, const EcalRecHitCollection &hit_collection, std::string algo,
24  double Sum8Cut, bool *AcceptFlag) {
25  // recover as single dead channel
26  double NewEnergy = 0.0;
27 
28  if (algo == "NeuralNetworks") {
29  NewEnergy = this->nn.recover(id, hit_collection, Sum8Cut, AcceptFlag);
30  } else {
31  edm::LogError("EcalDeadChannelRecoveryAlgos")
32  << "Invalid algorithm for dead channel recovery.";
33  *AcceptFlag = false;
34  }
35 
36  uint32_t flag = 0;
37  return EcalRecHit(id, NewEnergy, 0, flag);
38 }
39 
void setCaloTopology(const CaloTopology *topology)
EcalRecHit correct(const DetIdT id, const EcalRecHitCollection &hit_collection, std::string algo, double Sum8Cut, bool *AccFlag)
long double T