22{
23
24
25
26
27
28
29
30
31
33
36 }
37
38
40
41
43
44
45
48 int sampling_or_module = 0;
49
50 float etacell = cluster.
etamax(sam);
53 if ((
eta == 0. &&
phi == 0.) || std::abs(
eta) > 100) {
55 }
56
58
59
60
61 const CaloDetDescrElement* dde =
63
64 if (!dde) {
66 }
67
68 double deta = dde->
deta();
69 double dphi = dde->
dphi();
70
71
72
73
74
75 CaloLayerCalculator
calc;
77 &cell_container,
80 7. * deta,
81 7. * dphi,
82 sam);
83 double etamax =
calc.etarmax();
84 double phimax =
calc.phirmax();
85
86
87
88 CaloCellList cell_list(&cmgr, &cell_container);
89 cell_list.select(etamax, phimax, 7. * deta, 7. * dphi, sam);
90
91
92
93
94
95 calc.fill(cell_list.begin(),
96 cell_list.end(),
97 etamax,
98 phimax,
99 7. * deta,
100 7. * dphi,
101 sam);
103
104 calc.fill(cell_list.begin(),
105 cell_list.end(),
106 etamax,
107 phimax,
108 3. * deta,
109 7. * dphi,
110 sam);
112
113 if (!doRetaOnly) {
114
115
116
117 calc.fill(cell_list.begin(),
118 cell_list.end(),
119 etamax,
120 phimax,
121 3. * deta,
122 3. * dphi,
123 sam);
125
126 calc.fill(cell_list.begin(),
127 cell_list.end(),
128 etamax,
129 phimax,
130 3. * deta,
131 5. * dphi,
132 sam);
134 double etaw =
calc.etas();
139
140 calc.fill(cell_list.begin(),
141 cell_list.end(),
142 etamax,
143 phimax,
144 5. * deta,
145 5. * dphi,
146 sam);
148 }
150}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
CaloCell_Base_ID::SUBCALO SUBCALO
float dphi() const
cell dphi
float deta() const
cell deta
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
static void decode_sample(CaloCell_ID::SUBCALO &subCalo, bool &barrel, int &sampling_or_module, CaloCell_ID::CaloSample sample)
translate between the 2 ways to label a sub-detector:
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
bool inBarrel() const
Returns true if at least one clustered cell in the barrel.
bool inEndcap() const
Returns true if at least one clustered cell in the endcap.
float etamax(const CaloSample sampling) const
Retrieve of cell with maximum energy in given sampling.
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
::StatusCode StatusCode
StatusCode definition for legacy code.
bool inBarrel(const xAOD::CaloCluster &cluster, int is)
return boolean to know if we are in barrel/end-cap
float Correct(float eta, float etacell, float width)
returns corrected width at eta.
double RelPosition(const float eta, const float etacell)
returns method within the cell