ATLAS Offline Software
Loading...
Searching...
No Matches
Trk::MappingTest Class Reference

Test to build the TrackingGeometry and try to map all points to layers. More...

#include <MappingTest.h>

Inheritance diagram for Trk::MappingTest:
Collaboration diagram for Trk::MappingTest:

Public Member Functions

StatusCode runTest ()
StatusCode initializeTest ()
StatusCode bookTree ()
StatusCode initialize ()
 standard Athena-Algorithm method
StatusCode execute (const EventContext &ctx)
 standard Athena-Algorithm method
StatusCode finalize ()
 standard Athena-Algorithm method
 AthAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 Standard Athena-Algorithm Constructor.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

Rndm::Numbers * m_gaussDist = nullptr
 Random Number setup.
Rndm::Numbers * m_flatDist = nullptr
Gaudi::Property< size_t > m_numTests {this, "NumberOfTestsPerEvent", 100}
 number of tests

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

bool m_executed = false
 Make sure it only runs once.
ServiceHandle< Trk::ITrackingGeometrySvcm_trackingGeometrySvc
const TrackingGeometrym_trackingGeometry = nullptr
 The TrackingGeometry to be retrieved.
std::string m_trackingGeometryName = "AtlasTrackingGeometry"
 The Name of the TrackingGeometry.
Gaudi::Property< double > m_etaCutOff {this, "EtaCutOff", 6.0, "do not map beyond this point"}
Gaudi::Property< std::string > m_mappingVolumeName
Gaudi::Property< std::string > m_mappingTreeName {this, "MappingTreeName", "LayerMappingTest"}
Gaudi::Property< std::string > m_mappingTreeDescription {this, "MappingTreeDescription", "Test Algorithm for Layer - 3D point association"}
TTree * m_mappingTree = nullptr
float m_mappingPositionX {}
float m_mappingPositionY {}
float m_mappingPositionZ {}
float m_mappingPositionR {}
float m_assignedPositionX {}
float m_assignedPositionY {}
float m_assignedPositionZ {}
float m_assignedPositionR {}
float m_assignedCorrection {}
int m_assignedLayerIndex {}
float m_assignmentDistance {}
TTree * m_unmappedTree = nullptr
float m_unmappedPositionX {}
float m_unmappedPositionY {}
float m_unmappedPositionZ {}
float m_unmappedPositionR {}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Test to build the TrackingGeometry and try to map all points to layers.

Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch

Definition at line 33 of file MappingTest.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Function Documentation

◆ AthAlgorithm()

AthAlgorithm::AthAlgorithm ( const std::string & name,
ISvcLocator * pSvcLocator )
inherited

Standard Athena-Algorithm Constructor.

Definition at line 31 of file AthAlgorithm.cxx.

11 :
12 AthCommonAlgorithm<Gaudi::Algorithm>( name, pSvcLocator )
13{
14 // default cardinality for non-reentrant algorithms
15 setProperty( "Cardinality", 1 ).orThrow("Unable to set property 'Cardinality'", name);
16}
void setProperty(columnar::PythonToolHandle &self, const std::string &key, nb::object value)
AthCommonAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)

◆ bookTree()

StatusCode Trk::MappingTest::bookTree ( )
virtual

Reimplemented from Trk::TrkDetDescrUnitTestBase.

Definition at line 38 of file MappingTest.cxx.

39{
40 ATH_MSG_VERBOSE("Booking the Material Tree.");
41
42 // ------------------------------> OUTPUT NTUPLE (geometry validation)
43
44 m_mappingTree = new TTree(m_mappingTreeName.value().c_str(),
45 m_mappingTreeDescription.value().c_str());
46 // add the Branches
47 m_mappingTree->Branch("ValPosX", &m_mappingPositionX, "valpx/F");
48 m_mappingTree->Branch("ValPosY", &m_mappingPositionY, "valpy/F");
49 m_mappingTree->Branch("ValPosZ", &m_mappingPositionZ, "valpz/F");
50 m_mappingTree->Branch("ValPosR", &m_mappingPositionR, "valpr/F");
51
52 // add the Branches for the association objects
53 m_mappingTree->Branch("AssocPosX", &m_assignedPositionX, "asspx/F");
54 m_mappingTree->Branch("AssocPosY", &m_assignedPositionY, "asspy/F");
55 m_mappingTree->Branch("AssocPosZ", &m_assignedPositionZ, "asspz/F");
56 m_mappingTree->Branch("AssocPosR", &m_assignedPositionR, "asspr/F");
57 m_mappingTree->Branch("AssocCorr", &m_assignedCorrection, "asscor/F");
58 m_mappingTree->Branch("AssocLayer", &m_assignedLayerIndex, "assidx/I");
59 m_mappingTree->Branch("AssocDistance", &m_assignmentDistance, "asignd/F");
60
61 // ------------------------------> OUTPUT NTUPLE (unmapped hits)
62 m_unmappedTree = new TTree("UnmappedHits", "Unmapped Hits of the MappingTest Algorithm");
63 // add the Branches
64 m_unmappedTree->Branch("UnmappedHitX", &m_unmappedPositionX, "unmappedx/F");
65 m_unmappedTree->Branch("UnmappedHitY", &m_unmappedPositionY, "unmappedy/F");
66 m_unmappedTree->Branch("UnmappedHitZ", &m_unmappedPositionZ, "unmappedz/F");
67 m_unmappedTree->Branch("UnmappedHitR", &m_unmappedPositionR, "unmappedr/F");
68
69 // now register the Tree
70 SmartIF<ITHistSvc> tHistSvc{service("THistSvc")};
71 if (!tHistSvc) {
72 ATH_MSG_ERROR( "initialize() Could not find Hist Service -> Switching Tree output off !" );
73 delete m_unmappedTree; m_unmappedTree = nullptr;
74 delete m_mappingTree; m_mappingTree = nullptr;
75 }
76 if (tHistSvc && ((tHistSvc->regTree("/val/UnmappedAssociations", m_unmappedTree)).isFailure()
77 || (tHistSvc->regTree("/val/MappingTest", m_mappingTree)).isFailure()) ) {
78 ATH_MSG_ERROR( "initialize() Could not register the validation Tree -> Switching Tree output off !" );
79 delete m_unmappedTree; m_unmappedTree = nullptr;
80 delete m_mappingTree; m_mappingTree = nullptr;
81 }
82
83 return StatusCode::SUCCESS;
84
85}
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_VERBOSE(x,...)
TTree * m_unmappedTree
Definition MappingTest.h:82
float m_mappingPositionY
Definition MappingTest.h:70
Gaudi::Property< std::string > m_mappingTreeDescription
Definition MappingTest.h:66
float m_assignedPositionZ
Definition MappingTest.h:76
float m_unmappedPositionZ
Definition MappingTest.h:85
float m_unmappedPositionX
Definition MappingTest.h:83
Gaudi::Property< std::string > m_mappingTreeName
Definition MappingTest.h:64
float m_assignmentDistance
Definition MappingTest.h:80
float m_mappingPositionX
Definition MappingTest.h:69
float m_assignedCorrection
Definition MappingTest.h:78
float m_mappingPositionR
Definition MappingTest.h:72
float m_assignedPositionY
Definition MappingTest.h:75
TTree * m_mappingTree
Definition MappingTest.h:67
float m_assignedPositionR
Definition MappingTest.h:77
float m_mappingPositionZ
Definition MappingTest.h:71
float m_unmappedPositionY
Definition MappingTest.h:84
float m_unmappedPositionR
Definition MappingTest.h:86
float m_assignedPositionX
Definition MappingTest.h:74

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode Trk::TrkDetDescrUnitTestBase::execute ( const EventContext & ctx)
virtualinherited

standard Athena-Algorithm method

Implements AthAlgorithm.

Definition at line 40 of file TrkDetDescrUnitTestBase.cxx.

41{
42 return runTest();
43}
virtual StatusCode runTest()=0

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

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 & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode Trk::TrkDetDescrUnitTestBase::finalize ( )
inherited

standard Athena-Algorithm method

Definition at line 45 of file TrkDetDescrUnitTestBase.cxx.

46{
47
48 ATH_MSG_INFO( "finalize()" );
49 return StatusCode::SUCCESS;
50}
#define ATH_MSG_INFO(x,...)

◆ initialize()

StatusCode Trk::TrkDetDescrUnitTestBase::initialize ( )
inherited

standard Athena-Algorithm method

Definition at line 19 of file TrkDetDescrUnitTestBase.cxx.

20{
21 ATH_MSG_INFO( "Creating random number services, call bookTree() and initializeTest()" );
22
23 // intialize the random number generators
24 m_gaussDist = new Rndm::Numbers(randSvc(), Rndm::Gauss(0.,1.));
25 m_flatDist = new Rndm::Numbers(randSvc(), Rndm::Flat(0.,1.));
26
27 if (bookTree().isFailure()){
28 ATH_MSG_FATAL( "Could not book the TTree object" );
29 return StatusCode::FAILURE;
30 }
31
32 if (initializeTest().isFailure()){
33 ATH_MSG_FATAL( "Could not initialize the test" );
34 return StatusCode::FAILURE;
35 }
36
37 return StatusCode::SUCCESS;
38}
#define ATH_MSG_FATAL(x,...)
Rndm::Numbers * m_gaussDist
Random Number setup.

◆ initializeTest()

StatusCode Trk::MappingTest::initializeTest ( )
virtual

Reimplemented from Trk::TrkDetDescrUnitTestBase.

Definition at line 24 of file MappingTest.cxx.

25{
26
27 // Get the TrackingGeometry from StoreGate
28 // initialize the TrackingGeometrySvc
29 if (m_trackingGeometrySvc.retrieve().isFailure()) {
30 ATH_MSG_FATAL( "Cannot retrieve TrackingGeometrySvc. Abort job. " );
31 return StatusCode::FAILURE;
32 }
33 m_trackingGeometryName = m_trackingGeometrySvc->trackingGeometryName();
34
35 return StatusCode::SUCCESS;
36}
ServiceHandle< Trk::ITrackingGeometrySvc > m_trackingGeometrySvc
Definition MappingTest.h:52
std::string m_trackingGeometryName
The Name of the TrackingGeometry.
Definition MappingTest.h:55

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

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.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

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()

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 > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
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()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ runTest()

StatusCode Trk::MappingTest::runTest ( )
virtual

Implements Trk::TrkDetDescrUnitTestBase.

Definition at line 87 of file MappingTest.cxx.

88{
89 ATH_MSG_VERBOSE("Running the MappingTest Test");
90
91 // ------------------------------- get the trackingGeometry at first place
92 if (!m_trackingGeometry) {
93 if ((detStore()->retrieve(m_trackingGeometry, m_trackingGeometryName)).isFailure())
94 ATH_MSG_FATAL( "Could not retrieve TrackingGeometry '" << m_trackingGeometryName << "' from DetectorStore." );
95 else
96 ATH_MSG_INFO( "TrackingGeometry '" << m_trackingGeometryName << "' successfully retrieved from DetectorStore." );
97 }
98 // only run if it didn't already run before
100 // get the volume and the overal boundaries
101 const TrackingVolume* tVolume = m_trackingGeometry->trackingVolume(m_mappingVolumeName);
102 if (tVolume){
103 ATH_MSG_INFO("Retrieved TrackingVolume '" << tVolume->volumeName() << "'. Start the mapping validation.");
104 const Trk::CylinderVolumeBounds* cvb = dynamic_cast<const Trk::CylinderVolumeBounds*>(&(tVolume->volumeBounds()));
105 if (cvb){
106 double mRad = cvb->innerRadius();
107 double dRad = cvb->deltaRadius();
108 double zHalf = cvb->halflengthZ();
109 // run the mapping
110 for ( size_t it = 0; it < TrkDetDescrUnitTestBase::m_numTests; ++it ){
111 // create the mapping position
112 double mapRad = mRad + TrkDetDescrUnitTestBase::m_flatDist->shoot()*dRad;
113 double mapPhi = M_PI * (2*TrkDetDescrUnitTestBase::m_flatDist->shoot() - 1.);
114 double mapZ = zHalf * (2*TrkDetDescrUnitTestBase::m_flatDist->shoot() - 1.);
115 double mapX = mapRad*cos(mapPhi);
116 double mapY = mapRad*sin(mapPhi);
117 // the mapping position & unit is the same
118 Amg::Vector3D position(mapX, mapY, mapZ);
119 Amg::Vector3D direction = position.normalized();
120 // create curvilinear parameters
122 // get the closest material layer
124 = m_trackingGeometry->closestMaterialLayer<Trk::NeutralCurvilinearParameters>(ncp, Trk::mappingMode, true);
125 if (lIntersect.intersection.valid){
126 // the mapping positions
127 m_mappingPositionX = mapX;
128 m_mappingPositionY = mapY;
129 m_mappingPositionZ = mapZ;
130 m_mappingPositionR = mapRad;
131 // the resulting assigned position
135 m_assignedPositionR = lIntersect.intersection.position.perp();
139 // and now write the tree
140 m_mappingTree->Fill();
141 } else {
142 // the unmapped positions
143 // and now fill the tree
144 m_unmappedPositionX = mapY;
145 m_unmappedPositionY = mapY;
146 m_unmappedPositionZ = mapZ;
147 m_unmappedPositionR = mapRad;
148 // and now fill the tree
149 m_unmappedTree->Fill();
150 }
151 }
152 }
153 } else
154 ATH_MSG_INFO("Could not retrieve the TrackingVolume '" << m_mappingVolumeName << "'." );
155
156 }
157 m_executed = true;
158 return StatusCode::SUCCESS;
159
160}
#define M_PI
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
Definition LayerIndex.h:71
const LayerIndex & layerIndex() const
get the layerIndex
Gaudi::Property< std::string > m_mappingVolumeName
Definition MappingTest.h:60
bool m_executed
Make sure it only runs once.
Definition MappingTest.h:49
const TrackingGeometry * m_trackingGeometry
The TrackingGeometry to be retrieved.
Definition MappingTest.h:54
Gaudi::Property< size_t > m_numTests
number of tests
Eigen::Matrix< double, 3, 1 > Vector3D
@ mappingMode
const Amg::Vector3D & direction() const
Method to retrieve the direction at the Intersection.
CurvilinearParametersT< NeutralParametersDim, Neutral, PlaneSurface > NeutralCurvilinearParameters
const Amg::Vector3D & position() const
Method to retrieve the position of the Intersection.
FullIntersection< Layer, Surface, T > LayerIntersection
Amg::Vector3D position

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_WARNING(x,...)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_assignedCorrection

float Trk::MappingTest::m_assignedCorrection {}
private

Definition at line 78 of file MappingTest.h.

78{};

◆ m_assignedLayerIndex

int Trk::MappingTest::m_assignedLayerIndex {}
private

Definition at line 79 of file MappingTest.h.

79{};

◆ m_assignedPositionR

float Trk::MappingTest::m_assignedPositionR {}
private

Definition at line 77 of file MappingTest.h.

77{};

◆ m_assignedPositionX

float Trk::MappingTest::m_assignedPositionX {}
private

Definition at line 74 of file MappingTest.h.

74{};

◆ m_assignedPositionY

float Trk::MappingTest::m_assignedPositionY {}
private

Definition at line 75 of file MappingTest.h.

75{};

◆ m_assignedPositionZ

float Trk::MappingTest::m_assignedPositionZ {}
private

Definition at line 76 of file MappingTest.h.

76{};

◆ m_assignmentDistance

float Trk::MappingTest::m_assignmentDistance {}
private

Definition at line 80 of file MappingTest.h.

80{};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_etaCutOff

Gaudi::Property<double> Trk::MappingTest::m_etaCutOff {this, "EtaCutOff", 6.0, "do not map beyond this point"}
private

Definition at line 57 of file MappingTest.h.

58{this, "EtaCutOff", 6.0, "do not map beyond this point"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_executed

bool Trk::MappingTest::m_executed = false
private

Make sure it only runs once.

Definition at line 49 of file MappingTest.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_flatDist

Rndm::Numbers* Trk::TrkDetDescrUnitTestBase::m_flatDist = nullptr
protectedinherited

Definition at line 58 of file TrkDetDescrUnitTestBase.h.

◆ m_gaussDist

Rndm::Numbers* Trk::TrkDetDescrUnitTestBase::m_gaussDist = nullptr
protectedinherited

Random Number setup.

Definition at line 57 of file TrkDetDescrUnitTestBase.h.

◆ m_mappingPositionR

float Trk::MappingTest::m_mappingPositionR {}
private

Definition at line 72 of file MappingTest.h.

72{};

◆ m_mappingPositionX

float Trk::MappingTest::m_mappingPositionX {}
private

Definition at line 69 of file MappingTest.h.

69{};

◆ m_mappingPositionY

float Trk::MappingTest::m_mappingPositionY {}
private

Definition at line 70 of file MappingTest.h.

70{};

◆ m_mappingPositionZ

float Trk::MappingTest::m_mappingPositionZ {}
private

Definition at line 71 of file MappingTest.h.

71{};

◆ m_mappingTree

TTree* Trk::MappingTest::m_mappingTree = nullptr
private

Definition at line 67 of file MappingTest.h.

◆ m_mappingTreeDescription

Gaudi::Property<std::string> Trk::MappingTest::m_mappingTreeDescription {this, "MappingTreeDescription", "Test Algorithm for Layer - 3D point association"}
private

Definition at line 65 of file MappingTest.h.

66{this, "MappingTreeDescription", "Test Algorithm for Layer - 3D point association"};

◆ m_mappingTreeName

Gaudi::Property<std::string> Trk::MappingTest::m_mappingTreeName {this, "MappingTreeName", "LayerMappingTest"}
private

Definition at line 63 of file MappingTest.h.

64{this, "MappingTreeName", "LayerMappingTest"};

◆ m_mappingVolumeName

Gaudi::Property<std::string> Trk::MappingTest::m_mappingVolumeName
private
Initial value:
{this, "HighestVolume", "InDet::Detectors::Pixel::Barrel",
"only map within this volume"}

Definition at line 59 of file MappingTest.h.

60 {this, "HighestVolume", "InDet::Detectors::Pixel::Barrel",
61 "only map within this volume"};

◆ m_numTests

Gaudi::Property<size_t> Trk::TrkDetDescrUnitTestBase::m_numTests {this, "NumberOfTestsPerEvent", 100}
protectedinherited

number of tests

Definition at line 61 of file TrkDetDescrUnitTestBase.h.

61{this, "NumberOfTestsPerEvent", 100};

◆ m_trackingGeometry

const TrackingGeometry* Trk::MappingTest::m_trackingGeometry = nullptr
private

The TrackingGeometry to be retrieved.

Definition at line 54 of file MappingTest.h.

◆ m_trackingGeometryName

std::string Trk::MappingTest::m_trackingGeometryName = "AtlasTrackingGeometry"
private

The Name of the TrackingGeometry.

Definition at line 55 of file MappingTest.h.

◆ m_trackingGeometrySvc

ServiceHandle<Trk::ITrackingGeometrySvc> Trk::MappingTest::m_trackingGeometrySvc
private
Initial value:
{this, "TrackingGeometrySvc", "TrackingGeometrySvc/AtlasTrackingGeometrySvc",
"Service handle for retrieving the TrackingGeometry"}

Definition at line 51 of file MappingTest.h.

52 {this, "TrackingGeometrySvc", "TrackingGeometrySvc/AtlasTrackingGeometrySvc",
53 "Service handle for retrieving the TrackingGeometry"};

◆ m_unmappedPositionR

float Trk::MappingTest::m_unmappedPositionR {}
private

Definition at line 86 of file MappingTest.h.

86{};

◆ m_unmappedPositionX

float Trk::MappingTest::m_unmappedPositionX {}
private

Definition at line 83 of file MappingTest.h.

83{};

◆ m_unmappedPositionY

float Trk::MappingTest::m_unmappedPositionY {}
private

Definition at line 84 of file MappingTest.h.

84{};

◆ m_unmappedPositionZ

float Trk::MappingTest::m_unmappedPositionZ {}
private

Definition at line 85 of file MappingTest.h.

85{};

◆ m_unmappedTree

TTree* Trk::MappingTest::m_unmappedTree = nullptr
private

Definition at line 82 of file MappingTest.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: