CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 //modified by S.Taroni, N. Marinelli 11 June 2019
12 
15 
16 template <typename T>
18  bdtg_.setParameters(ps);
19 }
20 
21 template <typename T>
23  bdtg_.setCaloTopology(topo);
24 }
25 
26 template <typename T>
28  const EcalRecHitCollection &hit_collection,
30  double single8Cut,
31  double sum8Cut,
32  bool *acceptFlag) {
33  // recover as single dead channel
34  double newEnergy = 0.0;
35  if (algo == "BDTG") {
36  *acceptFlag = false;
37  newEnergy = this->bdtg_.recover(id, hit_collection, single8Cut, sum8Cut, acceptFlag); //ADD here
38  if (newEnergy > 0.)
39  *acceptFlag = true; //bdtg set to 0 if there is more than one channel in the matrix that is not reponding
40  } else {
41  edm::LogError("EcalDeadChannelRecoveryAlgos") << "Invalid algorithm for dead channel recovery.";
42  *acceptFlag = false;
43  }
44 
45  return newEnergy;
46 }
47 
Log< level::Error, false > LogError
void setCaloTopology(const CaloTopology *topology)
void setParameters(const edm::ParameterSet &ps)
float correct(const DetIdT id, const EcalRecHitCollection &hit_collection, std::string algo, double single8Cut, double sum8Cut, bool *accFlag)
long double T