src
RecoLocalCalo
EcalDeadChannelRecoveryAlgos
src
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
13
#include "
RecoLocalCalo/EcalDeadChannelRecoveryAlgos/interface/EcalDeadChannelRecoveryAlgos.h
"
14
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
15
16
template
<
typename
T>
17
void
EcalDeadChannelRecoveryAlgos<T>::setParameters
(
const
edm::ParameterSet
&ps) {
18
bdtg_.setParameters(ps);
19
}
20
21
template
<
typename
T>
22
void
EcalDeadChannelRecoveryAlgos<T>::setCaloTopology
(
const
CaloTopology
*topo) {
23
bdtg_.setCaloTopology(topo);
24
}
25
26
template
<
typename
T>
27
float
EcalDeadChannelRecoveryAlgos<T>::correct
(
const
T
id
,
28
const
EcalRecHitCollection
&hit_collection,
29
std::string
algo
,
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
48
template
class
EcalDeadChannelRecoveryAlgos<EBDetId>
;
49
template
class
EcalDeadChannelRecoveryAlgos<EEDetId>
;
EcalDeadChannelRecoveryAlgos< EBDetId >
edm::SortedCollection< EcalRecHit >
MessageLogger.h
edm::LogError
Log< level::Error, false > LogError
Definition:
MessageLogger.h:129
EcalDeadChannelRecoveryAlgos::setCaloTopology
void setCaloTopology(const CaloTopology *topology)
Definition:
EcalDeadChannelRecoveryAlgos.cc:22
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
EcalDeadChannelRecoveryAlgos::setParameters
void setParameters(const edm::ParameterSet &ps)
Definition:
EcalDeadChannelRecoveryAlgos.cc:17
cmsdt::algo
algo
Definition:
constants.h:171
edm::ParameterSet
Definition:
ParameterSet.h:48
CaloTopology
Definition:
CaloTopology.h:19
EcalDeadChannelRecoveryAlgos::correct
float correct(const DetIdT id, const EcalRecHitCollection &hit_collection, std::string algo, double single8Cut, double sum8Cut, bool *accFlag)
Definition:
EcalDeadChannelRecoveryAlgos.cc:27
T
long double T
Definition:
Basic3DVectorLD.h:48
EcalDeadChannelRecoveryAlgos.h
Generated for CMSSW Reference Manual by
1.8.14