ATLAS Offline Software
Loading...
Searching...
No Matches
egammaRetaphiFillerTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5// $Id$
12
13
15#include "xAODEgamma/Egamma.h"
17
18
19namespace D3PD {
20
21
29 (const std::string& type,
30 const std::string& name,
31 const IInterface* parent)
32 : BlockFillerTool<xAOD::Egamma> (type, name, parent)
33{
34 book().ignore(); // Avoid coverity warnings.
35}
36
37
38
43{
44 CHECK( addVariable ("reta", m_reta) );
45 CHECK( addVariable ("rphi", m_rphi) );
46 return StatusCode::SUCCESS;
47}
48
49
59{
60 float e233 = 0;
61 float e237 = 0;
62 float e277 = 0;
63 e233 = p.showerShapeValue (xAOD::EgammaParameters::e233);
64 e237 = p.showerShapeValue (xAOD::EgammaParameters::e237);
65 e277 = p.showerShapeValue (xAOD::EgammaParameters::e277);
66
67 *m_reta = e277 ? e237 / e277 : 0;
68 *m_rphi = e237 ? e233 / e237 : 0;
69
70 return StatusCode::SUCCESS;
71}
72
73
74} // namespace D3PD
Helpers for checking error return status codes and reporting errors.
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode addVariable(const std::string &name, const std::type_info &ti, void *&ptr, const std::string &docstring="", const void *defval=0)
Type-safe wrapper for block filler tools.
virtual StatusCode book() final
Book variables for this block.
float * m_rphi
Variable: E233 / E237.
float * m_reta
Variable: E237 / E277.
virtual StatusCode fill(const xAOD::Egamma &p) override
Fill one block — type-safe version.
egammaRetaphiFillerTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Block filler tool for noisy FEB information.
@ e277
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 7x7
Definition EgammaEnums.h:81
@ e237
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x7
Definition EgammaEnums.h:78
@ e233
uncalibrated energy (sum of cells) of the middle sampling in a rectangle of size 3x3 (in cell units e...
Definition EgammaEnums.h:69
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Egamma_v1 Egamma
Definition of the current "egamma version".
Definition Egamma.h:17