ATLAS Offline Software
EMShowerBuilder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef EGAMMATOOLS_EMSHOWERBUILDER_H
6 #define EGAMMATOOLS_EMSHOWERBUILDER_H
7 
28 // INCLUDE HEADER FILES:
29 
33 
35 #include "GaudiKernel/AlgTool.h"
36 #include "GaudiKernel/Algorithm.h"
37 #include "GaudiKernel/ToolHandle.h"
39 
41 #include "xAODEgamma/EgammaEnums.h"
42 #include "xAODEgamma/EgammaFwd.h"
45 
46 class StoreGateSvc;
47 class CaloCellContainer;
48 class IChronoStatSvc;
50 
51 class EMShowerBuilder final
52  : public AthAlgTool
53  , virtual public IEMShowerBuilder
54 {
55 public:
57  EMShowerBuilder(const std::string& type,
58  const std::string& name,
59  const IInterface* parent);
60 
62  ~EMShowerBuilder() = default;
63 
65  virtual StatusCode initialize() override final;
67  virtual StatusCode execute(const EventContext& ctx,
69  xAOD::Egamma*) const override final;
70 
73  xAOD::Egamma*) const override final;
75  virtual StatusCode finalize() override;
76 
77 private:
79  template <typename T> StatusCode RetrieveTool(ToolHandle<T> &tool, bool tool_requested);
83  const CaloCellContainer* cellcoll) const;
87  const xAOD::CaloCluster* clus,
88  const CaloCellContainer* cellcoll) const;
92 
94  SG::ReadHandleKey<CaloCellContainer> m_cellsKey{
95  this,
96  "CellsName",
97  "AllCalo",
98  "Names of containers which contain cells"
99  };
100 
102  Gaudi::Property<std::vector<int>> m_caloNums{ this,
103  "CaloNums",
104  {},
105  "list of calo to treat" };
106 
108  ToolHandle<IegammaShowerShape> m_ShowerShapeTool{
109  this,
110  "ShowerShapeTool",
111  "egammaShowerShape/egammashowershape",
112  "Handle of instance of egammaShowerShape Tool to be run"
113  };
114 
116  ToolHandle<IegammaIso> m_HadronicLeakageTool{
117  this,
118  "HadronicLeakageTool",
119  "egammaIso",
120  "Handle of the EMCaloIsolationTool for Hadronic leakage"
121  };
122 
124  Gaudi::Property<bool> m_Print{ this,
125  "Print",
126  false,
127  "in case of extra prints" };
128 
131  Gaudi::Property<bool> m_UseShowerShapeTool{
132  this,
133  "UseShowerShapeTool",
134  true,
135  "Boolean to call shower shape calculation and filling"
136  };
137 
140  Gaudi::Property<bool> m_UseCaloIsoTool{
141  this,
142  "UseCaloIsoTool",
143  true,
144  "Boolean to call hadronic leakage calculation and filling"
145  };
146 
148  Gaudi::Property<bool> m_isCosmics{ this,
149  "isCosmics",
150  false,
151  "Boolean for use of cosmics" };
152 };
153 
154 #endif
grepfile.info
info
Definition: grepfile.py:38
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
EMShowerBuilder::execute
virtual StatusCode execute(const EventContext &ctx, const CaloDetDescrManager &cmgr, xAOD::Egamma *) const override final
standard execute method
Definition: EMShowerBuilder.cxx:73
EgammaFwd.h
EMShowerBuilder::CalcShowerShape
StatusCode CalcShowerShape(xAOD::Egamma *eg, const CaloDetDescrManager &cmgr, const CaloCellContainer *cellcoll) const
calculate shower shapes
Definition: EMShowerBuilder.cxx:102
IEMShowerBuilder.h
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
ParticleTest.eg
eg
Definition: ParticleTest.py:29
EMShowerBuilder::m_isCosmics
Gaudi::Property< bool > m_isCosmics
boolean to know if we are looking at cosmic data
Definition: EMShowerBuilder.h:148
Egamma
Definition: ClusMomentumPlots.cxx:11
taskman.template
dictionary template
Definition: taskman.py:317
EMShowerBuilder::m_UseShowerShapeTool
Gaudi::Property< bool > m_UseShowerShapeTool
Boolean to call shower shape calculation and filling (NB: this could be important when redoing calcul...
Definition: EMShowerBuilder.h:131
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
EMShowerBuilder::m_HadronicLeakageTool
ToolHandle< IegammaIso > m_HadronicLeakageTool
Tool for hadronic leakage calculation.
Definition: EMShowerBuilder.h:116
EMShowerBuilder::EMShowerBuilder
EMShowerBuilder(const std::string &type, const std::string &name, const IInterface *parent)
Default constructor.
Definition: EMShowerBuilder.cxx:25
EMShowerBuilder::m_Print
Gaudi::Property< bool > m_Print
boolean to print results
Definition: EMShowerBuilder.h:124
EMShowerBuilder
Definition: EMShowerBuilder.h:54
StoreGateSvc
The Athena Transient Store API.
Definition: StoreGateSvc.h:125
CaloClusterFwd.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
test_pyathena.parent
parent
Definition: test_pyathena.py:15
EMShowerBuilder::RetrieveTool
StatusCode RetrieveTool(ToolHandle< T > &tool, bool tool_requested)
Wraps tool retrival to ensure it is has a name.
Definition: EMShowerBuilder.cxx:52
CaloCluster
Principal data class for CaloCell clusters.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:79
EMShowerBuilder::m_caloNums
Gaudi::Property< std::vector< int > > m_caloNums
Obsolete enum on the layers to use for the HadLeakage variables.
Definition: EMShowerBuilder.h:102
EMShowerBuilder::m_UseCaloIsoTool
Gaudi::Property< bool > m_UseCaloIsoTool
Boolean to call calo isolation variables calculation and filling (NB: this could be important when re...
Definition: EMShowerBuilder.h:140
EMShowerBuilder::m_cellsKey
SG::ReadHandleKey< CaloCellContainer > m_cellsKey
Cell container.
Definition: EMShowerBuilder.h:94
EMShowerBuilder::FillEMShowerShape
StatusCode FillEMShowerShape(xAOD::Egamma *eg, const IegammaShowerShape::Info &info) const
fill shower detail from shower shape calculation
Definition: EMShowerBuilder.cxx:190
EMShowerBuilder::CalcHadronicLeakage
StatusCode CalcHadronicLeakage(xAOD::Egamma *eg, const CaloDetDescrManager &cmgr, const xAOD::CaloCluster *clus, const CaloCellContainer *cellcoll) const
calculate Hadronic leakage
Definition: EMShowerBuilder.cxx:141
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
EMShowerBuilder::executeWithCells
virtual StatusCode executeWithCells(const CaloCellContainer *cellcoll, const CaloDetDescrManager &cmgr, xAOD::Egamma *) const override final
@Execute passing the cells explicitly
Definition: EMShowerBuilder.cxx:93
IegammaShowerShape
Definition: IegammaShowerShape.h:30
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
python.Dumpers.typename
def typename(t)
Definition: Dumpers.py:194
EMShowerBuilder::m_ShowerShapeTool
ToolHandle< IegammaShowerShape > m_ShowerShapeTool
Tool for shower shape calculation.
Definition: EMShowerBuilder.h:108
EgammaEnums.h
VertexContainer.h
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
EMShowerBuilder::~EMShowerBuilder
~EMShowerBuilder()=default
Destructor.
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
IegammaShowerShape.h
IegammaIso.h
AthAlgTool
Definition: AthAlgTool.h:26
EMShowerBuilder::finalize
virtual StatusCode finalize() override
finalize method
Definition: EMShowerBuilder.cxx:67
IEMShowerBuilder
Definition: IEMShowerBuilder.h:32
TrackParticleContainer.h
EMShowerBuilder::initialize
virtual StatusCode initialize() override final
initialize method
Definition: EMShowerBuilder.cxx:36
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35