RecoEgamma
EgammaIsolationAlgos
src
EGHcalRecHitSelector.cc
Go to the documentation of this file.
1
#include "
RecoEgamma/EgammaIsolationAlgos/interface/EGHcalRecHitSelector.h
"
2
3
#include <limits>
4
5
EGHcalRecHitSelector::EGHcalRecHitSelector
(
const
edm::ParameterSet
&
config
,
edm::ConsumesCollector
cc
)
6
: maxDIEta_(
config
.getParameter<
int
>(
"maxDIEta"
)),
7
maxDIPhi_(
config
.getParameter<
int
>(
"maxDIPhi"
)),
8
minEnergyHB_(
config
.getParameter<double>(
"minEnergyHB"
)),
9
minEnergyHEDepth1_(
config
.getParameter<double>(
"minEnergyHEDepth1"
)),
10
minEnergyHEDefault_(
config
.getParameter<double>(
"minEnergyHEDefault"
)),
11
towerMapToken_(
cc
.esConsumes<
CaloTowerConstituentsMap
,
CaloGeometryRecord
,
edm
::
Transition
::BeginRun>()) {}
12
13
edm::ParameterSetDescription
EGHcalRecHitSelector::makePSetDescription
() {
14
edm::ParameterSetDescription
desc
;
15
desc
.add<
int
>(
"maxDIEta"
, 5);
16
desc
.add<
int
>(
"maxDIPhi"
, 5);
17
desc
.add<
double
>(
"minEnergyHB"
, 0.8);
18
desc
.add<
double
>(
"minEnergyHEDepth1"
, 0.1);
19
desc
.add<
double
>(
"minEnergyHEDefault"
, 0.2);
20
return
desc
;
21
}
22
23
int
EGHcalRecHitSelector::calDIEta
(
int
iEta1,
int
iEta2) {
24
int
dEta
= iEta1 - iEta2;
25
if
(iEta1 * iEta2 < 0) {
//-ve to +ve transistion and no crystal at zero
26
if
(
dEta
< 0)
27
dEta
++;
28
else
29
dEta
--;
30
}
31
return
dEta
;
32
}
33
34
int
EGHcalRecHitSelector::calDIPhi
(
int
iPhi1,
int
iPhi2) {
35
int
dPhi
= iPhi1 - iPhi2;
36
if
(
dPhi
> 72 / 2)
37
dPhi
-= 72;
38
else
if
(
dPhi
< -72 / 2)
39
dPhi
+= 72;
40
return
dPhi
;
41
}
42
43
float
EGHcalRecHitSelector::getMinEnergyHCAL_
(
HcalDetId
id
)
const
{
44
if
(
id
.subdetId() ==
HcalBarrel
)
45
return
minEnergyHB_
;
46
else
if
(
id
.subdetId() ==
HcalEndcap
) {
47
if
(
id
.
depth
() == 1)
48
return
minEnergyHEDepth1_
;
49
else
50
return
minEnergyHEDefault_
;
51
}
else
52
return
std::numeric_limits<float>::max
();
53
}
EGHcalRecHitSelector::getMinEnergyHCAL_
float getMinEnergyHCAL_(HcalDetId id) const
Definition:
EGHcalRecHitSelector.cc:43
CaloGeometryRecord
Definition:
CaloGeometryRecord.h:30
EGHcalRecHitSelector::minEnergyHEDefault_
float minEnergyHEDefault_
Definition:
EGHcalRecHitSelector.h:42
edm
HLT enums.
Definition:
AlignableModifier.h:19
EGHcalRecHitSelector::minEnergyHB_
float minEnergyHB_
Definition:
EGHcalRecHitSelector.h:40
edm::ParameterSetDescription
Definition:
ParameterSetDescription.h:52
HcalBarrel
Definition:
HcalAssistant.h:33
HLT_FULL_cff.dPhi
dPhi
Definition:
HLT_FULL_cff.py:13702
config
Definition:
config.py:1
EGHcalRecHitSelector::makePSetDescription
static edm::ParameterSetDescription makePSetDescription()
Definition:
EGHcalRecHitSelector.cc:13
EGHcalRecHitSelector::EGHcalRecHitSelector
EGHcalRecHitSelector(const edm::ParameterSet &config, edm::ConsumesCollector)
Definition:
EGHcalRecHitSelector.cc:5
CaloTowerConstituentsMap
Definition:
CaloTowerConstituentsMap.h:18
LEDCalibrationChannels.depth
depth
Definition:
LEDCalibrationChannels.py:65
edm::ParameterSet
Definition:
ParameterSet.h:47
edm::Transition
Transition
Definition:
Transition.h:12
SiStripPI::max
Definition:
SiStripPayloadInspectorHelper.h:169
EGHcalRecHitSelector.h
HcalDetId
Definition:
HcalDetId.h:12
createfilelist.int
int
Definition:
createfilelist.py:10
EGHcalRecHitSelector::minEnergyHEDepth1_
float minEnergyHEDepth1_
Definition:
EGHcalRecHitSelector.h:41
cc
submitPVResolutionJobs.desc
string desc
Definition:
submitPVResolutionJobs.py:251
EGHcalRecHitSelector::calDIEta
static int calDIEta(int iEta1, int iEta2)
Definition:
EGHcalRecHitSelector.cc:23
HcalEndcap
Definition:
HcalAssistant.h:34
HLT_FULL_cff.dEta
dEta
Definition:
HLT_FULL_cff.py:13701
EGHcalRecHitSelector::calDIPhi
static int calDIPhi(int iPhi1, int iPhi2)
Definition:
EGHcalRecHitSelector.cc:34
edm::ConsumesCollector
Definition:
ConsumesCollector.h:45
Generated for CMSSW Reference Manual by
1.8.16