ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk Class Reference

#include <TRT_TrackSegmentsMakerCondAlg_ATLxk.h>

Inheritance diagram for InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk:
Collaboration diagram for InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk:

Public Member Functions

 TRT_TrackSegmentsMakerCondAlg_ATLxk (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~TRT_TrackSegmentsMakerCondAlg_ATLxk ()=default
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
void printStraw (const InDetDD::TRT_BaseElement *elementCS, unsigned int strawNum) const
virtual bool isReEntrant () const override
 Avoid scheduling algorithm multiple times.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
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
virtual void setFilterPassed (bool state, const EventContext &ctx) const
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

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.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

void magneticFieldInit ()
void detElementInformation (const InDetDD::TRT_BaseElement &, double *)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

const TRT_IDm_trtid {}
StringProperty m_fieldmode
ToolHandle< Trk::IPropagatorm_propTool
Trk::MagneticFieldProperties m_fieldprop
FloatProperty m_pTmin {this, "pTmin", 500.}
float m_Psi128 {}
IntegerProperty m_nMom
float m_A {}
float m_Psi {}
int m_nPhi {}
SG::ReadCondHandleKey< InDetDD::TRT_DetElementContainerm_trtDetEleContKey {this, "TRTDetEleContKey", "TRT_DetElementContainer", "Key of TRT_DetElementContainer"}
SG::WriteCondHandleKey< TRT_TrackSegmentsToolCondData_xkm_writeKey {this, "WriteKey", "TRT_TrackSegmentsToolCondData_xk", "Key of TRT_TrackSegmentsToolCondData_xk"}
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

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TRT_TrackSegmentsMakerCondAlg_ATLxk()

InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::TRT_TrackSegmentsMakerCondAlg_ATLxk ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 30 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.cxx.

31 : ::AthCondAlgorithm(name, pSvcLocator) { }

◆ ~TRT_TrackSegmentsMakerCondAlg_ATLxk()

virtual InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::~TRT_TrackSegmentsMakerCondAlg_ATLxk ( )
virtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ 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>

◆ detElementInformation()

void InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::detElementInformation ( const InDetDD::TRT_BaseElement & ,
double *  )
private

◆ 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 InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::execute ( const EventContext & ctx) const
overridevirtual

Definition at line 73 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.cxx.

74{
75
76 SG::WriteCondHandle<InDet::TRT_TrackSegmentsToolCondData_xk> writeHandle{m_writeKey, ctx};
77 if (writeHandle.isValid()) {
78 ATH_MSG_DEBUG("CondHandle " << writeHandle.fullKey() << " is already valid.");
79 return StatusCode::SUCCESS;
80 }
81
82 EventIDRange rangeTrt;
83
84 SG::ReadCondHandle<InDetDD::TRT_DetElementContainer> trtDetEleHandle(m_trtDetEleContKey, ctx);
85 if (not trtDetEleHandle.isValid()) {
86 ATH_MSG_FATAL(m_trtDetEleContKey.fullKey() << " is not available.");
87 return StatusCode::FAILURE;
88 }
89
90 const InDetDD::TRT_Numerology* trtNum = trtDetEleHandle->getTRTNumerology();
91 if (trtNum==nullptr){
92 ATH_MSG_FATAL("Pointer to TRT_Numerology not found in condition store" << m_trtDetEleContKey.fullKey());
93 }
94
95 if (not trtDetEleHandle.range(rangeTrt)) {
96 ATH_MSG_FATAL("Failed to retrieve validity range for " << trtDetEleHandle.key());
97 return StatusCode::FAILURE;
98 }
99
100 auto writeCdo = std::make_unique<InDet::TRT_TrackSegmentsToolCondData_xk>();
101 if(writeCdo->m_ndzdr ) delete [] writeCdo->m_ndzdr ;
102 if(writeCdo->m_slope ) delete [] writeCdo->m_slope ;
103 if(writeCdo->m_islope ) delete [] writeCdo->m_islope ;
104
105 float RZ [4][200];
106 float Tmin [4][200];
107 float Tmax [4][200];
108
109 // Map straws production for barrel geometry
110 //
111 int Rings = trtNum->getNBarrelRings();
112 int NPhi = trtNum->getNBarrelPhi();
113 int n = 0;
114
115 for(int ring = 0; ring!=Rings; ++ring) {
116
117 int NSlayers = trtNum->getNBarrelLayers(ring);
118
119 writeCdo->m_flayers[1][ring] = writeCdo->m_nlayers[1]; writeCdo->m_flayers[2][ring] = writeCdo->m_nlayers[2];
120 writeCdo->m_nlayers[1] += NSlayers ; writeCdo->m_nlayers[2] += NSlayers ;
121
122 for(int nsl=0; nsl!=NSlayers; ++nsl) {
123
124
125 for(int f=0; f!=NPhi; ++f) {
126
127 const InDetDD::TRT_BaseElement* base1 = trtDetEleHandle->getBarrelDetElement(0,ring,f,nsl);
128 const InDetDD::TRT_BaseElement* base2 = trtDetEleHandle->getBarrelDetElement(1,ring,f,nsl);
129 if(!base1 || !base2) continue;
130 const InDetDD::TRT_BarrelElement* bael1 =
131 dynamic_cast<const InDetDD::TRT_BarrelElement*>(base1);
132 const Trk::RectangleBounds* rb1 =
133 dynamic_cast<const Trk::RectangleBounds*>(&base1->bounds());
134 const Trk::RectangleBounds* rb2 =
135 dynamic_cast<const Trk::RectangleBounds*>(&base2->bounds());
136 if(!bael1 || !rb1 || !rb2) continue;
137 float rmean = 0;
138 if(f==0) {
139
140 Amg::Vector3D C1 = base1->center();
141 Amg::Vector3D C2 = base2->center();
142 RZ [1][n] = std::sqrt(C1.x()*C1.x()+C1.y()*C1.y());
143
144 Tmin [1][n] = (C1.z()-rb1->halflengthY())/RZ[1][n];
145 Tmax [1][n] = -.001;
146
147 RZ [2][n] = std::sqrt(C2.x()*C2.x()+C2.y()*C2.y());
148
149 Tmin [2][n] = +.001;
150 Tmax [2][n] = (C2.z()+rb2->halflengthY())/RZ[2][n];
151 ++n;
152 }
153 int ns = bael1->nStraws();
154 for(int s=0; s!=ns; ++s) {
155
156 const Identifier id1 = m_trtid->straw_id(-1,f,ring,nsl,s );
157 const Amg::Vector3D * sc1 = &(base1->strawCenter (s));
158 const Amg::Transform3D* st1 = &(base1->strawTransform (s));
159 const Amg::Transform3D* tr1 = &(base1->surface(id1).transform() );
160 if(f==0) rmean+=std::sqrt(sc1->x()*sc1->x()+sc1->y()*sc1->y());
161
162 if(!sc1 || !st1 || !tr1 ) {ATH_MSG_ERROR("problem with TRT geometry");}
163 ++writeCdo->m_nstraws[1];
164 const Identifier id2 = m_trtid->straw_id(+1,f,ring,nsl,s );
165 const Amg::Vector3D * sc2 = &(base2->strawCenter (s));
166 const Amg::Transform3D* st2 = &(base2->strawTransform (s));
167 const Amg::Transform3D* tr2 = &(base2->surface(id2).transform() );
168 if(!sc2 || !st2 || !tr2) {ATH_MSG_ERROR("problem with TRT geometry");}
169 ++writeCdo->m_nstraws[2];
170 }
171 if(f==0) { RZ[1][n-1] = RZ[2][n-1] = rmean/float(ns);}
172 }
173 }
174 }
175
176 // Endcap
177 //
178 int Wheels = trtNum->getNEndcapWheels(); if(!Wheels) return StatusCode::SUCCESS;
179 NPhi = trtNum->getNEndcapPhi ();
180 n = 0;
181 for(int wh = 0; wh!=Wheels; ++wh) {
182
183 int NSlayers = trtNum->getNEndcapLayers(wh);
184 writeCdo->m_flayers[0][wh] = writeCdo->m_nlayers[0]; writeCdo->m_flayers[3][wh] = writeCdo->m_nlayers[3];
185 writeCdo->m_nlayers[0] += NSlayers ; writeCdo->m_nlayers[3] += NSlayers ;
186
187 for(int nsl = 0; nsl!=NSlayers; ++nsl) {
188
189 for(int f=0; f!=NPhi; ++f) {
190
191 const InDetDD::TRT_BaseElement* base1 = trtDetEleHandle->getEndcapDetElement(0,wh,nsl,f);
192 const InDetDD::TRT_BaseElement* base2 = trtDetEleHandle->getEndcapDetElement(1,wh,nsl,f);
193 if(!base1 || !base2) continue;
194
195 const InDetDD::TRT_EndcapElement* enel1 =
196 dynamic_cast<const InDetDD::TRT_EndcapElement*>(base1);
197 const Trk::DiscBounds* db1 =
198 dynamic_cast<const Trk::DiscBounds*>(&base1->bounds());
199 const Trk::DiscBounds* db2 =
200 dynamic_cast<const Trk::DiscBounds*>(&base2->bounds());
201 if(!enel1 || !db1 || !db2) continue;
202 if(f==0) {
203
204 Amg::Vector3D C1 = base1->center();
205 Amg::Vector3D C2 = base2->center();
206 RZ [0][n] = C1.z();
207 Tmin [0][n] = RZ[0][n]/db1->rMin();
208 Tmax [0][n] = RZ[0][n]/db1->rMax();
209
210 RZ [3][n] = C2.z();
211 Tmin [3][n] = RZ[3][n]/db2->rMax();
212 Tmax [3][n] = RZ[3][n]/db2->rMin();
213
214 ++n;
215 }
216
217 int ns = enel1->nStraws();
218
219 for(int s=0; s!=ns; ++s) {
220
221 const Identifier id1 = m_trtid->straw_id(-2,f,wh,nsl,s );
222 const Amg::Vector3D * sc1 = &(base1->strawCenter (s) );
223 const Amg::Transform3D* st1 = &(base1->strawTransform (s) );
224 const Amg::Transform3D* tr1 = &(base1->surface(id1).transform());
225
226 if(!sc1 || !st1 || !tr1) {ATH_MSG_ERROR("problem with TRT geometry");}
227 ++writeCdo->m_nstraws[0];
228
229 const Identifier id2 = m_trtid->straw_id(+2,f,wh,nsl,s );
230 const Amg::Vector3D * sc2 = &(base2->strawCenter (s) );
231 const Amg::Transform3D* st2 = &(base2->strawTransform (s) );
232 const Amg::Transform3D* tr2 = &(base2->surface(id2).transform());
233
234 if(!sc2 || !st2 || !tr2) {ATH_MSG_ERROR("problem with TRT geometry");}
235 ++writeCdo->m_nstraws[3];
236 }
237 }
238 }
239 }
240
241 double zmax = RZ[3][writeCdo->m_nlayers[3]-1]+10.;
242 double rmax = RZ[2][writeCdo->m_nlayers[2]-1]+10.;
243 const Trk::CylinderBounds CB(rmax,zmax);
244
245 float rapidity[26]=
246 {-2.05,-1.95,-1.84,-1.72,-1.62,-1.53,-1.43,-1.33,-1.21,-1.00,-.94, -.85,-.32,
247 .32, .85, .94, 1.00, 1.21, 1.33, 1.43, 1.53, 1.62, 1.72,1.84, 1.95,2.05};
248
249 std::deque<Amg::Vector3D> G [26];
250 Amg::Vector3D psv(0.,0.,0.);
251 Trk::PerigeeSurface ps(psv);
252
253 for(int r=0; r!=26; ++r) {
254 writeCdo->m_dzdr[r] = 1./std::tan(2.*std::atan(std::exp(-rapidity[r])));
255 double pinv =-1./(m_pTmin*std::sqrt(1.+writeCdo->m_dzdr[r]*writeCdo->m_dzdr[r]));
256 auto trackPar = ps.createUniqueTrackParameters(
257 0.,
258 0.,
259 0.,
260 std::atan2(1., double(writeCdo->m_dzdr[r])),
261 pinv,
262 std::nullopt);
263 m_propTool->globalPositions(ctx,
264 G[r], *trackPar, m_fieldprop, CB, 5., Trk::pion);
265 }
266
267 n = 0;
268 for(int b=0; b!=4; ++b) {
269 for(unsigned int i=0; i!=writeCdo->m_nlayers[b]; ++i) {
270 writeCdo->m_begin[b][i] = n;
271 for(float r : writeCdo->m_dzdr) {
272 if( r >= Tmin[b][i] && r <= Tmax[b][i] ) {
273 writeCdo->m_end[b][i] = n++;
274 }
275 }
276 }
277 }
278
279 writeCdo->m_ndzdr = new unsigned int[n];
280 writeCdo->m_islope = new int[n];
281 writeCdo->m_slope = new float [n];
282 writeCdo->m_cirsize = writeCdo->m_nstraws[0]+writeCdo->m_nstraws[1];
283
284 n = 0;
285 for (int b = 0; b != 4; ++b) {
286
287 for (unsigned int i = 0; i != writeCdo->m_nlayers[b]; ++i) {
288
289 for (int r = 0; r != 26; ++r) {
290 if (writeCdo->m_dzdr[r] >= Tmin[b][i] &&
291 writeCdo->m_dzdr[r] <= Tmax[b][i]) {
292 writeCdo->m_ndzdr[n] = r;
293 std::deque<Amg::Vector3D>::iterator gp0, gp1, gp = G[r].begin(),gpe = G[r].end();
294 if (b == 0 || b == 3) {
295
296 gp0 = gp;
297 for (++gp; gp != gpe; ++gp) {
298 if (b == 3 && (*gp).z() >= RZ[b][i])
299 break;
300 if (b == 0 && (*gp).z() <= RZ[b][i])
301 break;
302 gp1 = gp0;
303 gp0 = gp;
304 }
305 } else {
306 gp0 = gp;
307 for (++gp; gp != gpe; ++gp) {
308 if (std::sqrt((*gp).x() * (*gp).x() + (*gp).y() * (*gp).y()) >
309 RZ[b][i])
310 break;
311 gp1 = gp0;
312 gp0 = gp;
313 }
314 }
315 double x, y, z, ax, ay, az;
316 if (gp != gpe) {
317 x = (*gp0).x();
318 ax = (*gp).x() - x;
319 y = (*gp0).y();
320 ay = (*gp).y() - y;
321 z = (*gp0).z();
322 az = (*gp).z() - z;
323 double as = 1. / std::sqrt(ax * ax + ay * ay + az * az);
324 ax *= as;
325 ay *= as;
326 az *= as;
327 } else {
328 x = (*gp1).x();
329 ax = (*gp0).x() - x;
330 y = (*gp1).y();
331 ay = (*gp0).y() - y;
332 z = (*gp1).z();
333 az = (*gp0).z() - z;
334 double as = 1. / std::sqrt(ax * ax + ay * ay + az * az);
335 ax *= as;
336 ay *= as;
337 az *= as;
338 }
339 double S = 0;
340
341 if (b == 0 || b == 3) {
342 S = (RZ[b][i] - z) / az;
343 } else {
344 double A = (ax * x + ay * y) * 2.;
345 double D = (RZ[b][i] - x - y) * (RZ[b][i] + x + y) + 2. * x * y;
346 S = D / A;
347 double B = 2. * (ax * ax + ay * ay);
348 double Sq = A * A + 2. * D * B;
349 Sq > 0. ? Sq = std::sqrt(Sq) : Sq = 0.;
350 double S1 = -(A + Sq) / B;
351 double S2 = -(A - Sq) / B;
352 if (S > S2)
353 S = S2;
354 else if (S < S1)
355 S = S1;
356 }
357 writeCdo->m_slope[n] = std::atan2(y + S * ay, x + S * ax) * m_A;
358 writeCdo->m_islope[n] = int(writeCdo->m_slope[n] * m_Psi128);
359 ++n;
360 }
361 }
362 }
363 }
364
365 if (writeHandle.record(rangeTrt, std::move(writeCdo)).isFailure()) {
366 ATH_MSG_FATAL("Could not record " << writeHandle.key()
367 << " with EventRange " << rangeTrt
368 << " into Conditions Store");
369 return StatusCode::FAILURE;
370 }
371 ATH_MSG_DEBUG("recorded new CDO " << writeHandle.key() << " with range "
372 << rangeTrt << " into Conditions Store");
373
374 return StatusCode::SUCCESS;
375
376}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
HWIdentifier id2
#define G(x, y, z)
Definition MD5.cxx:113
struct TBPatternUnitContext S2
struct TBPatternUnitContext S1
#define y
#define x
#define z
unsigned int nStraws() const
Number of straws in the element.
virtual const Trk::SurfaceBounds & bounds() const override final
Straw layer bounds.
virtual const Trk::Surface & surface() const override final
Element Surface: access to the Surface (straw layer)
virtual const Amg::Vector3D & center() const override final
Element Surface: center of a straw layer.
const Amg::Transform3D & strawTransform(unsigned int straw) const
Straw transform - fast access in array, in Tracking frame: Amg.
const Amg::Vector3D & strawCenter(int straw) const
Straw Surface: Local -> global transform of the straw via integer.
unsigned int getNEndcapWheels() const
unsigned int getNEndcapPhi() const
unsigned int getNBarrelPhi() const
unsigned int getNBarrelRings() const
unsigned int getNBarrelLayers(unsigned int iMod) const
unsigned int getNEndcapLayers(unsigned int iWheel) const
SG::WriteCondHandleKey< TRT_TrackSegmentsToolCondData_xk > m_writeKey
SG::ReadCondHandleKey< InDetDD::TRT_DetElementContainer > m_trtDetEleContKey
const std::string & key() const
StatusCode record(const EventIDRange &range, T *t)
record handle, with explicit range DEPRECATED
const DataObjID & fullKey() const
double halflengthY() const
for consitant naming
int r
Definition globals.cxx:22
Eigen::Affine3d Transform3D
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Eigen::Matrix< double, 3, 1 > Vector3D
str wh
Definition parseDir.py:45

◆ 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 & AthCommonReentrantAlgorithm< 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 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::initialize ( )
overridevirtual

Definition at line 37 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.cxx.

38{
39
40 ATH_CHECK(m_trtDetEleContKey.initialize());
41 ATH_CHECK(m_writeKey.initialize());
42
43 // Get propagator tool
44 //
45 if( m_propTool.retrieve().isFailure()) {
46 ATH_MSG_FATAL("Failed to retrieve tool "<< m_propTool);
47 return StatusCode::FAILURE;
48 }
49 ATH_MSG_DEBUG("Retrieved tool " << m_propTool);
50
52
53 // Get TRT ID
54 if (detStore()->retrieve(m_trtid, "TRT_ID").isFailure()) {
55 ATH_MSG_FATAL("Could not get TRT ID helper");
56 return StatusCode::FAILURE;
57 }
58
59 m_nPhi = 500 ;
60 m_Psi = 2./float(m_nMom-1) ;
61 m_Psi128 = m_Psi*128. ;
62 m_A = float(m_nPhi)/(2.*M_PI) ;
63
64 return StatusCode::SUCCESS;
65}
#define M_PI
#define ATH_CHECK
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

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

◆ isReEntrant()

virtual bool AthCondAlgorithm::isReEntrant ( ) const
inlineoverridevirtualinherited

Avoid scheduling algorithm multiple times.

With multiple concurrent events, conditions objects often expire simultaneously for all slots. To avoid that the scheduler runs the CondAlg in each slot, we declare it as "non-reentrant". This ensures that the conditions objects are only created once.

In case a particular CondAlg should behave differently, it can override this method again and return true.

See also
ATEAM-836

Definition at line 39 of file AthCondAlgorithm.h.

39{ return false; }

◆ magneticFieldInit()

void InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::magneticFieldInit ( )
private

Definition at line 378 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.cxx.

379{
380 // Build MagneticFieldProperties
381 //
382 if (m_fieldmode == "NoField" ) m_fieldprop = Trk::MagneticFieldProperties(Trk::NoField );
383 else if(m_fieldmode == "MapSolenoid") m_fieldprop = Trk::MagneticFieldProperties(Trk::FastField);
384 else m_fieldprop = Trk::MagneticFieldProperties(Trk::FullField);
385}
@ FastField
call the fast field access method of the FieldSvc
@ NoField
Field is set to 0., 0., 0.,.
@ FullField
Field is set to be realistic, but within a given Volume.

◆ 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.

◆ printStraw()

void InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::printStraw ( const InDetDD::TRT_BaseElement * elementCS,
unsigned int strawNum ) const

◆ 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 }

◆ setFilterPassed()

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

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< 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.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< 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 HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_WARNING(x)
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_A

float InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_A {}
private

Definition at line 66 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.h.

66{} ;

◆ 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_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_extendedExtraObjects

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

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_fieldmode

StringProperty InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_fieldmode
private
Initial value:
{this, "MagneticFieldMode", "MapSolenoid",
"Mode of magnetic field"}

Definition at line 57 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.h.

57 {this, "MagneticFieldMode", "MapSolenoid",
58 "Mode of magnetic field"};

◆ m_fieldprop

Trk::MagneticFieldProperties InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_fieldprop
private

Definition at line 61 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.h.

◆ m_nMom

IntegerProperty InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_nMom
private
Initial value:
{this, "NumberMomentumChannel", 70,
"number momentum channel"}

Definition at line 64 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.h.

64 {this, "NumberMomentumChannel", 70,
65 "number momentum channel"};

◆ m_nPhi

int InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_nPhi {}
private

Definition at line 68 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.h.

68{} ; // number azimuthal channel

◆ m_propTool

ToolHandle<Trk::IPropagator> InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_propTool
private
Initial value:
{this, "PropagatorTool",
"Trk::RungeKuttaPropagator"}

Definition at line 59 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.h.

59 {this, "PropagatorTool",
60 "Trk::RungeKuttaPropagator"};

◆ m_Psi

float InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_Psi {}
private

Definition at line 67 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.h.

67{} ;

◆ m_Psi128

float InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_Psi128 {}
private

Definition at line 63 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.h.

63{} ;

◆ m_pTmin

FloatProperty InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_pTmin {this, "pTmin", 500.}
private

Definition at line 62 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.h.

62{this, "pTmin", 500.};

◆ m_trtDetEleContKey

SG::ReadCondHandleKey<InDetDD::TRT_DetElementContainer> InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_trtDetEleContKey {this, "TRTDetEleContKey", "TRT_DetElementContainer", "Key of TRT_DetElementContainer"}
private

Definition at line 72 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.h.

72{this, "TRTDetEleContKey", "TRT_DetElementContainer", "Key of TRT_DetElementContainer"};

◆ m_trtid

const TRT_ID* InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_trtid {}
private

Definition at line 55 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.h.

55{} ;

◆ 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.

◆ m_writeKey

SG::WriteCondHandleKey<TRT_TrackSegmentsToolCondData_xk> InDet::TRT_TrackSegmentsMakerCondAlg_ATLxk::m_writeKey {this, "WriteKey", "TRT_TrackSegmentsToolCondData_xk", "Key of TRT_TrackSegmentsToolCondData_xk"}
private

Definition at line 73 of file TRT_TrackSegmentsMakerCondAlg_ATLxk.h.

73{this, "WriteKey", "TRT_TrackSegmentsToolCondData_xk", "Key of TRT_TrackSegmentsToolCondData_xk"};

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