ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
InnerDetector
InDetExample
InDetDetDescrExample
src
PrintSiElements.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef InDetDetDescrExample_PrintSiElements_h
6
#define InDetDetDescrExample_PrintSiElements_h
7
8
#include "
AthenaBaseComps/AthAlgorithm.h
"
9
10
#include "
GeoPrimitives/GeoPrimitives.h
"
11
#include "
GeoModelInterfaces/IGeoModelSvc.h
"
12
#include "
InDetReadoutGeometry/SiDetectorElementCollection.h
"
13
#include "
StoreGate/ReadCondHandleKey.h
"
14
15
#include "GaudiKernel/ServiceHandle.h"
16
17
#include <fstream>
18
20
21
class
PrintSiElements
:
public
AthAlgorithm
{
22
public
:
23
using
AthAlgorithm::AthAlgorithm
;
24
virtual
StatusCode
initialize
()
override
;
25
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
;
26
virtual
StatusCode
finalize
()
override
;
27
28
StatusCode
printElements
(
const
std::string & managerName);
29
30
std::string
printTransform
(
const
Amg::Transform3D
&
trans
)
const
;
31
void
extractAlphaBetaGamma
(
const
Amg::Transform3D
&
trans
,
double
& alpha,
double
& beta,
double
&gamma)
const
;
32
33
private
:
34
std::ofstream
m_fileout
;
35
bool
m_firstEvent
{
true
};
36
// Alg properties
37
BooleanProperty
m_modulesOnly
{
this
,
"ModulesOnly"
,
true
,
"Print transforms of modules"
};
38
BooleanProperty
m_expandId
{
this
,
"ExpandId"
,
true
,
"Print fields of identifier"
};
39
BooleanProperty
m_nominal
{
this
,
"NominalPosition"
,
true
,
"Print out nominal geometry"
};
40
BooleanProperty
m_aligned
{
this
,
"AlignedPosition"
,
false
,
"Print out aligned geometry"
};
41
BooleanProperty
m_fullRotationMatrix
{
this
,
"FullRotationMatrix"
,
false
,
"If true prints the 9 elements of the rotation matrix"
};
42
StringProperty
m_outputFileName
{
this
,
"OutputFile"
,
"geometry.dat"
,
"Output file name"
};
43
ServiceHandle<IGeoModelSvc>
m_geoModelSvc
{
this
,
"GeoModelSvc"
,
"GeoModelSvc"
};
44
SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection>
m_pixelDetEleCollKey
{
this
,
"PixelDetEleCollKey"
,
"PixelDetectorElementCollection"
,
"Key of SiDetectorElementCollection for Pixel"
};
45
SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection>
m_SCTDetEleCollKey
{
this
,
"SCTDetEleCollKey"
,
"SCT_DetectorElementCollection"
,
"Key of SiDetectorElementCollection for SCT"
};
46
SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection>
m_ITkPixelDetEleCollKey
{
this
,
"ITkPixelDetEleCollKey"
,
"ITkPixelDetectorElementCollection"
,
"Key of SiDetectorElementCollection for ITkPixel"
};
47
SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection>
m_ITkStripDetEleCollKey
{
this
,
"ITkStripDetEleCollKey"
,
"ITkStripDetectorElementCollection"
,
"Key of SiDetectorElementCollection for ITkStrip"
};
48
StringArrayProperty
m_detManagerNames
{
this
,
"DetectorManagerNames"
, {
"Pixel"
,
"SCT"
}};
49
};
50
51
#endif
// InDetDetDescrExample_PrintSiElements_h
AthAlgorithm.h
GeoPrimitives.h
IGeoModelSvc.h
ReadCondHandleKey.h
SiDetectorElementCollection.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
PrintSiElements
Definition
PrintSiElements.h:21
PrintSiElements::m_modulesOnly
BooleanProperty m_modulesOnly
Definition
PrintSiElements.h:37
PrintSiElements::m_nominal
BooleanProperty m_nominal
Definition
PrintSiElements.h:39
PrintSiElements::m_fileout
std::ofstream m_fileout
Definition
PrintSiElements.h:34
PrintSiElements::m_detManagerNames
StringArrayProperty m_detManagerNames
Definition
PrintSiElements.h:48
PrintSiElements::m_fullRotationMatrix
BooleanProperty m_fullRotationMatrix
Definition
PrintSiElements.h:41
PrintSiElements::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition
PrintSiElements.h:44
PrintSiElements::m_firstEvent
bool m_firstEvent
Definition
PrintSiElements.h:35
PrintSiElements::initialize
virtual StatusCode initialize() override
Definition
PrintSiElements.cxx:34
PrintSiElements::m_expandId
BooleanProperty m_expandId
Definition
PrintSiElements.h:38
PrintSiElements::printTransform
std::string printTransform(const Amg::Transform3D &trans) const
Definition
PrintSiElements.cxx:183
PrintSiElements::extractAlphaBetaGamma
void extractAlphaBetaGamma(const Amg::Transform3D &trans, double &alpha, double &beta, double &gamma) const
Definition
PrintSiElements.cxx:204
PrintSiElements::m_aligned
BooleanProperty m_aligned
Definition
PrintSiElements.h:40
PrintSiElements::finalize
virtual StatusCode finalize() override
Definition
PrintSiElements.cxx:176
PrintSiElements::printElements
StatusCode printElements(const std::string &managerName)
Definition
PrintSiElements.cxx:59
PrintSiElements::m_outputFileName
StringProperty m_outputFileName
Definition
PrintSiElements.h:42
PrintSiElements::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition
PrintSiElements.h:45
PrintSiElements::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
PrintSiElements::m_ITkPixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_ITkPixelDetEleCollKey
Definition
PrintSiElements.h:46
PrintSiElements::m_ITkStripDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_ITkStripDetEleCollKey
Definition
PrintSiElements.h:47
PrintSiElements::m_geoModelSvc
ServiceHandle< IGeoModelSvc > m_geoModelSvc
Definition
PrintSiElements.h:43
PrintSiElements::execute
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
PrintSiElements.cxx:165
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
ServiceHandle
Definition
ClusterMakerTool.h:36
trans
TH1F * trans(TH1F *h, bool t=false)
Definition
comparitor.cxx:201
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition
GeoPrimitives.h:46
Generated on
for ATLAS Offline Software by
1.17.0