ATLAS Offline Software
Loading...
Searching...
No Matches
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
14#include "GaudiKernel/IRndmGenSvc.h"
15#include "GaudiKernel/RndmGenerators.h"
16#include "GaudiKernel/ToolHandle.h"
17//Eigen
19// TrkGeometry
21
23
24
25namespace 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
44
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
55
56 public:
57
60
63
65 StatusCode initialize();
66
68 StatusCode execute(const EventContext& ctx);
69
71 StatusCode finalize();
72
73 private:
75 const Amg::Vector3D& position,
77
79
82 const EventContext& ctx) const
83 {
85 ctx);
86 if (!handle.isValid()) {
87 ATH_MSG_FATAL("Could not load TrackingGeometry with name '"
88 << m_trackingGeometryReadKey.key() << "'. Aborting.");
90 }
91 return handle.cptr();
92 }
93
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
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
#define ATH_MSG_FATAL(x)
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
StatusCode finalize()
standard Athena-Algorithm method
Gaudi::Property< bool > m_runNativeNavigation
validate the native TG navigation
PositionAtBoundary collectMaterialAndExit(const Trk::TrackingVolume &tvol, const Amg::Vector3D &position, const Amg::Vector3D &direction)
ToolHandle< IMaterialMapper > m_materialMapper
Mapper and Inspector.
Rndm::Numbers * m_flatDist
Random generator for flat distribution.
SG::ReadCondHandleKey< TrackingGeometry > m_trackingGeometryReadKey
StatusCode execute(const EventContext &ctx)
standard Athena-Algorithm method
StatusCode initialize()
standard Athena-Algorithm method
const TrackingGeometry * retrieveTrackingGeometry(const EventContext &ctx) const
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
Abstract Base Class for tracking surfaces.
Definition Surface.h:79
The TrackingGeometry class is the owner of the constructed TrackingVolumes.
Full Volume description used in Tracking, it inherits from Volume to get the geometrical structure,...
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
std::pair< Amg::Vector3D, const Trk::TrackingVolume * > PositionAtBoundary
const Amg::Vector3D & direction() const
Method to retrieve the direction at the Intersection.
const Amg::Vector3D & position() const
Method to retrieve the position of the Intersection.
VolumeExit(const Trk::TrackingVolume *itv=0, const Trk::Surface *ibs=0, Amg::Vector3D iexit=Amg::Vector3D(0., 0., 0.))