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
21namespace {
29
30double trackQuality(const Trk::Track* Tr) {
31
32 double quality = 0.;
33 double baseScorePerHit = 17.;
35 for (const Trk::TrackStateOnSurface* m : *(Tr->trackStateOnSurfaces())) {
38 continue;
40 const Trk::FitQualityOnSurface fq = m->fitQualityOnSurface();
41 if (!fq)
42 continue;
43
44 double x2 = fq.chiSquared();
45 double hitQualityScore;
48 if (fq.numberDoF() == 2)
49 hitQualityScore = (1.2 * (baseScorePerHit - x2 * .5)); // pix
50 else
51 hitQualityScore = (baseScorePerHit - x2); // sct
52 if (hitQualityScore < 0.)
53 hitQualityScore =
54 0.; // do not allow a bad hit to decrement the overall score
55 quality += hitQualityScore;
56 }
59 quality *= 0.7;
60
61 return quality;
62}
63} // namespace
64
68
70(const std::string& name,ISvcLocator* pSvcLocator) : AthReentrantAlgorithm(name, pSvcLocator)
71{
72}
73
77
79{
80 ATH_CHECK(m_evtKey.initialize());
81 ATH_CHECK(m_mbtsKey.initialize(m_useMBTS));
84 ATH_CHECK(m_outputTracksKey.initialize());
85
87 ATH_CHECK( m_prdToTrackMap.initialize( !m_prdToTrackMap.key().empty() ) );
88
90
92 ATH_CHECK( m_seedsmaker.retrieve() );
93 ATH_CHECK( m_zvertexmaker.retrieve( DisableTool{ not m_useZvertexTool } ));
94
96 ATH_CHECK( m_trackmaker.retrieve());
97
98 ATH_CHECK( m_regsel_strip.retrieve( DisableTool{ not m_useITkConvSeeded } ) );
99
101
102 ATH_CHECK( m_trackSummaryTool.retrieve( DisableTool{ m_trackSummaryTool.name().empty()} ));
103
104 if (m_useNewStrategy and m_beamSpotKey.key().empty()) {
105 m_useNewStrategy = false;
106 m_useZBoundaryFinding = false;
107 }
108
111
112 if (not m_beamSpotKey.key().empty()) {
114 ATH_CHECK( m_proptool.retrieve() );
115
118
120 if (m_histsize < 100) m_histsize = 100;
121 m_zstep = static_cast<double>(m_histsize)/(2.*m_zcut);
122 } else {
123 m_proptool.disable();
124 m_useNewStrategy = false;
125 m_useZBoundaryFinding = false;
126 }
127 } else {
128 m_proptool.disable();
129 }
130
132 if (msgLvl(MSG::DEBUG)) {
133 dump(MSG::DEBUG, nullptr);
134 }
135 m_neventsTotal = 0;
136 m_neventsTotalV = 0;
137 m_problemsTotal = 0;
139 return StatusCode::SUCCESS;
140}
141
145
146StatusCode InDet::SiSPSeededTrackFinder::execute(const EventContext& ctx) const
147{
153 else if (m_useITkConvSeeded) return itkConvStrategy(ctx);
154 else if (not m_useNewStrategy and not m_useZBoundaryFinding and not m_ITKGeometry) {
155 return oldStrategy(ctx);
156 }
157 return newStrategy(ctx);
158}
159
163
164namespace InDet {
177}
178
179
180StatusCode InDet::SiSPSeededTrackFinder::oldStrategy(const EventContext& ctx) const
181{
183 ATH_CHECK(outputTracks.record(std::make_unique<TrackCollection>()));
185 if (not isGoodEvent(ctx)) {
186 return StatusCode::SUCCESS;
187 }
188
190 bool ZVE = false;
191 if (m_useZvertexTool) {
192 std::list<Trk::Vertex> vertices = m_zvertexmaker->newEvent(ctx, seedEventData);
193 if (not vertices.empty()) ZVE = true;
194 m_seedsmaker->find3Sp(ctx, seedEventData, vertices);
195 } else {
196 m_seedsmaker->newEvent(ctx, seedEventData, -1);
197 std::list<Trk::Vertex> vertexList;
198 m_seedsmaker->find3Sp(ctx, seedEventData, vertexList);
199 }
200
201 const bool PIX = true;
202 const bool SCT = true;
204 m_trackmaker->newEvent(ctx, trackEventData, PIX, SCT);
205
206 bool ERR = false;
207 Counter_t counter{};
208 const InDet::SiSpacePointsSeed* seed = nullptr;
209 std::multimap<double, Trk::Track*> qualitySortedTrackCandidates;
210 // Loop through all seed and reconsrtucted tracks collection preparation
211 //
212 while ((seed = m_seedsmaker->next(ctx, seedEventData))) {
213 ++counter[kNSeeds];
214 std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints());
215 for (Trk::Track* t: trackList) {
216 qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t));
217 }
218 if (not ZVE and (counter[kNSeeds] >= m_maxNumberSeeds)) {
219 ERR = true;
221 break;
222 }
223 }
224 m_trackmaker->endEvent(trackEventData);
225
226 // Remove shared tracks with worse quality
227 //
228 filterSharedTracks(qualitySortedTrackCandidates);
229
230 // Save good tracks in track collection
231 //
232 for (const std::pair<const double, Trk::Track*> & qualityAndTrack: qualitySortedTrackCandidates) {
233 ++counter[kNTracks];
234 if (m_trackSummaryTool.isEnabled()) {
235 m_trackSummaryTool->computeAndReplaceTrackSummary(ctx, *(qualityAndTrack.second),
236 false /* DO NOT suppress hole search*/);
237 }
238 outputTracks->push_back(qualityAndTrack.second);
239 }
240
241 m_counterTotal[kNSeeds] += counter[kNSeeds];
242
243 if (ZVE) ++m_neventsTotalV;
244 else ++m_neventsTotal;
245
246 if (ERR) {
247 outputTracks->clear();
248 } else {
249 m_counterTotal[kNTracks] += counter[kNTracks];
250 }
251
252 // Print common event information
253 //
254 if (msgLvl(MSG::DEBUG)) {
255 dump(MSG::DEBUG, &counter);
256 }
257
258 return StatusCode::SUCCESS;
259}
260
262// Execute with new strategy
264
265StatusCode InDet::SiSPSeededTrackFinder::newStrategy(const EventContext& ctx) const
266{
268 ATH_CHECK(outputTracks.record(std::make_unique<TrackCollection>()));
270 if (not isGoodEvent(ctx)) {
271 return StatusCode::SUCCESS;
272 }
273
276 Trk::PerigeeSurface beamPosPerigee(beamSpotHandle->beamPos());
277
279
288
293
295 m_seedsmaker->newEvent(ctx, seedEventData, 0);
296 std::list<Trk::Vertex> vertexList;
298 m_seedsmaker->find3Sp(ctx, seedEventData, vertexList);
299
300 const bool PIX = true ;
301 const bool SCT = true ;
304 m_trackmaker->newEvent(ctx, trackEventData, PIX, SCT);
305
307 std::vector<int> numberHistogram(m_histsize, 0);
308 std::vector<double> zWeightedHistogram(m_histsize, 0.);
309 std::vector<double> ptWeightedHistogram(m_histsize, 0.);
310
311 bool ERR = false;
312 Counter_t counter{};
313 const InDet::SiSpacePointsSeed* seed = nullptr;
314
316 std::multimap<double, Trk::Track*> qualitySortedTrackCandidates;
317
319 bool doWriteNtuple = m_seedsmaker->getWriteNtupleBoolProperty();
320 long EvNumber = 0.; //Event number variable to be used for the validation ntuple
321
322 if (doWriteNtuple) {
324 if(!eventInfo.isValid()) {EvNumber = -1.0;} else {EvNumber = eventInfo->eventNumber();}
325 }
326
328 while ((seed = m_seedsmaker->next(ctx, seedEventData))) {
329
330 ++counter[kNSeeds];
332 bool firstTrack{true};
333
335 std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints());
337 for (Trk::Track* t: trackList) {
338
339 qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t));
340
341 if (firstTrack && m_doDumpGBTSTrainingDataLRT) {
343 }
344
346 if (firstTrack and not m_ITKGeometry) {
347 fillZHistogram(ctx, t, beamPosPerigee, numberHistogram, zWeightedHistogram, ptWeightedHistogram);
348 }
349 firstTrack = false;
350 }
352 if(doWriteNtuple) { m_seedsmaker->writeNtuple(seed, !trackList.empty() ? trackList.front() : nullptr, ISiSpacePointsSeedMaker::StripSeed, EvNumber) ; }
353
354
355 if (counter[kNSeeds] >= m_maxNumberSeeds) {
356 ERR = true;
358 break;
359 }
360 }
361
366 if(not m_SpacePointsPixelKey.empty()) {
367 m_seedsmaker->newEvent(ctx, seedEventData, 1);
368
370 std::pair<double,double> zBoundaries;
371 if (not m_ITKGeometry) {
373 findZvertex(vertexList, zBoundaries, numberHistogram, zWeightedHistogram, ptWeightedHistogram);
376 m_seedsmaker->find3Sp(ctx, seedEventData, vertexList, &(zBoundaries.first));
377 } else {
378 m_seedsmaker->find3Sp(ctx, seedEventData, vertexList);
379 }
380
382 while ((seed = m_seedsmaker->next(ctx, seedEventData))) {
383
384 ++counter[kNSeeds];
385
386 std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints());
387
388 for (Trk::Track* t: trackList) {
389 qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t));
390 }
391
392 if(doWriteNtuple) { m_seedsmaker->writeNtuple(seed, !trackList.empty() ? trackList.front() : nullptr, ISiSpacePointsSeedMaker::PixelSeed, EvNumber); }
393
394 if (counter[kNSeeds] >= m_maxNumberSeeds) {
395 ERR = true;
397 break;
398 }
399 }
400 } else {
401 ATH_MSG_WARNING("SpacePointsPixelKey is empty. Skipping the second seeding pass that uses pixel seeds.");
402 }
403
404 m_trackmaker->endEvent(trackEventData);
405
407 filterSharedTracks(qualitySortedTrackCandidates);
408
410 for (const std::pair<const double, Trk::Track*> & qualityAndTrack: qualitySortedTrackCandidates) {
411 ++counter[kNTracks];
412 if (m_trackSummaryTool.isEnabled()) {
415 m_trackSummaryTool->computeAndReplaceTrackSummary(ctx, *qualityAndTrack.second,
416 false /* DO NOT suppress hole search*/);
419 if (m_writeHolesFromPattern && trackEventData.combinatorialData().findPatternHoleSearchOutcome(qualityAndTrack.second,theOutcome)){
421 qualityAndTrack.second->trackSummary()->update(Trk::numberOfPixelHoles, theOutcome.nPixelHoles);
422 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTHoles, theOutcome.nSCTHoles);
423 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTDoubleHoles, theOutcome.nSCTDoubleHoles);
424 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTDeadSensors, theOutcome.nSCTDeads);
425 qualityAndTrack.second->trackSummary()->update(Trk::numberOfPixelDeadSensors, theOutcome.nPixelDeads);
426 }
427 }
428 outputTracks->push_back(qualityAndTrack.second);
430 collectGBTSTrainingData(qualityAndTrack.second);
431 }
432 }
433
434 m_counterTotal[kNSeeds] += counter[kNSeeds] ;
435
437
438 if (ERR) {
439 outputTracks->clear();
440 } else {
441 m_counterTotal[kNTracks] += counter[kNTracks];
442 }
443
444 // Print common event information
445 //
446 if (msgLvl(MSG::DEBUG)) {
447 dump(MSG::DEBUG, &counter);
448 }
449 return StatusCode::SUCCESS;
450}
451
452
453
455// ITk fast tracking strategy
457
458StatusCode InDet::SiSPSeededTrackFinder::itkFastTrackingStrategy(const EventContext& ctx) const
459{
461 ATH_CHECK(outputTracks.record(std::make_unique<TrackCollection>()));
462
463 const bool PIX = true ;
464 const bool STRIP = true ;
467 m_trackmaker->newTrigEvent(ctx, trackEventData, PIX, STRIP);
468
470
474
479
481 m_seedsmaker->newEvent(ctx, seedEventData, 0);
482 std::list<Trk::Vertex> vertexList;
484 m_seedsmaker->find3Sp(ctx, seedEventData, vertexList);
485
486 bool ERR = false;
487 Counter_t counter{};
488 const InDet::SiSpacePointsSeed* seed = nullptr;
489
491 std::multimap<double, Trk::Track*> qualitySortedTrackCandidates;
492
494 bool doWriteNtuple = m_seedsmaker->getWriteNtupleBoolProperty();
495 long EvNumber = 0.; //Event number variable to be used for the validation ntuple
496
497 if (doWriteNtuple) {
499 if(!eventInfo.isValid()) {EvNumber = -1.0;} else {EvNumber = eventInfo->eventNumber();}
500 }
501
503 while ((seed = m_seedsmaker->next(ctx, seedEventData))) {
504
505 ++counter[kNSeeds];
506
508 std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints());
510 for (Trk::Track* t: trackList) {
511
512 qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t));
513
514 }
516 if(doWriteNtuple) { m_seedsmaker->writeNtuple(seed, !trackList.empty() ? trackList.front() : nullptr, ISiSpacePointsSeedMaker::PixelSeed, EvNumber) ; }
517
518 if (counter[kNSeeds] >= m_maxNumberSeeds) {
519 ERR = true;
521 break;
522 }
523 }
524
525 m_trackmaker->endEvent(trackEventData);
526
528 filterSharedTracksFast(qualitySortedTrackCandidates);
529
531 for (const std::pair<const double, Trk::Track*> & qualityAndTrack: qualitySortedTrackCandidates) {
532 ++counter[kNTracks];
533
534 if (m_trackSummaryTool.isEnabled()) {
535 m_trackSummaryTool->computeAndReplaceTrackSummary(ctx, *qualityAndTrack.second);
538 if (m_writeHolesFromPattern && trackEventData.combinatorialData().findPatternHoleSearchOutcome(qualityAndTrack.second,theOutcome)){
540 qualityAndTrack.second->trackSummary()->update(Trk::numberOfPixelHoles, theOutcome.nPixelHoles);
541 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTHoles, theOutcome.nSCTHoles);
542 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTDoubleHoles, theOutcome.nSCTDoubleHoles);
543 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTDeadSensors, theOutcome.nSCTDeads);
544 qualityAndTrack.second->trackSummary()->update(Trk::numberOfPixelDeadSensors, theOutcome.nPixelDeads);
545 }
546 }
547
548 outputTracks->push_back(qualityAndTrack.second);
549 }
550
551 m_counterTotal[kNSeeds] += counter[kNSeeds] ;
552
554
555 if (ERR) {
556 outputTracks->clear();
557 } else {
558 m_counterTotal[kNTracks] += counter[kNTracks];
559 }
560
561 // Print common event information
562 //
563 if (msgLvl(MSG::DEBUG)) {
564 dump(MSG::DEBUG, &counter);
565 }
566 return StatusCode::SUCCESS;
567}
568
569
571// Conversion Strategy for ITk
573
574StatusCode InDet::SiSPSeededTrackFinder::itkConvStrategy(const EventContext& ctx) const
575{
576 ATH_MSG_DEBUG("Executing " << name() << "::itkConvStrategy");
577
579 ATH_CHECK(outputTracks.record(std::make_unique<TrackCollection>()));
581 if (not isGoodEvent(ctx)) {
582 return StatusCode::SUCCESS;
583 }
584
586
588 std::unique_ptr<RoiDescriptor> roiComp = std::make_unique<RoiDescriptor>(true);
589
590 if(calo_rois.isValid()) {
591 RoiDescriptor * roi =nullptr;
593 double beamZ = beamSpotHandle->beamVtx().position().z();
594 roiComp->clear();
595 roiComp->setComposite();
596
597 const ROIPhiRZContainer &calo_rois_ref=*calo_rois;
598 for (const ROIPhiRZ &calo_roi : calo_rois_ref) {
599 double phi = calo_roi.phi();
600 if (std::abs(phi)>=M_PI && phi!=-M_PI) continue; // skip duplicates < -pi and >pi
601 double eta = calo_roi.eta();
602 double z = beamZ;
603 double roiPhiMin = phi - m_deltaPhi;
604 double roiPhiMax = phi + m_deltaPhi;
605 double roiEtaMin = eta - m_deltaEta;
606 double roiEtaMax = eta + m_deltaEta;
607 double roiZMin = beamZ - m_deltaZ;
608 double roiZMax = beamZ + m_deltaZ;
609 roi = new RoiDescriptor( eta, roiEtaMin, roiEtaMax,phi, roiPhiMin ,roiPhiMax,z,roiZMin,roiZMax);
610 roiComp->push_back(roi);
611 }
612 }
613 else {
614 ATH_MSG_ERROR("Calo RoI is not valid: " << m_caloClusterROIKey.key());
615 return StatusCode::FAILURE;
616 }
617
618 std::vector<IdentifierHash> listOfStripIds;
619 std::vector<IdentifierHash> listOfPixIds;
620
621 m_regsel_strip->lookup(ctx)->HashIDList( *roiComp, listOfStripIds );
622
624 m_seedsmaker->newRegion(ctx, seedEventData, listOfPixIds, listOfStripIds);
625 std::list<Trk::Vertex> vertexList;
627 m_seedsmaker->find3Sp(ctx, seedEventData, vertexList);
628
629 const bool PIX = true ;
630 const bool STRIP = true ;
633 m_trackmaker->newEvent(ctx, trackEventData, PIX, STRIP);
634
635 bool ERR = false;
636 Counter_t counter{};
637 const InDet::SiSpacePointsSeed* seed = nullptr;
638
640 std::multimap<double, Trk::Track*> qualitySortedTrackCandidates;
641
643 bool doWriteNtuple = m_seedsmaker->getWriteNtupleBoolProperty();
644 long EvNumber = 0.; //Event number variable to be used for the validation ntuple
645
646 if (doWriteNtuple) {
648 if(!eventInfo.isValid()) {EvNumber = -1.0;} else {EvNumber = eventInfo->eventNumber();}
649 }
650
652 while ((seed = m_seedsmaker->next(ctx, seedEventData))) {
653
654 ++counter[kNSeeds];
655
657 std::list<Trk::Track*> trackList = m_trackmaker->getTracks(ctx, trackEventData, seed->spacePoints());
659 for (Trk::Track* t: trackList) {
660 qualitySortedTrackCandidates.insert(std::make_pair(-trackQuality(t), t));
661 }
662
664 if(doWriteNtuple) { m_seedsmaker->writeNtuple(seed, !trackList.empty() ? trackList.front() : nullptr, ISiSpacePointsSeedMaker::StripSeed, EvNumber) ; }
665
666 if (counter[kNSeeds] >= m_maxNumberSeeds) {
667 ERR = true;
669 break;
670 }
671 }
672
673 m_trackmaker->endEvent(trackEventData);
674
676 filterSharedTracks(qualitySortedTrackCandidates);
677
679 for (const std::pair<const double, Trk::Track*> & qualityAndTrack: qualitySortedTrackCandidates) {
680 ++counter[kNTracks];
681 if (m_trackSummaryTool.isEnabled()) {
684 m_trackSummaryTool->computeAndReplaceTrackSummary(ctx, *qualityAndTrack.second,
685 false /* DO NOT suppress hole search*/);
688 if (m_writeHolesFromPattern && trackEventData.combinatorialData().findPatternHoleSearchOutcome(qualityAndTrack.second,theOutcome)){
690 qualityAndTrack.second->trackSummary()->update(Trk::numberOfPixelHoles, theOutcome.nPixelHoles);
691 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTHoles, theOutcome.nSCTHoles);
692 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTDoubleHoles, theOutcome.nSCTDoubleHoles);
693 qualityAndTrack.second->trackSummary()->update(Trk::numberOfSCTDeadSensors, theOutcome.nSCTDeads);
694 qualityAndTrack.second->trackSummary()->update(Trk::numberOfPixelDeadSensors, theOutcome.nPixelDeads);
695 }
696 }
697 outputTracks->push_back(qualityAndTrack.second);
698 }
699
700 m_counterTotal[kNSeeds] += counter[kNSeeds] ;
701
703
704 if (ERR) {
705 outputTracks->clear();
706 } else {
707 m_counterTotal[kNTracks] += counter[kNTracks];
708 }
709
710 // Print common event information
711 //
712 if (msgLvl(MSG::DEBUG)) {
713 dump(MSG::DEBUG, &counter);
714 }
715 return StatusCode::SUCCESS;
716}
717
718
719
721// Finalize
723
725{
726
727 dump(MSG::INFO, &m_counterTotal);
728
731 }
732 return StatusCode::SUCCESS;
733}
734
736// Dumps relevant information into the MsgStream
738
739MsgStream& InDet::SiSPSeededTrackFinder::dump(MSG::Level assign_level, const InDet::SiSPSeededTrackFinder::Counter_t* counter) const
740{
741 msg(assign_level) <<std::endl;
742 MsgStream& out_msg=msg();
743 if (counter) dumpevent(out_msg ,*counter);
744 else dumptools(out_msg);
745 out_msg << endmsg;
746 return out_msg;
747}
748
750// Dumps conditions information into the MsgStream
752
753MsgStream& InDet::SiSPSeededTrackFinder::dumptools(MsgStream& out) const
754{
755 int n = 65-m_zvertexmaker.type().size();
756 std::string s1; for (int i=0; i<n; ++i) s1.append(" "); s1.append("|");
757 n = 65-m_seedsmaker.type().size();
758 std::string s2; for (int i=0; i<n; ++i) s2.append(" "); s2.append("|");
759 n = 65-m_trackmaker.type().size();
760 std::string s3; for (int i=0; i<n; ++i) s3.append(" "); s3.append("|");
761 n = 65-m_outputTracksKey.key().size();
762 std::string s4; for (int i=0; i<n; ++i) s4.append(" "); s4.append("|");
763
764 std::string s5;
765 if (m_useZvertexTool) s5= "Yes"; else s5 = "No";
766 n = 65-s5.size(); for (int i=0; i<n; ++i) s5.append(" "); s5.append("|");
767
768 out<<"|----------------------------------------------------------------"
769 <<"----------------------------------------------------|"
770 <<std::endl;
771 out<<"| Use primary vertices z-coordinates finding?| "<<s5
772 <<std::endl;
773 if (m_useZvertexTool) {
774 out<<"| Tool for primary vertices z-coordinates finding | "<<m_zvertexmaker.type()<<s1
775 <<std::endl;
776 }
777 out<<"| Tool for space points seeds finding | "<<m_seedsmaker.type()<<s2
778 <<std::endl;
779 out<<"| Tool for space points seeded track finding | "<<m_trackmaker.type()<<s3
780 <<std::endl;
781 out<<"| Location of output tracks | "<<m_outputTracksKey.key()<<s4
782 <<std::endl;
783 out<<"|----------------------------------------------------------------"
784 <<"----------------------------------------------------|"
785 <<std::endl;
786 return out;
787}
788
790// Dumps event information into the ostream
792
794{
795 out<<"|-------------------------------------------------------------------";
796 out<<"---------------------------------|"
797 <<std::endl;
798 out<<"| Investigated "
799 <<std::setw(9)<<counter[kNSeeds]<<" space points seeds and found ";
800 out<<std::setw(9)<<counter[kNTracks];
801 if (m_ITKGeometry ) out<<" tracks using new strategy for ITK |"<<std::endl;
802 else if (m_useNewStrategy ) out<<" tracks using new strategy ("<<std::setw(2)<< m_nvertex <<") |"<<std::endl;
803 else if (m_useZBoundaryFinding) out<<" tracks using old strategy with Zb |"<<std::endl;
804 else out<<" tracks using old strategy |"<<std::endl;
805
806 out<<"|-------------------------------------------------------------------";
807 out<<"---------------------------------|"
808 <<std::endl;
810 out<<"| Events "
811 <<std::setw(7)<<m_neventsTotal <<" without Z-vertz "
812 <<std::setw(7)<<m_neventsTotalV <<" with Z-vertex |"
813 <<std::endl;
814 out<<"| Problems "
815 <<std::setw(7)<<m_problemsTotal <<" without Z-vertz "
816 <<std::setw(7)<<m_problemsTotalV <<" with Z-vertex |"
817 <<std::endl;
818 out<<"|-------------------------------------------------------------------";
819 out<<"-----------------------------|"
820 <<std::endl;
821 }
822 return out;
823}
824
826// Test is it good event for reconstruction (mainly for HI events)
828
829bool InDet::SiSPSeededTrackFinder::isGoodEvent(const EventContext& ctx) const {
830
831 if ( not m_alwaysProtectAgainstBusyEvent ) { // if not enabled the protection is only applied to specific events
832 // Test MBTS information from calorimeter
833 //
834 if (not m_useMBTS) return true;
835
837 if (not eventInfo->isEventFlagBitSet(xAOD::EventInfo::Background, xAOD::EventInfo::MBTSTimeDiffHalo) ) {
838 return true;
839 }
840 }
841
842 // Test total number pixels space points
843 //
844 unsigned int nsp = 0;
845 if (not m_SpacePointsPixelKey.empty()) {
847 if (spacePointsPixel.isValid()) {
848 for (const SpacePointCollection* spc: *spacePointsPixel) {
849 nsp += spc->size();
850 }
851 if (static_cast<int>(nsp) > m_maxPIXsp) {
852 ATH_MSG_WARNING("Found more than "<<m_maxPIXsp<<" pixels space points in background event. Skip track finding");
853 return false;
854 }
855 }
856 }
857 // Test total number sct space points
858 //
859 nsp = 0;
860 if (not m_SpacePointsSCTKey.empty()) {
862 if (spacePointsSCT.isValid()) {
863 for (const SpacePointCollection* spc: *spacePointsSCT) {
864 nsp += spc->size();
865 }
866 if (static_cast<int>(nsp) > m_maxSCTsp) {
867 ATH_MSG_WARNING("Found more than "<<m_maxSCTsp<<" sct space points in background event. Skip track finding");
868 return false;
869 }
870 }
871 }
872
873 return true;
874}
875
877// Filer shared tracks
879
880void InDet::SiSPSeededTrackFinder::filterSharedTracks(std::multimap<double, Trk::Track*>& qualitySortedTracks) const
881{
882 std::set<const Trk::PrepRawData*> clusters;
883
884 std::vector<const Trk::PrepRawData*> freeClusters;
885 freeClusters.reserve(15);
886
887 std::multimap<double, Trk::Track*>::iterator it_qualityAndTrack = qualitySortedTracks.begin();
888
890 while (it_qualityAndTrack!=qualitySortedTracks.end()) {
891 freeClusters.clear();
892
893 std::set<const Trk::PrepRawData*>::iterator it_clustersEnd = clusters.end();
894
895 int nClusters = 0;
897 for (const Trk::MeasurementBase* m: *((*it_qualityAndTrack).second->measurementsOnTrack())) {
898
900 const Trk::PrepRawData* pr = (static_cast<const Trk::RIO_OnTrack*>(m))->prepRawData();
901 if (pr) {
903 ++nClusters;
905 if (clusters.find(pr)==it_clustersEnd) {
907 freeClusters.push_back(pr);
908 }
909 }
910 }
911
913 int nFreeClusters = static_cast<int>(freeClusters.size());
914 if (nFreeClusters >= m_nfreeCut || nFreeClusters==nClusters) {
917 clusters.insert(freeClusters.begin(), freeClusters.end());
918 ++it_qualityAndTrack;
919 } else {
921 delete (*it_qualityAndTrack).second;
922 qualitySortedTracks.erase(it_qualityAndTrack++);
923 }
924 }
925}
926
927
928void InDet::SiSPSeededTrackFinder::filterSharedTracksFast(std::multimap<double, Trk::Track*>& qualitySortedTracks) const
929{
930 std::set<const Trk::PrepRawData*> clusters;
931
932 std::vector<const Trk::PrepRawData*> freeClusters;
933 freeClusters.reserve(15);
934
935 std::multimap<double, Trk::Track*>::iterator it_qualityAndTrack = qualitySortedTracks.begin();
936
938 while (it_qualityAndTrack!=qualitySortedTracks.end()) {
939 freeClusters.clear();
940
941 std::set<const Trk::PrepRawData*>::iterator it_clustersEnd = clusters.end();
942
943 int nClusters = 0;
944 int nPixels = 0;
946 for (const Trk::TrackStateOnSurface* tsos: *((*it_qualityAndTrack).second->trackStateOnSurfaces())) {
947
948 if(!tsos->type(Trk::TrackStateOnSurface::Measurement)) continue;
949 const Trk::FitQualityOnSurface fq = tsos->fitQualityOnSurface();
950 if(!fq) continue;
951 if(fq.numberDoF() == 2) ++nPixels;
952
954 const Trk::MeasurementBase* mb = tsos->measurementOnTrack();
955 const Trk::RIO_OnTrack* ri = dynamic_cast<const Trk::RIO_OnTrack*>(mb);
956 if(!ri) continue;
957 const Trk::PrepRawData* pr = ri->prepRawData();
958 if (pr) {
960 ++nClusters;
962 if (clusters.find(pr)==it_clustersEnd) {
964 freeClusters.push_back(pr);
965 }
966 }
967 }
968
970 clusters.insert(freeClusters.begin(), freeClusters.end());
971
972 int nFreeClusters = static_cast<int>(freeClusters.size());
973 if( passEtaDepCuts( (*it_qualityAndTrack).second, nClusters, nFreeClusters, nPixels) ){
975 ++it_qualityAndTrack;
976 } else {
978 delete (*it_qualityAndTrack).second;
979 qualitySortedTracks.erase(it_qualityAndTrack++);
980 }
981 }
982}
983
985// Fill z coordinate histogram
987
989 const Trk::Track* Tr,
990 const Trk::PerigeeSurface& beamPosPerigee,
991 std::vector<int>& numberHistogram,
992 std::vector<double>& zWeightedHistogram,
993 std::vector<double>& ptWeightedHistogram) const
994{
995
996 if (Tr->measurementsOnTrack()->size() < 10) return;
997
998 const Trk::TrackParameters* paramsAtFirstSurface = Tr->trackStateOnSurfaces()->front()->trackParameters();
999 Amg::Vector3D position = paramsAtFirstSurface->position() ;
1000 Amg::Vector3D momentum = paramsAtFirstSurface->momentum() ;
1001
1003 constexpr double rSquare_max_forZHisto = 60.*60.;
1004 if (position.x()*position.x()+position.y()*position.y() >= rSquare_max_forZHisto) return;
1005
1006 double pT = sqrt(momentum.x()*momentum.x()+momentum.y()*momentum.y());
1007 if (pT < m_pTcut) return;
1008
1010 if (not TP.production(paramsAtFirstSurface)) return;
1011
1012 double step;
1014 if (not m_proptool->propagate(ctx,
1015 TP, beamPosPerigee, TP, Trk::anyDirection, m_fieldprop, step, Trk::pion)) return;
1016
1017 const AmgVector(5)& parsAtBeamSpot = TP.parameters();
1018 if (std::abs(parsAtBeamSpot[0]) > m_imcut) return;
1020 int z = static_cast<int>((parsAtBeamSpot[1]+m_zcut)*m_zstep);
1022 if (z >=0 and z < m_histsize) {
1024 ++numberHistogram[z];
1026 zWeightedHistogram[z] += parsAtBeamSpot[1];
1028 ptWeightedHistogram[z] += pT;
1029 }
1030
1031}
1032
1034// Find verteex z coordinates
1036
1037void InDet::SiSPSeededTrackFinder::findZvertex(std::list<Trk::Vertex>& vertexZList,
1038 std::pair<double, double> & zBoundaries,
1039 const std::vector<int>& numberHistogram,
1040 const std::vector<double>& zWeightedHistogram,
1041 const std::vector<double>& ptWeightedHistogram) const
1042{
1043 zBoundaries = {1000., -1000};
1044
1045 std::multimap<int ,double> vertexZ_sortedByNtracks;
1046 std::multimap<double,double> vertexZ_sortedBySumPt;
1047
1048 int lastBin = m_histsize-1;
1049 int minBinContentSum = 3;
1050
1052 for (int binIndex=1; binIndex<lastBin; ++binIndex) {
1053
1055 int vertexNtracks = numberHistogram.at(binIndex-1)+numberHistogram.at(binIndex)+numberHistogram.at(binIndex+1);
1056
1059 if (vertexNtracks>=minBinContentSum and (numberHistogram.at(binIndex) >= numberHistogram.at(binIndex-1) and numberHistogram.at(binIndex) >= numberHistogram.at(binIndex+1))) {
1061 double vertexZestimate = (zWeightedHistogram.at(binIndex-1)+zWeightedHistogram.at(binIndex)+zWeightedHistogram.at(binIndex+1))/static_cast<double>(vertexNtracks);
1062
1065 if (vertexZestimate < zBoundaries.first) zBoundaries.first = vertexZestimate;
1066 if (vertexZestimate > zBoundaries.second) zBoundaries.second = vertexZestimate;
1067
1068 if (m_useNewStrategy) {
1070 double vertexSumPt = ptWeightedHistogram.at(binIndex-1)+ptWeightedHistogram.at(binIndex)+ptWeightedHistogram.at(binIndex+1);
1071 vertexZ_sortedByNtracks.insert(std::make_pair(-vertexNtracks, vertexZestimate));
1072 vertexZ_sortedBySumPt.insert(std::make_pair(-vertexSumPt, vertexZestimate));
1073 }
1074 }
1075 }
1076
1077 if (m_useNewStrategy) {
1078
1079 std::set<double> leadingVertices;
1080 int n = 0;
1081 std::multimap<double, double>::iterator vertex_pt_and_z = vertexZ_sortedBySumPt.begin();
1082 for (std::pair<int, double> nTrackAndZ: vertexZ_sortedByNtracks) {
1084 if (n++ >= m_nvertex) break;
1087 leadingVertices.insert(nTrackAndZ.second);
1088 leadingVertices.insert((*vertex_pt_and_z++).second);
1089 }
1090
1091 for (double v: leadingVertices) {
1092 vertexZList.emplace_back(Amg::Vector3D{0.,0.,v});
1093 }
1094 }
1096 if (zBoundaries.first > zBoundaries.second) {
1097 zBoundaries.first = -1000.;
1098 zBoundaries.second = +1000.;
1099 } else {
1101 zBoundaries.first -= 20.;
1102 zBoundaries.second += 20.;
1103 }
1104}
1105
1106
1108// Callback function - get the magnetic field /
1110
1112{
1113 // Build MagneticFieldProperties
1114 //
1115 if(m_fieldmode == "NoField") {
1117 } else {
1119 }
1120}
1121
1122
1124// Check if track passes eta-dependent cuts for fast tracking
1126
1128 int nClusters,
1129 int nFreeClusters,
1130 int nPixels) const
1131{
1132 Trk::TrackStates::const_iterator m = track->trackStateOnSurfaces()->begin();
1133 const Trk::TrackParameters* par = (*m)->trackParameters();
1134 if(!par) return false;
1135
1136 double eta = std::abs(par->eta());
1137 if(nClusters < m_etaDependentCutsSvc->getMinSiHitsAtEta(eta)) return false;
1138 if(nFreeClusters < m_etaDependentCutsSvc->getMinSiNotSharedAtEta(eta)) return false;
1139 if(nClusters-nFreeClusters > m_etaDependentCutsSvc->getMaxSharedAtEta(eta)) return false;
1140 if(nPixels < m_etaDependentCutsSvc->getMinPixelHitsAtEta(eta)) return false;
1141
1142 if(par->pT() < m_etaDependentCutsSvc->getMinPtAtEta(eta)) return false;
1143 if(!(*m)->type(Trk::TrackStateOnSurface::Perigee)) return true ;
1144 if(std::abs(par->localPosition()[0]) > m_etaDependentCutsSvc->getMaxPrimaryImpactAtEta(eta)) return false;
1145 return true;
1146}
1147
1149
1150 struct VLM_Data {
1151 int vol_id, lay_id, mod_id;
1152 float m_x, m_y, m_z;
1153 };
1154
1155 const PixelID* IDp = 0;
1156 const SCT_ID* IDs = 0;
1157
1158 if (detStore()->retrieve(IDp, "PixelID").isFailure()) {
1159 ATH_MSG_FATAL("Could not get Pixel ID helper");
1160 }
1161
1162 if (detStore()->retrieve(IDs, "SCT_ID").isFailure()) {
1163 ATH_MSG_FATAL("Could not get SCT ID helper");
1164 }
1165
1166 if (!IDs && !IDp) return;
1167
1169
1170 std::vector<VLM_Data> vlm;
1171
1172 for (const auto* s : *track->trackStateOnSurfaces()) {
1173 if (!s->type(Trk::TrackStateOnSurface::Measurement)) continue;
1174
1175 const Trk::MeasurementBase* mb = s->measurementOnTrack();
1176 if (!mb) continue;
1177
1178 const Trk::RIO_OnTrack* ri = dynamic_cast<const Trk::RIO_OnTrack*>(mb);
1179 if (!ri) continue;
1180
1181 const Trk::PrepRawData* rd = ri->prepRawData();
1182 if (!rd) continue;
1183
1184 const InDet::SiCluster* si = dynamic_cast<const InDet::SiCluster*>(rd);
1185 if (!si) continue;
1186
1187 const Amg::Vector3D& pos = s->trackParameters()->position();
1188
1189 if (dynamic_cast<const InDet::PixelCluster*>(si)) { // Pixel
1190
1191 Identifier id = si->identify();
1192
1193 int bec = IDp->barrel_ec(id);
1194
1195 int vol_id = 8;
1196
1197 if (bec == -2) vol_id = 7;
1198 if (bec == 2) vol_id = 9;
1199
1200 if (bec < -2 || bec > 2) continue;
1201
1202 int lay_id = IDp->layer_disk(id);
1203 int eta_mod = IDp->eta_module(id);
1204 int phi_mod = IDp->phi_module(id);
1205
1206 Identifier wafer_id = IDp->wafer_id(bec, lay_id, phi_mod, eta_mod);
1207
1208 int mod_id = IDp->wafer_hash(wafer_id);
1209
1210 int new_vol = 0, new_lay = 0;
1211
1212 if (vol_id == 7 || vol_id == 9) {
1213 new_vol = 10 * vol_id + lay_id;
1214 new_lay = eta_mod;
1215 } else if (vol_id == 8) {
1216 new_lay = 0;
1217 new_vol = 10 * vol_id + lay_id;
1218 }
1219 if (vol_id != 0)
1220 vlm.emplace_back(new_vol, new_lay, mod_id, pos.x(), pos.y(), pos.z());
1221 }
1222
1223 if (dynamic_cast<const InDet::SCT_Cluster*>(si)) { // SCT
1224
1225 Identifier id = si->identify();
1226
1227 int bec = IDs->barrel_ec(id);
1228
1229 int vol_id = 13;
1230
1231 if (bec < 0) vol_id = 12;
1232 if (bec > 0) vol_id = 14;
1233
1234 int lay_id = IDs->layer_disk(id);
1235 int eta_mod = IDs->eta_module(id);
1236 int phi_mod = IDs->phi_module(id);
1237 int side = IDs->side(id);
1238
1239 Identifier wafer_id = IDs->wafer_id(bec, lay_id, phi_mod, eta_mod, side);
1240
1241 int mod_id = IDs->wafer_hash(wafer_id);
1242
1243 vlm.emplace_back(vol_id, lay_id, mod_id, pos.x(), pos.y(), pos.z());
1244 }
1245 }
1246
1247 // remove single-strip cases where no spacepoint exists
1248
1249 std::vector<VLM_Data> vlm2;
1250
1251 for (std::size_t it1 = 0; it1 < vlm.size() - 1; it1++) {
1252 if (vlm.at(it1).vol_id > 14) { // Pixels
1253 vlm2.push_back(vlm.at(it1));
1254 continue;
1255 }
1256
1257 std::size_t it2 = it1 + 1;
1258
1259 int src = vlm.at(it1).vol_id * 1000 + vlm.at(it1).lay_id;
1260 int dst = vlm.at(it2).vol_id * 1000 + vlm.at(it2).lay_id;
1261
1262 if (src == dst) { // a spacepoint can be formed
1263 vlm2.push_back(vlm.at(it1));
1264 vlm2.push_back(vlm.at(it2));
1265 it1 = it2;
1266 continue;
1267 }
1268 }
1269
1270 // remove track segments which are too short
1272
1273 constexpr float minDist = 20.0;
1274
1275 for (auto it = std::next(vlm2.begin()); it != vlm2.end(); ) {
1276 auto jt = std::prev(it);
1277 float dx = it->m_x - jt->m_x;
1278 float dy = it->m_y - jt->m_y;
1279 float dz = it->m_z - jt->m_z;
1280
1281 float dist = std::sqrt(dx*dx + dy*dy + dz*dz);
1282
1283 if (dist < minDist) it = vlm2.erase(it);
1284 else ++it;
1285 }
1286 }
1287
1288 std::scoped_lock trainingDataLock(m_GBTSTrainingDataMutex);
1289
1290 for (std::size_t it1 = 0; it1 < vlm2.size() - 1; ++it1) {
1291 std::size_t it2 = it1 + 1;
1292
1293 int src = vlm2.at(it1).vol_id * 1000 + vlm2.at(it1).lay_id;
1294 int dst = vlm2.at(it2).vol_id * 1000 + vlm2.at(it2).lay_id;
1295
1296 if (src != dst) { // skip the same layer
1297 auto [im1, new1] = m_GBTSTrainingData.insert({src, {}});
1298 auto [im2, new2] = im1->second.insert({dst, 1ul});
1299 if (!new2) im2->second++;
1300 }
1301 }
1302}
1303
1305 std::ofstream tableFile(m_GBTSTrainingDataFileName);
1306 tableFile << "from,to,probability,flow\n";
1307
1308 unsigned long nTotal = 0;
1309 for (const auto& [src, conns] : m_GBTSTrainingData) {
1310 unsigned long nTotalDst = 0;
1311 for (const auto& [dst, n] : conns) {
1312 nTotalDst += n;
1313 }
1314 nTotal += nTotalDst;
1315 for (const auto& [dst, n] : conns) {
1316 double prob = double(n) / double(nTotalDst);
1317 tableFile << src << ", " << dst << ", " << std::fixed << std::setprecision(6) << prob << ", " << prob << '\n';
1318 }
1319 }
1320 ATH_MSG_INFO("GBTS training data from " << m_numGBTSTrainingData << " tracks with " << nTotal << " pairs written to " << m_GBTSTrainingDataFileName.value());
1321}
#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
Helper struct for hole search results from the pattern recognition.