6#include "GaudiKernel/EventContext.h"
7#include "GaudiKernel/IChronoStatSvc.h"
26 const std::string& name,
27 const IInterface* parent)
31 declareInterface<IEMShowerBuilder>(
this);
39 " Initializing EMShowerBuilder, m_cellKey = " <<
m_cellsKey.key());
47 return StatusCode::SUCCESS;
54 if (!tool_requested) {
56 return StatusCode::SUCCESS;
60 return StatusCode::FAILURE;
63 return StatusCode::SUCCESS;
69 return StatusCode::SUCCESS;
81 return StatusCode::SUCCESS;
89 return StatusCode::SUCCESS;
98 return StatusCode::SUCCESS;
112 return StatusCode::SUCCESS;
117 if (clus ==
nullptr) {
119 return StatusCode::SUCCESS;
121 if (cellcoll ==
nullptr) {
123 return StatusCode::SUCCESS;
137 return StatusCode::SUCCESS;
152 return StatusCode::SUCCESS;
156 return StatusCode::SUCCESS;
161 if (
sc.isFailure()) {
167 const double et = eg->caloCluster()->et();
168 value =
static_cast<float>(info.ethad1);
170 eg->setShowerShapeValue(
et != 0. ? value /
et : 0.,
172 value =
static_cast<float>(info.ethad);
174 eg->setShowerShapeValue(
et != 0. ? value /
et : 0.,
176 value =
static_cast<float>(info.ehad1);
178 return StatusCode::SUCCESS;
181 unsigned int iflag = 0;
196 return StatusCode::SUCCESS;
203 value =
static_cast<float>(info.e011);
206 value =
static_cast<float>(info.e033);
209 value =
static_cast<float>(info.e132);
212 value =
static_cast<float>(info.e1152);
215 value =
static_cast<float>(info.f1);
218 value =
static_cast<float>(info.f1core);
221 value =
static_cast<float>(info.ws3c);
224 value =
static_cast<float>(info.esec);
227 value =
static_cast<float>(info.esec1);
230 value =
static_cast<float>(info.fside);
233 value =
static_cast<float>(info.widths5);
236 value =
static_cast<float>(info.poscs1);
239 value =
static_cast<float>(info.asymmetrys3);
242 value =
static_cast<float>(info.deltaEtaTrackShower);
245 value =
static_cast<float>(info.deltaEtaTrackShower7);
248 value =
static_cast<float>(info.emins1);
251 value =
static_cast<float>(info.emaxs1);
254 value =
static_cast<float>(info.etas3);
257 value =
static_cast<float>(info.wstot);
263 value =
static_cast<float>(info.e233);
266 value =
static_cast<float>(info.e235);
269 value =
static_cast<float>(info.e237);
272 value =
static_cast<float>(info.e255);
275 value =
static_cast<float>(info.e277);
278 value =
static_cast<float>(info.etaw);
281 value =
static_cast<float>(info.width);
284 value =
static_cast<float>(info.poscs2);
290 value =
static_cast<float>(info.f3);
293 value =
static_cast<float>(info.f3core);
296 value =
static_cast<float>(info.e333);
299 value =
static_cast<float>(info.e335);
302 value =
static_cast<float>(info.e337);
305 value =
static_cast<float>(info.e377);
311 value =
static_cast<float>(info.reta3337_allcalo);
314 value =
static_cast<float>(info.ecore);
319 float valueSecond = 0;
321 value =
static_cast<float>(info.e277);
322 valueSecond =
static_cast<float>(info.e237);
323 eg->setShowerShapeValue(value != 0 ? valueSecond / value : 0.,
326 value =
static_cast<float>(info.e233);
327 valueSecond =
static_cast<float>(info.e237);
328 eg->setShowerShapeValue(valueSecond != 0 ? value / valueSecond : 0.,
331 value =
static_cast<float>(info.emaxs1);
332 valueSecond =
static_cast<float>(info.esec1);
333 eg->setShowerShapeValue(std::abs(value + valueSecond) > 0.
334 ? (value - valueSecond) / (value + valueSecond)
338 value =
static_cast<float>(info.emins1);
339 eg->setShowerShapeValue((valueSecond - value),
341 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Definition of CaloDetDescrManager.
Handle class for reading from StoreGate.
Container class for CaloCell.
This class provides the client interface for accessing the detector description information common to...
virtual StatusCode executeWithCells(const CaloCellContainer *cellcoll, const CaloDetDescrManager &cmgr, xAOD::Egamma *) const override final
@Execute passing the cells explicitly
StatusCode CalcShowerShape(xAOD::Egamma *eg, const CaloDetDescrManager &cmgr, const CaloCellContainer *cellcoll) const
calculate shower shapes
virtual StatusCode initialize() override final
initialize method
Gaudi::Property< std::vector< int > > m_caloNums
Obsolete enum on the layers to use for the HadLeakage variables.
StatusCode CalcHadronicLeakage(xAOD::Egamma *eg, const CaloDetDescrManager &cmgr, const xAOD::CaloCluster *clus, const CaloCellContainer *cellcoll) const
calculate Hadronic leakage
virtual StatusCode execute(const EventContext &ctx, const CaloDetDescrManager &cmgr, xAOD::Egamma *) const override final
standard execute method
StatusCode RetrieveTool(ToolHandle< T > &tool, bool tool_requested)
Wraps tool retrieval to ensure it is has a name.
Gaudi::Property< bool > m_UseShowerShapeTool
Boolean to call shower shape calculation and filling (NB: this could be important when redoing calcul...
ToolHandle< IegammaIso > m_HadronicLeakageTool
Tool for hadronic leakage calculation.
virtual StatusCode finalize() override
finalize method
ToolHandle< IegammaShowerShape > m_ShowerShapeTool
Tool for shower shape calculation.
StatusCode FillEMShowerShape(xAOD::Egamma *eg, const IegammaShowerShape::Info &info) const
fill shower detail from shower shape calculation
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
Cell container.
Gaudi::Property< bool > m_UseCaloIsoTool
Boolean to call calo isolation variables calculation and filling (NB: this could be important when re...
EMShowerBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Default constructor.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
@ DeadCellTileS0
Dead cell in the Tile Calorimeter S0 affecting the hadronic leakage calculation.
@ DeadCellTileS1S2
Dead cell in the Tile Calorimeter S1,2,3 affecting the hadronic leakage calculation.
@ e235
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x5
@ e337
uncalibrated energy (sum of cells) of the third sampling in a rectangle of size 3x7
@ wtots1
shower width is determined in a window detaxdphi = 0,0625 ×~0,2, corresponding typically to 20 strips...
@ pos7
Difference between the track and the shower positions: sum_{i=i_m-7}^{i=i_m+7}E_i x (i-i_m) / sum_{i=...
@ f3core
E3(3x3)/E fraction of the energy reconstructed in the third compartment of the electromagnetic calori...
@ ethad1
transverse energy in the first sampling of the hadronic calorimeters behind the cluster calculated fr...
@ e277
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
@ e237
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x7
@ ethad
ET leakage into hadronic calorimeter with exclusion of energy in CaloSampling::TileGap3.
@ e1152
uncalibrated energy (sum of cells) in strips in a 15x2 window in cells in eta X phi
@ f3
fraction of energy reconstructed in 3rd sampling
@ poscs2
relative position in eta within cell in 2nd sampling
@ ecore
core energy in em calo E(core) = E0(3x3) + E1(15x2) + E2(5x5) + E3(3x5)
@ f1
E1/E = fraction of energy reconstructed in the first sampling, where E1 is energy in all strips belon...
@ pos
difference between shower cell and predicted track in +/- 1 cells
@ widths2
same as egammaParameters::weta2 but without corrections on particle impact point inside the cell
@ e2ts1
2nd max in strips calc by summing 3 strips
@ poscs1
relative position in eta within cell in 1st sampling
@ Eratio
(emaxs1-e2tsts1)/(emaxs1+e2tsts1)
@ e335
uncalibrated energy (sum of cells) of the third sampling in a rectangle of size 3x5
@ e377
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
@ e333
uncalibrated energy (sum of cells) of the third sampling in a rectangle of size 3x3
@ emaxs1
energy of strip with maximal energy deposit
@ e255
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 5x5
@ ehad1
E leakage into 1st sampling of had calo (CaloSampling::HEC0 + CaloSampling::TileBar0 + CaloSampling::...
@ barys1
barycentre in sampling 1 calculated in 3 strips
@ e233
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x3 (in cell units e...
@ asy1
uncorr asymmetry in 3 strips in the 1st sampling
@ e033
uncalibrated energy (sum of cells) in presampler in a 3x3 window in cells in eta X phi
@ e132
uncalibrated energy (sum of cells) in strips in a 3x2 window in cells in eta X phi
@ fracs1
shower shape in the shower core : [E(+/-3)-E(+/-1)]/E(+/-1), where E(+/-n) is the energy in ± n strip...
@ r33over37allcalo
1-ratio of energy in 3x3 over 3x7 cells; E(3x3) = E0(1x1) + E1(3x1) + E2(3x3) + E3(3x3); E(3x7) = E0(...
@ weta2
the lateral width is calculated with a window of 3x5 cells using the energy weighted sum over all cel...
@ e011
uncalibrated energy (sum of cells) in presampler in a 1x1 window in cells in eta X phi
@ weta1
shower width using +/-3 strips around the one with the maximal energy deposit: w3 strips = sqrt{sum(E...
@ e2tsts1
energy of the cell corresponding to second energy maximum in the first sampling
@ emins1
energy reconstructed in the strip with the minimal value between the first and second maximum
@ widths1
same as egammaParameters::weta1 but without corrections on particle impact point inside the cell
@ f1core
E1(3x1)/E = fraction of the energy reconstructed in the first longitudinal compartment of the electro...
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Egamma_v1 Egamma
Definition of the current "egamma version".
Extra patterns decribing particle interation process.