ATLAS Offline Software
GeometryWriter.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef JIVEXML_GEOMETRYWRITER
6 #define JIVEXML_GEOMETRYWRITER
7 
8 #include "CLHEP/Geometry/Point3D.h"
11 
13 #include <string>
14 #include <vector>
15 #include <fstream>
16 #include <memory>
17 
18 class CaloDetDescriptor;
19 class Identifier;
21 class LArDetectorManager;
22 class PixelID;
23 class SCT_ID;
24 class TRT_ID;
25 
26 namespace InDetDD {
27  class PixelDetectorManager;
28  class SCT_DetectorManager;
29  class TRT_DetectorManager;
30 }
31 
32 namespace JiveXML{
33 
37  class GeometryWriter : virtual public IGeometryWriter, public AthAlgTool {
38 
39  public:
40 
46  GeometryWriter(const std::string& t,const std::string& n,const IInterface* p):
47  AthAlgTool(t,n,p){declareInterface<IGeometryWriter>(this);};
48 
52  virtual StatusCode writeGeometry() override;
53 
54  virtual ~GeometryWriter(){};
55 
56  private:
57 
62  void writeHeader(std::ofstream &out);
63 
68  void writePixelGeometry(std::ofstream &out);
69 
74  void writeSCTGeometry(std::ofstream &out);
75 
80  void writeTRTGeometry(std::ofstream &out);
81 
86  void writeSolenoidGeometry(std::ofstream &out);
87 
92  void writeLArGeometry(std::ofstream &out);
93 
98  void writeMBTSGeometry(std::ofstream &out);
99 
104  void writeTILEGeometry(std::ofstream &out);
105 
110  void writeFooter(std::ofstream &out);
111 
121  void writeDiscElement(std::ofstream &out, std::string p, std::string c,
122  std::string n, double rIn, double rOut);
123 
135  void writeRectangleElement(std::ofstream &out, std::string p, std::string c,
136  std::string n, double xIn, double xOut,
137  double yIn, double yOut);
138 
151  void writeRectanglishElement(std::ofstream &out, std::string p, std::string c,
152  std::string n, double xIn, double xOut,
153  double yIn, double yOut);
154 
155 
158  const PixelID * m_pixelIdHelper{nullptr};
159 
162  const SCT_ID * m_sctIdHelper{nullptr};
163 
166  const TRT_ID * m_trtIdHelper{nullptr};
167 
169  std::unique_ptr<CaloDetDescrManager> m_calo_manager;
170 
173 
175  static const int m_numCaloTypes = 24;
176 
177  std::vector<double> m_larMin;
178  std::vector<double> m_larMax;
179  };
180 }
181 #endif
JiveXML::GeometryWriter::writeGeometry
virtual StatusCode writeGeometry() override
Writes the inner detector and calorimeter geometry to an XML file.
Definition: GeometryWriter.cxx:35
InDetDD::SCT_DetectorManager
Definition: SCT_DetectorManager.h:49
IGeometryWriter.h
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
JiveXML::GeometryWriter::writeLArGeometry
void writeLArGeometry(std::ofstream &out)
Writes the geometry of the LAr calorimeters.
Definition: GeometryWriter.cxx:612
JiveXML::GeometryWriter::m_pixelIdHelper
const PixelID * m_pixelIdHelper
Definition: GeometryWriter.h:158
JiveXML::GeometryWriter::m_larMax
std::vector< double > m_larMax
Definition: GeometryWriter.h:178
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
JiveXML::GeometryWriter::m_silicon_manager
const InDetDD::SCT_DetectorManager * m_silicon_manager
Silicon detector manager and ID helper.
Definition: GeometryWriter.h:161
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
JiveXML::GeometryWriter::m_trt_manager
const InDetDD::TRT_DetectorManager * m_trt_manager
TRT detector manager and ID helper.
Definition: GeometryWriter.h:165
JiveXML::GeometryWriter::m_tile_manager
const TileDetDescrManager * m_tile_manager
Definition: GeometryWriter.h:171
CaloDetDescrManager.h
Definition of CaloDetDescrManager.
JiveXML::GeometryWriter::m_sctIdHelper
const SCT_ID * m_sctIdHelper
Definition: GeometryWriter.h:162
JiveXML::GeometryWriter::m_calo_manager
std::unique_ptr< CaloDetDescrManager > m_calo_manager
Calorimeter detector manager.
Definition: GeometryWriter.h:169
JiveXML::GeometryWriter::writeSCTGeometry
void writeSCTGeometry(std::ofstream &out)
Writes the geometry of the silicon detector.
Definition: GeometryWriter.cxx:357
TileDetDescrManager
Definition: TileDetDescrManager.h:33
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
JiveXML::GeometryWriter::m_trtIdHelper
const TRT_ID * m_trtIdHelper
Definition: GeometryWriter.h:166
AthAlgTool.h
JiveXML::GeometryWriter::m_lar_manager
const LArDetectorManager * m_lar_manager
Definition: GeometryWriter.h:172
JiveXML::GeometryWriter::writeTILEGeometry
void writeTILEGeometry(std::ofstream &out)
Writes the geometry of the TILE calorimeters.
Definition: GeometryWriter.cxx:555
LArDetectorManager
Stored in storegate. Provides access to EMB, EMEC, HEC and FCAL Detector Managers....
Definition: LArDetectorManager.h:26
JiveXML::GeometryWriter::writeSolenoidGeometry
void writeSolenoidGeometry(std::ofstream &out)
Writes the (hardcoded) geometry of the solenoid.
Definition: GeometryWriter.cxx:533
JiveXML::GeometryWriter::writePixelGeometry
void writePixelGeometry(std::ofstream &out)
Writes the geometry of the pixel detector.
Definition: GeometryWriter.cxx:276
JiveXML
This header is shared inbetween the C-style server thread and the C++ Athena ServerSvc.
Definition: BadLArRetriever.cxx:21
InDetDD::PixelDetectorManager
Definition: PixelDetectorManager.h:47
JiveXML::GeometryWriter::writeDiscElement
void writeDiscElement(std::ofstream &out, std::string p, std::string c, std::string n, double rIn, double rOut)
Writes <ADisc> element to the XML file.
JiveXML::GeometryWriter::~GeometryWriter
virtual ~GeometryWriter()
Definition: GeometryWriter.h:54
JiveXML::GeometryWriter::m_larMin
std::vector< double > m_larMin
Definition: GeometryWriter.h:177
JiveXML::GeometryWriter::writeTRTGeometry
void writeTRTGeometry(std::ofstream &out)
Writes the geometry of the TRT detector.
Definition: GeometryWriter.cxx:456
JiveXML::IGeometryWriter
Definition: IGeometryWriter.h:18
TRT_ID
Definition: TRT_ID.h:84
InDetDD::TRT_DetectorManager
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
Definition: TRT_DetectorManager.h:69
CaloDetDescriptor
This is a base class for LAr and Tile Descriptors The primary goal is to speed up loops over all the ...
Definition: CaloDetDescriptor.h:58
SCT_ID
Definition: SCT_ID.h:68
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
JiveXML::GeometryWriter
Writes the inner detector and calorimeter geometry to an XML file for use with Atlantis.
Definition: GeometryWriter.h:37
AthAlgTool
Definition: AthAlgTool.h:26
JiveXML::GeometryWriter::m_pixel_manager
const InDetDD::PixelDetectorManager * m_pixel_manager
Pixel detector manager and ID helper.
Definition: GeometryWriter.h:157
PixelID
Definition: PixelID.h:67
JiveXML::GeometryWriter::writeRectangleElement
void writeRectangleElement(std::ofstream &out, std::string p, std::string c, std::string n, double xIn, double xOut, double yIn, double yOut)
Writes <ARectangle> element to the XML file.
python.compressB64.c
def c
Definition: compressB64.py:93
JiveXML::GeometryWriter::writeHeader
void writeHeader(std::ofstream &out)
Writes the header of the XML file.
Definition: GeometryWriter.cxx:134
JiveXML::GeometryWriter::writeMBTSGeometry
void writeMBTSGeometry(std::ofstream &out)
Writes the geometry of the Minimum Bias Trigger Scintillators.
Definition: GeometryWriter.cxx:795
JiveXML::GeometryWriter::m_numCaloTypes
static const int m_numCaloTypes
The number of calorimeter sampling types.
Definition: GeometryWriter.h:175
JiveXML::GeometryWriter::writeRectanglishElement
void writeRectanglishElement(std::ofstream &out, std::string p, std::string c, std::string n, double xIn, double xOut, double yIn, double yOut)
Writes <AGeneralPath> element to the XML file.
JiveXML::GeometryWriter::GeometryWriter
GeometryWriter(const std::string &t, const std::string &n, const IInterface *p)
Constructor.
Definition: GeometryWriter.h:46
JiveXML::GeometryWriter::writeFooter
void writeFooter(std::ofstream &out)
Writes the footer of the XML file.
Definition: GeometryWriter.cxx:895