ATLAS Offline Software
Loading...
Searching...
No Matches
SiSPSeededTrackFinder.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6
13
16#include "Identifier/Identifier.h"
17
18#include <set>
19#include <fstream>
20#include <stdexcept>
21
22namespace {
30
31double trackQuality(const Trk::Track* Tr) {
32
33 double quality = 0.;
34 double baseScorePerHit = 17.;
36 for (const Trk::TrackStateOnSurface* m : *(Tr->trackStateOnSurfaces())) {
39 continue;
41 const Trk::FitQualityOnSurface fq = m->fitQualityOnSurface();
42 if (!fq)
43 continue;
44
45 double x2 = fq.chiSquared();
46 double hitQualityScore;
49 if (fq.numberDoF() == 2)
50 hitQualityScore = (1.2 * (baseScorePerHit - x2 * .5)); // pix
51 else
52 hitQualityScore = (baseScorePerHit - x2); // sct
53 if (hitQualityScore < 0.)
54 hitQualityScore =
55 0.; // do not allow a bad hit to decrement the overall score
56 quality += hitQualityScore;
57 }
60 quality *= 0.7;
61
62 return quality;
63}
64} // namespace
65
69
71(const std::string& name,ISvcLocator* pSvcLocator) : AthReentrantAlgorithm(name, pSvcLocator)
72{
73}
74
78
80{
81 ATH_CHECK(m_evtKey.initialize());
82 ATH_CHECK(m_mbtsKey.initialize(m_useMBTS));
85 ATH_CHECK(m_outputTracksKey.initialize());
86
88 ATH_CHECK( m_prdToTrackMap.initialize( !m_prdToTrackMap.key().empty() ) );
89
91
93 ATH_CHECK( m_seedsmaker.retrieve() );
94 ATH_CHECK( m_zvertexmaker.retrieve( DisableTool{ not m_useZvertexTool } ));
95
97 ATH_CHECK( m_trackmaker.retrieve());
98
99 ATH_CHECK( m_regsel_strip.retrieve( DisableTool{ not m_useITkConvSeeded } ) );
100
102
103 ATH_CHECK( m_trackSummaryTool.retrieve( DisableTool{ m_trackSummaryTool.name().empty()} ));
104
105 if (m_useNewStrategy and m_beamSpotKey.key().empty()) {
106 m_useNewStrategy = false;
107 m_useZBoundaryFinding = false;
108 }
109
112
113 if (not m_beamSpotKey.key().empty()) {
115 ATH_CHECK( m_proptool.retrieve() );
116
119
121 if (m_histsize < 100) m_histsize = 100;
122 m_zstep = static_cast<double>(m_histsize)/(2.*m_zcut);
123 } else {
124 m_proptool.disable();
125 m_useNewStrategy = false;
126 m_useZBoundaryFinding = false;
127 }
128 } else {
129 m_proptool.disable();
130 }
131
133 if (msgLvl(MSG::DEBUG)) {
134 dump(MSG::DEBUG, nullptr);
135 }
136 m_neventsTotal = 0;
137 m_neventsTotalV = 0;
138 m_problemsTotal = 0;
140 return StatusCode::SUCCESS;
141}
142
146
147StatusCode InDet::SiSPSeededTrackFinder::execute(const EventContext& ctx) const
148{
154 else if (m_useITkConvSeeded) return itkConvStrategy(ctx);
155 else if (not m_useNewStrategy and not m_useZBoundaryFinding and not m_ITKGeometry) {
156 return oldStrategy(ctx);
157 }
158 return newStrategy(ctx);
159}
160
164
165namespace InDet {
178}
179
180
181StatusCode InDet::SiSPSeededTrackFinder::oldStrategy(const EventContext& ctx) const
182{
184 ATH_CHECK(outputTracks.record(std::make_unique<TrackCollection>()));
186 if (not isGoodEvent(ctx)) {
187 return StatusCode::SUCCESS;
188 }
189
191 bool ZVE = false;
192 if (m_useZvertexTool) {
193 std::list<Trk::Vertex> vertices = m_zvertexmaker->newEvent(ctx, seedEventData);
194 if (not vertices.empty()) ZVE = true;
195 m_seedsmaker->find3Sp(ctx, seedEventData, vertices);
196 } else {
197 m_seedsmaker->newEvent(ctx, seedEventData, -1);
198 std::list<Trk::Vertex> vertexList;
199 m_seedsmaker->find3Sp(ctx, seedEventData, vertexList);
200 }
201
202 const bool PIX = true;
203 const bool SCT = true;
204 //Total stack use for this function is 831124 bytes
205 //coverity[STACK_USE]
207 m_trackmaker->newEvent(ctx, trackEventData, PIX, SCT);
208
209 bool ERR = false;
210 Counter_t counter{};
211 const InDet::SiSpacePointsSeed* seed = nullptr;
212 std::multimap<double, Trk::Track*> qualitySortedTrackCandidates;
213 // Loop through all seed and reconsrtucted tracks collection preparation
214 //
215 while ((seed = m_seedsmaker->next(ctx, seedEventData))) {
216 ++counter[kNSeeds];
217 std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints());
218 for (Trk::Track* t: trackList) {
219 qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t));
220 }
221 if (not ZVE and (counter[kNSeeds] >= m_maxNumberSeeds)) {
222 ERR = true;
224 break;
225 }
226 }
227 m_trackmaker->endEvent(trackEventData);
228
229 // Remove shared tracks with worse quality
230 //
231 filterSharedTracks(qualitySortedTrackCandidates);
232
233 // Save good tracks in track collection
234 //
235 for (const std::pair<const double, Trk::Track*> & qualityAndTrack: qualitySortedTrackCandidates) {
236 ++counter[kNTracks];
237 if (m_trackSummaryTool.isEnabled()) {
238 m_trackSummaryTool->computeAndReplaceTrackSummary(ctx, *(qualityAndTrack.second),
239 false /* DO NOT suppress hole search*/);
240 }
241 outputTracks->push_back(qualityAndTrack.second);
242 }
243
244 m_counterTotal[kNSeeds] += counter[kNSeeds];
245
246 if (ZVE) ++m_neventsTotalV;
247 else ++m_neventsTotal;
248
249 if (ERR) {
250 outputTracks->clear();
251 } else {
252 m_counterTotal[kNTracks] += counter[kNTracks];
253 }
254
255 // Print common event information
256 //
257 if (msgLvl(MSG::DEBUG)) {
258 dump(MSG::DEBUG, &counter);
259 }
260
261 return StatusCode::SUCCESS;
262}
263
265// Execute with new strategy
267
268StatusCode InDet::SiSPSeededTrackFinder::newStrategy(const EventContext& ctx) const
269{
271 ATH_CHECK(outputTracks.record(std::make_unique<TrackCollection>()));
273 if (not isGoodEvent(ctx)) {
274 return StatusCode::SUCCESS;
275 }
276
279 Trk::PerigeeSurface beamPosPerigee(beamSpotHandle->beamPos());
280
282
291
296
298 m_seedsmaker->newEvent(ctx, seedEventData, 0);
299 std::list<Trk::Vertex> vertexList;
301 m_seedsmaker->find3Sp(ctx, seedEventData, vertexList);
302
303 const bool PIX = true ;
304 const bool SCT = true ;
305 //Total stack use for this function is 831736 bytes.
306 //coverity[STACK_USE]
309 m_trackmaker->newEvent(ctx, trackEventData, PIX, SCT);
310
312 std::vector<int> numberHistogram(m_histsize, 0);
313 std::vector<double> zWeightedHistogram(m_histsize, 0.);
314 std::vector<double> ptWeightedHistogram(m_histsize, 0.);
315
316 bool ERR = false;
317 Counter_t counter{};
318 const InDet::SiSpacePointsSeed* seed = nullptr;
319
321 std::multimap<double, Trk::Track*> qualitySortedTrackCandidates;
322
324 bool doWriteNtuple = m_seedsmaker->getWriteNtupleBoolProperty();
325 long EvNumber = 0.; //Event number variable to be used for the validation ntuple
326
327 if (doWriteNtuple) {
329 if(!eventInfo.isValid()) {EvNumber = -1.0;} else {EvNumber = eventInfo->eventNumber();}
330 }
331
333 while ((seed = m_seedsmaker->next(ctx, seedEventData))) {
334
335 ++counter[kNSeeds];
337 bool firstTrack{true};
338
340 std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints());
342 for (Trk::Track* t: trackList) {
343
344 qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t));
345
346 if (firstTrack && m_doDumpGBTSTrainingDataLRT) {
348 }
349
351 if (firstTrack and not m_ITKGeometry) {
352 fillZHistogram(ctx, t, beamPosPerigee, numberHistogram, zWeightedHistogram, ptWeightedHistogram);
353 }
354 firstTrack = false;
355 }
357 if(doWriteNtuple) { m_seedsmaker->writeNtuple(seed, !trackList.empty() ? trackList.front() : nullptr, ISiSpacePointsSeedMaker::StripSeed, EvNumber) ; }
358
359
360 if (counter[kNSeeds] >= m_maxNumberSeeds) {
361 ERR = true;
363 break;
364 }
365 }
366
371 if(not m_SpacePointsPixelKey.empty()) {
372 m_seedsmaker->newEvent(ctx, seedEventData, 1);
373
375 std::pair<double,double> zBoundaries;
376 if (not m_ITKGeometry) {
378 findZvertex(vertexList, zBoundaries, numberHistogram, zWeightedHistogram, ptWeightedHistogram);
381 m_seedsmaker->find3Sp(ctx, seedEventData, vertexList, &(zBoundaries.first));
382 } else {
383 m_seedsmaker->find3Sp(ctx, seedEventData, vertexList);
384 }
385
387 while ((seed = m_seedsmaker->next(ctx, seedEventData))) {
388
389 ++counter[kNSeeds];
390
391 std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints());
392
393 for (Trk::Track* t: trackList) {
394 qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t));
395 }
396
397 if(doWriteNtuple) { m_seedsmaker->writeNtuple(seed, !trackList.empty() ? trackList.front() : nullptr, ISiSpacePointsSeedMaker::PixelSeed, EvNumber); }
398
399 if (counter[kNSeeds] >= m_maxNumberSeeds) {
400 ERR = true;
402 break;
403 }
404 }
405 } else {
406 ATH_MSG_WARNING("SpacePointsPixelKey is empty. Skipping the second seeding pass that uses pixel seeds.");
407 }
408
409 m_trackmaker->endEvent(trackEventData);
410
412 filterSharedTracks(qualitySortedTrackCandidates);
413
415 for (const std::pair<const double, Trk::Track*> & qualityAndTrack: qualitySortedTrackCandidates) {
416 ++counter[kNTracks];
417 if (m_trackSummaryTool.isEnabled()) {
420 m_trackSummaryTool->computeAndReplaceTrackSummary(ctx, *qualityAndTrack.second,
421 false /* DO NOT suppress hole search*/);
424 if (m_writeHolesFromPattern && trackEventData.combinatorialData().findPatternHoleSearchOutcome(qualityAndTrack.second,theOutcome)){
426 qualityAndTrack.second->trackSummary()->update(Trk::numberOfPixelHoles, theOutcome.nPixelHoles);
427 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTHoles, theOutcome.nSCTHoles);
428 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTDoubleHoles, theOutcome.nSCTDoubleHoles);
429 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTDeadSensors, theOutcome.nSCTDeads);
430 qualityAndTrack.second->trackSummary()->update(Trk::numberOfPixelDeadSensors, theOutcome.nPixelDeads);
431 }
432 }
433 outputTracks->push_back(qualityAndTrack.second);
435 collectGBTSTrainingData(qualityAndTrack.second);
436 }
437 }
438
439 m_counterTotal[kNSeeds] += counter[kNSeeds] ;
440
442
443 if (ERR) {
444 outputTracks->clear();
445 } else {
446 m_counterTotal[kNTracks] += counter[kNTracks];
447 }
448
449 // Print common event information
450 //
451 if (msgLvl(MSG::DEBUG)) {
452 dump(MSG::DEBUG, &counter);
453 }
454 return StatusCode::SUCCESS;
455}
456
457
458
460// ITk fast tracking strategy
462
463StatusCode InDet::SiSPSeededTrackFinder::itkFastTrackingStrategy(const EventContext& ctx) const
464{
466 ATH_CHECK(outputTracks.record(std::make_unique<TrackCollection>()));
467
468 const bool PIX = true ;
469 const bool STRIP = true ;
470 // Local variable trackEventData uses 814592 bytes of stack space
471 //coverity[STACK_USE]
474 m_trackmaker->newTrigEvent(ctx, trackEventData, PIX, STRIP);
475
477
481
486
488 m_seedsmaker->newEvent(ctx, seedEventData, 0);
489 std::list<Trk::Vertex> vertexList;
491 m_seedsmaker->find3Sp(ctx, seedEventData, vertexList);
492
493 bool ERR = false;
494 Counter_t counter{};
495 const InDet::SiSpacePointsSeed* seed = nullptr;
496
498 std::multimap<double, Trk::Track*> qualitySortedTrackCandidates;
499
501 bool doWriteNtuple = m_seedsmaker->getWriteNtupleBoolProperty();
502 long EvNumber = 0.; //Event number variable to be used for the validation ntuple
503
504 if (doWriteNtuple) {
506 if(!eventInfo.isValid()) {EvNumber = -1.0;} else {EvNumber = eventInfo->eventNumber();}
507 }
508
510 while ((seed = m_seedsmaker->next(ctx, seedEventData))) {
511
512 ++counter[kNSeeds];
513
515 std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints());
517 for (Trk::Track* t: trackList) {
518
519 qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t));
520
521 }
523 if(doWriteNtuple) { m_seedsmaker->writeNtuple(seed, !trackList.empty() ? trackList.front() : nullptr, ISiSpacePointsSeedMaker::PixelSeed, EvNumber) ; }
524
525 if (counter[kNSeeds] >= m_maxNumberSeeds) {
526 ERR = true;
528 break;
529 }
530 }
531
532 m_trackmaker->endEvent(trackEventData);
533
535 filterSharedTracksFast(qualitySortedTrackCandidates);
536
538 for (const std::pair<const double, Trk::Track*> & qualityAndTrack: qualitySortedTrackCandidates) {
539 ++counter[kNTracks];
540
541 if (m_trackSummaryTool.isEnabled()) {
542 m_trackSummaryTool->computeAndReplaceTrackSummary(ctx, *qualityAndTrack.second);
545 if (m_writeHolesFromPattern && trackEventData.combinatorialData().findPatternHoleSearchOutcome(qualityAndTrack.second,theOutcome)){
547 qualityAndTrack.second->trackSummary()->update(Trk::numberOfPixelHoles, theOutcome.nPixelHoles);
548 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTHoles, theOutcome.nSCTHoles);
549 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTDoubleHoles, theOutcome.nSCTDoubleHoles);
550 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTDeadSensors, theOutcome.nSCTDeads);
551 qualityAndTrack.second->trackSummary()->update(Trk::numberOfPixelDeadSensors, theOutcome.nPixelDeads);
552 }
553 }
554
555 outputTracks->push_back(qualityAndTrack.second);
556 }
557
558 m_counterTotal[kNSeeds] += counter[kNSeeds] ;
559
561
562 if (ERR) {
563 outputTracks->clear();
564 } else {
565 m_counterTotal[kNTracks] += counter[kNTracks];
566 }
567
568 // Print common event information
569 //
570 if (msgLvl(MSG::DEBUG)) {
571 dump(MSG::DEBUG, &counter);
572 }
573 return StatusCode::SUCCESS;
574}
575
576
578// Conversion Strategy for ITk
580
581StatusCode InDet::SiSPSeededTrackFinder::itkConvStrategy(const EventContext& ctx) const
582{
583 ATH_MSG_DEBUG("Executing " << name() << "::itkConvStrategy");
584
586 ATH_CHECK(outputTracks.record(std::make_unique<TrackCollection>()));
588 if (not isGoodEvent(ctx)) {
589 return StatusCode::SUCCESS;
590 }
591
593
595 std::unique_ptr<RoiDescriptor> roiComp = std::make_unique<RoiDescriptor>(true);
596
597 if(calo_rois.isValid()) {
598 RoiDescriptor * roi =nullptr;
600 double beamZ = beamSpotHandle->beamVtx().position().z();
601 roiComp->clear();
602 roiComp->setComposite();
603
604 const ROIPhiRZContainer &calo_rois_ref=*calo_rois;
605 for (const ROIPhiRZ &calo_roi : calo_rois_ref) {
606 double phi = calo_roi.phi();
607 if (std::abs(phi)>=M_PI && phi!=-M_PI) continue; // skip duplicates < -pi and >pi
608 double eta = calo_roi.eta();
609 double z = beamZ;
610 double roiPhiMin = phi - m_deltaPhi;
611 double roiPhiMax = phi + m_deltaPhi;
612 double roiEtaMin = eta - m_deltaEta;
613 double roiEtaMax = eta + m_deltaEta;
614 double roiZMin = beamZ - m_deltaZ;
615 double roiZMax = beamZ + m_deltaZ;
616 roi = new RoiDescriptor( eta, roiEtaMin, roiEtaMax,phi, roiPhiMin ,roiPhiMax,z,roiZMin,roiZMax);
617 roiComp->push_back(roi);
618 }
619 }
620 else {
621 ATH_MSG_ERROR("Calo RoI is not valid: " << m_caloClusterROIKey.key());
622 return StatusCode::FAILURE;
623 }
624
625 std::vector<IdentifierHash> listOfStripIds;
626 std::vector<IdentifierHash> listOfPixIds;
627
628 m_regsel_strip->lookup(ctx)->HashIDList( *roiComp, listOfStripIds );
629
631 m_seedsmaker->newRegion(ctx, seedEventData, listOfPixIds, listOfStripIds);
632 std::list<Trk::Vertex> vertexList;
634 m_seedsmaker->find3Sp(ctx, seedEventData, vertexList);
635
636 const bool PIX = true ;
637 const bool STRIP = true ;
638 //Local variable trackEventData uses 814592 bytes of stack space
639 //coverity[STACK_USE]
642 m_trackmaker->newEvent(ctx, trackEventData, PIX, STRIP);
643
644 bool ERR = false;
645 Counter_t counter{};
646 const InDet::SiSpacePointsSeed* seed = nullptr;
647
649 std::multimap<double, Trk::Track*> qualitySortedTrackCandidates;
650
652 bool doWriteNtuple = m_seedsmaker->getWriteNtupleBoolProperty();
653 long EvNumber = 0.; //Event number variable to be used for the validation ntuple
654
655 if (doWriteNtuple) {
657 if(!eventInfo.isValid()) {EvNumber = -1.0;} else {EvNumber = eventInfo->eventNumber();}
658 }
659
661 while ((seed = m_seedsmaker->next(ctx, seedEventData))) {
662
663 ++counter[kNSeeds];
664
666 std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints());
668 for (Trk::Track* t: trackList) {
669 qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t));
670 }
671
673 if(doWriteNtuple) { m_seedsmaker->writeNtuple(seed, !trackList.empty() ? trackList.front() : nullptr, ISiSpacePointsSeedMaker::StripSeed, EvNumber) ; }
674
675 if (counter[kNSeeds] >= m_maxNumberSeeds) {
676 ERR = true;
678 break;
679 }
680 }
681
682 m_trackmaker->endEvent(trackEventData);
683
685 filterSharedTracks(qualitySortedTrackCandidates);
686
688 for (const std::pair<const double, Trk::Track*> & qualityAndTrack: qualitySortedTrackCandidates) {
689 ++counter[kNTracks];
690 if (m_trackSummaryTool.isEnabled()) {
693 m_trackSummaryTool->computeAndReplaceTrackSummary(ctx, *qualityAndTrack.second,
694 false /* DO NOT suppress hole search*/);
697 if (m_writeHolesFromPattern && trackEventData.combinatorialData().findPatternHoleSearchOutcome(qualityAndTrack.second,theOutcome)){
699 qualityAndTrack.second->trackSummary()->update(Trk::numberOfPixelHoles, theOutcome.nPixelHoles);
700 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTHoles, theOutcome.nSCTHoles);
701 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTDoubleHoles, theOutcome.nSCTDoubleHoles);
702 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTDeadSensors, theOutcome.nSCTDeads);
703 qualityAndTrack.second->trackSummary()->update(Trk::numberOfPixelDeadSensors, theOutcome.nPixelDeads);
704 }
705 }
706 outputTracks->push_back(qualityAndTrack.second);
707 }
708
709 m_counterTotal[kNSeeds] += counter[kNSeeds] ;
710
712
713 if (ERR) {
714 outputTracks->clear();
715 } else {
716 m_counterTotal[kNTracks] += counter[kNTracks];
717 }
718
719 // Print common event information
720 //
721 if (msgLvl(MSG::DEBUG)) {
722 dump(MSG::DEBUG, &counter);
723 }
724 return StatusCode::SUCCESS;
725}
726
727
728
730// Finalize
732
734{
735
736 dump(MSG::INFO, &m_counterTotal);
737
740 }
741 return StatusCode::SUCCESS;
742}
743
745// Dumps relevant information into the MsgStream
747
748MsgStream& InDet::SiSPSeededTrackFinder::dump(MSG::Level assign_level, const InDet::SiSPSeededTrackFinder::Counter_t* counter) const
749{
750 msg(assign_level) <<std::endl;
751 MsgStream& out_msg=msg();
752 if (counter) dumpevent(out_msg ,*counter);
753 else dumptools(out_msg);
754 out_msg << endmsg;
755 return out_msg;
756}
757
759// Dumps conditions information into the MsgStream
761
762MsgStream& InDet::SiSPSeededTrackFinder::dumptools(MsgStream& out) const
763{
764 int n = 65-m_zvertexmaker.type().size();
765 std::string s1; for (int i=0; i<n; ++i) s1.append(" "); s1.append("|");
766 n = 65-m_seedsmaker.type().size();
767 std::string s2; for (int i=0; i<n; ++i) s2.append(" "); s2.append("|");
768 n = 65-m_trackmaker.type().size();
769 std::string s3; for (int i=0; i<n; ++i) s3.append(" "); s3.append("|");
770 n = 65-m_outputTracksKey.key().size();
771 std::string s4; for (int i=0; i<n; ++i) s4.append(" "); s4.append("|");
772
773 std::string s5;
774 if (m_useZvertexTool) s5= "Yes"; else s5 = "No";
775 n = 65-s5.size(); for (int i=0; i<n; ++i) s5.append(" "); s5.append("|");
776
777 out<<"|----------------------------------------------------------------"
778 <<"----------------------------------------------------|"
779 <<std::endl;
780 out<<"| Use primary vertices z-coordinates finding?| "<<s5
781 <<std::endl;
782 if (m_useZvertexTool) {
783 out<<"| Tool for primary vertices z-coordinates finding | "<<m_zvertexmaker.type()<<s1
784 <<std::endl;
785 }
786 out<<"| Tool for space points seeds finding | "<<m_seedsmaker.type()<<s2
787 <<std::endl;
788 out<<"| Tool for space points seeded track finding | "<<m_trackmaker.type()<<s3
789 <<std::endl;
790 out<<"| Location of output tracks | "<<m_outputTracksKey.key()<<s4
791 <<std::endl;
792 out<<"|----------------------------------------------------------------"
793 <<"----------------------------------------------------|"
794 <<std::endl;
795 return out;
796}
797
799// Dumps event information into the ostream
801
803{
804 out<<"|-------------------------------------------------------------------";
805 out<<"---------------------------------|"
806 <<std::endl;
807 out<<"| Investigated "
808 <<std::setw(9)<<counter[kNSeeds]<<" space points seeds and found ";
809 out<<std::setw(9)<<counter[kNTracks];
810 if (m_ITKGeometry ) out<<" tracks using new strategy for ITK |"<<std::endl;
811 else if (m_useNewStrategy ) out<<" tracks using new strategy ("<<std::setw(2)<< m_nvertex <<") |"<<std::endl;
812 else if (m_useZBoundaryFinding) out<<" tracks using old strategy with Zb |"<<std::endl;
813 else out<<" tracks using old strategy |"<<std::endl;
814
815 out<<"|-------------------------------------------------------------------";
816 out<<"---------------------------------|"
817 <<std::endl;
819 out<<"| Events "
820 <<std::setw(7)<<m_neventsTotal <<" without Z-vertz "
821 <<std::setw(7)<<m_neventsTotalV <<" with Z-vertex |"
822 <<std::endl;
823 out<<"| Problems "
824 <<std::setw(7)<<m_problemsTotal <<" without Z-vertz "
825 <<std::setw(7)<<m_problemsTotalV <<" with Z-vertex |"
826 <<std::endl;
827 out<<"|-------------------------------------------------------------------";
828 out<<"-----------------------------|"
829 <<std::endl;
830 }
831 return out;
832}
833
835// Test is it good event for reconstruction (mainly for HI events)
837
838bool InDet::SiSPSeededTrackFinder::isGoodEvent(const EventContext& ctx) const {
839
840 if ( not m_alwaysProtectAgainstBusyEvent ) { // if not enabled the protection is only applied to specific events
841 // Test MBTS information from calorimeter
842 //
843 if (not m_useMBTS) return true;
844
846 if (not eventInfo->isEventFlagBitSet(xAOD::EventInfo::Background, xAOD::EventInfo::MBTSTimeDiffHalo) ) {
847 return true;
848 }
849 }
850
851 // Test total number pixels space points
852 //
853 unsigned int nsp = 0;
854 if (not m_SpacePointsPixelKey.empty()) {
856 if (spacePointsPixel.isValid()) {
857 for (const SpacePointCollection* spc: *spacePointsPixel) {
858 nsp += spc->size();
859 }
860 if (static_cast<int>(nsp) > m_maxPIXsp) {
861 ATH_MSG_WARNING("Found more than "<<m_maxPIXsp<<" pixels space points in background event. Skip track finding");
862 return false;
863 }
864 }
865 }
866 // Test total number sct space points
867 //
868 nsp = 0;
869 if (not m_SpacePointsSCTKey.empty()) {
871 if (spacePointsSCT.isValid()) {
872 for (const SpacePointCollection* spc: *spacePointsSCT) {
873 nsp += spc->size();
874 }
875 if (static_cast<int>(nsp) > m_maxSCTsp) {
876 ATH_MSG_WARNING("Found more than "<<m_maxSCTsp<<" sct space points in background event. Skip track finding");
877 return false;
878 }
879 }
880 }
881
882 return true;
883}
884
886// Filer shared tracks
888
889void InDet::SiSPSeededTrackFinder::filterSharedTracks(std::multimap<double, Trk::Track*>& qualitySortedTracks) const
890{
891 std::set<const Trk::PrepRawData*> clusters;
892
893 std::vector<const Trk::PrepRawData*> freeClusters;
894 freeClusters.reserve(15);
895
896 std::multimap<double, Trk::Track*>::iterator it_qualityAndTrack = qualitySortedTracks.begin();
897
899 while (it_qualityAndTrack!=qualitySortedTracks.end()) {
900 freeClusters.clear();
901
902 std::set<const Trk::PrepRawData*>::iterator it_clustersEnd = clusters.end();
903
904 int nClusters = 0;
906 for (const Trk::MeasurementBase* m: *((*it_qualityAndTrack).second->measurementsOnTrack())) {
907
909 const Trk::PrepRawData* pr = (static_cast<const Trk::RIO_OnTrack*>(m))->prepRawData();
910 if (pr) {
912 ++nClusters;
914 if (clusters.find(pr)==it_clustersEnd) {
916 freeClusters.push_back(pr);
917 }
918 }
919 }
920
922 int nFreeClusters = static_cast<int>(freeClusters.size());
923 if (nFreeClusters >= m_nfreeCut || nFreeClusters==nClusters) {
926 clusters.insert(freeClusters.begin(), freeClusters.end());
927 ++it_qualityAndTrack;
928 } else {
930 delete (*it_qualityAndTrack).second;
931 qualitySortedTracks.erase(it_qualityAndTrack++);
932 }
933 }
934}
935
936
937void InDet::SiSPSeededTrackFinder::filterSharedTracksFast(std::multimap<double, Trk::Track*>& qualitySortedTracks) const
938{
939 std::set<const Trk::PrepRawData*> clusters;
940
941 std::vector<const Trk::PrepRawData*> freeClusters;
942 freeClusters.reserve(15);
943
944 std::multimap<double, Trk::Track*>::iterator it_qualityAndTrack = qualitySortedTracks.begin();
945
947 while (it_qualityAndTrack!=qualitySortedTracks.end()) {
948 freeClusters.clear();
949
950 std::set<const Trk::PrepRawData*>::iterator it_clustersEnd = clusters.end();
951
952 int nClusters = 0;
953 int nPixels = 0;
955 for (const Trk::TrackStateOnSurface* tsos: *((*it_qualityAndTrack).second->trackStateOnSurfaces())) {
956
957 if(!tsos->type(Trk::TrackStateOnSurface::Measurement)) continue;
958 const Trk::FitQualityOnSurface fq = tsos->fitQualityOnSurface();
959 if(!fq) continue;
960 if(fq.numberDoF() == 2) ++nPixels;
961
963 const Trk::MeasurementBase* mb = tsos->measurementOnTrack();
964 const Trk::RIO_OnTrack* ri = dynamic_cast<const Trk::RIO_OnTrack*>(mb);
965 if(!ri) continue;
966 const Trk::PrepRawData* pr = ri->prepRawData();
967 if (pr) {
969 ++nClusters;
971 if (clusters.find(pr)==it_clustersEnd) {
973 freeClusters.push_back(pr);
974 }
975 }
976 }
977
979 clusters.insert(freeClusters.begin(), freeClusters.end());
980
981 int nFreeClusters = static_cast<int>(freeClusters.size());
982 if( passEtaDepCuts( (*it_qualityAndTrack).second, nClusters, nFreeClusters, nPixels) ){
984 ++it_qualityAndTrack;
985 } else {
987 delete (*it_qualityAndTrack).second;
988 qualitySortedTracks.erase(it_qualityAndTrack++);
989 }
990 }
991}
992
994// Fill z coordinate histogram
996
998 const Trk::Track* Tr,
999 const Trk::PerigeeSurface& beamPosPerigee,
1000 std::vector<int>& numberHistogram,
1001 std::vector<double>& zWeightedHistogram,
1002 std::vector<double>& ptWeightedHistogram) const
1003{
1004
1005 if (Tr->measurementsOnTrack()->size() < 10) return;
1006
1007 const Trk::TrackParameters* paramsAtFirstSurface = Tr->trackStateOnSurfaces()->front()->trackParameters();
1008 Amg::Vector3D position = paramsAtFirstSurface->position() ;
1009 Amg::Vector3D momentum = paramsAtFirstSurface->momentum() ;
1010
1012 constexpr double rSquare_max_forZHisto = 60.*60.;
1013 if (position.x()*position.x()+position.y()*position.y() >= rSquare_max_forZHisto) return;
1014
1015 double pT = sqrt(momentum.x()*momentum.x()+momentum.y()*momentum.y());
1016 if (pT < m_pTcut) return;
1017
1019 if (not TP.production(paramsAtFirstSurface)) return;
1020
1021 double step;
1023 if (not m_proptool->propagate(ctx,
1024 TP, beamPosPerigee, TP, Trk::anyDirection, m_fieldprop, step, Trk::pion)) return;
1025
1026 const AmgVector(5)& parsAtBeamSpot = TP.parameters();
1027 if (std::abs(parsAtBeamSpot[0]) > m_imcut) return;
1029 int z = static_cast<int>((parsAtBeamSpot[1]+m_zcut)*m_zstep);
1031 if (z >=0 and z < m_histsize) {
1033 ++numberHistogram[z];
1035 zWeightedHistogram[z] += parsAtBeamSpot[1];
1037 ptWeightedHistogram[z] += pT;
1038 }
1039
1040}
1041
1043// Find verteex z coordinates
1045
1046void InDet::SiSPSeededTrackFinder::findZvertex(std::list<Trk::Vertex>& vertexZList,
1047 std::pair<double, double> & zBoundaries,
1048 const std::vector<int>& numberHistogram,
1049 const std::vector<double>& zWeightedHistogram,
1050 const std::vector<double>& ptWeightedHistogram) const
1051{
1052 zBoundaries = {1000., -1000};
1053
1054 std::multimap<int ,double> vertexZ_sortedByNtracks;
1055 std::multimap<double,double> vertexZ_sortedBySumPt;
1056
1057 int lastBin = m_histsize-1;
1058 int minBinContentSum = 3;
1059
1061 for (int binIndex=1; binIndex<lastBin; ++binIndex) {
1062
1064 int vertexNtracks = numberHistogram.at(binIndex-1)+numberHistogram.at(binIndex)+numberHistogram.at(binIndex+1);
1065
1068 if (vertexNtracks>=minBinContentSum and (numberHistogram.at(binIndex) >= numberHistogram.at(binIndex-1) and numberHistogram.at(binIndex) >= numberHistogram.at(binIndex+1))) {
1070 double vertexZestimate = (zWeightedHistogram.at(binIndex-1)+zWeightedHistogram.at(binIndex)+zWeightedHistogram.at(binIndex+1))/static_cast<double>(vertexNtracks);
1071
1074 if (vertexZestimate < zBoundaries.first) zBoundaries.first = vertexZestimate;
1075 if (vertexZestimate > zBoundaries.second) zBoundaries.second = vertexZestimate;
1076
1077 if (m_useNewStrategy) {
1079 double vertexSumPt = ptWeightedHistogram.at(binIndex-1)+ptWeightedHistogram.at(binIndex)+ptWeightedHistogram.at(binIndex+1);
1080 vertexZ_sortedByNtracks.insert(std::make_pair(-vertexNtracks, vertexZestimate));
1081 vertexZ_sortedBySumPt.insert(std::make_pair(-vertexSumPt, vertexZestimate));
1082 }
1083 }
1084 }
1085
1086 if (m_useNewStrategy) {
1087
1088 std::set<double> leadingVertices;
1089 int n = 0;
1090 std::multimap<double, double>::iterator vertex_pt_and_z = vertexZ_sortedBySumPt.begin();
1091 for (std::pair<int, double> nTrackAndZ: vertexZ_sortedByNtracks) {
1093 if (n++ >= m_nvertex) break;
1096 leadingVertices.insert(nTrackAndZ.second);
1097 leadingVertices.insert((*vertex_pt_and_z++).second);
1098 }
1099
1100 for (double v: leadingVertices) {
1101 vertexZList.emplace_back(Amg::Vector3D{0.,0.,v});
1102 }
1103 }
1105 if (zBoundaries.first > zBoundaries.second) {
1106 zBoundaries.first = -1000.;
1107 zBoundaries.second = +1000.;
1108 } else {
1110 zBoundaries.first -= 20.;
1111 zBoundaries.second += 20.;
1112 }
1113}
1114
1115
1117// Callback function - get the magnetic field /
1119
1121{
1122 // Build MagneticFieldProperties
1123 //
1124 if(m_fieldmode == "NoField") {
1126 } else {
1128 }
1129}
1130
1131
1133// Check if track passes eta-dependent cuts for fast tracking
1135
1137 int nClusters,
1138 int nFreeClusters,
1139 int nPixels) const
1140{
1141 Trk::TrackStates::const_iterator m = track->trackStateOnSurfaces()->begin();
1142 const Trk::TrackParameters* par = (*m)->trackParameters();
1143 if(!par) return false;
1144
1145 double eta = std::abs(par->eta());
1146 if(nClusters < m_etaDependentCutsSvc->getMinSiHitsAtEta(eta)) return false;
1147 if(nFreeClusters < m_etaDependentCutsSvc->getMinSiNotSharedAtEta(eta)) return false;
1148 if(nClusters-nFreeClusters > m_etaDependentCutsSvc->getMaxSharedAtEta(eta)) return false;
1149 if(nPixels < m_etaDependentCutsSvc->getMinPixelHitsAtEta(eta)) return false;
1150
1151 if(par->pT() < m_etaDependentCutsSvc->getMinPtAtEta(eta)) return false;
1152 if(!(*m)->type(Trk::TrackStateOnSurface::Perigee)) return true ;
1153 if(std::abs(par->localPosition()[0]) > m_etaDependentCutsSvc->getMaxPrimaryImpactAtEta(eta)) return false;
1154 return true;
1155}
1156
1158
1159 struct VLM_Data {
1160 int vol_id, lay_id, mod_id;
1161 float m_x, m_y, m_z;
1162 };
1163
1164 const PixelID* IDp = 0;
1165 const SCT_ID* IDs = 0;
1166
1167 if (detStore()->retrieve(IDp, "PixelID").isFailure()) {
1168 ATH_MSG_FATAL("Could not get Pixel ID helper");
1169 }
1170
1171 if (detStore()->retrieve(IDs, "SCT_ID").isFailure()) {
1172 ATH_MSG_FATAL("Could not get SCT ID helper");
1173 }
1174
1175 if (!IDs && !IDp) return;
1176
1178
1179 std::vector<VLM_Data> vlm;
1180
1181 for (const auto* s : *track->trackStateOnSurfaces()) {
1182 if (!s->type(Trk::TrackStateOnSurface::Measurement)) continue;
1183
1184 const Trk::MeasurementBase* mb = s->measurementOnTrack();
1185 if (!mb) continue;
1186
1187 const Trk::RIO_OnTrack* ri = dynamic_cast<const Trk::RIO_OnTrack*>(mb);
1188 if (!ri) continue;
1189
1190 const Trk::PrepRawData* rd = ri->prepRawData();
1191 if (!rd) continue;
1192
1193 const InDet::SiCluster* si = dynamic_cast<const InDet::SiCluster*>(rd);
1194 if (!si) continue;
1195
1196 const Amg::Vector3D& pos = s->trackParameters()->position();
1197
1198 if (dynamic_cast<const InDet::PixelCluster*>(si)) { // Pixel
1199
1200 Identifier id = si->identify();
1201
1202 int bec = IDp->barrel_ec(id);
1203
1204 int vol_id = 8;
1205
1206 if (bec == -2) vol_id = 7;
1207 if (bec == 2) vol_id = 9;
1208
1209 if (bec < -2 || bec > 2) continue;
1210
1211 int lay_id = IDp->layer_disk(id);
1212 int eta_mod = IDp->eta_module(id);
1213 int phi_mod = IDp->phi_module(id);
1214
1215 Identifier wafer_id = IDp->wafer_id(bec, lay_id, phi_mod, eta_mod);
1216
1217 int mod_id = IDp->wafer_hash(wafer_id);
1218
1219 int new_vol = 0, new_lay = 0;
1220
1221 if (vol_id == 7 || vol_id == 9) {
1222 new_vol = 10 * vol_id + lay_id;
1223 new_lay = eta_mod;
1224 } else if (vol_id == 8) {
1225 new_lay = 0;
1226 new_vol = 10 * vol_id + lay_id;
1227 }
1228 if (vol_id != 0)
1229 vlm.emplace_back(new_vol, new_lay, mod_id, pos.x(), pos.y(), pos.z());
1230 }
1231
1232 if (IDs && dynamic_cast<const InDet::SCT_Cluster*>(si)) { // SCT
1233
1234 Identifier id = si->identify();
1235
1236 int bec = IDs->barrel_ec(id);
1237
1238 int vol_id = 13;
1239
1240 if (bec < 0) vol_id = 12;
1241 if (bec > 0) vol_id = 14;
1242
1243 int lay_id = IDs->layer_disk(id);
1244 int eta_mod = IDs->eta_module(id);
1245 int phi_mod = IDs->phi_module(id);
1246 int side = IDs->side(id);
1247
1248 Identifier wafer_id = IDs->wafer_id(bec, lay_id, phi_mod, eta_mod, side);
1249
1250 int mod_id = IDs->wafer_hash(wafer_id);
1251
1252 vlm.emplace_back(vol_id, lay_id, mod_id, pos.x(), pos.y(), pos.z());
1253 }
1254 }
1255
1256 // remove single-strip cases where no spacepoint exists
1257
1258 std::vector<VLM_Data> vlm2;
1259
1260 for (std::size_t it1 = 0; it1 < vlm.size() - 1; it1++) {
1261 if (vlm.at(it1).vol_id > 14) { // Pixels
1262 vlm2.push_back(vlm.at(it1));
1263 continue;
1264 }
1265
1266 std::size_t it2 = it1 + 1;
1267
1268 int src = vlm.at(it1).vol_id * 1000 + vlm.at(it1).lay_id;
1269 int dst = vlm.at(it2).vol_id * 1000 + vlm.at(it2).lay_id;
1270
1271 if (src == dst) { // a spacepoint can be formed
1272 vlm2.push_back(vlm.at(it1));
1273 vlm2.push_back(vlm.at(it2));
1274 it1 = it2;
1275 continue;
1276 }
1277 }
1278
1279 // remove track segments which are too short
1281
1282 constexpr float minDist = 20.0;
1283
1284 for (auto it = std::next(vlm2.begin()); it != vlm2.end(); ) {
1285 auto jt = std::prev(it);
1286 float dx = it->m_x - jt->m_x;
1287 float dy = it->m_y - jt->m_y;
1288 float dz = it->m_z - jt->m_z;
1289
1290 float dist = std::sqrt(dx*dx + dy*dy + dz*dz);
1291
1292 if (dist < minDist) it = vlm2.erase(it);
1293 else ++it;
1294 }
1295 }
1296
1297 std::scoped_lock trainingDataLock(m_GBTSTrainingDataMutex);
1298
1299 for (std::size_t it1 = 0; it1 < vlm2.size() - 1; ++it1) {
1300 std::size_t it2 = it1 + 1;
1301
1302 int src = vlm2.at(it1).vol_id * 1000 + vlm2.at(it1).lay_id;
1303 int dst = vlm2.at(it2).vol_id * 1000 + vlm2.at(it2).lay_id;
1304
1305 if (src != dst) { // skip the same layer
1306 auto [im1, new1] = m_GBTSTrainingData.insert({src, {}});
1307 auto [im2, new2] = im1->second.insert({dst, 1ul});
1308 if (!new2) im2->second++;
1309 }
1310 }
1311}
1312
1314 std::ofstream tableFile(m_GBTSTrainingDataFileName);
1315 tableFile << "from,to,probability,flow\n";
1316
1317 unsigned long nTotal = 0;
1318 for (const auto& [src, conns] : m_GBTSTrainingData) {
1319 unsigned long nTotalDst = 0;
1320 for (const auto& [dst, n] : conns) {
1321 nTotalDst += n;
1322 }
1323 nTotal += nTotalDst;
1324 if (nTotalDst == 0) [[unlikely]] {
1325 throw std::runtime_error("InDet::SiSPSeededTrackFinder::dumpGBTSTrainingData: nTotalDst divisor is zero");
1326 }
1327 for (const auto& [dst, n] : conns) {
1328 double prob = double(n) / double(nTotalDst);
1329 tableFile << src << ", " << dst << ", " << std::fixed << std::setprecision(6) << prob << ", " << prob << '\n';
1330 }
1331 }
1332 ATH_MSG_INFO("GBTS training data from " << m_numGBTSTrainingData << " tracks with " << nTotal << " pairs written to " << m_GBTSTrainingDataFileName.value());
1333}
#define M_PI
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi 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_INFO(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
#define AmgVector(rows)
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
#define z
const ServiceHandle< StoreGateSvc > & detStore() const
bool msgLvl(const MSG::Level lvl) const
An algorithm that can be simultaneously executed in multiple threads.
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const T * front() const
Access the first element in the collection as an rvalue.
ExtendedSiTrackMakerEventData_xk(const SG::ReadHandleKey< Trk::PRDtoTrackMap > &key)
SG::ReadHandle< Trk::PRDtoTrackMap > m_prdToTrackMap
bool findPatternHoleSearchOutcome(Trk::Track *theTrack, InDet::PatternHoleSearchOutcome &outcome) const
Methods used to associate the hole search outcome to tracks without having to modify the EDM.
bool passEtaDepCuts(const Trk::Track *track, int nClusters, int nFreeClusters, int nPixels) const
MsgStream & dumptools(MsgStream &out) const
StatusCode itkFastTrackingStrategy(const EventContext &ctx) const
EventContext is used to specify which event.
SG::ReadHandleKey< SpacePointContainer > m_SpacePointsSCTKey
SG::ReadHandleKey< ROIPhiRZContainer > m_caloClusterROIKey
void filterSharedTracks(std::multimap< double, Trk::Track * > &scoredTracks) const
cleans up the collection of quality filtered tracks.
virtual StatusCode execute(const EventContext &ctx) const override
Execute.
MsgStream & dump(MSG::Level lvl, const SiSPSeededTrackFinder::Counter_t *) const
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
ToolHandle< ISiTrackMaker > m_trackmaker
std::atomic_int m_problemsTotal
Number events with number seeds > maxNumber.
std::atomic_int m_problemsTotalV
Number events with number seeds > maxNumber.
PublicToolHandle< Trk::IPatternParametersPropagator > m_proptool
SG::WriteHandleKey< TrackCollection > m_outputTracksKey
std::atomic_int m_neventsTotalV
Number events.
Trk::MagneticFieldProperties m_fieldprop
StatusCode itkConvStrategy(const EventContext &ctx) const
EventContext is used to specify which event.
void filterSharedTracksFast(std::multimap< double, Trk::Track * > &scoredTracks) const
SiSPSeededTrackFinder(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
StatusCode newStrategy(const EventContext &ctx) const
this method performs the track finding using the new strategy
SG::ReadDecorHandleKey< xAOD::EventInfo > m_mbtsKey
virtual StatusCode finalize() override
ToolHandle< IRegSelTool > m_regsel_strip
void collectGBTSTrainingData(const Trk::Track *) const
bool isGoodEvent(const EventContext &ctx) const
EventContext is used to specify which event.
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap
void fillZHistogram(const EventContext &ctx, const Trk::Track *Tr, const Trk::PerigeeSurface &beamlinePerigee, std::vector< int > &numberWeightedhistogram, std::vector< double > &zWeightedHistogram, std::vector< double > &ptWeightedHistogram) const
fills three z0 histograms (non-weighted, weighted by z, and weighted by pt) with the track z at the b...
void findZvertex(std::list< Trk::Vertex > &vertexList, std::pair< double, double > &zBoundaries, const std::vector< int > &numberWeightedhistogram, const std::vector< double > &zWeightedHistogram, const std::vector< double > &ptWeightedHistogram) const
estimates a set of vertex positions and a z interval for the second track finding pass using the inpu...
ToolHandle< ISiZvertexMaker > m_zvertexmaker
SG::ReadHandleKey< xAOD::EventInfo > m_evtKey
virtual StatusCode initialize() override
Initialisation.
MsgStream & dumpevent(MsgStream &out, const SiSPSeededTrackFinder::Counter_t &counter) const
std::atomic_int m_neventsTotal
Number events.
StatusCode oldStrategy(const EventContext &ctx) const
this method performs the track finding using the old strategy
SG::ReadHandleKey< SpacePointContainer > m_SpacePointsPixelKey
ToolHandle< ISiSpacePointsSeedMaker > m_seedsmaker
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trackSummaryTool
ServiceHandle< IInDetEtaDependentCutsSvc > m_etaDependentCutsSvc
service to get cut values depending on different variable
InDet::SiSpacePointsSeedMakerEventData holds event dependent data used by ISiSpacePointsSeedMaker.
InDet::SiTrackMakerEventData_xk holds event dependent data used by ISiTrackMaker.
void setPRDtoTrackMap(const Trk::PRDtoTrackMap *prd_to_track_map)
SiCombinatorialTrackFinderData_xk & combinatorialData()
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:69
int layer_disk(const Identifier &id) const
Definition PixelID.h:602
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition PixelID.h:355
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0).
Definition PixelID.h:595
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition PixelID.h:378
int eta_module(const Identifier &id) const
Definition PixelID.h:627
int phi_module(const Identifier &id) const
Definition PixelID.h:620
container for phi sorted ROIs defined by phi, r and z.
Describes the Region of Ineterest geometry It has basically 9 parameters.
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
int layer_disk(const Identifier &id) const
Definition SCT_ID.h:687
int side(const Identifier &id) const
Definition SCT_ID.h:705
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
Definition SCT_ID.h:487
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
Definition SCT_ID.h:459
int phi_module(const Identifier &id) const
Definition SCT_ID.h:693
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0).
Definition SCT_ID.h:681
int eta_module(const Identifier &id) const
Definition SCT_ID.h:699
Property holding a SG store/key/clid from which a ReadHandle is made.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
Definition FitQuality.h:60
double chiSquared() const
returns the of the overall track fit
Definition FitQuality.h:56
magnetic field properties to steer the behavior of the extrapolation
This class is the pure abstract base class for all fittable tracking measurements.
const Amg::Vector3D & momentum() const
Access method for the momentum.
const Amg::Vector3D & position() const
Access method for the position.
bool production(const TrackParameters *)
Class describing the Line to which the Perigee refers to.
Identifier identify() const
return the identifier
Class to handle RIO On Tracks ROT) for InDet and Muons, it inherits from the common MeasurementBase.
Definition RIO_OnTrack.h:70
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
bool trackProperties(const TrackProperties &property) const
Access methods for track properties.
@ BremFit
A brem fit was performed on this track.
represents the track state (measurement, material, fit parameters and quality) at a surface.
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
const DataVector< const MeasurementBase > * measurementsOnTrack() const
return a pointer to a vector of MeasurementBase (NOT including any that come from outliers).
const TrackInfo & info() const
Returns a const ref to info of a const tracks.
@ Background
The beam background detectors.
Eigen::Matrix< double, 3, 1 > Vector3D
Primary Vertex Finder.
@ anyDirection
@ FastField
call the fast field access method of the FieldSvc
@ NoField
Field is set to 0., 0., 0.,.
ParametersBase< TrackParametersDim, Charged > TrackParameters
@ numberOfSCTHoles
number of Holes in both sides of a SCT module
@ numberOfPixelHoles
number of pixels which have a ganged ambiguity.
@ numberOfPixelDeadSensors
number of pixel hits with broad errors (width/sqrt(12))
-event-from-file
#define unlikely(x)
Helper struct for hole search results from the pattern recognition.