src
RecoEgamma
EgammaTools
src
LongDeps.cc
Go to the documentation of this file.
1
#include "
RecoEgamma/EgammaTools/interface/LongDeps.h
"
2
3
using namespace
hgcal
;
4
5
LongDeps::LongDeps
(
float
radius
,
6
const
std::vector<float>& energyPerLayer,
7
float
energyEE,
8
float
energyFH,
9
float
energyBH,
10
const
std::set<int>&
layers
)
11
: energyPerLayer_(energyPerLayer),
12
radius_(
radius
),
13
energyEE_(energyEE),
14
energyFH_(energyFH),
15
energyBH_(energyBH),
16
layers_(
layers
) {
17
lay_Efrac10_
= 0;
18
lay_Efrac90_
= 0;
19
float
lay_energy = 0;
20
float
e4
= 0.;
21
// NB: energyPerLayer_ is 1-indexed
22
for
(
unsigned
lay = 1; lay <
energyPerLayer_
.size(); ++lay) {
23
lay_energy +=
energyPerLayer_
[lay];
24
if
(lay < 5)
25
e4
+=
energyPerLayer_
[lay];
26
if
(
lay_Efrac10_
== 0 && lay_energy > 0.1 *
energyEE_
) {
27
lay_Efrac10_
= lay;
28
}
29
if
(
lay_Efrac90_
== 0 && lay_energy > 0.9 *
energyEE_
) {
30
lay_Efrac90_
= lay;
31
}
32
}
33
float
etot =
energyEE_
+
energyFH_
+
energyBH_
;
34
e4oEtot_
= (etot > 0.) ?
e4
/ etot : -1.;
35
}
hgcal::LongDeps::lay_Efrac90_
int lay_Efrac90_
Definition:
LongDeps.h:45
hgcalTBTopologyTester_cfi.layers
layers
Definition:
hgcalTBTopologyTester_cfi.py:8
hgcal::LongDeps::energyEE_
float energyEE_
Definition:
LongDeps.h:40
LongDeps.h
hgcal::LongDeps::LongDeps
LongDeps(float radius, const std::vector< float > &energyPerLayer, float energyEE, float energyFH, float energyBH, const std::set< int > &layers)
Definition:
LongDeps.cc:5
hgcal
Definition:
EgammaPCAHelper.h:31
hgcal::LongDeps::energyFH_
float energyFH_
Definition:
LongDeps.h:41
CosmicsPD_Skims.radius
radius
Definition:
CosmicsPD_Skims.py:135
hgcal::LongDeps::lay_Efrac10_
int lay_Efrac10_
Definition:
LongDeps.h:44
vertexPlots.e4
e4
Definition:
vertexPlots.py:64
hgcal::LongDeps::energyPerLayer_
std::vector< float > energyPerLayer_
Definition:
LongDeps.h:38
hgcal::LongDeps::e4oEtot_
float e4oEtot_
Definition:
LongDeps.h:46
hgcal::LongDeps::energyBH_
float energyBH_
Definition:
LongDeps.h:42
Generated for CMSSW Reference Manual by
1.8.14