ATLAS Offline Software
Loading...
Searching...
No Matches
ExtrapolationEngineTest.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6// ExtrapolationEngineTest.h, (c) ATLAS Detector software
8
9#ifndef TRKEXUNITTESTS_EXTRAPOLATIONENGINETEST_H
10#define TRKEXUNITTESTS_EXTRAPOLATIONENGINETEST_H
11
12// Athena & Gaudi includes
13#include "GaudiKernel/ServiceHandle.h"
14#include "GaudiKernel/ToolHandle.h"
16// Trk includes
19#include "TString.h"
20#include "TRandom.h"
21
22class TTree;
23
24class PixelID;
25class SCT_ID;
26class HGTD_ID;
27class AtlasDetectorID;
28
29namespace Trk {
32
39
41 // ^ ExtrapolationEngine itself is not thread-safe
42 public:
44 using TrkExUnitTestBase::TrkExUnitTestBase;
45
46 /* finalize */
47 StatusCode finalize();
48
49 /* specify the test here */
50 StatusCode runTest();
51
52 /* specify the scan here */
53 StatusCode runScan();
54
56 StatusCode initializeTest();
57
58 /* book the TTree branches */
59 StatusCode bookTree();
60 private:
61 template <class T, class P> StatusCode runTestT();
62
63 template <class T, class P> StatusCode fillStepInformationT(ExtrapolationCell<T>& eCell, int fwbw, std::vector<const Trk::Surface*>& stepSurfaces);
64
66 ToolHandle<IExtrapolationEngine> m_extrapolationEngine{
67 this, "ExtrapolationEngine", ""};
68
69 const AtlasDetectorID* m_idHelper = nullptr;
70 const PixelID* m_pixel_ID = nullptr;
71 const SCT_ID* m_sct_ID = nullptr;
72 const HGTD_ID* m_hgtd_ID = nullptr;
73 BooleanProperty m_useHGTD{this, "UseHGTD", false};
74
75 BooleanProperty m_parametersMode{this, "ParametersMode", 1,
76 "0 - neutral, 1 - charged, 2 - multi"};
77 IntegerProperty m_particleHypothesis{this, "ParticleHypothesis", 2};
78
79 BooleanProperty m_smearProductionVertex{this, "SmearOrigin", false};
80 BooleanProperty m_smearFlatOriginT{this, "SmearFlatOriginD0", false};
81 BooleanProperty m_smearFlatOriginZ{this, "SmearFlatOriginZ0", false};
82 DoubleProperty m_sigmaOriginT{this, "SimgaOriginD0", 0.};
83 DoubleProperty m_sigmaOriginZ{this, "SimgaOriginZ0", 0.};
84 DoubleProperty m_d0Min{this, "D0Min", 0.};
85 DoubleProperty m_d0Max{this, "D0Max", 0.};
86 DoubleProperty m_z0Min{this, "Z0Min", 0.};
87 DoubleProperty m_z0Max{this, "Z0Max", 0.};
88
89 DoubleProperty m_etaMin{this, "EtaMin", -3.};
90 DoubleProperty m_etaMax{this, "EtaMax", 3.};
91 DoubleProperty m_phiMin{this, "PhiMin", -M_PI};
92 DoubleProperty m_phiMax{this, "PhiMax", M_PI};
93 DoubleProperty m_ptMin{this, "PtMin", 100.};
94 DoubleProperty m_ptMax{this, "PtMax", 100000.};
95
96 DoubleProperty m_pathLimit{this, "PathLimit", 10e10};
97
98 BooleanProperty m_collectSensitive{this, "CollectSensitive", false};
99 BooleanProperty m_collectPassive{this, "CollectPassive", false};
100 BooleanProperty m_collectBoundary{this, "CollectBoundary", false};
101 BooleanProperty m_collectMaterial{this, "CollectMaterial", false};
102
103 BooleanProperty m_backExtrapolation{this, "BackExtrapolation", false};
104 BooleanProperty m_stepwiseExtrapolation{this, "StepwiseExtrapolation", false};
105
107 IntegerProperty m_stepsPhi{this, "PhiSteps", 1};
109 FloatArrayProperty m_etaScans{this, "EtaScans", {}};
110 double m_currentEta = 0.;
111 FloatArrayProperty m_phiScans{this, "PhiScans", {}};
112 double m_currentPhi = 0.;
113 BooleanProperty m_splitCharge{this, "SplitCharge", false};
114
115 BooleanProperty m_writeTTree{this, "WriteTTree", true};
116 ToolHandle<IPositionMomentumWriter> m_posmomWriter{
117 this, "PositionMomentumWriter", ""};
118
119 StringProperty m_treeName{this, "TreeName", "ExtrapolationEngineTest"};
120 StringProperty m_treeFolder{this, "TreeFolder", "/val/"};
121 StringProperty m_treeDescription{this, "TreeDescription",
122 "ExtrapolationEngine test setup"};
123 TTree* m_tree = nullptr;
124 TRandom m_tRandom;
125
126 float m_startPositionX = 0.0F;
127 float m_startPositionY = 0.0F;
128 float m_startPositionZ = 0.0F;
129 float m_startPositionR = 0.0F;
130 float m_startPhi = 0.0F;
131 float m_startTheta = 0.0F;
132 float m_startEta = 0.0F;
133 float m_startP = 0.0F;
134 float m_startPt = 0.0F;
135 float m_charge = -1.;
136
138 float m_endPositionX = 0.0F;
139 float m_endPositionY = 0.0F;
140 float m_endPositionZ = 0.0F;
141 float m_endPositionR = 0.0F;
142 float m_endPhi = 0.0F;
143 float m_endTheta = 0.0F;
144 float m_endEta = 0.0F;
145 float m_endP = 0.0F;
146 float m_endPt = 0.0F;
147 float m_endPathLength = 0.0F;
148
150 float m_backPositionX = 0.0F;
151 float m_backPositionY = 0.0F;
152 float m_backPositionZ = 0.0F;
153 float m_backPositionR = 0.0F;
154 float m_backPhi = 0.;
155 float m_backTheta = 0.;
156 float m_backEta = 0.;
157 float m_backP = 0.;
158 float m_backPt = 0.;
159
160 std::vector<TString> m_parameterNames;
161 std::vector< std::vector< float >* > m_pPositionX;
162 std::vector< std::vector< float >* > m_pPositionY;
163 std::vector< std::vector< float >* > m_pPositionZ;
164 std::vector< std::vector< float >* > m_pPositionR;
165 std::vector< std::vector< float >* > m_pPhi;
166 std::vector< std::vector< float >* > m_pTheta;
167 std::vector< std::vector< float >* > m_pEta;
168 std::vector< std::vector< float >* > m_pP;
169 std::vector< std::vector< float >* > m_pPt;
170
171 std::vector< int >* m_sensitiveSurfaceType = nullptr;
172 std::vector< int >* m_sensitiveLayerIndex = nullptr;
173 std::vector< float >* m_sensitiveLocalPosX = nullptr;
174 std::vector< float >* m_sensitiveLocalPosY = nullptr;
175 std::vector< float >* m_sensitiveCenterPosX = nullptr;
176 std::vector< float >* m_sensitiveCenterPosY = nullptr;
177 std::vector< float >* m_sensitiveCenterPosZ = nullptr;
178 std::vector< float >* m_sensitiveCenterPosR = nullptr;
179 std::vector< float >* m_sensitiveCenterPosPhi = nullptr;
180 std::vector< float >* m_sensitiveLocalPosR = nullptr;
181 std::vector< float >* m_sensitiveLocalPosPhi = nullptr;
182 std::vector< int >* m_sensitiveDetector = nullptr;
183 std::vector< int >* m_sensitiveIsInnermost = nullptr;
184 std::vector< int >* m_sensitiveIsNextToInnermost = nullptr;
185 std::vector< int >* m_sensitiveBarrelEndcap = nullptr;
186 std::vector< int >* m_sensitiveLayerDisc = nullptr;
187 std::vector< int >* m_sensitiveEtaModule = nullptr;
188 std::vector< int >* m_sensitivePhiModule = nullptr;
189 std::vector< int >* m_sensitiveSide = nullptr;
190 std::vector< int >* m_sensitiveNearBondGap = nullptr;
191 std::vector< int >* m_sensitiveisInside = nullptr;
192 std::vector< int >* m_sensitiveisInsideBound = nullptr;
193 std::vector< float >* m_materialtInX0AccumulatedUpTo = nullptr;
194
199
202
206
210
211 std::vector< float >* m_materialThicknessInX0Accumulated = nullptr;
212 std::vector< float >* m_materialThicknessInX0Steps = nullptr;
213 std::vector< float >* m_materialThicknessInL0Steps = nullptr;
214 std::vector< float >* m_materialPositionX = nullptr;
215 std::vector< float >* m_materialPositionY = nullptr;
216 std::vector< float >* m_materialPositionZ = nullptr;
217 std::vector< float >* m_materialPositionR = nullptr;
218 std::vector< float >* m_materialPositionP = nullptr;
219 std::vector< float >* m_materialPositionPt = nullptr;
220 std::vector< float >* m_materialScaling = nullptr;
221 std::vector< int >* m_stepDirection = nullptr;
222
228 float m_endStepPhi = 0.;
229 float m_endStepTheta = 0.;
230 float m_endStepEta = 0.;
231 float m_endStepP = 0.;
232 float m_endStepPt = 0.;
235
236 };
237}
238
239// include the templated function
241
242#endif
#define M_PI
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
This is an Identifier helper class for the HGTD subdetector.
Definition HGTD_ID.h:47
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:67
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
templated class as an input-output object of the extrapolation, only public members,...
Test Algorithm to run test extrapolations with the new IExtrapolationEngine.
std::vector< float > * m_sensitiveCenterPosX
StatusCode fillStepInformationT(ExtrapolationCell< T > &eCell, int fwbw, std::vector< const Trk::Surface * > &stepSurfaces)
std::vector< float > * m_materialPositionR
std::vector< int > * m_sensitiveIsInnermost
std::vector< float > * m_sensitiveCenterPosZ
std::vector< float > * m_materialPositionPt
std::vector< float > * m_sensitiveCenterPosPhi
std::vector< float > * m_materialThicknessInX0Steps
ToolHandle< IExtrapolationEngine > m_extrapolationEngine
retrieve it
std::vector< std::vector< float > * > m_pPositionX
std::vector< std::vector< float > * > m_pP
std::vector< float > * m_materialPositionY
std::vector< float > * m_sensitiveLocalPosX
std::vector< float > * m_materialThicknessInX0Accumulated
std::vector< float > * m_materialScaling
std::vector< int > * m_sensitiveNearBondGap
std::vector< float > * m_materialtInX0AccumulatedUpTo
std::vector< float > * m_sensitiveLocalPosR
std::vector< float > * m_materialPositionX
std::vector< float > * m_sensitiveLocalPosY
std::vector< TString > m_parameterNames
std::vector< float > * m_sensitiveCenterPosR
std::vector< std::vector< float > * > m_pPositionR
std::vector< int > * m_sensitiveSurfaceType
std::vector< float > * m_materialPositionP
ToolHandle< IPositionMomentumWriter > m_posmomWriter
std::vector< std::vector< float > * > m_pPhi
std::vector< std::vector< float > * > m_pPositionY
StatusCode initializeTest()
initialize the test, i.e.
std::vector< std::vector< float > * > m_pEta
std::vector< float > * m_materialThicknessInL0Steps
std::vector< int > * m_sensitiveIsNextToInnermost
std::vector< float > * m_sensitiveLocalPosPhi
IntegerProperty m_stepsPhi
scanning parameters
std::vector< float > * m_sensitiveCenterPosY
std::vector< std::vector< float > * > m_pTheta
std::vector< int > * m_sensitiveisInsideBound
std::vector< float > * m_materialPositionZ
std::vector< int > * m_sensitiveBarrelEndcap
std::vector< std::vector< float > * > m_pPt
std::vector< std::vector< float > * > m_pPositionZ
Extrapolation engine interface for Charged and Neutral parameters, it serves as the Master extrapolat...
Very simple helper Tool to record track states at certain positions this works only for single track ...
Base class for all unit tests in the TrkEx package, gives access to gaussian and flat random numbers.
Ensure that the ATLAS eigen extensions are properly loaded.