ATLAS Offline Software
Loading...
Searching...
No Matches
egammaMiddleShape Class Reference

EM cluster shower shape calculations in 2nd ECAL sampling Calculate the width in the strip layer around the eta,phi of the hottest cell in the middle layer. More...

#include <egammaMiddleShape.h>

Collaboration diagram for egammaMiddleShape:

Classes

struct  Info

Static Public Member Functions

static StatusCode execute (const xAOD::CaloCluster &cluster, const CaloDetDescrManager &cmgr, const CaloCellContainer &cell_container, Info &info, bool doRetaOnly=false)

Detailed Description

EM cluster shower shape calculations in 2nd ECAL sampling Calculate the width in the strip layer around the eta,phi of the hottest cell in the middle layer.

Author
Frederic Derue derue.nosp@m.@lpn.nosp@m.he.in.nosp@m.2p3..nosp@m.fr
Christos Anastopoulos

Definition at line 27 of file egammaMiddleShape.h.

Member Function Documentation

◆ execute()

StatusCode egammaMiddleShape::execute ( const xAOD::CaloCluster & cluster,
const CaloDetDescrManager & cmgr,
const CaloCellContainer & cell_container,
Info & info,
bool doRetaOnly = false )
static

Definition at line 17 of file egammaMiddleShape.cxx.

22{
23 //
24 // Estimate shower shapes from 2nd compartment
25 // based on hottest cell and deta,dphi
26 // with eta = cluster->eta(sam)
27 // phi = cluster->phi(sam)
28 // and search for hottest cell in a 7X7 window
29 // in the second sampling
30 //
31 //
32 StatusCode sc = StatusCode::SUCCESS;
33 // check if cluster is in barrel or in the end-cap
34 if (!cluster.inBarrel() && !cluster.inEndcap()) {
35 return sc;
36 }
37
38 // check if cluster is in barrel or end-cap
39 const bool in_barrel = egammaEnergyPositionAllSamples::inBarrel(cluster, 2);
40
41 // define accordingly position of CaloSampling
42 const CaloSampling::CaloSample sam = in_barrel ? CaloSampling::EMB2 : CaloSampling::EME2;
43
44 // granularity in (eta,phi) in the pre sampler
45 // CaloCellList needs both enums: subCalo and CaloSample
46 bool barrel = false;
48 int sampling_or_module = 0;
49
50 float etacell = cluster.etamax(sam);
51 double eta = cluster.etaSample(sam);
52 double phi = cluster.phiSample(sam);
53 if ((eta == 0. && phi == 0.) || std::abs(eta) > 100) {
54 return sc;
55 }
56
57 CaloDetDescrManager::decode_sample(subcalo, barrel, sampling_or_module, sam);
58
59 // Get the corresponding grannularities : needs to know where you are
60 // the easiest is to look for the CaloDetDescrElement
61 const CaloDetDescrElement* dde =
62 cmgr.get_element(subcalo, sampling_or_module, barrel, eta, phi);
63 // if object does not exist then return
64 if (!dde) {
65 return sc;
66 }
67 // local granularity
68 double deta = dde->deta();
69 double dphi = dde->dphi();
70
71 // Find the hottest cell
72 // in a 7x7 (7deta,7*dphi) window
73 // opened in the eta/phi of the
74 // cluster in this sampling
75 CaloLayerCalculator calc;
76 sc = calc.fill(cmgr,
77 &cell_container,
78 cluster.etaSample(sam),
79 cluster.phiSample(sam),
80 7. * deta,
81 7. * dphi,
82 sam);
83 double etamax = calc.etarmax();
84 double phimax = calc.phirmax();
85
86 //select the widest cell list we will use
87 //i.e a 7x7 around the found hottest cell
88 CaloCellList cell_list(&cmgr, &cell_container);
89 cell_list.select(etamax, phimax, 7. * deta, 7. * dphi, sam);
90
91 // Using that list do the filling
92 // of all the sub windows.
93
94 // 7x7
95 calc.fill(cell_list.begin(),
96 cell_list.end(),
97 etamax,
98 phimax,
99 7. * deta,
100 7. * dphi,
101 sam);
102 info.e277 = calc.em();
103 // 3X7
104 calc.fill(cell_list.begin(),
105 cell_list.end(),
106 etamax,
107 phimax,
108 3. * deta,
109 7. * dphi,
110 sam);
111 info.e237 = calc.em();
112
113 if (!doRetaOnly) {
114 // estimate the relevant quantities around the hottest cell
115 // in the following eta X phi windows
116 // 3X3
117 calc.fill(cell_list.begin(),
118 cell_list.end(),
119 etamax,
120 phimax,
121 3. * deta,
122 3. * dphi,
123 sam);
124 info.e233 = calc.em();
125 // 3X5
126 calc.fill(cell_list.begin(),
127 cell_list.end(),
128 etamax,
129 phimax,
130 3. * deta,
131 5. * dphi,
132 sam);
133 info.e235 = calc.em();
134 double etaw = calc.etas();
135 info.phiw = calc.phis();
136 info.etaw = egammaqweta2c::Correct(eta, etacell, etaw);
137 info.width = etaw;
138 info.poscs2 = egammaqweta2c::RelPosition(eta, etacell);
139 // 5X5
140 calc.fill(cell_list.begin(),
141 cell_list.end(),
142 etamax,
143 phimax,
144 5. * deta,
145 5. * dphi,
146 sam);
147 info.e255 = calc.em();
148 }
149 return sc;
150}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
static Double_t sc
CaloCell_Base_ID::SUBCALO SUBCALO
Definition CaloCell_ID.h:50
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

The documentation for this class was generated from the following files: