ATLAS Offline Software
Classes | Static Public Member Functions | List of all members
egammaPreSamplerShape Class Reference

EM cluster shower shape calculations in presampler of ECAL. More...

#include <egammaPreSamplerShape.h>

Collaboration diagram for egammaPreSamplerShape:

Classes

struct  Info
 

Static Public Member Functions

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

Detailed Description

EM cluster shower shape calculations in presampler of ECAL.

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

Definition at line 21 of file egammaPreSamplerShape.h.

Member Function Documentation

◆ execute()

StatusCode egammaPreSamplerShape::execute ( const xAOD::CaloCluster cluster,
const CaloDetDescrManager cmgr,
const CaloCellContainer cell_container,
Info info 
)
static

Definition at line 13 of file egammaPreSamplerShape.cxx.

17 {
18  //
19  // Estimate shower shapes in pre sampler
20  // based on hottest cell and deta,dphi windows
21  // defined from the pre sampler granularity
22  // with eta = cluster->etaSample(sam)
23  // phi = cluster->phiSample(sam)
24  // deta = 0.025
25  // dphi = 10.*0.1*(2.*M_PI/64)
26  //
27 
28  // check if cluster is in barrel or in the end-cap
29  if (!cluster.inBarrel() && !cluster.inEndcap()) {
30  return StatusCode::SUCCESS;
31  }
32  // check if cluster is in barrel or end-cap
33  const bool in_barrel = egammaEnergyPositionAllSamples::inBarrel(cluster, 0);
34 
35  // define accordingly the position of CaloSampling
38 
39  //
40  // From the original (eta,phi) position, find the location
41  // (sampling, barrel/end-cap, granularity)
42  // For this we use the tool egammaEnergyAllSamples
43  // which uses the CaloCluster method inBarrel() and inEndcap()
44  // but also, in case close to the crack region where both
45  // boolean can be true, the energy reconstructed in the sampling
46  //
47 
48  // Fetch eta and phi of the sampling
49  // Note that we use m_sam2 in the 2nd sampling, not in presampler
50  double eta = cluster.etamax(sam2);
51  double phi = cluster.phimax(sam2);
52 
53  // bad patch to avoid crash with dde
54  if ((eta == 0. && phi == 0.) || std::abs(eta) > 100) {
55  return StatusCode::SUCCESS;
56  }
57  // granularity in (eta,phi) in the pre sampler
59  bool barrel = false;
60  int sampling_or_module = 0;
61  // CaloCellList needs both enums: subCalo and CaloSample
62  CaloDetDescrManager::decode_sample(subcalo, barrel, sampling_or_module, sam);
63 
64  // Get the corresponding grannularities : needs to know where you are
65  // the easiest is to look for the CaloDetDescrElement
66  const CaloDetDescrElement* dde =
67  cmgr.get_element(subcalo, sampling_or_module, barrel, eta, phi);
68  // if object does not exist then return
69  if (!dde) {
70  return StatusCode::SUCCESS;
71  }
72  // local granularity
73  double deta = dde->deta();
74  double dphi = dde->dphi();
75  // change eta,phi values
76  eta = dde->eta_raw();
77  phi = dde->phi_raw();
78  // estimate the relevant quantities around the hottest cell
79  // in the following eta X phi windows
81  StatusCode sc = StatusCode::SUCCESS;
82  // 1X1
83  sc = calc.fill(cmgr, &cell_container, eta, phi, deta, dphi, sam);
84  if (sc.isFailure()) {
85  return sc;
86  }
87  info.e011 = calc.em();
88  // 3X3
89  sc = calc.fill(cmgr, &cell_container, eta, phi, 3. * deta, 3. * dphi, sam);
90  if (sc.isFailure()) {
91  return sc;
92  }
93  info.e033 = calc.em();
94  return StatusCode::SUCCESS;
95 }

The documentation for this class was generated from the following files:
grepfile.info
info
Definition: grepfile.py:38
CaloDetDescrElement::deta
float deta() const
cell deta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:356
xAOD::CaloCluster_v1::phimax
float phimax(const CaloSample sampling) const
Retrieve of cell with maximum energy in given sampling.
Definition: CaloCluster_v1.cxx:589
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
egammaEnergyPositionAllSamples::inBarrel
bool inBarrel(const xAOD::CaloCluster &cluster, int is)
return boolean to know if we are in barrel/end-cap
CaloDetDescrManager_Base::get_element
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
Definition: CaloDetDescrManager.cxx:159
xAOD::CaloCluster_v1::etamax
float etamax(const CaloSample sampling) const
Retrieve of cell with maximum energy in given sampling.
Definition: CaloCluster_v1.cxx:576
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
CaloDetDescrElement::eta_raw
float eta_raw() const
cell eta_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:350
xAOD::CaloCluster_v1::inEndcap
bool inEndcap() const
Returns true if at least one clustered cell in the endcap.
Definition: CaloCluster_v1.h:901
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CaloCell_Base_ID::SUBCALO
SUBCALO
enumeration of sub calorimeters
Definition: CaloCell_Base_ID.h:46
xAOD::CaloCluster_v1::inBarrel
bool inBarrel() const
Returns true if at least one clustered cell in the barrel.
Definition: CaloCluster_v1.h:896
CaloDetDescrElement::dphi
float dphi() const
cell dphi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:358
CaloLayerCalculator
Definition: CaloLayerCalculator.h:82
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
CaloDetDescrManager_Base::decode_sample
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:
Definition: CaloDetDescrManager.cxx:1468
DetectorZone::barrel
@ barrel
CaloCell_Base_ID::LAREM
@ LAREM
Definition: CaloCell_Base_ID.h:46
beamspotnt.calc
calc
Definition: bin/beamspotnt.py:1252
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56
CaloDetDescrElement::phi_raw
float phi_raw() const
cell phi_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:352