ATLAS Offline Software
Loading...
Searching...
No Matches
SiSpacePointsSeedMaker.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include "GaudiKernel/EventContext.h"
7
8#include "Acts/Definitions/Units.hpp"
9#include "Acts/MagneticField/MagneticFieldContext.hpp"
11
15
21//for validation
22#include "TrkTrack/Track.h"
25#include "GaudiKernel/ITHistSvc.h"
27
28#include "TTree.h"
29
30#include <cmath>
31
32
33namespace ActsTrk {
34
35 SiSpacePointsSeedMaker::SiSpacePointsSeedMaker(const std::string &t, const std::string &n, const IInterface *p)
36 : base_class(t, n, p),
37 m_thistSvc("THistSvc", n)
38 {}
39
41 {
42 ATH_MSG_DEBUG( "Initializing " << name() << "..." );
43
44 ATH_MSG_DEBUG( "Properties Summary:" );
45 ATH_MSG_DEBUG( " " << m_pixel );
46 ATH_MSG_DEBUG( " " << m_strip );
50
51 if (not m_pixel and not m_strip) {
52 ATH_MSG_ERROR("Activate seeding on at least one between Pixel and Strip space point collections!");
53 return StatusCode::FAILURE;
54 }
55
59
60 ATH_CHECK( m_seedsToolPixel.retrieve(EnableTool{m_pixel}) );
61 ATH_CHECK( m_seedsToolStrip.retrieve(EnableTool{m_strip}) );
62
63 ATH_CHECK( m_prdToTrackMap.initialize(not m_prdToTrackMap.empty() ) );
64
65 ATH_CHECK( m_beamSpotKey.initialize() );
66 ATH_CHECK( m_fieldCondObjInputKey.initialize() );
67
68 ATH_CHECK(m_pixelDetEleCollKey.initialize());
69 ATH_CHECK(m_stripDetEleCollKey.initialize());
70
71 // Validation
72 if (m_writeNtuple)
74
75 return StatusCode::SUCCESS;
76 }
77
78 // ===================================================================== //
79
80 StatusCode
82 {
83 ATH_CHECK( m_thistSvc.retrieve() );
84 std::string tree_name = std::string("SeedTree_") + name();
85 std::replace( tree_name.begin(), tree_name.end(), '.', '_' );
86
87 m_outputTree = new TTree( tree_name.c_str() , "ActsSeedMakerValTool");
88
89 m_outputTree->Branch("eventNumber", &m_eventNumber,"eventNumber/L");
90 m_outputTree->Branch("d0", &m_d0);
91 m_outputTree->Branch("z0", &m_z0);
92 m_outputTree->Branch("pt", &m_pt);
93 m_outputTree->Branch("eta", &m_eta);
94 m_outputTree->Branch("x1", &m_x1);
95 m_outputTree->Branch("x2", &m_x2);
96 m_outputTree->Branch("x3", &m_x3);
97 m_outputTree->Branch("y1", &m_y1);
98 m_outputTree->Branch("y2", &m_y2);
99 m_outputTree->Branch("y3", &m_y3);
100 m_outputTree->Branch("z1", &m_z1);
101 m_outputTree->Branch("z2", &m_z2);
102 m_outputTree->Branch("z3", &m_z3);
103 m_outputTree->Branch("r1", &m_r1);
104 m_outputTree->Branch("r2", &m_r2);
105 m_outputTree->Branch("r3", &m_r3);
106 m_outputTree->Branch("quality", &m_quality);
107 m_outputTree->Branch("seedType", &m_type);
108 m_outputTree->Branch("givesTrack", &m_givesTrack);
109 m_outputTree->Branch("dzdr_b", &m_dzdr_b);
110 m_outputTree->Branch("dzdr_t", &m_dzdr_t);
111 m_outputTree->Branch("track_pt", &m_trackPt);
112 m_outputTree->Branch("track_eta", &m_trackEta);
113
114 std::string full_tree_name = "/" + m_treeFolder + "/" + tree_name;
115 ATH_CHECK( m_thistSvc->regTree( full_tree_name.c_str(), m_outputTree ) );
116
117 return StatusCode::SUCCESS;
118 }
119
120 void
122 const xAOD::SpacePoint* sp) const
123 {
124
125 data.v_ActsSpacePointForSeed.emplace_back(sp);
126 data.ns++;
127 data.nsaz++;
128 }
129
131 float * ATH_RESTRICT r)
132 {
133 const InDet::SiCluster *cl = static_cast<const InDet::SiCluster *>(sp->clusterList().first);
134 const InDetDD::SiDetectorElement *de = cl->detectorElement();
135 const Amg::Transform3D &Tp = de->surface().transform();
136 r[3] = static_cast<float>(Tp(0, 2));
137 r[4] = static_cast<float>(Tp(1, 2));
138 r[5] = static_cast<float>(Tp(2, 2));
139 }
140
141
143 const Trk::SpacePoint* sp,
144 std::span<float,15> r)
145 {
146 const InDet::SiCluster *c0 = static_cast<const InDet::SiCluster *>(sp->clusterList().first);
147 const InDet::SiCluster *c1 = static_cast<const InDet::SiCluster *>(sp->clusterList().second);
148 const InDetDD::SiDetectorElement *d0 = c0->detectorElement();
149 const InDetDD::SiDetectorElement *d1 = c1->detectorElement();
150
151 Amg::Vector2D lc0 = c0->localPosition();
152 Amg::Vector2D lc1 = c1->localPosition();
153
154 std::pair<Amg::Vector3D, Amg::Vector3D> e0 =
155 (d0->endsOfStrip(InDetDD::SiLocalPosition(lc0.y(), lc0.x(), 0.)));
156 std::pair<Amg::Vector3D, Amg::Vector3D> e1 =
157 (d1->endsOfStrip(InDetDD::SiLocalPosition(lc1.y(), lc1.x(), 0.)));
158
159 Amg::Vector3D s0(.5 * (e0.first + e0.second));
160 Amg::Vector3D s1(.5 * (e1.first + e1.second));
161
162 Amg::Vector3D b0(.5 * (e0.second - e0.first));
163 Amg::Vector3D b1(.5 * (e1.second - e1.first));
164 Amg::Vector3D d02(s0 - s1);
165
166 // b0
167 r[3] = static_cast<float>(b0[0]);
168 r[4] = static_cast<float>(b0[1]);
169 r[5] = static_cast<float>(b0[2]);
170
171 // b1
172 r[6] = static_cast<float>(b1[0]);
173 r[7] = static_cast<float>(b1[1]);
174 r[8] = static_cast<float>(b1[2]);
175
176 // r0-r2
177 r[9] = static_cast<float>(d02[0]);
178 r[10] = static_cast<float>(d02[1]);
179 r[11] = static_cast<float>(d02[2]);
180
181 // r0
182 r[12] = static_cast<float>(s0[0]) - data.xbeam[0];
183 r[13] = static_cast<float>(s0[1]) - data.ybeam[0];
184 r[14] = static_cast<float>(s0[2]) - data.zbeam[0];
185 }
186
187 StatusCode
190 const Trk::PRDtoTrackMap* prd_to_track_map_cptr) const
191 {
192 // get the xAOD::SpacePointContainer and loop on entries to check which space point
193 // you want to use for seeding
194 ATH_MSG_DEBUG("Retrieving pixel space point collection " << m_actsSpacepointsPixel.key());
196 if (not inputSpacePointContainer.isValid()){
197 ATH_MSG_FATAL("xAOD::SpacePointContainer with key " << m_actsSpacepointsPixel.key() << " is not available...");
198 return StatusCode::FAILURE;
199 }
200 const xAOD::SpacePointContainer* inputSpacePointCollection = inputSpacePointContainer.cptr();
201 // TODO: here you need to write some lines to implement the
202 // check on the used PDRs in previous tracking passes
203 for (const xAOD::SpacePoint * sp : *inputSpacePointCollection) {
204 if (prd_to_track_map_cptr != nullptr and isUsed(sp, *prd_to_track_map_cptr)) continue;
206 }
207
208 return StatusCode::SUCCESS;
209 }
210
211 StatusCode
214 const std::vector<IdentifierHash>& ids,
215 const Trk::PRDtoTrackMap* prd_to_track_map_cptr) const
216 {
217 if (ids.empty()) return StatusCode::SUCCESS;
218
219 ATH_MSG_DEBUG("Retrieving pixel space point collection " << m_actsSpacepointsPixel.key());
221 if (not inputSpacePointContainer.isValid()){
222 ATH_MSG_FATAL("xAOD::SpacePointContainer with key " << m_actsSpacepointsPixel.key() << " is not available...");
223 return StatusCode::FAILURE;
224 }
225 const xAOD::SpacePointContainer *inputCollection = inputSpacePointContainer.cptr();
226
227 ATH_MSG_DEBUG("Retrieving SiDetectorElementCollection with key `" << m_pixelDetEleCollKey.key() << "`");
229 ATH_CHECK(detEleHandle.isValid());
230 const InDetDD::SiDetectorElementCollection* detElements = detEleHandle.cptr();
231
233 accessor ( *inputCollection,
234 [] (const xAOD::SpacePoint& coll) -> IdentifierHash
235 { return coll.elementIdList()[0]; },
236 detElements->size());
237
238 for (const IdentifierHash id : ids) {
239 if (not accessor.isIdentifierPresent(id)) {
240 continue;
241 }
242
243 const auto& ranges = accessor.rangesForIdentifierDirect(id);
244 for (auto [firstElement, lastElement] : ranges) {
245 for (; firstElement != lastElement; ++firstElement) {
246 const xAOD::SpacePoint *sp = *firstElement;
247 if (prd_to_track_map_cptr != nullptr and isUsed(sp, *prd_to_track_map_cptr)) continue;
249 }
250 }
251 }
252
253 return StatusCode::SUCCESS;
254 }
255
256 StatusCode
259 const Trk::PRDtoTrackMap* prd_to_track_map_cptr) const
260 {
261 // get the xAOD::SpacePointContainer and loop on entries to check which space point
262 // you want to use for seeding
263 ATH_MSG_DEBUG("Retrieving strip space point collection " << m_actsSpacepointsStrip.key());
265 if (!inputSpacePointContainer.isValid()){
266 ATH_MSG_FATAL("xAOD::SpacePointContainer with key " << m_actsSpacepointsStrip.key() << " is not available...");
267 return StatusCode::FAILURE;
268 }
269 const xAOD::SpacePointContainer* inputSpacePointCollection = inputSpacePointContainer.cptr();
270 // TODO: here you need to write some lines to implement the
271 // check on the used PDRs in previous tracking passes
272 for (const xAOD::SpacePoint * sp : *inputSpacePointCollection) {
273 if (prd_to_track_map_cptr != nullptr and isUsed(sp, *prd_to_track_map_cptr)) continue;
275 }
276
277 return StatusCode::SUCCESS;
278 }
279
280 StatusCode
283 const std::vector<IdentifierHash>& ids,
284 const Trk::PRDtoTrackMap* prd_to_track_map_cptr) const
285
286 {
287 if (ids.empty()) return StatusCode::SUCCESS;
288
289 ATH_MSG_DEBUG("Retrieving strip space point collection " << m_actsSpacepointsStrip.key());
291 if (not inputSpacePointContainer.isValid()){
292 ATH_MSG_FATAL("xAOD::SpacePointContainer with key " << m_actsSpacepointsStrip.key() << " is not available...");
293 return StatusCode::FAILURE;
294 }
295 const xAOD::SpacePointContainer *inputCollection = inputSpacePointContainer.cptr();
296
297 ATH_MSG_DEBUG("Retrieving SiDetectorElementCollection with key `" << m_stripDetEleCollKey.key() << "`");
299 ATH_CHECK(detEleHandle.isValid());
300 const InDetDD::SiDetectorElementCollection* detElements = detEleHandle.cptr();
301
303 accessor ( *inputCollection,
304 [] (const xAOD::SpacePoint& coll) -> IdentifierHash
305 { return coll.elementIdList()[0]; },
306 detElements->size());
307
308 for (const IdentifierHash id : ids) {
309 if (not accessor.isIdentifierPresent(id)) {
310 continue;
311 }
312
313 const auto& ranges = accessor.rangesForIdentifierDirect(id);
314 for (auto [firstElement, lastElement] : ranges) {
315 for (; firstElement != lastElement; ++firstElement) {
316 const xAOD::SpacePoint *sp = *firstElement;
317 if (prd_to_track_map_cptr != nullptr and isUsed(sp, *prd_to_track_map_cptr)) continue;
319 }
320 }
321 }
322
323 return StatusCode::SUCCESS;
324 }
325
326
327 StatusCode
330 const Trk::PRDtoTrackMap* prd_to_track_map_cptr) const
331 {
332 // get the xAOD::SpacePointContainer and loop on entries to check which space point
333 // you want to use for seeding
334 ATH_MSG_DEBUG("Retrieving strip overlap space point collection " << m_actsSpacepointsOverlap.key());
336 if (!inputSpacePointContainer.isValid()){
337 ATH_MSG_FATAL("xAOD::SpacePointContainer with key " << m_actsSpacepointsOverlap.key() << " is not available...");
338 return StatusCode::FAILURE;
339 }
340 const xAOD::SpacePointContainer* inputSpacePointCollection = inputSpacePointContainer.cptr();
341 // TODO: here you need to write some lines to implement the
342 // check on the used PDRs in previous tracking passes
343 for (const xAOD::SpacePoint * sp : *inputSpacePointCollection) {
344 if (prd_to_track_map_cptr != nullptr and isUsed(sp, *prd_to_track_map_cptr)) continue;
346 }
347
348 return StatusCode::SUCCESS;
349 }
350
351 StatusCode
354 const std::vector<IdentifierHash>& ids,
355 const Trk::PRDtoTrackMap* prd_to_track_map_cptr) const
356 {
357 if (ids.empty()) return StatusCode::SUCCESS;
358
359 ATH_MSG_DEBUG("Retrieving strip overlap space point collection " << m_actsSpacepointsOverlap.key());
361 if (not inputSpacePointContainer.isValid()){
362 ATH_MSG_FATAL("xAOD::SpacePointContainer with key " << m_actsSpacepointsOverlap.key() << " is not available...");
363 return StatusCode::FAILURE;
364 }
365 const xAOD::SpacePointContainer *inputCollection = inputSpacePointContainer.cptr();
366
367 ATH_MSG_DEBUG("Retrieving SiDetectorElementCollection with key `" << m_stripDetEleCollKey.key() << "`");
369 ATH_CHECK(detEleHandle.isValid());
370 const InDetDD::SiDetectorElementCollection* detElements = detEleHandle.cptr();
371
373 accessor ( *inputCollection,
374 [] (const xAOD::SpacePoint& coll) -> IdentifierHash
375 { return coll.elementIdList()[0]; },
376 detElements->size());
377
378 for (const IdentifierHash id : ids) {
379 if (not accessor.isIdentifierPresent(id)) {
380 continue;
381 }
382
383 const auto& ranges = accessor.rangesForIdentifierDirect(id);
384 for (auto [firstElement, lastElement] : ranges) {
385 for (; firstElement != lastElement; ++firstElement) {
386 const xAOD::SpacePoint *sp = *firstElement;
387 if (prd_to_track_map_cptr != nullptr and isUsed(sp, *prd_to_track_map_cptr)) continue;
389 }
390 }
391 }
392
393 return StatusCode::SUCCESS;
394 }
395
396 void
399 {
401
402 const Amg::Vector3D &cb = beamSpotHandle->beamPos();
403 double tx = std::tan(beamSpotHandle->beamTilt(0));
404 double ty = std::tan(beamSpotHandle->beamTilt(1));
405
406 double phi = std::atan2(ty, tx);
407 double theta = std::acos(1. / std::sqrt(1. + tx * tx + ty * ty));
408 double sinTheta = std::sin(theta);
409 double cosTheta = std::cos(theta);
410 double sinPhi = std::sin(phi);
411 double cosPhi = std::cos(phi);
412
413 data.xbeam[0] = static_cast<float>(cb.x());
414 data.xbeam[1] = static_cast<float>(cosTheta * cosPhi * cosPhi + sinPhi * sinPhi);
415 data.xbeam[2] = static_cast<float>(cosTheta * sinPhi * cosPhi - sinPhi * cosPhi);
416 data.xbeam[3] = -static_cast<float>(sinTheta * cosPhi);
417
418 data.ybeam[0] = static_cast<float>(cb.y());
419 data.ybeam[1] = static_cast<float>(cosTheta * cosPhi * sinPhi - sinPhi * cosPhi);
420 data.ybeam[2] = static_cast<float>(cosTheta * sinPhi * sinPhi + cosPhi * cosPhi);
421 data.ybeam[3] = -static_cast<float>(sinTheta * sinPhi);
422
423 data.zbeam[0] = static_cast<float>(cb.z());
424 data.zbeam[1] = static_cast<float>(sinTheta * cosPhi);
425 data.zbeam[2] = static_cast<float>(sinTheta * sinPhi);
426 data.zbeam[3] = static_cast<float>(cosTheta);
427
428 // Acts Seed Tool requires both MagneticFieldContext and BeamSpotData
429 // we need to retrieve them both from StoreGate
430 // Read the b-field information
432 if ( not readHandle.isValid() ) {
433 throw std::runtime_error("Error while retrieving Atlas Field Cache Cond DB");
434 }
435 const AtlasFieldCacheCondObj* fieldCondObj{ *readHandle };
436 if (fieldCondObj == nullptr) {
437 throw std::runtime_error("Failed to retrieve AtlasFieldCacheCondObj with key " + m_fieldCondObjInputKey.key());
438 }
439
440 // Get the magnetic field
441 // Using ACTS classes in order to be sure we are consistent
442 Acts::MagneticFieldContext magFieldContext(fieldCondObj);
443
444 // Beam Spot Position
445 Acts::Vector3 beamPos( data.xbeam[0] * Acts::UnitConstants::mm,
446 data.ybeam[0] * Acts::UnitConstants::mm,
447 0. );
448
449 // Magnetic Field
450 ATLASMagneticFieldWrapper magneticField;
451 Acts::MagneticFieldProvider::Cache magFieldCache = magneticField.makeCache( magFieldContext );
452 Acts::Vector3 bField = *magneticField.getField( beamPos,
453 magFieldCache );
454
455 data.bField[0] = bField[0];
456 data.bField[1] = bField[1];
457 data.bField[2] = bField[2];
458
459 data.K = 2. * s_toTesla / (300. * bField[2]);
460
461 }
462
463
464 // ===================================================================== //
465 // Interface Methods
466 // ===================================================================== //
467
468 void
469 SiSpacePointsSeedMaker::newRegion(const EventContext& ctx,
471 const std::vector<IdentifierHash>& vPixel,
472 const std::vector<IdentifierHash>& vStrip) const
473 {
474 ATH_MSG_DEBUG("Calling " << name() << "::newRegion");
475 if (!m_pixel && !m_strip)
476 return;
477
479 data.i_ITkSpacePointForSeed = data.l_ITkSpacePointForSeed.begin();
480 data.v_ActsSpacePointForSeed.clear();
481
483 data.i_ITkSeed = data.i_ITkSeeds.begin();
484
486
487 data.ns = 0;
488 data.nsaz = 0;
489 data.nsazv = 0;
490
491 const Trk::PRDtoTrackMap *prd_to_track_map_cptr = nullptr;
492 if ( not m_prdToTrackMap.empty() ) {
494 if ( not prd_handle.isValid() ) {
495 ATH_MSG_ERROR("Failed to read PRD to track association map: " << m_prdToTrackMap.key());
496 }
497 prd_to_track_map_cptr = prd_handle.get();
498 }
499 if (prd_to_track_map_cptr != nullptr) {
500 ATH_MSG_DEBUG("Retrieved prd map with name " << m_prdToTrackMap.key());
501 }
502
503 if ( not retrievePixel(ctx, data, vPixel, prd_to_track_map_cptr).isSuccess() ) {
504 ATH_MSG_ERROR("Error while retrieving Pixel space points with key " << m_actsSpacepointsPixel.key());
505 }
506
507 if ( not retrieveStrip(ctx, data, vStrip, prd_to_track_map_cptr).isSuccess() ) {
508 ATH_MSG_ERROR("Error while retrieving Strip space points with key " << m_actsSpacepointsStrip.key());
509 }
510
511 if ( m_useOverlap and not retrieveOverlap(ctx, data, prd_to_track_map_cptr).isSuccess() ) {
512 ATH_MSG_ERROR("Error while retrieving Strip Overlap space points with key " << m_actsSpacepointsOverlap.key());
513 }
514
515 data.initialized = true;
516 }
517
518
519
520 void
521 SiSpacePointsSeedMaker::newEvent(const EventContext& ctx,
523 int iteration) const
524 {
525 // Store iteration into data for use in other methods
526 data.iteration = iteration;
527 if (iteration < 0)
528 data.iteration = 0;
529
530 // At the beginning of each iteration
531 // clearing list of space points to be used for seeding
533 data.i_ITkSpacePointForSeed = data.l_ITkSpacePointForSeed.begin();
534 data.v_ActsSpacePointForSeed.clear();
535
536
537 // clearing list of produced seeds
539 data.i_ITkSeed = data.i_ITkSeeds.begin();
540
541 // First iteration:
542 // -- event-specific configuration, i.e. beamspot and magnetic field
543 // -- for default case: producing SSS
544 // -- for fast tracking: producing PPP
545 // Second iteration:
546 // -- for default case: producing PPP
547 // -- no additional iteration is foreseen for fast tracking case
548
549 bool isPixel = (m_fastTracking or data.iteration == 1) and m_pixel;
550 bool isStrip = not m_fastTracking and data.iteration == 0 and m_strip;
551
552 // The Acts Seed tool requires beamspot information for the space points already here
553 if (data.iteration == 0)
555
556 // initialising the number of space points as well
557 data.ns = 0;
558 data.nsaz = 0;
559 data.nsazv = 0;
560
561 // Retrieve the Trk::PRDtoTrackMap
562 const Trk::PRDtoTrackMap *prd_to_track_map_cptr = nullptr;
563 if ( not m_prdToTrackMap.empty() ) {
565 if ( not prd_handle.isValid() ) {
566 ATH_MSG_ERROR("Failed to read PRD to track association map: " << m_prdToTrackMap.key());
567 }
568 prd_to_track_map_cptr = prd_handle.get();
569 }
570
571 // Only retrieving the collections needed for the seed formation,
572 // depending on the tool configuration and iteration
573
574 // Retrieve Pixels
575 if (isPixel and not retrievePixel(ctx, data, prd_to_track_map_cptr).isSuccess() ) {
576 ATH_MSG_ERROR("Error while retrieving Pixel space points with key " << m_actsSpacepointsPixel.key());
577 }
578
579 // Retrieve Strips
580 if (isStrip and not retrieveStrip(ctx, data, prd_to_track_map_cptr).isSuccess() ) {
581 ATH_MSG_ERROR("Error while retrieving Strip space points with key " << m_actsSpacepointsStrip.key());
582 }
583
584 // Retrieve Overlaps, will go into Strip collection
585 if ((isStrip and m_useOverlap) and not retrieveOverlap(ctx, data, prd_to_track_map_cptr).isSuccess() ) {
586 ATH_MSG_ERROR("Error while retrieving Strip Overlap space points with key " << m_actsSpacepointsOverlap.key());
587 }
588
589 data.initialized = true;
590 }
591
592 void
593 SiSpacePointsSeedMaker::find3Sp(const EventContext& ctx,
595 const std::list<Trk::Vertex>& /*lv*/) const
596 {
597 // Fast return if no sps are collected
598 if ( data.v_ActsSpacePointForSeed.empty() )
599 return;
600
601 // select the ACTS seeding tool to call, if for PPP or SSS
602 bool isPixel = (m_fastTracking or data.iteration == 1) and m_pixel;
603
604 // this is use for a fast retrieval of the space points later
605 std::vector<ITk::SiSpacePointForSeed*> sp_storage;
606
607 // We can now run the Acts Seeding
608 std::unique_ptr< ActsTrk::SeedContainer > seedPtrs = std::make_unique< ActsTrk::SeedContainer >();
609 //cppcheck-suppress unreadVariable
610 std::string combinationType = isPixel ? "PPP" : "SSS";
611 ATH_MSG_DEBUG("Running Seed Finding (" << combinationType << ") ...");
612
613 // Beam Spot Position
614 Acts::Vector3 beamPos( data.xbeam[0] * Acts::UnitConstants::mm,
615 data.ybeam[0] * Acts::UnitConstants::mm,
616 data.zbeam[0] * Acts::UnitConstants::mm);
617
618 Acts::Vector3 bField( data.bField[0], data.bField[1], data.bField[2] );
619
620
621 ActsTrk::SpacePointCollector backEnd(data.v_ActsSpacePointForSeed);
622
623 Acts::SpacePointContainerConfig spConfig;
624 spConfig.useDetailedDoubleMeasurementInfo = not isPixel;
625 // Options
626 Acts::SpacePointContainerOptions spOptions;
627 spOptions.beamPos = Acts::Vector2(beamPos.x(), beamPos.y());
628
629 Acts::SpacePointContainer<decltype(backEnd), Acts::detail::RefHolder> collect(spConfig, spOptions, backEnd);
630
631
632 StatusCode sc;
633
634 if (isPixel)
635 sc = m_seedsToolPixel->createSeeds( ctx,
636 collect,
637 beamPos,
638 bField,
639 *seedPtrs.get() );
640 else {
641 sc = m_seedsToolStrip->createSeeds( ctx,
642 collect,
643 beamPos,
644 bField,
645 *seedPtrs.get() );
646 }
647
648 if (sc == StatusCode::FAILURE) {
649 ATH_MSG_ERROR("Error during seed production (" << combinationType << ")");
650 return;
651 }
652
653 ATH_MSG_DEBUG(" \\__ Created " << seedPtrs->size() << " seeds");
654 data.nsazv = seedPtrs->size();
655
656 // Store seeds to data
657 // We need now to convert the output to Athena object once again (i.e. ITk::SiSpacePointForSeed)
658 // The seeds will be stored in data.i_ITkSeeds (both PPP and SSS seeds)
659 if (m_doSeedConversion) {
660
661 if (isPixel) {
662 if (not convertPixelSeed(ctx, data, *seedPtrs.get())) {
663 ATH_MSG_FATAL("Error in pixel seed conversion");
664 return;
665 }
666 } else {
667 if (not convertStripSeed(ctx, data, *seedPtrs.get())) {
668 ATH_MSG_FATAL("Error in strip seed conversion");
669 return;
670 }
671 }
672 }
673
674 data.i_ITkSeed = data.i_ITkSeeds.begin();
675 data.nprint = 1;
676 dump(data, msg(MSG::DEBUG));
677 }
678
680 SiSpacePointsSeedMaker::next(const EventContext& /*ctx*/,
682 {
683
684 do {
685 if (data.i_ITkSeed == data.i_ITkSeeds.end())
686 return nullptr;
687
688 // iterate until we find a valid seed satisfying certain quality cuts in set3
689 } while (!(*data.i_ITkSeed++).set3(data.seedOutput, 1./(1000. * data.K)));
690
692 return &data.seedOutput;
693
694 }
695
696 void
698 const Trk::Track* track,
699 int seedType,
700 long eventNumber) const
701 {
702 if (not m_writeNtuple) return;
703
704 std::lock_guard<std::mutex> lock(m_mutex);
705
706 if(track != nullptr) {
707 m_trackPt = (track->trackParameters()->front()->pT())/1000.f;
708 m_trackEta = std::abs(track->trackParameters()->front()->eta());
709 }
710 else {
711 m_trackPt = -1.;
712 m_trackEta = -1.;
713 }
714 m_d0 = seed->d0();
715 m_z0 = seed->zVertex();
716 m_eta = seed->eta();
717 m_x1 = seed->x1();
718 m_x2 = seed->x2();
719 m_x3 = seed->x3();
720 m_y1 = seed->y1();
721 m_y2 = seed->y2();
722 m_y3 = seed->y3();
723 m_z1 = seed->z1();
724 m_z2 = seed->z2();
725 m_z3 = seed->z3();
726 m_r1 = seed->r1();
727 m_r2 = seed->r2();
728 m_r3 = seed->r3();
729 m_type = seedType;
730 m_dzdr_b = seed->dzdr_b();
731 m_dzdr_t = seed->dzdr_t();
732 m_pt = seed->pt();
733 m_givesTrack = !(track == nullptr);
734 m_eventNumber = eventNumber;
735
736 // Ok: protected by mutex.
737 TTree* outputTree ATLAS_THREAD_SAFE = m_outputTree;
738 outputTree->Fill();
739 }
740
741 bool
744
745 MsgStream&
747 MsgStream& out) const
748 {
749 if (data.nprint)
750 return dumpEvent(data, out);
751 return dumpConditions(data, out);
752 }
753
754
756 // Dumps conditions information into the MsgStream
758
760 {
761 std::string s2, s3, s4, s5;
762
763 int n = 42-m_actsSpacepointsPixel.key().size();
764 s2.append(n,' ');
765 s2.append("|");
766 n = 42-m_actsSpacepointsStrip.key().size();
767 s3.append(n,' ');
768 s3.append("|");
769 n = 42-m_actsSpacepointsOverlap.key().size();
770 s4.append(n,' ');
771 s4.append("|");
772 n = 42-m_beamSpotKey.key().size();
773 s5.append(n,' ');
774 s5.append("|");
775
776 out<<"|---------------------------------------------------------------------|"
777 <<endmsg;
778 out<<"| Pixel space points | "<<m_actsSpacepointsPixel.key() <<s2
779 <<endmsg;
780 out<<"| Strip space points | "<<m_actsSpacepointsStrip.key()<<s3
781 <<endmsg;
782 out<<"| Overlap space points | "<<m_actsSpacepointsOverlap.key()<<s4
783 <<endmsg;
784 out<<"| BeamConditionsService | "<<m_beamSpotKey.key()<<s5
785 <<endmsg;
786 out<<"| usePixel | "
787 <<std::setw(12)<<m_pixel
788 <<" |"<<endmsg;
789 out<<"| useStrip | "
790 <<std::setw(12)<<m_strip
791 <<" |"<<endmsg;
792 out<<"| useStripOverlap | "
793 <<std::setw(12)<<m_useOverlap
794 <<" |"<<endmsg;
795 out<<"|---------------------------------------------------------------------|"
796 <<endmsg;
797 out<<"| Beam X center | "
798 <<std::setw(12)<<std::setprecision(5)<<data.xbeam[0]
799 <<" |"<<endmsg;
800 out<<"| Beam Y center | "
801 <<std::setw(12)<<std::setprecision(5)<<data.ybeam[0]
802 <<" |"<<endmsg;
803 out<<"| Beam Z center | "
804 <<std::setw(12)<<std::setprecision(5)<<data.zbeam[0]
805 <<" |"<<endmsg;
806 out<<"| Beam X-axis direction | "
807 <<std::setw(12)<<std::setprecision(5)<<data.xbeam[1]
808 <<std::setw(12)<<std::setprecision(5)<<data.xbeam[2]
809 <<std::setw(12)<<std::setprecision(5)<<data.xbeam[3]
810 <<" |"<<endmsg;
811 out<<"| Beam Y-axis direction | "
812 <<std::setw(12)<<std::setprecision(5)<<data.ybeam[1]
813 <<std::setw(12)<<std::setprecision(5)<<data.ybeam[2]
814 <<std::setw(12)<<std::setprecision(5)<<data.ybeam[3]
815 <<" |"<<endmsg;
816 out<<"| Beam Z-axis direction | "
817 <<std::setw(12)<<std::setprecision(5)<<data.zbeam[1]
818 <<std::setw(12)<<std::setprecision(5)<<data.zbeam[2]
819 <<std::setw(12)<<std::setprecision(5)<<data.zbeam[3]
820 <<" |"<<endmsg;
821 out<<"|---------------------------------------------------------------------|"
822 <<endmsg;
823 return out;
824
825 }
826
828 // Dumps event information into the MsgStream
830
832 MsgStream &out)
833 {
834 out<<"|---------------------------------------------------------------------|"
835 <<endmsg;
836 out<<"| ns | "
837 <<std::setw(12)<<data.ns
838 <<" |"<<endmsg;
839 out<<"| nsaz | "
840 <<std::setw(12)<<data.nsaz
841 <<" |"<<endmsg;
842 out<<"| seeds | "
843 <<std::setw(12)<< data.nsazv
844 <<" |"<<endmsg;
845 out<<"|---------------------------------------------------------------------|"
846 <<endmsg;
847 return out;
848
849 }
850
851 bool
852 SiSpacePointsSeedMaker::convertStripSeed(const EventContext& /*ctx*/,
854 const ActsTrk::SeedContainer& seedPtrs) const {
855 // If the read handle key for clusters is not empty, that means the xAOD->InDet Cluster link is available
856 // Else we can use xAOD->Trk Space Point link
857 // If none of these is available, we have a JO misconfguration!
858 static const SG::AuxElement::Accessor< ElementLink< ::SpacePointCollection > > linkAcc("sctSpacePointLink");
859 static const SG::AuxElement::Accessor< ElementLink< ::SpacePointOverlapCollection > > overlaplinkAcc("stripOverlapSpacePointLink");
860 static const SG::AuxElement::Accessor< ElementLink< InDet::SCT_ClusterCollection > > stripLinkAcc("sctClusterLink");
861
862 if (m_useClusters) {
863 data.v_StripSpacePointForSeed.clear();
864 }
865
866 std::array<const Trk::SpacePoint*, 3> spacePoints {};
867 std::array<ITk::SiSpacePointForSeed*, 3> stripSpacePointsForSeeds {};
868
869 for (const ActsTrk::Seed seedProxy : seedPtrs) {
870 const ActsTrk::Seed* seed = &seedProxy; // keep old-style seed as pointer
871 // Retrieve/make space points
872 if (not m_useClusters) {
873 // Get the space point from the element link
874 if (not linkAcc.isAvailable(*seed->sp()[0]) and
875 not overlaplinkAcc.isAvailable(*seed->sp()[0])) {
876 ATH_MSG_FATAL("no sctSpacePointLink/stripOverlapSpacePointLink for bottom sp!");
877 return false;
878 }
879 if (not linkAcc.isAvailable(*seed->sp()[1]) and
880 not overlaplinkAcc.isAvailable(*seed->sp()[1])) {
881 ATH_MSG_FATAL("no sctSpacePointLink/stripOverlapSpacePointLink for middle sp!");
882 return false;
883 }
884 if (not linkAcc.isAvailable(*seed->sp()[2]) and
885 not overlaplinkAcc.isAvailable(*seed->sp()[2])) {
886 ATH_MSG_FATAL("no sctSpacePointLink/stripOverlapSpacePointLink for top sp!");
887 return false;
888 }
889
890 for (std::size_t nsp(0ul); nsp < 3ul; ++nsp) {
891 spacePoints[nsp] = linkAcc.isAvailable(*seed->sp()[nsp])
892 ? *linkAcc(*seed->sp()[nsp])
893 : *overlaplinkAcc(*seed->sp()[nsp]);
894 }
895 }
896 else {
897 // Get the clusters from the xAOD::Clusters and then make the space points
898 const auto& bottom_idx = seed->sp()[0]->measurements();
899 const auto& medium_idx = seed->sp()[1]->measurements();
900 const auto& top_idx = seed->sp()[2]->measurements();
901
902 std::array<const xAOD::StripCluster*, 6> strip_cluster {
903 reinterpret_cast<const xAOD::StripCluster*>(bottom_idx[0]),
904 reinterpret_cast<const xAOD::StripCluster*>(bottom_idx[1]),
905 reinterpret_cast<const xAOD::StripCluster*>(medium_idx[0]),
906 reinterpret_cast<const xAOD::StripCluster*>(medium_idx[1]),
907 reinterpret_cast<const xAOD::StripCluster*>(top_idx[0]),
908 reinterpret_cast<const xAOD::StripCluster*>(top_idx[1])
909 };
910
911 if (not stripLinkAcc.isAvailable(*strip_cluster[0]) or
912 not stripLinkAcc.isAvailable(*strip_cluster[1])){
913 ATH_MSG_FATAL("no sctClusterLink for clusters associated to bottom sp!");
914 return false;
915 }
916 if (not stripLinkAcc.isAvailable(*strip_cluster[2]) or
917 not stripLinkAcc.isAvailable(*strip_cluster[3])){
918 ATH_MSG_FATAL("no sctClusterLink for clusters associated to middle sp!");
919 return false;
920 }
921 if (not stripLinkAcc.isAvailable(*strip_cluster[4]) or
922 not stripLinkAcc.isAvailable(*strip_cluster[5])){
923 ATH_MSG_FATAL("no sctClusterLink for clusters associated to top sp!");
924 return false;
925 }
926
927 std::pair<std::size_t, std::size_t> key_b = std::make_pair(strip_cluster[0]->index(), strip_cluster[1]->index());
928 std::pair<std::size_t, std::size_t> key_m = std::make_pair(strip_cluster[2]->index(), strip_cluster[3]->index());
929 std::pair<std::size_t, std::size_t> key_t = std::make_pair(strip_cluster[4]->index(), strip_cluster[5]->index());
930
931 std::unique_ptr<InDet::SCT_SpacePoint>& ptr_b = data.v_StripSpacePointForSeed[key_b];
932 if (!ptr_b) {
933 ptr_b = std::make_unique<InDet::SCT_SpacePoint>(std::make_pair<IdentifierHash, IdentifierHash>(strip_cluster[0]->identifierHash(), strip_cluster[1]->identifierHash()),
934 Amg::Vector3D(seed->sp()[0]->x(), seed->sp()[0]->y(), seed->sp()[0]->z()),
935 std::make_pair<const Trk::PrepRawData*, const Trk::PrepRawData*>(*(stripLinkAcc(*strip_cluster[0])), *(stripLinkAcc(*strip_cluster[1]))));
936 }
937 std::unique_ptr<InDet::SCT_SpacePoint>& ptr_m = data.v_StripSpacePointForSeed[key_m];
938 if (!ptr_m) {
939 ptr_m = std::make_unique<InDet::SCT_SpacePoint>(std::make_pair<IdentifierHash, IdentifierHash>(strip_cluster[2]->identifierHash(), strip_cluster[3]->identifierHash()),
940 Amg::Vector3D(seed->sp()[1]->x(), seed->sp()[1]->y(), seed->sp()[1]->z()),
941 std::make_pair<const Trk::PrepRawData*, const Trk::PrepRawData*>(*(stripLinkAcc(*strip_cluster[2])), *(stripLinkAcc(*strip_cluster[3]))));
942 }
943 std::unique_ptr<InDet::SCT_SpacePoint>& ptr_t = data.v_StripSpacePointForSeed[key_t];
944 if (!ptr_t) {
945 ptr_t = std::make_unique<InDet::SCT_SpacePoint>(std::make_pair<IdentifierHash, IdentifierHash>(strip_cluster[4]->identifierHash(), strip_cluster[5]->identifierHash()),
946 Amg::Vector3D(seed->sp()[2]->x(), seed->sp()[2]->y(), seed->sp()[2]->z()),
947 std::make_pair<const Trk::PrepRawData*, const Trk::PrepRawData*>(*(stripLinkAcc(*strip_cluster[4])), *(stripLinkAcc(*strip_cluster[5]))));
948 }
949
950 spacePoints = {
951 data.v_StripSpacePointForSeed[key_b].get(),
952 data.v_StripSpacePointForSeed[key_m].get(),
953 data.v_StripSpacePointForSeed[key_t].get()
954 };
955
956 }
957
958 for (unsigned int index = 0; index<3; index++) {
959 std::array<float, 15> r;
960 r[0] = seed->sp()[index]->x();
961 r[1] = seed->sp()[index]->y();
962 r[2] = seed->sp()[index]->z();
963 stripInform(data, spacePoints[index], r);
964 stripSpacePointsForSeeds[index] = new ITk::SiSpacePointForSeed(spacePoints[index], r);
965 stripSpacePointsForSeeds[index]->setQuality(-seed->seedQuality());
966 }
967
968 data.i_ITkSeeds.emplace_back(stripSpacePointsForSeeds[0], stripSpacePointsForSeeds[1],
969 stripSpacePointsForSeeds[2], seed->z());
970 data.i_ITkSeeds.back().setQuality(-seed->seedQuality());
971 }
972
973 return true;
974 }
975
976 bool
977 SiSpacePointsSeedMaker::convertPixelSeed(const EventContext& /*ctx*/,
979 const ActsTrk::SeedContainer& seedPtrs) const {
980 // If the read handle key for clusters is not empty, that means the xAOD->InDet Cluster link is available
981 // Else we can use xAOD->Trk Space Point link
982 // If none of these is available, we have a JO misconfguration!
983 static const SG::AuxElement::Accessor< ElementLink< InDet::PixelClusterCollection > > pixelLinkAcc("pixelClusterLink");
984 static const SG::AuxElement::Accessor< ElementLink< ::SpacePointCollection > > linkAcc("pixelSpacePointLink");
985
986 if (m_useClusters) {
987 data.v_PixelSpacePointForSeed.clear();
988 }
989
990 data.v_PixelSiSpacePointForSeed.clear();
991 data.v_PixelSiSpacePointForSeed.reserve(data.ns);
992 std::unordered_map<std::size_t, std::size_t> bridge_idx_sispacepoints;
993
994 std::array<const Trk::SpacePoint*, 3> spacePoints {nullptr, nullptr, nullptr};
995 std::array<ITk::SiSpacePointForSeed*, 3> pixelSpacePointsForSeeds {nullptr, nullptr, nullptr};
996
997 for (const ActsTrk::Seed seedProxy : seedPtrs) {
998 const ActsTrk::Seed* seed = &seedProxy; // keep old-style seed as pointer
999 std::array<std::size_t, 3> indexes {
1000 seed->sp()[0]->index(),
1001 seed->sp()[1]->index(),
1002 seed->sp()[2]->index()
1003 };
1004
1005 const auto [bottom_idx, medium_idx, top_idx] = indexes;
1006 std::size_t max_index = std::max(bottom_idx, std::max(medium_idx, top_idx));
1007 if (data.v_PixelSpacePointForSeed.size() < max_index + 1) {
1008 data.v_PixelSpacePointForSeed.resize( max_index + 1 );
1009 }
1010
1011 // Retrieve/make the space points!
1012 if (not m_useClusters) {
1013 // Get the Space Point from the element link
1014 if (not linkAcc.isAvailable(*seed->sp()[0])){
1015 ATH_MSG_FATAL("no pixelSpacePointLink for bottom sp!");
1016 return false;
1017 }
1018 if (not linkAcc.isAvailable(*seed->sp()[1])){
1019 ATH_MSG_FATAL("no pixelSpacePointLink for middle sp!");
1020 return false;
1021 }
1022 if (not linkAcc.isAvailable(*seed->sp()[2])){
1023 ATH_MSG_FATAL("no pixelSpacePointLink for top sp!");
1024 return false;
1025 }
1026
1027 spacePoints = {
1028 *linkAcc(*seed->sp()[0]),
1029 *linkAcc(*seed->sp()[1]),
1030 *linkAcc(*seed->sp()[2])
1031 };
1032 }
1033 else {
1034 // Get the clusters from the xAOD::Clusters and then make the space points
1035 const xAOD::PixelCluster* bottom_cluster = reinterpret_cast<const xAOD::PixelCluster*>(seed->sp()[0]->measurements()[0]);
1036 const xAOD::PixelCluster* medium_cluster = reinterpret_cast<const xAOD::PixelCluster*>(seed->sp()[1]->measurements()[0]);
1037 const xAOD::PixelCluster* top_cluster = reinterpret_cast<const xAOD::PixelCluster*>(seed->sp()[2]->measurements()[0]);
1038
1039 if (not pixelLinkAcc.isAvailable(*bottom_cluster)) {
1040 ATH_MSG_FATAL("no pixelClusterLink for cluster associated to bottom sp!");
1041 return false;
1042 }
1043 if (not pixelLinkAcc.isAvailable(*medium_cluster)) {
1044 ATH_MSG_FATAL("no pixelClusterLink for cluster associated to middle sp!");
1045 return false;
1046 }
1047 if (not pixelLinkAcc.isAvailable(*top_cluster)) {
1048 ATH_MSG_FATAL("no pixelClusterLink for cluster associated to top sp!");
1049 return false;
1050 }
1051
1052 if (not data.v_PixelSpacePointForSeed[bottom_idx])
1053 data.v_PixelSpacePointForSeed[bottom_idx] = std::make_unique<InDet::PixelSpacePoint>(bottom_cluster->identifierHash(), *(pixelLinkAcc(*bottom_cluster)));
1054 if (not data.v_PixelSpacePointForSeed[medium_idx])
1055 data.v_PixelSpacePointForSeed[medium_idx] = std::make_unique<InDet::PixelSpacePoint>(medium_cluster->identifierHash(), *(pixelLinkAcc(*medium_cluster)));
1056 if (not data.v_PixelSpacePointForSeed[top_idx])
1057 data.v_PixelSpacePointForSeed[top_idx] = std::make_unique<InDet::PixelSpacePoint>(top_cluster->identifierHash(), *(pixelLinkAcc(*top_cluster)));
1058
1059 spacePoints = {
1060 data.v_PixelSpacePointForSeed[bottom_idx].get(),
1061 data.v_PixelSpacePointForSeed[medium_idx].get(),
1062 data.v_PixelSpacePointForSeed[top_idx].get()
1063 };
1064
1065 }
1066
1067 for (int index = 0; index<3; ++index) {
1068 std::size_t sp_idx = indexes[index];
1069
1070 // Try add an element.
1071 // If already there just return the old value
1072 // If not present, we add a new element to it
1073 auto [itr, outcome] = bridge_idx_sispacepoints.try_emplace(sp_idx, data.v_PixelSiSpacePointForSeed.size());
1074 std::size_t mapped_idx = itr->second;
1075 // We added a new element
1076 if (outcome) {
1077 std::array<float, 15> r;
1078 r[0] = seed->sp()[index]->x();
1079 r[1] = seed->sp()[index]->y();
1080 r[2] = seed->sp()[index]->z();
1081 pixInform(spacePoints[index], r.data());
1082 data.v_PixelSiSpacePointForSeed.emplace_back( spacePoints[index], r );
1083
1084 }
1085 data.v_PixelSiSpacePointForSeed[mapped_idx].setQuality(-seed->seedQuality());
1086 pixelSpacePointsForSeeds[index] = &data.v_PixelSiSpacePointForSeed[mapped_idx];
1087 }
1088
1089 data.i_ITkSeeds.emplace_back(pixelSpacePointsForSeeds[0],
1090 pixelSpacePointsForSeeds[1],
1091 pixelSpacePointsForSeeds[2],
1092 seed->z());
1093 data.i_ITkSeeds.back().setQuality(-seed->seedQuality());
1094 }
1095
1096 return true;
1097 }
1098
1099}
Scalar phi() const
phi method
Scalar theta() const
theta method
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_DEBUG(x)
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
static Double_t sp
static Double_t s0
static Double_t Tp(Double_t *t, Double_t *par)
static Double_t sc
Define macros for attributes used to control the static checker.
Acts::Result< Acts::Vector3 > getField(const Acts::Vector3 &position, Acts::MagneticFieldProvider::Cache &gcache) const override
MagneticFieldProvider::Cache makeCache(const Acts::MagneticFieldContext &mctx) const override
bool convertStripSeed(const EventContext &ctx, InDet::SiSpacePointsSeedMakerEventData &data, const ActsTrk::SeedContainer &seedPtrs) const
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap
virtual const InDet::SiSpacePointsSeed * next(const EventContext &ctx, InDet::SiSpacePointsSeedMakerEventData &data) const override
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
StatusCode retrieveStrip(const EventContext &ctx, InDet::SiSpacePointsSeedMakerEventData &data, const Trk::PRDtoTrackMap *prd_to_track_map_cptr) const
SG::ReadHandleKey< xAOD::SpacePointContainer > m_actsSpacepointsOverlap
virtual void find3Sp(const EventContext &ctx, InDet::SiSpacePointsSeedMakerEventData &data, const std::list< Trk::Vertex > &lv) const override
ServiceHandle< ITHistSvc > m_thistSvc
StatusCode retrievePixel(const EventContext &ctx, InDet::SiSpacePointsSeedMakerEventData &data, const Trk::PRDtoTrackMap *prd_to_track_map_cptr) const
SiSpacePointsSeedMaker(const std::string &t, const std::string &n, const IInterface *p)
static void stripInform(InDet::SiSpacePointsSeedMakerEventData &data, const Trk::SpacePoint *sp, std::span< float, 15 > r)
virtual bool getWriteNtupleBoolProperty() const override
bool convertPixelSeed(const EventContext &ctx, InDet::SiSpacePointsSeedMakerEventData &data, const ActsTrk::SeedContainer &seedPtrs) const
void buildBeamFrameWork(const EventContext &ctx, InDet::SiSpacePointsSeedMakerEventData &data) const
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
void newSpacePoint(InDet::SiSpacePointsSeedMakerEventData &data, const xAOD::SpacePoint *sp) const
Gaudi::Property< bool > m_doSeedConversion
SG::ReadHandleKey< xAOD::SpacePointContainer > m_actsSpacepointsStrip
virtual MsgStream & dump(InDet::SiSpacePointsSeedMakerEventData &data, MsgStream &out) const override
virtual void newEvent(const EventContext &ctx, InDet::SiSpacePointsSeedMakerEventData &data, int iteration=-1) const override
MsgStream & dumpConditions(InDet::SiSpacePointsSeedMakerEventData &data, MsgStream &out) const
virtual void newRegion(const EventContext &, InDet::SiSpacePointsSeedMakerEventData &, const std::vector< IdentifierHash > &, const std::vector< IdentifierHash > &) const override
SG::ReadHandleKey< xAOD::SpacePointContainer > m_actsSpacepointsPixel
virtual void writeNtuple(const InDet::SiSpacePointsSeed *seed, const Trk::Track *track, int seedType, long eventNumber) const override
static MsgStream & dumpEvent(InDet::SiSpacePointsSeedMakerEventData &data, MsgStream &out)
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
ToolHandle< ActsTrk::ISeedingTool > m_seedsToolStrip
static void pixInform(const Trk::SpacePoint *sp, float *r)
virtual StatusCode initialize() override
bool isUsed(const Trk::SpacePoint *, const Trk::PRDtoTrackMap &prd_to_track_map) const
StatusCode retrieveOverlap(const EventContext &ctx, InDet::SiSpacePointsSeedMakerEventData &data, const Trk::PRDtoTrackMap *prd_to_track_map_cptr) const
ToolHandle< ActsTrk::ISeedingTool > m_seedsToolPixel
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Class implementing how to access a container.
size_type size() const noexcept
Returns the number of elements in the collection.
This is a "hash" representation of an Identifier.
Class to hold the SiDetectorElement objects to be put in the detector store.
Class to hold geometrical description of a silicon detector element.
Class to represent a position in the natural frame of a silicon sensor, for Pixel and SCT For Pixel: ...
Trk::Surface & surface()
Element Surface.
InDet::SiSpacePointsSeedMakerEventData holds event dependent data used by ISiSpacePointsSeedMaker.
static void clearPoolList(std::list< T, SG::ArenaPoolSTLAllocator< T > > &poolList)
SG::Accessor< T, ALLOC > Accessor
Definition AuxElement.h:572
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
const_pointer_type cptr()
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
const std::vector< DetectorIDHashType > & elementIdList() const
Returns the IdentifierHash of the spacepoint (corresponds to the detector element IdentifierHash)
DetectorIDHashType identifierHash() const
Returns the IdentifierHash of the measurement (corresponds to the detector element IdentifierHash)
int r
Definition globals.cxx:22
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
static constexpr float s_toTesla
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
-event-from-file
Definition index.py:1
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
SpacePointContainer_v1 SpacePointContainer
Define the version of the space point container.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.
#define ATH_RESTRICT
Definition restrict.h:31
MsgStream & msg
Definition testRead.cxx:32