Test to build the TrackingGeometry and try to map all points to layers.
More...
#include <MappingTest.h>
◆ StoreGateSvc_t
◆ MappingTest()
| Trk::MappingTest::MappingTest |
( |
const std::string & | name, |
|
|
ISvcLocator * | pSvcLocator ) |
Standard Athena-Algorithm Constructor.
Definition at line 24 of file MappingTest.cxx.
24 :
25 Trk::TrkDetDescrUnitTestBase(name, pSvcLocator),
51 {
52
54
57
60 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< Trk::ITrackingGeometrySvc > m_trackingGeometrySvc
Service handle for retrieving the TrackingGeometry.
float m_assignedPositionZ
float m_unmappedPositionZ
float m_unmappedPositionX
float m_assignmentDistance
bool m_executed
Make sure it only runs once.
double m_etaCutOff
do not map beyond this point
std::string m_mappingTreeDescription
float m_assignedCorrection
float m_assignedPositionY
float m_assignedPositionR
float m_unmappedPositionY
const TrackingGeometry * m_trackingGeometry
The TrackingGeometry to be retrieved.
std::string m_mappingVolumeName
only map within this volume
std::string m_trackingGeometryName
The Name of the TrackingGeometry.
float m_unmappedPositionR
std::string m_mappingTreeName
float m_assignedPositionX
◆ bookTree()
| StatusCode Trk::MappingTest::bookTree |
( |
| ) |
|
|
virtual |
Reimplemented from Trk::TrkDetDescrUnitTestBase.
Definition at line 76 of file MappingTest.cxx.
77{
79
80
81
83
88
89
97
98
99 m_unmappedTree =
new TTree(
"UnmappedHits",
"Unmapped Hits of the MappingTest Algorithm");
100
105
106
107 SmartIF<ITHistSvc> tHistSvc{service("THistSvc")};
108 if (!tHistSvc) {
109 ATH_MSG_ERROR(
"initialize() Could not find Hist Service -> Switching Tree output off !" );
112 }
113 if (tHistSvc && ((tHistSvc->regTree(
"/val/UnmappedAssociations",
m_unmappedTree)).isFailure()
114 || (tHistSvc->regTree(
"/val/MappingTest",
m_mappingTree)).isFailure()) ) {
115 ATH_MSG_ERROR(
"initialize() Could not register the validation Tree -> Switching Tree output off !" );
118 }
119
120 return StatusCode::SUCCESS;
121
122}
#define ATH_MSG_VERBOSE(x)
◆ declareGaudiProperty()
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
158 {
161 hndl.documentation());
162
163 }
◆ declareProperty()
Definition at line 145 of file AthCommonDataStore.h.
145 {
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
◆ detStore()
◆ evtStore()
◆ execute()
| StatusCode Trk::TrkDetDescrUnitTestBase::execute |
( |
| ) |
|
|
inherited |
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
| const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
51{
52
53
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects
◆ finalize()
| StatusCode Trk::TrkDetDescrUnitTestBase::finalize |
( |
| ) |
|
|
inherited |
◆ initialize()
| StatusCode Trk::TrkDetDescrUnitTestBase::initialize |
( |
| ) |
|
|
inherited |
standard Athena-Algorithm method
Definition at line 27 of file TrkDetDescrUnitTestBase.cxx.
28{
29 ATH_MSG_INFO(
"Creating random number services, call bookTree() and initializeTest()" );
30
31
32 m_gaussDist =
new Rndm::Numbers(randSvc(), Rndm::Gauss(0.,1.));
33 m_flatDist =
new Rndm::Numbers(randSvc(), Rndm::Flat(0.,1.));
34
37 return StatusCode::FAILURE;
38 }
39
42 return StatusCode::FAILURE;
43 }
44
45 return StatusCode::SUCCESS;
46}
virtual StatusCode initializeTest()
Rndm::Numbers * m_gaussDist
Random Number setup.
Rndm::Numbers * m_flatDist
virtual StatusCode bookTree()
◆ initializeTest()
| StatusCode Trk::MappingTest::initializeTest |
( |
| ) |
|
|
virtual |
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ msg()
◆ msgLvl()
| bool AthCommonMsg< Algorithm >::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
Definition at line 380 of file AthCommonDataStore.h.
381 {
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
◆ renounceArray()
◆ runTest()
| StatusCode Trk::MappingTest::runTest |
( |
| ) |
|
|
virtual |
Implements Trk::TrkDetDescrUnitTestBase.
Definition at line 124 of file MappingTest.cxx.
125{
127
128
132 else
134 }
135
137
139 if (tVolume){
140 ATH_MSG_INFO(
"Retrieved TrackingVolume '" << tVolume->volumeName() <<
"'. Start the mapping validation.");
141 const Trk::CylinderVolumeBounds* cvb = dynamic_cast<const Trk::CylinderVolumeBounds*>(&(tVolume->volumeBounds()));
142 if (cvb){
146
148
152 double mapX = mapRad*
cos(mapPhi);
153 double mapY = mapRad*
sin(mapPhi);
154
157
159
163
168
176
178 } else {
179
180
185
187 }
188 }
189 }
190 } else
192
193 }
195 return StatusCode::SUCCESS;
196
197}
const ServiceHandle< StoreGateSvc > & detStore() const
double innerRadius() const
This method returns the inner radius.
double halflengthZ() const
This method returns the halflengthZ.
double deltaRadius() const
This method returns the delta radius.
Intersection intersection
int value() const
layerIndex expressed in an integer
const LayerIndex & layerIndex() const
get the layerIndex
size_t m_numTests
number of tests
Eigen::Matrix< double, 3, 1 > Vector3D
CurvilinearParametersT< NeutralParametersDim, Neutral, PlaneSurface > NeutralCurvilinearParameters
FullIntersection< Layer, Surface, T > LayerIntersection
retrieve(aClass, aKey=None)
◆ sysInitialize()
| StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
Override sysInitialize.
Override sysInitialize from the base class.
Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc
Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc
Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.
Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.
Definition at line 66 of file AthAlgorithm.cxx.
66 {
68
71 }
72 ServiceHandle<ICondSvc> cs(
"CondSvc",
name());
74 if (
h->isCondition() &&
h->mode() == Gaudi::DataHandle::Writer) {
75
76 if ( cs.retrieve().isFailure() ) {
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
88}
#define ATH_MSG_WARNING(x)
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
Definition at line 308 of file AthCommonDataStore.h.
308 {
309
310
313 for (
auto k :
keys) {
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka
◆ m_assignedCorrection
| float Trk::MappingTest::m_assignedCorrection |
|
private |
◆ m_assignedLayerIndex
| int Trk::MappingTest::m_assignedLayerIndex |
|
private |
◆ m_assignedPositionR
| float Trk::MappingTest::m_assignedPositionR |
|
private |
◆ m_assignedPositionX
| float Trk::MappingTest::m_assignedPositionX |
|
private |
◆ m_assignedPositionY
| float Trk::MappingTest::m_assignedPositionY |
|
private |
◆ m_assignedPositionZ
| float Trk::MappingTest::m_assignedPositionZ |
|
private |
◆ m_assignmentDistance
| float Trk::MappingTest::m_assignmentDistance |
|
private |
◆ m_detStore
◆ m_etaCutOff
| double Trk::MappingTest::m_etaCutOff |
|
private |
◆ m_evtStore
◆ m_executed
| bool Trk::MappingTest::m_executed |
|
private |
◆ m_extendedExtraObjects
| DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_flatDist
| Rndm::Numbers* Trk::TrkDetDescrUnitTestBase::m_flatDist |
|
protectedinherited |
◆ m_gaussDist
| Rndm::Numbers* Trk::TrkDetDescrUnitTestBase::m_gaussDist |
|
protectedinherited |
◆ m_mappingPositionR
| float Trk::MappingTest::m_mappingPositionR |
|
private |
◆ m_mappingPositionX
| float Trk::MappingTest::m_mappingPositionX |
|
private |
◆ m_mappingPositionY
| float Trk::MappingTest::m_mappingPositionY |
|
private |
◆ m_mappingPositionZ
| float Trk::MappingTest::m_mappingPositionZ |
|
private |
◆ m_mappingTree
| TTree* Trk::MappingTest::m_mappingTree |
|
private |
◆ m_mappingTreeDescription
| std::string Trk::MappingTest::m_mappingTreeDescription |
|
private |
◆ m_mappingTreeName
| std::string Trk::MappingTest::m_mappingTreeName |
|
private |
◆ m_mappingVolumeName
| std::string Trk::MappingTest::m_mappingVolumeName |
|
private |
◆ m_numTests
| size_t Trk::TrkDetDescrUnitTestBase::m_numTests |
|
protectedinherited |
◆ m_trackingGeometry
◆ m_trackingGeometryName
| std::string Trk::MappingTest::m_trackingGeometryName |
|
private |
◆ m_trackingGeometrySvc
◆ m_unmappedPositionR
| float Trk::MappingTest::m_unmappedPositionR |
|
private |
◆ m_unmappedPositionX
| float Trk::MappingTest::m_unmappedPositionX |
|
private |
◆ m_unmappedPositionY
| float Trk::MappingTest::m_unmappedPositionY |
|
private |
◆ m_unmappedPositionZ
| float Trk::MappingTest::m_unmappedPositionZ |
|
private |
◆ m_unmappedTree
| TTree* Trk::MappingTest::m_unmappedTree |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files: