 |
ATLAS Offline Software
|
Go to the documentation of this file.
21 #include "GaudiKernel/ITHistSvc.h"
27 m_outputFileName(
"TrackingGeometry.json"),
29 m_firstLayerWritten(false)
43 m_outputFile.open(m_outputFileName.c_str());
45 m_outputFile << std::setiosflags(std::ios::fixed);
46 m_outputFile << std::setprecision(3);
54 m_outputFile <<
"]" << std::endl;
64 return StatusCode::SUCCESS;
79 if (referenceSurface){
84 if (m_firstLayerWritten) m_outputFile <<
",";
86 m_outputFile <<
"{\"Name\" : \"Layer " << lay.
layerIndex().
value() <<
"\", ";
87 m_outputFile <<
"\"Dimensions\" : [" << 2*rBounds->
halflengthX() <<
"," << 2.*rBounds->
halflengthY() <<
", 1.0 ], ";
91 m_outputFile <<
"\"Coords\": [";
94 double cx =
sf->center().x();
95 double cy =
sf->center().y();
96 double cz =
sf->center().z();
98 auto ea =
sf->transform().rotation().eulerAngles(0, 1, 2);
102 m_outputFile <<
"[" <<
cx <<
"," <<
cy <<
"," << cz <<
"],[" <<
e0 <<
"," <<
e1 <<
"," <<
e2 <<
"]";
103 if (is < nSurfaces) m_outputFile <<
",";
106 m_outputFile <<
"]}";
107 m_firstLayerWritten =
true;
111 return StatusCode::SUCCESS;
119 return StatusCode::SUCCESS;
StatusCode initialize()
AlgTool initialize method.
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
StatusCode initialize()
AlgTool initialize method.
#define ATH_MSG_VERBOSE(x)
const Surface * subSurfaceReference(unsigned int idx=0) const
Return a reference sub surface of the layer, usually the first one in the array.
const SurfaceArray * surfaceArray() const
Return the entire SurfaceArray, returns nullptr if no SurfaceArray.
StatusCode finalize()
AlgTool finalize method.
double halflengthX() const
for consistant naming
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
int value() const
layerIndex expressed in an integer
virtual std::span< T *const > arrayObjects()=0
Return all objects of the Array non-const we can still modify the T.
Ensure that the ATLAS eigen extensions are properly loaded.
StatusCode finalize()
AlgTool finalize method.
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
double halflengthY() const
for consitant naming
std::string m_outputFileName
where the tree is written to
StatusCode processNode(const TrackingVolume &tvol, size_t level=0) const
Current implementation: write root visualization to file stream.
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
GeometryJsonDumper(const std::string &, const std::string &, const IInterface *)
Constructor.
virtual ~GeometryJsonDumper()
Destructor.
double e0(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in pre-sampler
const LayerIndex & layerIndex() const
get the layerIndex