ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
TrkDetDescr
TrkDetDescrAlgs
src
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// MaterialValidation.h, (c) ATLAS Detector software
8
9
#ifndef TRKDETDESCRALGS_MATERIALVALIDATION_H
10
#define TRKDETDESCRALGS_MATERIALVALIDATION_H
11
12
// Gaudi includes
13
#include "
AthenaBaseComps/AthAlgorithm.h
"
14
#include "GaudiKernel/IRndmGenSvc.h"
15
#include "GaudiKernel/RndmGenerators.h"
16
#include "GaudiKernel/ToolHandle.h"
17
//Eigen
18
#include "
GeoPrimitives/GeoPrimitives.h
"
19
// TrkGeometry
20
#include "
TrkGeometry/TrackingGeometry.h
"
21
22
#include "
TrkDetDescrInterfaces/IMaterialMapper.h
"
23
24
25
namespace
Trk
{
26
27
class
TrackingVolume
;
28
class
Surface
;
29
30
typedef
std::pair<Amg::Vector3D, const Trk::TrackingVolume*>
PositionAtBoundary
;
31
36
37
38
// exit the volume
39
struct
VolumeExit
{
40
// the triple struct
41
const
Trk::TrackingVolume
*
nVolume
;
42
const
Trk::Surface
*
bSurface
;
43
Amg::Vector3D
vExit
;
44
45
VolumeExit
(
const
Trk::TrackingVolume
* itv = 0,
46
const
Trk::Surface
* ibs = 0,
47
Amg::Vector3D
iexit =
Amg::Vector3D
(0.,0.,0.)) :
48
nVolume
(itv),
49
bSurface
(ibs),
50
vExit
(iexit){}
51
52
};
53
54
class
MaterialValidation
:
public
AthAlgorithm
{
55
56
public
:
57
59
using
AthAlgorithm::AthAlgorithm
;
60
62
~MaterialValidation
();
63
65
StatusCode
initialize
();
66
68
StatusCode
execute
(
const
EventContext& ctx);
69
71
StatusCode
finalize
();
72
73
private
:
74
PositionAtBoundary
collectMaterialAndExit
(
const
Trk::TrackingVolume
& tvol,
75
const
Amg::Vector3D
&
position
,
76
const
Amg::Vector3D
&
direction
);
77
78
const
TrackingGeometry
&
trackingGeometry
()
const
;
79
80
void
throwFailedToGetTrackingGeometry
()
const
;
81
const
TrackingGeometry
*
retrieveTrackingGeometry
(
82
const
EventContext& ctx)
const
83
{
84
SG::ReadCondHandle<TrackingGeometry>
handle(
m_trackingGeometryReadKey
,
85
ctx);
86
if
(!handle.isValid()) {
87
ATH_MSG_FATAL
(
"Could not load TrackingGeometry with name '"
88
<<
m_trackingGeometryReadKey
.key() <<
"'. Aborting."
);
89
throwFailedToGetTrackingGeometry
();
90
}
91
return
handle.cptr();
92
}
93
94
SG::ReadCondHandleKey<TrackingGeometry>
m_trackingGeometryReadKey
95
{
this
,
"TrackingGeometryReadKey"
,
""
,
"Key of the TrackingGeometry conditions data."
};
96
98
ToolHandle<IMaterialMapper>
m_materialMapper
99
{
this
,
"MaterialMapper"
,
"Trk::MaterialMapper/MappingMaterialMapper"
};
100
101
Rndm::Numbers*
m_flatDist
=
nullptr
;
102
Gaudi::Property<double>
m_etaMin
{
this
,
"MinEta"
, -3.};
103
Gaudi::Property<double>
m_etaMax
{
this
,
"MaxEta"
, 3.};
104
Gaudi::Property<bool>
m_runNativeNavigation
{
this
,
"NativeNavigation"
,
true
};
105
106
double
m_accTinX0
= 0.;
107
108
};
109
110
inline
const
Trk::TrackingGeometry
&
Trk::MaterialValidation::trackingGeometry
()
const
{
111
const
Trk::TrackingGeometry
*tracking_geometry =
retrieveTrackingGeometry
(Gaudi::Hive::currentContext());
112
if
(!tracking_geometry){
113
ATH_MSG_FATAL
(
"Did not get valid TrackingGeometry. Aborting."
);
114
throw
GaudiException(
"MaterialValidation"
,
"Problem with TrackingGeometry loading."
, StatusCode::FAILURE);
115
}
116
return
*tracking_geometry;
117
}
118
}
119
120
#endif
AthAlgorithm.h
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition
AthMsgStreamMacros.h:34
GeoPrimitives.h
IMaterialMapper.h
TrackingGeometry.h
AthAlgorithm::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition
AthAlgorithm.cxx:10
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
SG::ReadCondHandle
Definition
ReadCondHandle.h:40
Trk::MaterialValidation::finalize
StatusCode finalize()
standard Athena-Algorithm method
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.cxx:266
Trk::MaterialValidation::m_runNativeNavigation
Gaudi::Property< bool > m_runNativeNavigation
validate the native TG navigation
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h:104
Trk::MaterialValidation::~MaterialValidation
~MaterialValidation()
Destructor.
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.cxx:28
Trk::MaterialValidation::trackingGeometry
const TrackingGeometry & trackingGeometry() const
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h:110
Trk::MaterialValidation::collectMaterialAndExit
PositionAtBoundary collectMaterialAndExit(const Trk::TrackingVolume &tvol, const Amg::Vector3D &position, const Amg::Vector3D &direction)
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.cxx:77
Trk::MaterialValidation::m_materialMapper
ToolHandle< IMaterialMapper > m_materialMapper
Mapper and Inspector.
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h:99
Trk::MaterialValidation::m_flatDist
Rndm::Numbers * m_flatDist
Random generator for flat distribution.
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h:101
Trk::MaterialValidation::m_etaMin
Gaudi::Property< double > m_etaMin
eta boundary
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h:102
Trk::MaterialValidation::m_trackingGeometryReadKey
SG::ReadCondHandleKey< TrackingGeometry > m_trackingGeometryReadKey
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h:95
Trk::MaterialValidation::execute
StatusCode execute(const EventContext &ctx)
standard Athena-Algorithm method
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.cxx:49
Trk::MaterialValidation::initialize
StatusCode initialize()
standard Athena-Algorithm method
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.cxx:34
Trk::MaterialValidation::throwFailedToGetTrackingGeometry
void throwFailedToGetTrackingGeometry() const
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.cxx:272
Trk::MaterialValidation::m_etaMax
Gaudi::Property< double > m_etaMax
eta boundary
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h:103
Trk::MaterialValidation::retrieveTrackingGeometry
const TrackingGeometry * retrieveTrackingGeometry(const EventContext &ctx) const
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h:81
Trk::MaterialValidation::AthAlgorithm
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
Definition
AthAlgorithm.cxx:10
Trk::MaterialValidation::m_accTinX0
double m_accTinX0
accumulated t in X0
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h:106
Trk::Surface
Abstract Base Class for tracking surfaces.
Definition
Surface.h:79
Trk::TrackingGeometry
The TrackingGeometry class is the owner of the constructed TrackingVolumes.
Definition
TrackingGeometry.h:68
Trk::TrackingVolume
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
Definition
TrackingVolume.h:119
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
MaterialValidation
Definition
MaterialValidation.py:1
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition
FakeTrackBuilder.h:9
Trk::PositionAtBoundary
std::pair< Amg::Vector3D, const Trk::TrackingVolume * > PositionAtBoundary
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h:30
Trk::direction
const Amg::Vector3D & direction() const
Method to retrieve the direction at the Intersection.
Trk::position
const Amg::Vector3D & position() const
Method to retrieve the position of the Intersection.
Trk::VolumeExit::bSurface
const Trk::Surface * bSurface
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h:42
Trk::VolumeExit::VolumeExit
VolumeExit(const Trk::TrackingVolume *itv=0, const Trk::Surface *ibs=0, Amg::Vector3D iexit=Amg::Vector3D(0., 0., 0.))
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h:45
Trk::VolumeExit::vExit
Amg::Vector3D vExit
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h:43
Trk::VolumeExit::nVolume
const Trk::TrackingVolume * nVolume
Definition
TrkDetDescr/TrkDetDescrAlgs/src/MaterialValidation.h:41
Generated on
for ATLAS Offline Software by
1.17.0