ATLAS Offline Software
Loading...
Searching...
No Matches
CaloSurfaceBuilder.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5// ***************************************************************************
6// -----------------------------------------
7//
8// 25.10.2004 Creation of the class by claire.bourdarios@cern.ch
9//
10// 13.6.2006 Extention to include the tiles will work from 12.0.2 and 12.1.0
11// by Gustavo.Ordonez.Sanz@cern.ch
12//
13// 20.3.2014 entry/exit surfaces cashed for use by tracking geometry
14// sarka.todorova@cern.ch
15// ***************************************************************************
16
17#ifndef CALOTRACKINGGEOMETRY_CALOSURFACEBUILDER_H
18#define CALOTRACKINGGEOMETRY_CALOSURFACEBUILDER_H
19
21
24#include "GaudiKernel/ToolHandle.h"
25
30
32#include <vector>
33
36class IMessageSvc;
39class ICaloSurfaceHelper;
42
43namespace Trk {
44class Surface;
45class CylinderLayer;
46class DiscLayer;
50}
51
55
56class CaloSurfaceBuilder : public extends<AthAlgTool, ICaloSurfaceBuilder>
57
58{
59
60public:
61 // Constructor:
62
63 CaloSurfaceBuilder(const std::string& type,
64 const std::string& name,
65 const IInterface* parent);
66
68
69 virtual StatusCode initialize() override final;
70 virtual StatusCode finalize() override final;
71
72 virtual CaloDepthTool* getCaloDepth() override final;
73
77 const double offset,
78 const double etaCaloLocal,
79 const CaloDetDescrManager* calo_dd) const override final;
80
84 const double offset,
85 const double etaCaloLocal,
86 const CaloDetDescrManager* calo_dd) const override final;
87
91
92 virtual bool get_cylinder_surface(
93 CaloCell_ID::CaloSample sample,
94 int side,
95 Amg::Transform3D& htrans,
96 double& radius,
97 double& hphi,
98 double& hlength,
99 double& depth,
100 const CaloDetDescrManager* calo_dd) const override final;
101
102 virtual bool get_disk_surface(
103 CaloCell_ID::CaloSample sample,
104 int side,
105 Amg::Transform3D& htrans,
106 double& z,
107 double& rmin,
108 double& rmax,
109 double& hphisec,
110 double& depth,
111 const CaloDetDescrManager* calo_dd) const override final;
112
113 virtual bool get_cylinder_surface(
114 CaloSubdetNames::ALIGNVOL alvol,
115 Amg::Transform3D& htrans,
116 double& hphi,
117 std::vector<double>& radius,
118 std::vector<double>& depth,
119 std::vector<double>& hlength) const override final;
120
121 virtual bool get_disk_surface(
122 CaloSubdetNames::ALIGNVOL alvol,
123 Amg::Transform3D& htrans, double& hphi,
124 std::vector<double>& z,
125 std::vector<double>& depth,
126 std::vector<double>& rmin,
127 std::vector<double>& rmax) const override final;
128
129 virtual std::vector<std::pair<const Trk::Surface*, const Trk::Surface*>>
130 entrySurfaces(const CaloDetDescrManager* calo_dd) const override final;
131 virtual std::vector<std::pair<const Trk::Surface*, const Trk::Surface*>>
132 exitSurfaces(const CaloDetDescrManager* calo_dd) const override final;
133
134private:
135 // fill cashed surfaces
137
139
140 // cache the surfaces for TG builder
141 // These are protected by calls to fill once
142 // The assumption is calo does not change during
143 // a ~ Run
144 mutable std::vector<std::pair<const Trk::Surface*, const Trk::Surface*>>
145 m_layerEntries ATLAS_THREAD_SAFE;
146 mutable std::vector<std::pair<const Trk::Surface*, const Trk::Surface*>>
147 m_layerExits ATLAS_THREAD_SAFE;
148 mutable std::once_flag m_fillOnce ATLAS_THREAD_SAFE;
149
150 // Simplified geometry :
153
154 // Defines the depths for DD and User surfaces :
155 ToolHandle<CaloDepthTool> m_calodepth{ this,
156 "CaloDepthTool",
157 "CaloDepthTool/CaloDepthTool",
158 "CaloDepthTool to be used" };
159};
160
161inline std::vector<std::pair<const Trk::Surface*, const Trk::Surface*>>
163{
164 std::call_once(m_fillOnce, [this, calo_dd]() { fill_tg_surfaces(calo_dd); });
165 return m_layerEntries;
166}
167
168inline std::vector<std::pair<const Trk::Surface*, const Trk::Surface*>>
170{
171 std::call_once(m_fillOnce, [this, calo_dd]() { fill_tg_surfaces(calo_dd); });
172 return m_layerExits;
173}
174
175#endif // CALOTRACKINGGEOMETRY_CALOSURFACEBUILDER_H
176
CaloCell_ID::CaloSample CaloSample
Declaration of CaloDepthTool.
CaloPhiRange class declaration.
CaloSubdetNames declaration.
Eigen::Affine3d Transform3D
#define z
Define macros for attributes used to control the static checker.
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
Implementation of the ICaloDepthTool interface.Given a Track direction, checks if it is in the Calori...
This class provides the client interface for accessing the detector description information common to...
This class contains the ENUM needed to label the calorimeter pieces which be mooved independently,...
CaloSurfaceBuilder(const std::string &type, const std::string &name, const IInterface *parent)
void fill_tg_surfaces(const CaloDetDescrManager *calo_dd) const
virtual std::vector< std::pair< const Trk::Surface *, const Trk::Surface * > > exitSurfaces(const CaloDetDescrManager *calo_dd) const override final
virtual bool get_cylinder_surface(CaloCell_ID::CaloSample sample, int side, Amg::Transform3D &htrans, double &radius, double &hphi, double &hlength, double &depth, const CaloDetDescrManager *calo_dd) const override final
These methods provide the default parameters used by the CaloTrackingGeometry and Surface Builders,...
virtual Trk::Surface * CreateUserSurface(const CaloCell_ID::CaloSample sample, const double offset, const double etaCaloLocal, const CaloDetDescrManager *calo_dd) const override final
overwrite DD radius/z by CaloDepth radius, and an offset can be added
std::vector< std::pair< const Trk::Surface *, const Trk::Surface * > > m_layerEntries ATLAS_THREAD_SAFE
virtual std::vector< std::pair< const Trk::Surface *, const Trk::Surface * > > entrySurfaces(const CaloDetDescrManager *calo_dd) const override final
const TileDetDescrManager * m_tile_dd
virtual Trk::Surface * CreateLastSurface(const CaloCell_ID::CaloSample sample, const double offset, const double etaCaloLocal, const CaloDetDescrManager *calo_dd) const override final
end of the sample for the last layers of the Calo
ToolHandle< CaloDepthTool > m_calodepth
virtual StatusCode initialize() override final
virtual bool get_disk_surface(CaloCell_ID::CaloSample sample, int side, Amg::Transform3D &htrans, double &z, double &rmin, double &rmax, double &hphisec, double &depth, const CaloDetDescrManager *calo_dd) const override final
virtual CaloDepthTool * getCaloDepth() override final
ToolHandle< ICaloRecoSimpleGeomTool > m_lar_simplegeom
virtual StatusCode finalize() override final
virtual ~CaloSurfaceBuilder()
ToolHandle< ICaloRecoMaterialTool > m_lar_mat
This (clean) interface is implemented in the (rather dirty) ICaloCoordinateTool class,...
This (clean) interface is driven by 2 constraints :
Class to describe a cylindrical detector layer for tracking, it inhertis from both,...
Class to describe a disc-like detector layer for tracking, it inhertis from both, Layer base class an...
Definition DiscLayer.h:45
Interface class ITrackingVolumeBuilders It inherits from IAlgTool.
This virtual base class encapsulates the logics to build pre/post/full update material for Layer stru...
Material with information about thickness of material.
Abstract Base Class for tracking surfaces.
STL class.
std::string depth
tag string for intendation
Definition fastadd.cxx:46
Definition of ATLAS Math & Geometry primitives (Amg)
Ensure that the ATLAS eigen extensions are properly loaded.
STL namespace.
#define private