ATLAS Offline Software
TRT_StandaloneTrackFinder.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /**********************************************************************************
6  Header file for class TRT_StandaloneTrackFinder
7  (c) ATLAS Detector software
8  Algorithm for Trk::Track production in TRT only
9  Version 1.0: 09/28/2007
10  Authors : Thomas Koffas, Markus Elsing
11  email : Thomas.Koffas@cern.ch
12 **********************************************************************************/
13 
14 #ifndef TRT_StandaloneTrackFinder_H
15 #define TRT_StandaloneTrackFinder_H
16 
17 #include <array>
18 #include <string>
19 #include <mutex>
20 
22 #include "GaudiKernel/ToolHandle.h"
23 
28 
33 
34 #include "GaudiKernel/SystemOfUnits.h"
35 
36 namespace InDet {
37 
46  class ITRT_SegmentToTrackTool;
47 
48  class TRT_StandaloneTrackFinder : public AthReentrantAlgorithm
49  {
50 
52  // Public methods:
54 
55  public:
56 
58 
59 
61  TRT_StandaloneTrackFinder(const std::string &name, ISvcLocator *pSvcLocator);
64  StatusCode execute(const EventContext& ctx) const;
66 
68 
69 
71  MsgStream& dump(MsgStream& out) const;
72 
73  private:
74 
76  /* Private data */
78 
79 
80  IntegerProperty m_minNumDriftCircles
81  {this, "MinNumDriftCircles", 15,
82  "Minimum number of drift circles for TRT segment tracks"};
83  DoubleProperty m_minPt
84  {this, "MinPt", 1.0 * Gaudi::Units::GeV,
85  "Minimum pt cut for TRT only (used in preselection * 0.9)"};
86  BooleanProperty m_oldLogic
87  {this, "OldTransitionLogic", true,
88  "use old transition region hit logic "};
89 
90  ToolHandle< ITRT_SegmentToTrackTool > m_segToTrackTool
91  {this,"TRT_SegToTrackTool","InDet::TRT_SegmentToTrackTool"};
92 
94  {this , "InputSegmentsLocation","TRTSegments"};
96  {this,"PRDtoTrackMap",""};
97 
101  {this,"OutputTracksLocation","TRTStandaloneTracks"};
102 
105  enum ECounter {kNTrtSeg,
106  kNUsedSeg,
108  kNTrtSegGood,
109  kNSegFailed,
114 
115  typedef std::array<int,kNCounter> Counter_t;
116 
117  mutable std::mutex m_statMutex ATLAS_THREAD_SAFE;
118  mutable Counter_t m_total ATLAS_THREAD_SAFE {};
119  MsgStream& dumpContainerNames(MsgStream& out) const;
120  static MsgStream& dumpevent(MsgStream&, const InDet::TRT_StandaloneTrackFinder::Counter_t&);
121  friend MsgStream& operator<< (MsgStream&, const InDet::TRT_StandaloneTrackFinder::Counter_t&);
122  };
123 
125 
126 }
127 
128 
129 MsgStream& operator<< (MsgStream&, const InDet::TRT_StandaloneTrackFinder&);
130 
131 #endif // TRT_StandaloneTrackFinder_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
InDet::TRT_StandaloneTrackFinder::operator<<
friend MsgStream & operator<<(MsgStream &, const InDet::TRT_StandaloneTrackFinder::Counter_t &)
PRDtoTrackMap.h
InDet::TRT_StandaloneTrackFinder::kNTrtSegGood
@ kNTrtSegGood
Number of input TRT segments after cuts per event.
Definition: TRT_StandaloneTrackFinder.h:115
InDet::operator<<
MsgStream & operator<<(MsgStream &, const GNNTrackReaderTool &)
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
InDet::TRT_StandaloneTrackFinder::kNSegFailed
@ kNSegFailed
Number of segments failing to translate to a track (inclusing refit)
Definition: TRT_StandaloneTrackFinder.h:116
InDet::TRT_StandaloneTrackFinder::kNTrtSeg
@ kNTrtSeg
Number of input TRT segments to be investigated per event.
Definition: TRT_StandaloneTrackFinder.h:112
InDet::TRT_StandaloneTrackFinder::m_minNumDriftCircles
IntegerProperty m_minNumDriftCircles
Definition: TRT_StandaloneTrackFinder.h:88
BeamSpot::mutex
std::mutex mutex
Definition: InDetBeamSpotVertex.cxx:18
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::TRT_StandaloneTrackFinder::kNUsedSeg
@ kNUsedSeg
Number of TRT segments excluded at input (by BackTracking tracks)
Definition: TRT_StandaloneTrackFinder.h:113
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
InDet::TRT_StandaloneTrackFinder::ECounter
ECounter
Global Counters for final algorithm statistics.
Definition: TRT_StandaloneTrackFinder.h:112
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
InDet::TRT_StandaloneTrackFinder::TRT_StandaloneTrackFinder
TRT_StandaloneTrackFinder(const std::string &name, ISvcLocator *pSvcLocator)
Standard Algotithm methods
Definition: TRT_StandaloneTrackFinder.cxx:28
InDet::TRT_StandaloneTrackFinder::m_prdToTrackMap
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap
map between PRDs and tracks to identify shared hits.
Definition: TRT_StandaloneTrackFinder.h:103
operator<<
MsgStream & operator<<(MsgStream &, const InDet::TRT_StandaloneTrackFinder &)
Definition: TRT_StandaloneTrackFinder.cxx:266
InDet::TRT_StandaloneTrackFinder::execute
StatusCode execute(const EventContext &ctx) const
Definition: TRT_StandaloneTrackFinder.cxx:55
InDet::TRT_StandaloneTrackFinder::kNCounter
@ kNCounter
Definition: TRT_StandaloneTrackFinder.h:120
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
InDet::TRT_StandaloneTrackFinder::kNTrkSegUsedTotal
@ kNTrkSegUsedTotal
Number of excluded segments by other TRT segments.
Definition: TRT_StandaloneTrackFinder.h:118
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
InDet::TRT_StandaloneTrackFinder::kNRejectedSeg
@ kNRejectedSeg
Number of segments rejected in selection at input.
Definition: TRT_StandaloneTrackFinder.h:114
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::TRT_StandaloneTrackFinder::finalize
StatusCode finalize()
Definition: TRT_StandaloneTrackFinder.cxx:196
InDet::TRT_StandaloneTrackFinder::m_segToTrackTool
ToolHandle< ITRT_SegmentToTrackTool > m_segToTrackTool
Segment to track tool.
Definition: TRT_StandaloneTrackFinder.h:98
TrackCollection.h
InDet::TRT_StandaloneTrackFinder::dumpContainerNames
MsgStream & dumpContainerNames(MsgStream &out) const
Definition: TRT_StandaloneTrackFinder.cxx:225
InDet::TRT_StandaloneTrackFinder::m_finalTracks
SG::WriteHandleKey< TrackCollection > m_finalTracks
Tracks that will be passed out of AmbiProcessor.
Definition: TRT_StandaloneTrackFinder.h:108
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
InDet::TRT_StandaloneTrackFinder
Definition: TRT_StandaloneTrackFinder.h:56
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
InDet::TRT_StandaloneTrackFinder::dump
MsgStream & dump(MsgStream &out) const
Print internal tool parameters and status
Definition: TRT_StandaloneTrackFinder.cxx:206
InDet::TRT_StandaloneTrackFinder::dumpevent
static MsgStream & dumpevent(MsgStream &, const InDet::TRT_StandaloneTrackFinder::Counter_t &)
Definition: TRT_StandaloneTrackFinder.cxx:214
InDet::TRT_StandaloneTrackFinder::kNTRTTrkTotal
@ kNTRTTrkTotal
Number of TRT-only tracks on output.
Definition: TRT_StandaloneTrackFinder.h:119
InDet::TRT_StandaloneTrackFinder::initialize
StatusCode initialize()
Definition: TRT_StandaloneTrackFinder.cxx:39
ITRT_SegmentToTrackTool.h
InDet::TRT_StandaloneTrackFinder::m_Segments
SG::ReadHandleKey< Trk::SegmentCollection > m_Segments
TRT segments to use.
Definition: TRT_StandaloneTrackFinder.h:101
InDet::TRT_StandaloneTrackFinder::Counter_t
std::array< int, kNCounter > Counter_t
Definition: TRT_StandaloneTrackFinder.h:122
InDet::TRT_StandaloneTrackFinder::m_oldLogic
BooleanProperty m_oldLogic
Definition: TRT_StandaloneTrackFinder.h:94
InDet::TRT_StandaloneTrackFinder::ATLAS_THREAD_SAFE
std::mutex m_statMutex ATLAS_THREAD_SAFE
Definition: TRT_StandaloneTrackFinder.h:124
InDet::TRT_StandaloneTrackFinder::m_minPt
DoubleProperty m_minPt
Definition: TRT_StandaloneTrackFinder.h:91
InDet::TRT_StandaloneTrackFinder::~TRT_StandaloneTrackFinder
virtual ~TRT_StandaloneTrackFinder()
SegmentCollection.h
InDet::TRT_StandaloneTrackFinder::kNTrkScoreZeroTotal
@ kNTrkScoreZeroTotal
Number of tracks rejected by score zero.
Definition: TRT_StandaloneTrackFinder.h:117