ATLAS Offline Software
SimpleTRT_SeededSpacePointFinder_ATL.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // Header file for class SimpleTRT_SeededSpacePointFinder_ATL
8 // (c) ATLAS Detector software
10 // Class for track candidates generation using space points information
11 // for standard Atlas geometry
13 // Version 1.0 12-APR-2007 Martin Siebel
15 
16 #ifndef SimpleTRT_SeededSpacePointFinder_ATL_H
17 #define SimpleTRT_SeededSpacePointFinder_ATL_H
18 #define SIMPLE_TRT_INDEX_OFFSET 14
19 #include <list>
20 
21 //Tool Handle
22 //
23 #include "GaudiKernel/ServiceHandle.h"
26 
31 
32 class MsgStream;
33 class SCT_ID;
34 class TRT_ID;
35 
36 namespace InDet{
37 
39  virtual public ITRT_SeededSpacePointFinder, public AthAlgTool
40  {
42  // Public methods:
44 
45  public:
46 
47  typedef std::list<std::pair< int,int > > modulLookupTable;
48 
49 
51  // Standard tool methods
54  (const std::string&,const std::string&,const IInterface*);
56  virtual StatusCode initialize() override;
57  virtual StatusCode finalize () override;
58 
60  // Methods to satisfy the interface
62 
64  virtual std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData> newEvent () const override;
65  virtual std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData> newRegion
66  (const std::vector<IdentifierHash>&,const std::vector<IdentifierHash>&) const override;
68 
72  std::list<std::pair<const Trk::SpacePoint*,const Trk::SpacePoint*> > find2Sp (const EventContext& ctx,
73  const Trk::TrackParameters&,
74  InDet::ITRT_SeededSpacePointFinder::IEventData &event_data) const override;
75 
77  // Print internal tool parameters and status
79 
80  MsgStream& dump (MsgStream & out) const override;
81  std::ostream& dump (std::ostream& out) const override;
82 
83  private:
84 
90  BooleanProperty m_useROI{this, "RestrictROI", true};
91 
93  // Overall selection criteria cuts. See source code for explanation
95 
97  IntegerProperty m_maxHoles{this, "MaxHoles", 1};
98 
100  DoubleProperty m_perigeeCut{this, "PerigeeCut", 200.};
101  DoubleProperty m_directionPhiCut{this, "DirectionPhiCut", 0.05};
102 
103 
105  // Space points container
107 
108 
109  SG::ReadHandleKey<SpacePointContainer> m_spacepointsSCTname {this,"SpacePointsSCTName","SCT_SpacePoints","RHK to retrieve SCT SpacePointContainer"} ;
110  SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlapname {this,"SpacePointsSCTName","OverlapSpacePoints","RHK to retrieve OverlapCollection"} ;
112  {this,"PRDtoTrackMap",""};
113 
118 
119 
121  ToolHandle<IRegSelTool> m_pRegionSelector{ this, "RegSelTool_SCT", "RegSelTool/RegSelTool_SCT" };
122 
124  const SCT_ID* m_sctId = nullptr;
125 
127  const TRT_ID* m_trtId = nullptr;
128 
129 
134  //void getSearchRange(const Trk::TrackParameters& directionTRT, double& deltaPhi, double& deltaEta);
135  static void getSearchRange(double& deltaPhi, double& deltaEta) ;
136 
138  void getSpacePointsInROI(const EventContext& ctx,
139  std::set<IdentifierHash>& setOfSCT_Hashes,
140  int modulTRT,
141  std::multimap<int,
142  const Trk::SpacePoint*>& relevantSpacePoints) const;
143 
145  void getHashesInROI(const Trk::TrackParameters& directionTRT, std::set<IdentifierHash>& setOfSCT_Hashes) const;
146 
148  void combineSpacePoints(const std::multimap<int,const Trk::SpacePoint*>& relevantSpacePoints,
149  const Trk::TrackParameters& directionTRT,
150  int modulTRT,
151  std::list<std::pair<const Trk::SpacePoint*, const Trk::SpacePoint*> > &listOfSpacePointPairsBuffer) const;
152 
154  bool pairIsOk(const Trk::SpacePoint* sp1, const Trk::SpacePoint* sp2, const Trk::TrackParameters& directionTRT ) const;
155 
157  void setupLookUpTable();
158  void printLookupTable() const;
159 
161  int TRT_Module(const Trk::TrackParameters& directionTRT) const;
162 
163  };
164 
165  MsgStream& operator << (MsgStream& ,const SimpleTRT_SeededSpacePointFinder_ATL&);
166  std::ostream& operator << (std::ostream&,const SimpleTRT_SeededSpacePointFinder_ATL&);
167 
169  // Inline methods
171 
173  {
174  return nullptr;
175  }
176 
177 
178  inline std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData> SimpleTRT_SeededSpacePointFinder_ATL::newEvent () const {
179  return std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData>();
180  }
181 
182 } // end of name space
183 
184 #endif // SimpleTRT_SeededSpacePointFinder_ATL_H
185 
Trk::SpacePoint
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:35
IRegSelTool.h
InDet::SimpleTRT_SeededSpacePointFinder_ATL::setupLookUpTable
void setupLookUpTable()
the name says it
Definition: SimpleTRT_SeededSpacePointFinder_ATL.cxx:513
PRDtoTrackMap.h
InDet::operator<<
MsgStream & operator<<(MsgStream &, const GNNTrackReaderTool &)
InDet::SimpleTRT_SeededSpacePointFinder_ATL::TRT_Module
int TRT_Module(const Trk::TrackParameters &directionTRT) const
returns the number of the TRT wheel or barrel where the TP belongs to
Definition: SimpleTRT_SeededSpacePointFinder_ATL.cxx:806
InDet::SimpleTRT_SeededSpacePointFinder_ATL::modulLookupTable
std::list< std::pair< int, int > > modulLookupTable
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:47
InDet::ITRT_SeededSpacePointFinder::IEventData
Definition: ITRT_SeededSpacePointFinder.h:51
InDet::SimpleTRT_SeededSpacePointFinder_ATL::newRegion
virtual std::unique_ptr< InDet::ITRT_SeededSpacePointFinder::IEventData > newRegion(const std::vector< IdentifierHash > &, const std::vector< IdentifierHash > &) const override
Definition: SimpleTRT_SeededSpacePointFinder_ATL.cxx:103
ITRT_SeededSpacePointFinder.h
InDet::SimpleTRT_SeededSpacePointFinder_ATL::getSpacePointsInROI
void getSpacePointsInROI(const EventContext &ctx, std::set< IdentifierHash > &setOfSCT_Hashes, int modulTRT, std::multimap< int, const Trk::SpacePoint * > &relevantSpacePoints) const
retrieves SP Collections of modules in the ROI and sorts them by SCT layer
Definition: SimpleTRT_SeededSpacePointFinder_ATL.cxx:230
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::SimpleTRT_SeededSpacePointFinder_ATL::~SimpleTRT_SeededSpacePointFinder_ATL
virtual ~SimpleTRT_SeededSpacePointFinder_ATL()
SIMPLE_TRT_INDEX_OFFSET
#define SIMPLE_TRT_INDEX_OFFSET
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:18
InDet::SimpleTRT_SeededSpacePointFinder_ATL::newEvent
virtual std::unique_ptr< InDet::ITRT_SeededSpacePointFinder::IEventData > newEvent() const override
obsolete, do not do anything.
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:178
InDet::SimpleTRT_SeededSpacePointFinder_ATL::getSearchRange
static void getSearchRange(double &deltaPhi, double &deltaEta)
List with SP pairs as seed for the Si part of the back-track.
Definition: SimpleTRT_SeededSpacePointFinder_ATL.cxx:403
InDet::ITRT_SeededSpacePointFinder
Definition: ITRT_SeededSpacePointFinder.h:45
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_maxHoles
IntegerProperty m_maxHoles
controls how many not considered SCT layers are allowed between two SP in order to form a seed pair
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:97
InDet::SimpleTRT_SeededSpacePointFinder_ATL::combineSpacePoints
void combineSpacePoints(const std::multimap< int, const Trk::SpacePoint * > &relevantSpacePoints, const Trk::TrackParameters &directionTRT, int modulTRT, std::list< std::pair< const Trk::SpacePoint *, const Trk::SpacePoint * > > &listOfSpacePointPairsBuffer) const
builds pairs of SP according to the kook-up table
Definition: SimpleTRT_SeededSpacePointFinder_ATL.cxx:417
InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_useROI
BooleanProperty m_useROI
Controls, if SP have to be checked with the AssociationTool of the forward tracking and to avoid doub...
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:90
SG::ReadHandleKey< SpacePointContainer >
InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_spacepointsOverlapname
SG::ReadHandleKey< SpacePointOverlapCollection > m_spacepointsOverlapname
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:110
SpacePointContainer.h
InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_perigeeCut
DoubleProperty m_perigeeCut
rough cuts on the quality of the suggested SP pair
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:100
InDet::SimpleTRT_SeededSpacePointFinder_ATL::finalize
virtual StatusCode finalize() override
Definition: SimpleTRT_SeededSpacePointFinder_ATL.cxx:91
InDet::SiSpacePointsSeed
Definition: SiSpacePointsSeed.h:30
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:66
InDet::SimpleTRT_SeededSpacePointFinder_ATL::printLookupTable
void printLookupTable() const
Definition: SimpleTRT_SeededSpacePointFinder_ATL.cxx:775
InDet::SimpleTRT_SeededSpacePointFinder_ATL::SimpleTRT_SeededSpacePointFinder_ATL
SimpleTRT_SeededSpacePointFinder_ATL(const std::string &, const std::string &, const IInterface *)
Definition: SimpleTRT_SeededSpacePointFinder_ATL.cxx:32
InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_pRegionSelector
ToolHandle< IRegSelTool > m_pRegionSelector
Region Selector.
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:121
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::SimpleTRT_SeededSpacePointFinder_ATL
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:40
AthAlgTool.h
SpacePointOverlapCollection.h
InDet::SimpleTRT_SeededSpacePointFinder_ATL::getHashesInROI
void getHashesInROI(const Trk::TrackParameters &directionTRT, std::set< IdentifierHash > &setOfSCT_Hashes) const
obtains the hashes of modules in the ROI
Definition: SimpleTRT_SeededSpacePointFinder_ATL.cxx:196
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
Trk::ParametersBase
Definition: ParametersBase.h:55
InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_directionPhiCut
DoubleProperty m_directionPhiCut
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:101
InDet::SimpleTRT_SeededSpacePointFinder_ATL::initialize
virtual StatusCode initialize() override
Definition: SimpleTRT_SeededSpacePointFinder_ATL.cxx:49
InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_modulLookupTable
modulLookupTable m_modulLookupTable[2 *SIMPLE_TRT_INDEX_OFFSET+1]
Lookup table that contains the SCT Layers to be considered to provide SP for the pairing in dependenc...
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:116
InDet::SimpleTRT_SeededSpacePointFinder_ATL::pairIsOk
bool pairIsOk(const Trk::SpacePoint *sp1, const Trk::SpacePoint *sp2, const Trk::TrackParameters &directionTRT) const
applies rough cuts on the quality of a SP pair
Definition: SimpleTRT_SeededSpacePointFinder_ATL.cxx:468
InDet::SimpleTRT_SeededSpacePointFinder_ATL::dump
MsgStream & dump(MsgStream &out) const override
Definition: SimpleTRT_SeededSpacePointFinder_ATL.cxx:758
TRT_ID
Definition: TRT_ID.h:84
SCT_ID
Definition: SCT_ID.h:68
InDet::SimpleTRT_SeededSpacePointFinder_ATL::find2Sp
std::list< std::pair< const Trk::SpacePoint *, const Trk::SpacePoint * > > find2Sp(const EventContext &ctx, const Trk::TrackParameters &, InDet::ITRT_SeededSpacePointFinder::IEventData &event_data) const override
main method, calls the private methods and returns a pointer to the list of SpacePointpairs.
Definition: SimpleTRT_SeededSpacePointFinder_ATL.cxx:109
InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_prdToTrackMap
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:112
InDet::SimpleTRT_SeededSpacePointFinder_ATL::next
const SiSpacePointsSeed * next(InDet::ITRT_SeededSpacePointFinder::IEventData &event_data) const override
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:172
InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_sctId
const SCT_ID * m_sctId
ID SCT helper.
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:124
InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_trtId
const TRT_ID * m_trtId
ID TRT helper.
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:127
AthAlgTool
Definition: AthAlgTool.h:26
InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_spacepointsSCTname
SG::ReadHandleKey< SpacePointContainer > m_spacepointsSCTname
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:109
InDet::SimpleTRT_SeededSpacePointFinder_ATL::m_modulLookupTableIndex
std::set< int > m_modulLookupTableIndex[2 *SIMPLE_TRT_INDEX_OFFSET+1]
Definition: SimpleTRT_SeededSpacePointFinder_ATL.h:117