ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_SegmentsToTrack.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRT_SEGMENTSTOTRACK_H
6#define TRT_SEGMENTSTOTRACK_H
7
8//======================================================
9//
10// Algorithm for creating Tracks out of TrackSegments
11// by feeding them through a TrackFitter
12//
13// Author: Christian Schmitt <Christian.Schmitt@cern.ch>
14//
15//=======================================================
17#include "GaudiKernel/ToolHandle.h"
26// for shared hits:
29
31class AtlasDetectorID;
32class TRT_ID;
33
34namespace Trk {
35 class Track;
36 class Segment;
37}
38
39namespace InDet{
40 class TRT_DriftCircle;
41}
42
43
51namespace InDet
52{
54 {
55 public:
56 TRT_SegmentsToTrack(const std::string& name, ISvcLocator* pSvcLocator);
58
59 StatusCode initialize();
60 StatusCode execute();
61 StatusCode finalize();
62
63 private:
64 int getNumberReal(const InDet::TRT_DriftCircle*,const EventContext& ctx) const;
65
66
67 double getRealFractionTRT(const Trk::Track *track,const EventContext& ctx) const;
68
69 double getNoiseProbability(const Trk::Track *track) const;
70
71 int nTRTHits(const Trk::Track *track) const;
72
73 int nHTHits(const Trk::Track *track) const;
74
75 void combineSegments(const EventContext& ctx) const;
76
77
78 SG::ReadHandleKey<Trk::SegmentCollection> m_inputSegmentCollectionName{this,"InputSegmentsCollection","TrackSegments","RHK to retrieve input track collection"};
79
80 SG::WriteHandleKey<TrackCollection> m_outputTrackCollectionName{this,"OutputTrackCollection","SegmentTracks","WHK to store output tracks"};
81
82 ToolHandle<Trk::ITrackFitter> m_trackFitter
83 {this,"TrackFitter","Trk::KalmanFitter/TrkKalmanFitter",""};
84
85 ToolHandle<Trk::IExtrapolator> m_extrapolator
86 {this,"ExtrapolationTool","Trk::Extrapolator/InDetExtrapolator",""};
87
88 ToolHandle<Trk::IExtendedTrackSummaryTool> m_trkSummaryTool
89 {this, "SummaryTool","",""};
90 ToolHandle<Trk::IPRDtoTrackMapTool> m_assoTool
91 {this, "AssociationTool", "","" };
92
94 {this,"AssociationMapName","",""};
96 {this,"InputAssociationMapName","",""};
97
98
99 double m_noiseCut;
101
102 const AtlasDetectorID* m_idHelper; //<! Detector ID helper
103
105
106
107 SG::ReadHandleKey<PRD_MultiTruthCollection> m_multiTruthCollectionTRTName{this,"PRDTruthCollectionTRT","","RHK to retrieve TRT turth info"};
108
111
113
114 mutable std::atomic<int> m_events;
115 std::map<int,int> m_MapReal;
116 std::map<int,int> m_MapFake;
117
120
121
123
124 SG::ReadHandleKey<Trk::SegmentCollection> m_barrelSegments{this,"BarrelSegments","TRTBarrelSegments","RHK to retrieve barrel track segments"};
125 SG::ReadHandleKey<Trk::SegmentCollection> m_endcapSegments{this,"EndcapSegments","TRTEndcapSegments","RHK to retrieve endcap track segments"};
126
127 SG::WriteHandleKey<TrackCollection> m_BECCollectionName{this,"BarrelEndcapTracks","TRT_Barrel_EC","WHK to write tracks"};
128
129 mutable std::atomic<int> m_n_combined_fit;
130
131
132
133 };
134}
135
136#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
int m_nTracksReal
Counter for real reconstructed Tracks.
double getNoiseProbability(const Trk::Track *track) const
Get the fraction of noise TRT hits on this Track.
std::atomic< int > m_events
Event counter.
ToolHandle< Trk::ITrackFitter > m_trackFitter
The TrackFitter.
int nHTHits(const Trk::Track *track) const
Count number of TRT HT Hits on track.
SG::ReadHandleKey< Trk::SegmentCollection > m_endcapSegments
Name of Endcap segment collection.
ToolHandle< Trk::IExtrapolator > m_extrapolator
The Extrapolator.
SG::ReadHandleKey< Trk::SegmentCollection > m_inputSegmentCollectionName
Name of the TrackSegment Collection to read in.
const AtlasDetectorID * m_idHelper
double getRealFractionTRT(const Trk::Track *track, const EventContext &ctx) const
Get the fraction of truth TRT hits on this Track.
ToolHandle< Trk::IPRDtoTrackMapTool > m_assoTool
void combineSegments(const EventContext &ctx) const
int m_minTRTHits
All tracks with less Hits (after the track fit) will be thrown away.
SG::ReadHandleKey< PRD_MultiTruthCollection > m_multiTruthCollectionTRTName
Name of the TRT MultiTruthCollection.
std::map< int, int > m_MapReal
Map of hits and real tracks.
int m_nTracksFake
Counter for fake reconstructed Track.
std::atomic< int > m_n_combined_fit
std::map< int, int > m_MapFake
Map of hits and fake tracks.
int getNumberReal(const InDet::TRT_DriftCircle *, const EventContext &ctx) const
Get the number of truth particles associated with this hit.
SG::WriteHandleKey< TrackCollection > m_BECCollectionName
Name of the combined (TRT Barrel+EC) TrackCollection to write out.
SG::ReadHandleKey< Trk::SegmentCollection > m_barrelSegments
Name of Barrel segment collection.
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trkSummaryTool
bool m_outlierRemoval
Flag to switch on the outlier removal in the track fitter.
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_inputAssoMapName
key to be set to optionally store PRD to track association map
SG::WriteHandleKey< TrackCollection > m_outputTrackCollectionName
Name of the TrackCollection to write out.
TRT_SegmentsToTrack(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteHandleKey< Trk::PRDtoTrackMap > m_assoMapName
key for the PRDtoTrackMap to filled by the ambiguity score processor.
int nTRTHits(const Trk::Track *track) const
Count number of TRT Hits on track.
bool m_combineSegments
Try to combine segments from Barrel and Endcap.
double m_noiseCut
All tracks with a TRT Noise fraction larger than this variable will be thrown away.
bool m_materialEffects
Flag to switch on Material Effects in the Fitter.
double m_noiseratio
average percentage of noise in real tracks
A PRD is mapped onto all contributing particles.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:82
Base class for all TrackSegment implementations, extends the common MeasurementBase.
Primary Vertex Finder.
Ensure that the ATLAS eigen extensions are properly loaded.