ATLAS Offline Software
Loading...
Searching...
No Matches
SiSPSeededTrackFinder.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 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(*(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(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(*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(*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(*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::PerigeeSurface& beamPosPerigee,
990 std::vector<int>& numberHistogram,
991 std::vector<double>& zWeightedHistogram,
992 std::vector<double>& ptWeightedHistogram) const
993{
994
995 if (Tr->measurementsOnTrack()->size() < 10) return;
996
997 const Trk::TrackParameters* paramsAtFirstSurface = Tr->trackStateOnSurfaces()->front()->trackParameters();
998 Amg::Vector3D position = paramsAtFirstSurface->position() ;
999 Amg::Vector3D momentum = paramsAtFirstSurface->momentum() ;
1000
1002 constexpr double rSquare_max_forZHisto = 60.*60.;
1003 if (position.x()*position.x()+position.y()*position.y() >= rSquare_max_forZHisto) return;
1004
1005 double pT = sqrt(momentum.x()*momentum.x()+momentum.y()*momentum.y());
1006 if (pT < m_pTcut) return;
1007
1009 if (not TP.production(paramsAtFirstSurface)) return;
1010
1011 double step;
1013 if (not m_proptool->propagate(Gaudi::Hive::currentContext(),
1014 TP, beamPosPerigee, TP, Trk::anyDirection, m_fieldprop, step, Trk::pion)) return;
1015
1016 const AmgVector(5)& parsAtBeamSpot = TP.parameters();
1017 if (std::abs(parsAtBeamSpot[0]) > m_imcut) return;
1019 int z = static_cast<int>((parsAtBeamSpot[1]+m_zcut)*m_zstep);
1021 if (z >=0 and z < m_histsize) {
1023 ++numberHistogram[z];
1025 zWeightedHistogram[z] += parsAtBeamSpot[1];
1027 ptWeightedHistogram[z] += pT;
1028 }
1029
1030}
1031
1033// Find verteex z coordinates
1035
1036void InDet::SiSPSeededTrackFinder::findZvertex(std::list<Trk::Vertex>& vertexZList,
1037 std::pair<double, double> & zBoundaries,
1038 const std::vector<int>& numberHistogram,
1039 const std::vector<double>& zWeightedHistogram,
1040 const std::vector<double>& ptWeightedHistogram) const
1041{
1042 zBoundaries = {1000., -1000};
1043
1044 std::multimap<int ,double> vertexZ_sortedByNtracks;
1045 std::multimap<double,double> vertexZ_sortedBySumPt;
1046
1047 int lastBin = m_histsize-1;
1048 int minBinContentSum = 3;
1049
1051 for (int binIndex=1; binIndex<lastBin; ++binIndex) {
1052
1054 int vertexNtracks = numberHistogram.at(binIndex-1)+numberHistogram.at(binIndex)+numberHistogram.at(binIndex+1);
1055
1058 if (vertexNtracks>=minBinContentSum and (numberHistogram.at(binIndex) >= numberHistogram.at(binIndex-1) and numberHistogram.at(binIndex) >= numberHistogram.at(binIndex+1))) {
1060 double vertexZestimate = (zWeightedHistogram.at(binIndex-1)+zWeightedHistogram.at(binIndex)+zWeightedHistogram.at(binIndex+1))/static_cast<double>(vertexNtracks);
1061
1064 if (vertexZestimate < zBoundaries.first) zBoundaries.first = vertexZestimate;
1065 if (vertexZestimate > zBoundaries.second) zBoundaries.second = vertexZestimate;
1066
1067 if (m_useNewStrategy) {
1069 double vertexSumPt = ptWeightedHistogram.at(binIndex-1)+ptWeightedHistogram.at(binIndex)+ptWeightedHistogram.at(binIndex+1);
1070 vertexZ_sortedByNtracks.insert(std::make_pair(-vertexNtracks, vertexZestimate));
1071 vertexZ_sortedBySumPt.insert(std::make_pair(-vertexSumPt, vertexZestimate));
1072 }
1073 }
1074 }
1075
1076 if (m_useNewStrategy) {
1077
1078 std::set<double> leadingVertices;
1079 int n = 0;
1080 std::multimap<double, double>::iterator vertex_pt_and_z = vertexZ_sortedBySumPt.begin();
1081 for (std::pair<int, double> nTrackAndZ: vertexZ_sortedByNtracks) {
1083 if (n++ >= m_nvertex) break;
1086 leadingVertices.insert(nTrackAndZ.second);
1087 leadingVertices.insert((*vertex_pt_and_z++).second);
1088 }
1089
1090 for (double v: leadingVertices) {
1091 vertexZList.emplace_back(Amg::Vector3D{0.,0.,v});
1092 }
1093 }
1095 if (zBoundaries.first > zBoundaries.second) {
1096 zBoundaries.first = -1000.;
1097 zBoundaries.second = +1000.;
1098 } else {
1100 zBoundaries.first -= 20.;
1101 zBoundaries.second += 20.;
1102 }
1103}
1104
1105
1107// Callback function - get the magnetic field /
1109
1111{
1112 // Build MagneticFieldProperties
1113 //
1114 if(m_fieldmode == "NoField") {
1116 } else {
1118 }
1119}
1120
1121
1123// Check if track passes eta-dependent cuts for fast tracking
1125
1127 int nClusters,
1128 int nFreeClusters,
1129 int nPixels) const
1130{
1131 Trk::TrackStates::const_iterator m = track->trackStateOnSurfaces()->begin();
1132 const Trk::TrackParameters* par = (*m)->trackParameters();
1133 if(!par) return false;
1134
1135 double eta = std::abs(par->eta());
1136 if(nClusters < m_etaDependentCutsSvc->getMinSiHitsAtEta(eta)) return false;
1137 if(nFreeClusters < m_etaDependentCutsSvc->getMinSiNotSharedAtEta(eta)) return false;
1138 if(nClusters-nFreeClusters > m_etaDependentCutsSvc->getMaxSharedAtEta(eta)) return false;
1139 if(nPixels < m_etaDependentCutsSvc->getMinPixelHitsAtEta(eta)) return false;
1140
1141 if(par->pT() < m_etaDependentCutsSvc->getMinPtAtEta(eta)) return false;
1142 if(!(*m)->type(Trk::TrackStateOnSurface::Perigee)) return true ;
1143 if(std::abs(par->localPosition()[0]) > m_etaDependentCutsSvc->getMaxPrimaryImpactAtEta(eta)) return false;
1144 return true;
1145}
1146
1148
1149 struct VLM_Data {
1150 int vol_id, lay_id, mod_id;
1151 float m_x, m_y, m_z;
1152 };
1153
1154 const PixelID* IDp = 0;
1155 const SCT_ID* IDs = 0;
1156
1157 if (detStore()->retrieve(IDp, "PixelID").isFailure()) {
1158 ATH_MSG_FATAL("Could not get Pixel ID helper");
1159 }
1160
1161 if (detStore()->retrieve(IDs, "SCT_ID").isFailure()) {
1162 ATH_MSG_FATAL("Could not get SCT ID helper");
1163 }
1164
1165 if (!IDs && !IDp) return;
1166
1168
1169 std::vector<VLM_Data> vlm;
1170
1171 for (const auto* s : *track->trackStateOnSurfaces()) {
1172 if (!s->type(Trk::TrackStateOnSurface::Measurement)) continue;
1173
1174 const Trk::MeasurementBase* mb = s->measurementOnTrack();
1175 if (!mb) continue;
1176
1177 const Trk::RIO_OnTrack* ri = dynamic_cast<const Trk::RIO_OnTrack*>(mb);
1178 if (!ri) continue;
1179
1180 const Trk::PrepRawData* rd = ri->prepRawData();
1181 if (!rd) continue;
1182
1183 const InDet::SiCluster* si = dynamic_cast<const InDet::SiCluster*>(rd);
1184 if (!si) continue;
1185
1186 const Amg::Vector3D& pos = s->trackParameters()->position();
1187
1188 if (dynamic_cast<const InDet::PixelCluster*>(si)) { // Pixel
1189
1190 Identifier id = si->identify();
1191
1192 int bec = IDp->barrel_ec(id);
1193
1194 int vol_id = 8;
1195
1196 if (bec == -2) vol_id = 7;
1197 if (bec == 2) vol_id = 9;
1198
1199 if (bec < -2 || bec > 2) continue;
1200
1201 int lay_id = IDp->layer_disk(id);
1202 int eta_mod = IDp->eta_module(id);
1203 int phi_mod = IDp->phi_module(id);
1204
1205 Identifier wafer_id = IDp->wafer_id(bec, lay_id, phi_mod, eta_mod);
1206
1207 int mod_id = IDp->wafer_hash(wafer_id);
1208
1209 int new_vol = 0, new_lay = 0;
1210
1211 if (vol_id == 7 || vol_id == 9) {
1212 new_vol = 10 * vol_id + lay_id;
1213 new_lay = eta_mod;
1214 } else if (vol_id == 8) {
1215 new_lay = 0;
1216 new_vol = 10 * vol_id + lay_id;
1217 }
1218 if (vol_id != 0)
1219 vlm.emplace_back(new_vol, new_lay, mod_id, pos.x(), pos.y(), pos.z());
1220 }
1221
1222 if (dynamic_cast<const InDet::SCT_Cluster*>(si)) { // SCT
1223
1224 Identifier id = si->identify();
1225
1226 int bec = IDs->barrel_ec(id);
1227
1228 int vol_id = 13;
1229
1230 if (bec < 0) vol_id = 12;
1231 if (bec > 0) vol_id = 14;
1232
1233 int lay_id = IDs->layer_disk(id);
1234 int eta_mod = IDs->eta_module(id);
1235 int phi_mod = IDs->phi_module(id);
1236 int side = IDs->side(id);
1237
1238 Identifier wafer_id = IDs->wafer_id(bec, lay_id, phi_mod, eta_mod, side);
1239
1240 int mod_id = IDs->wafer_hash(wafer_id);
1241
1242 vlm.emplace_back(vol_id, lay_id, mod_id, pos.x(), pos.y(), pos.z());
1243 }
1244 }
1245
1246 // remove single-strip cases where no spacepoint exists
1247
1248 std::vector<VLM_Data> vlm2;
1249
1250 for (std::size_t it1 = 0; it1 < vlm.size() - 1; it1++) {
1251 if (vlm.at(it1).vol_id > 14) { // Pixels
1252 vlm2.push_back(vlm.at(it1));
1253 continue;
1254 }
1255
1256 std::size_t it2 = it1 + 1;
1257
1258 int src = vlm.at(it1).vol_id * 1000 + vlm.at(it1).lay_id;
1259 int dst = vlm.at(it2).vol_id * 1000 + vlm.at(it2).lay_id;
1260
1261 if (src == dst) { // a spacepoint can be formed
1262 vlm2.push_back(vlm.at(it1));
1263 vlm2.push_back(vlm.at(it2));
1264 it1 = it2;
1265 continue;
1266 }
1267 }
1268
1269 // remove track segments which are too short
1271
1272 constexpr float minDist = 20.0;
1273
1274 for (auto it = std::next(vlm2.begin()); it != vlm2.end(); ) {
1275 auto jt = std::prev(it);
1276 float dx = it->m_x - jt->m_x;
1277 float dy = it->m_y - jt->m_y;
1278 float dz = it->m_z - jt->m_z;
1279
1280 float dist = std::sqrt(dx*dx + dy*dy + dz*dz);
1281
1282 if (dist < minDist) it = vlm2.erase(it);
1283 else ++it;
1284 }
1285 }
1286
1287 std::scoped_lock trainingDataLock(m_GBTSTrainingDataMutex);
1288
1289 for (std::size_t it1 = 0; it1 < vlm2.size() - 1; ++it1) {
1290 std::size_t it2 = it1 + 1;
1291
1292 int src = vlm2.at(it1).vol_id * 1000 + vlm2.at(it1).lay_id;
1293 int dst = vlm2.at(it2).vol_id * 1000 + vlm2.at(it2).lay_id;
1294
1295 if (src != dst) { // skip the same layer
1296 auto [im1, new1] = m_GBTSTrainingData.insert({src, {}});
1297 auto [im2, new2] = im1->second.insert({dst, 1ul});
1298 if (!new2) im2->second++;
1299 }
1300 }
1301}
1302
1304 std::ofstream tableFile(m_GBTSTrainingDataFileName);
1305 tableFile << "from,to,probability,flow\n";
1306
1307 unsigned long nTotal = 0;
1308 for (const auto& [src, conns] : m_GBTSTrainingData) {
1309 unsigned long nTotalDst = 0;
1310 for (const auto& [dst, n] : conns) {
1311 nTotalDst += n;
1312 }
1313 nTotal += nTotalDst;
1314 for (const auto& [dst, n] : conns) {
1315 double prob = double(n) / double(nTotalDst);
1316 tableFile << src << ", " << dst << ", " << std::fixed << std::setprecision(6) << prob << ", " << prob << '\n';
1317 }
1318 }
1319 ATH_MSG_INFO("GBTS training data from " << m_numGBTSTrainingData << " tracks with " << nTotal << " pairs written to " << m_GBTSTrainingDataFileName.value());
1320}
#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
void fillZHistogram(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...
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 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:67
int layer_disk(const Identifier &id) const
Definition PixelID.h:607
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module) const
For a single crystal.
Definition PixelID.h:360
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition PixelID.h:600
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition PixelID.h:383
int eta_module(const Identifier &id) const
Definition PixelID.h:632
int phi_module(const Identifier &id) const
Definition PixelID.h:625
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.