ATLAS Offline Software
TRT_SeededSpacePointFinder_ATL.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /********************************************************************************
6  Header file for class TRT_SeededSpacePointFinder_ATL
7  (c) ATLAS Detector software
8  Class for Si seed candidates generation using space point information
9  Version 1.0: 04/15/2006
10  Authors: Thomas Koffas
11  email : Thomas.Koffas@cern.ch
12 ********************************************************************************/
13 
14 #ifndef TRT_SeededSpacePointFinder_ATL_H
15 #define TRT_SeededSpacePointFinder_ATL_H
16 
17 
18 
19 //Tool Handle
20 //
22 #include "GaudiKernel/ServiceHandle.h"
23 
26 
29 
31 
33 
34 // MagField cache
37 
38 #include <list>
39 #include <vector>
40 #include <iosfwd>
41 
42 class MsgStream ;
43 class SCT_ID ;
44 class SiSpacePointsSeed;
45 
46 namespace InDet{
47 
50  public:
51  bool operator()(std::pair<const Trk::SpacePoint*,int> sp1, std::pair<const Trk::SpacePoint*,int> sp2) const
52  {return (sp1.first)->r() > (sp2.first)->r();}
53  };
54 }
55 
56 namespace InDet{
57 
67  virtual public ITRT_SeededSpacePointFinder, public AthAlgTool
68  {
70  // Public methods:
72 
73  public:
74 
76 
77 
80  (const std::string&,const std::string&,const IInterface*);
82  virtual StatusCode initialize();
83  virtual StatusCode finalize ();
84 
86 
87 
89  std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData> newEvent () const;
90  std::unique_ptr<InDet::ITRT_SeededSpacePointFinder::IEventData> newRegion
91  (const std::vector<IdentifierHash>&,
92  const std::vector<IdentifierHash>&) const;
93 
95 
96 
98  std::list<std::pair<const Trk::SpacePoint*,const Trk::SpacePoint*> > find2Sp (const EventContext& ctx,
99  const Trk::TrackParameters&,
100  ITRT_SeededSpacePointFinder::IEventData &event_data) const;
101 
103 
104 
107 
109 
110 
112  MsgStream& dump (MsgStream & out) const;
113  std::ostream& dump (std::ostream& out) const;
114 
115  protected:
116 
118 
119 
121  std::string m_fieldmode ;
127  const SCT_ID* m_sctId;
128 
130 
131 
133  double m_ptmin ;
134  double m_r_rmin ;
135  double m_r_rmax ;
136  double m_r_rstep ;
137  double m_r1max ;
138  double m_r12min ;
139  double m_r2min ;
140  double m_dzdrmin ;
141  double m_dzdrmax ;
142  double m_xiC ;
143  double m_xiTC ;
144  double m_xiFC ;
145  bool m_search ;
146  bool m_loadFull ;
147  bool m_doCosmics ;
149 
151 
153  class EventData;
154  class EventData : public Trk::EventDataBase<EventData,InDet::ITRT_SeededSpacePointFinder::IEventData>
155  {
157  public:
159  : m_r_size(0),
160  m_ns(0),
161  m_fNmax(0),
162  m_nr(0),
163  m_nrf(0),
164  m_sF(0.)
165  {
166  m_r_index = 0 ;
167  m_r_map = 0 ;
168  }
170  if(m_r_index) delete [] m_r_index;
171  if(m_r_map ) delete [] m_r_map ;
172  }
173 
174  protected:
175  void buildFrameWork(double r_rmax, double r_rstep, double ptmin);
176  void erase(); // unused?
177 
178  int m_r_size ;
179  std::list<std::pair<const Trk::SpacePoint*,int> > m_rf_Sorted[530] ;
180  std::list<std::pair<const Trk::SpacePoint*,int> > m_newRfi_Sorted ;
181 
182  int m_ns=0 ;
183  int m_fNmax=0 ;
184  int m_nr=0 ; int* m_r_index=nullptr; int* m_r_map=nullptr ;
185  int m_nrf=0 , m_rf_index [ 530], m_rf_map [ 530] ;
186  double m_sF;
187 
188  };
189 
191 
192 
194  SG::ReadHandleKey<SpacePointContainer> m_spacepointsPixname {this,"SpacePointsPixelName","PixelSpacePoints","RHK to retrieve Pixel SpacePointContainer"} ;
195  SG::ReadHandleKey<SpacePointContainer> m_spacepointsSCTname {this,"SpacePointsSCTName","SCT_SpacePoints","RHK to retrieve SCT SpacePointContainer"} ;
196  SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlapname {this,"SpacePointsOverlapName","OverlapSpacePoints","RHK to retrieve OverlapCollection"} ;
198  {this,"PRDtoTrackMap",""};
199 
200  // Read handle for conditions object to get the field cache
202  "fieldCondObj", "Name of the Magnetic Field conditions object key"};
203 
205 
206 
208  MsgStream& dumpConditions(MsgStream & out) const;
209  MsgStream& dumpEvent (MsgStream & out,InDet::TRT_SeededSpacePointFinder_ATL::EventData &event_data) const;
210 
211 
213  void fillLists (std::vector< std::vector<const Trk::SpacePoint*> > &r_Sorted,
215 
216 
219  // // // // // // // // // // // // // // // // //
220  void production2Spb (const EventContext& ctx, const Trk::TrackParameters&,
221  int,
222  std::list<std::pair<const Trk::SpacePoint*,const Trk::SpacePoint*> > &outputListBuffer,
224  // // // // // // // // // // // // // // // // //
225 
227  void geoInfo(const Trk::SpacePoint*, int&, int&) const ;
228 
229 
231  void magneticFieldInit();
232 
233  // ptr to SP-specific data to be stored after calculated only once
234  // instead of repeating the same computations many times in the
235  // nested loop (memory allocated and deallocated in production2Spb)
236  struct bypass_struct {
237  double X, Y, Z;
238  double R, invR;
239  double a, b;
240  };
241 
242  // place to keep scalar values needed for cuts, common to all seeds
243  // updated only once per production2Sp call instead or each cutTPb
247  };
248 
251  // // // // // // // // // // // // // // // // //
252  bool cutTPb(const invar_bypass_struct &invar_bypass, const std::vector<bypass_struct> &prod_bypass,long, long, double) const;
253  // // // // // // // // // // // // // // // // //
254 
255  };
256 
258 
259 
263  {
264  return 0;
265  }
266 
267 } // end of name space
268 
269 #endif // TRT_SeededSpacePointFinder_ATL_H
InDet::TRT_SeededSpacePointFinder_ATL::m_xiC
double m_xiC
Max R-z direction cut
Definition: TRT_SeededSpacePointFinder_ATL.h:142
Trk::SpacePoint
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:35
beamspotman.r
def r
Definition: beamspotman.py:676
InDet::TRT_SeededSpacePointFinder_ATL::m_spacepointsOverlapname
SG::ReadHandleKey< SpacePointOverlapCollection > m_spacepointsOverlapname
Definition: TRT_SeededSpacePointFinder_ATL.h:196
PRDtoTrackMap.h
InDet::TRT_SeededSpacePointFinder_ATL::m_loadFull
bool m_loadFull
Do full neighbor search
Definition: TRT_SeededSpacePointFinder_ATL.h:146
Trk::EventDataBase
Base for a helper class to pass mutable storage to tools.
Definition: EventDataBase.h:17
InDet::TRT_SeededSpacePointFinder_ATL::invar_bypass_struct::max_phi
double max_phi
Definition: TRT_SeededSpacePointFinder_ATL.h:245
InDet::TRT_SeededSpacePointFinder_ATL::TRT_SeededSpacePointFinder_ATL
TRT_SeededSpacePointFinder_ATL(const std::string &, const std::string &, const IInterface *)
Standard tool methods
Definition: TRT_SeededSpacePointFinder_ATL.cxx:44
InDet::TRT_SeededSpacePointFinder_ATL::invar_bypass_struct::max_theta
double max_theta
Definition: TRT_SeededSpacePointFinder_ATL.h:245
InDet::ITRT_SeededSpacePointFinder::IEventData
Definition: ITRT_SeededSpacePointFinder.h:51
InDet::TRT_SeededSpacePointFinder_ATL::m_spacepointsPixname
SG::ReadHandleKey< SpacePointContainer > m_spacepointsPixname
Space points containers
Definition: TRT_SeededSpacePointFinder_ATL.h:194
Trk::MagneticFieldProperties
Definition: MagneticFieldProperties.h:31
InDet::TRT_SeededSpacePointFinder_ATL::EventData::m_nrf
int m_nrf
Definition: TRT_SeededSpacePointFinder_ATL.h:185
EventDataBase.h
InDet::TRT_SeededSpacePointFinder_ATL::EventData::m_sF
double m_sF
Definition: TRT_SeededSpacePointFinder_ATL.h:186
InDet::TRT_SeededSpacePointFinder_ATL::m_r_rmax
double m_r_rmax
Minimum SCT radius to be searched
Definition: TRT_SeededSpacePointFinder_ATL.h:135
ITRT_SeededSpacePointFinder.h
AtlasFieldCacheCondObj.h
InDet
DUMMY Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
TrigJetMonitorAlgorithm.ptmin
ptmin
Definition: TrigJetMonitorAlgorithm.py:1081
InDet::TRT_SeededSpacePointFinder_ATL::m_xiTC
double m_xiTC
qOverP based chi2 cut
Definition: TRT_SeededSpacePointFinder_ATL.h:143
InDet::TRT_SeededSpacePointFinder_ATL::next
const SiSpacePointsSeed * next(ITRT_SeededSpacePointFinder::IEventData &event_data) const
Iterator through seed collection.Not used in this implementation.
Definition: TRT_SeededSpacePointFinder_ATL.h:262
InDet::ITRT_SeededSpacePointFinder
Definition: ITRT_SeededSpacePointFinder.h:45
InDet::TRT_SeededSpacePointFinder_ATL::newEvent
std::unique_ptr< InDet::ITRT_SeededSpacePointFinder::IEventData > newEvent() const
Method to initialize tool for new event
Definition: TRT_SeededSpacePointFinder_ATL.cxx:132
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
InDet::TRT_SeededSpacePointFinder_ATL::EventData::m_ns
int m_ns
Definition: TRT_SeededSpacePointFinder_ATL.h:182
InDet::TRT_SeededSpacePointFinder_ATL::bypass_struct::Z
double Z
Definition: TRT_SeededSpacePointFinder_ATL.h:237
InDet::TRT_SeededSpacePointFinder_ATL::EventData::m_rf_index
int m_rf_index[530]
Definition: TRT_SeededSpacePointFinder_ATL.h:185
InDet::TRT_SeededSpacePointFinder_ATL::fillLists
void fillLists(std::vector< std::vector< const Trk::SpacePoint * > > &r_Sorted, InDet::TRT_SeededSpacePointFinder_ATL::EventData &event_data) const
Fill the space point container lists at beginning of each event.
Definition: TRT_SeededSpacePointFinder_ATL.cxx:552
InDet::TRT_SeededSpacePointFinder_ATL::m_r12min
double m_r12min
Max radius of last SCT layer
Definition: TRT_SeededSpacePointFinder_ATL.h:138
InDet::TRT_SeededSpacePointFinder_ATL::bypass_struct
Definition: TRT_SeededSpacePointFinder_ATL.h:236
InDet::TRT_SeededSpacePointFinder_ATL
Definition: TRT_SeededSpacePointFinder_ATL.h:68
InDet::MyNewDataSortPredicate
Sorting function according to space point radial position.
Definition: TRT_SeededSpacePointFinder_ATL.h:49
InDet::TRT_SeededSpacePointFinder_ATL::invar_bypass_struct::min_theta
double min_theta
Definition: TRT_SeededSpacePointFinder_ATL.h:245
InDet::TRT_SeededSpacePointFinder_ATL::EventData::buildFrameWork
void buildFrameWork(double r_rmax, double r_rstep, double ptmin)
Definition: TRT_SeededSpacePointFinder_ATL.cxx:525
SG::ReadHandleKey< SpacePointContainer >
InDet::TRT_SeededSpacePointFinder_ATL::EventData::EventData
EventData()
Definition: TRT_SeededSpacePointFinder_ATL.h:158
InDet::TRT_SeededSpacePointFinder_ATL::bypass_struct::invR
double invR
Definition: TRT_SeededSpacePointFinder_ATL.h:238
InDet::TRT_SeededSpacePointFinder_ATL::m_sctId
const SCT_ID * m_sctId
Magnetic field properties
Definition: TRT_SeededSpacePointFinder_ATL.h:127
InDet::TRT_SeededSpacePointFinder_ATL::EventData::~EventData
~EventData()
Definition: TRT_SeededSpacePointFinder_ATL.h:169
SpacePointContainer.h
InDet::TRT_SeededSpacePointFinder_ATL::~TRT_SeededSpacePointFinder_ATL
virtual ~TRT_SeededSpacePointFinder_ATL()
InDet::TRT_SeededSpacePointFinder_ATL::cutTPb
bool cutTPb(const invar_bypass_struct &invar_bypass, const std::vector< bypass_struct > &prod_bypass, long, long, double) const
Cut on chi2 based on TRT segment qOverP, theta and phi track parameters.
Definition: TRT_SeededSpacePointFinder_ATL.cxx:920
MagneticFieldProperties.h
InDet::TRT_SeededSpacePointFinder_ATL::EventData::m_rf_map
int m_rf_map[530]
Definition: TRT_SeededSpacePointFinder_ATL.h:185
InDet::TRT_SeededSpacePointFinder_ATL::m_dzdrmax
double m_dzdrmax
Min R-z direction cut
Definition: TRT_SeededSpacePointFinder_ATL.h:141
InDet::TRT_SeededSpacePointFinder_ATL::finalize
virtual StatusCode finalize()
Definition: TRT_SeededSpacePointFinder_ATL.cxx:121
InDet::TRT_SeededSpacePointFinder_ATL::m_fieldprop
Trk::MagneticFieldProperties m_fieldprop
Magnetic field mode
Definition: TRT_SeededSpacePointFinder_ATL.h:123
InDet::TRT_SeededSpacePointFinder_ATL::EventData::m_r_index
int * m_r_index
Definition: TRT_SeededSpacePointFinder_ATL.h:184
InDet::SiSpacePointsSeed
Definition: SiSpacePointsSeed.h:30
InDet::TRT_SeededSpacePointFinder_ATL::EventData::m_rf_Sorted
std::list< std::pair< const Trk::SpacePoint *, int > > m_rf_Sorted[530]
Definition: TRT_SeededSpacePointFinder_ATL.h:179
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::TRT_SeededSpacePointFinder_ATL::initialize
virtual StatusCode initialize()
Definition: TRT_SeededSpacePointFinder_ATL.cxx:90
InDet::TRT_SeededSpacePointFinder_ATL::newRegion
std::unique_ptr< InDet::ITRT_SeededSpacePointFinder::IEventData > newRegion(const std::vector< IdentifierHash > &, const std::vector< IdentifierHash > &) const
Definition: TRT_SeededSpacePointFinder_ATL.cxx:242
InDet::TRT_SeededSpacePointFinder_ATL::m_ptmin
double m_ptmin
Seed selection criteria
Definition: TRT_SeededSpacePointFinder_ATL.h:133
AthAlgTool.h
InDet::TRT_SeededSpacePointFinder_ATL::EventData::m_r_map
int * m_r_map
Definition: TRT_SeededSpacePointFinder_ATL.h:184
SpacePointOverlapCollection.h
AtlasFieldCache.h
InDet::TRT_SeededSpacePointFinder_ATL::invar_bypass_struct::invp_min2
double invp_min2
Definition: TRT_SeededSpacePointFinder_ATL.h:246
InDet::TRT_SeededSpacePointFinder_ATL::m_spacepointsSCTname
SG::ReadHandleKey< SpacePointContainer > m_spacepointsSCTname
Definition: TRT_SeededSpacePointFinder_ATL.h:195
InDet::TRT_SeededSpacePointFinder_ATL::bypass_struct::R
double R
Definition: TRT_SeededSpacePointFinder_ATL.h:238
InDet::MyNewDataSortPredicate::operator()
bool operator()(std::pair< const Trk::SpacePoint *, int > sp1, std::pair< const Trk::SpacePoint *, int > sp2) const
Definition: TRT_SeededSpacePointFinder_ATL.h:51
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
InDet::TRT_SeededSpacePointFinder_ATL::EventData::m_fNmax
int m_fNmax
Definition: TRT_SeededSpacePointFinder_ATL.h:183
Trk::ParametersBase
Definition: ParametersBase.h:55
InDet::TRT_SeededSpacePointFinder_ATL::m_search
bool m_search
phi based chi2 cut
Definition: TRT_SeededSpacePointFinder_ATL.h:145
InDet::TRT_SeededSpacePointFinder_ATL::dump
MsgStream & dump(MsgStream &out) const
Print internal tool parameters and status
Definition: TRT_SeededSpacePointFinder_ATL.cxx:511
InDet::TRT_SeededSpacePointFinder_ATL::m_fieldmode
std::string m_fieldmode
Protected data and methods
Definition: TRT_SeededSpacePointFinder_ATL.h:121
InDet::TRT_SeededSpacePointFinder_ATL::m_prdToTrackMap
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap
Definition: TRT_SeededSpacePointFinder_ATL.h:198
InDet::TRT_SeededSpacePointFinder_ATL::m_dzdrmin
double m_dzdrmin
Min radius to search for SP pairs
Definition: TRT_SeededSpacePointFinder_ATL.h:140
InDet::TRT_SeededSpacePointFinder_ATL::invar_bypass_struct::invp_max
double invp_max
Definition: TRT_SeededSpacePointFinder_ATL.h:245
InDet::TRT_SeededSpacePointFinder_ATL::geoInfo
void geoInfo(const Trk::SpacePoint *, int &, int &) const
Obtain geo model info for a specific space point
Definition: TRT_SeededSpacePointFinder_ATL.cxx:1051
InDet::TRT_SeededSpacePointFinder_ATL::invar_bypass_struct::invp_min
double invp_min
Definition: TRT_SeededSpacePointFinder_ATL.h:245
InDet::TRT_SeededSpacePointFinder_ATL::m_r2min
double m_r2min
Min radius of last SCT layer
Definition: TRT_SeededSpacePointFinder_ATL.h:139
InDet::TRT_SeededSpacePointFinder_ATL::invar_bypass_struct
Definition: TRT_SeededSpacePointFinder_ATL.h:244
InDet::TRT_SeededSpacePointFinder_ATL::EventData::erase
void erase()
Definition: TRT_SeededSpacePointFinder_ATL.cxx:592
InDet::TRT_SeededSpacePointFinder_ATL::bypass_struct::X
double X
Definition: TRT_SeededSpacePointFinder_ATL.h:237
InDet::TRT_SeededSpacePointFinder_ATL::magneticFieldInit
void magneticFieldInit()
Get magnetic field properties
Definition: TRT_SeededSpacePointFinder_ATL.cxx:1073
SG::ReadCondHandleKey< AtlasFieldCacheCondObj >
InDet::TRT_SeededSpacePointFinder_ATL::dumpConditions
MsgStream & dumpConditions(MsgStream &out) const
Protected methods
Definition: TRT_SeededSpacePointFinder_ATL.cxx:375
InDet::TRT_SeededSpacePointFinder_ATL::m_doCosmics
bool m_doCosmics
Load full Si space point container
Definition: TRT_SeededSpacePointFinder_ATL.h:147
InDet::TRT_SeededSpacePointFinder_ATL::EventData::m_newRfi_Sorted
std::list< std::pair< const Trk::SpacePoint *, int > > m_newRfi_Sorted
Definition: TRT_SeededSpacePointFinder_ATL.h:180
InDet::TRT_SeededSpacePointFinder_ATL::bypass_struct::Y
double Y
Definition: TRT_SeededSpacePointFinder_ATL.h:237
InDet::TRT_SeededSpacePointFinder_ATL::m_fieldCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Definition: TRT_SeededSpacePointFinder_ATL.h:201
InDet::TRT_SeededSpacePointFinder_ATL::m_xiFC
double m_xiFC
theta based chi2 cut
Definition: TRT_SeededSpacePointFinder_ATL.h:144
SCT_ID
Definition: SCT_ID.h:68
InDet::TRT_SeededSpacePointFinder_ATL::invar_bypass_struct::invp_max2
double invp_max2
Definition: TRT_SeededSpacePointFinder_ATL.h:246
InDet::TRT_SeededSpacePointFinder_ATL::EventData::m_r_size
int m_r_size
Definition: TRT_SeededSpacePointFinder_ATL.h:178
InDet::TRT_SeededSpacePointFinder_ATL::m_r1max
double m_r1max
Step size for space point storage
Definition: TRT_SeededSpacePointFinder_ATL.h:137
InDet::TRT_SeededSpacePointFinder_ATL::production2Spb
void production2Spb(const EventContext &ctx, const Trk::TrackParameters &, int, std::list< std::pair< const Trk::SpacePoint *, const Trk::SpacePoint * > > &outputListBuffer, InDet::TRT_SeededSpacePointFinder_ATL::EventData &event_data) const
Form possible space point combinations within allowed radial and pseudorapidity ranges.
Definition: TRT_SeededSpacePointFinder_ATL.cxx:669
InDet::TRT_SeededSpacePointFinder_ATL::m_r_rmin
double m_r_rmin
Minimum pT cut
Definition: TRT_SeededSpacePointFinder_ATL.h:134
InDet::TRT_SeededSpacePointFinder_ATL::m_r_rstep
double m_r_rstep
Maximum STC radius to be searched
Definition: TRT_SeededSpacePointFinder_ATL.h:136
InDet::TRT_SeededSpacePointFinder_ATL::dumpEvent
MsgStream & dumpEvent(MsgStream &out, InDet::TRT_SeededSpacePointFinder_ATL::EventData &event_data) const
Definition: TRT_SeededSpacePointFinder_ATL.cxx:465
InDet::TRT_SeededSpacePointFinder_ATL::EventData::m_nr
int m_nr
Definition: TRT_SeededSpacePointFinder_ATL.h:184
AthAlgTool
Definition: AthAlgTool.h:26
InDet::TRT_SeededSpacePointFinder_ATL::EventData
Definition: TRT_SeededSpacePointFinder_ATL.h:155
InDet::TRT_SeededSpacePointFinder_ATL::find2Sp
std::list< std::pair< const Trk::SpacePoint *, const Trk::SpacePoint * > > find2Sp(const EventContext &ctx, const Trk::TrackParameters &, ITRT_SeededSpacePointFinder::IEventData &event_data) const
Main method of seed production
Definition: TRT_SeededSpacePointFinder_ATL.cxx:335
InDet::TRT_SeededSpacePointFinder_ATL::bypass_struct::a
double a
Definition: TRT_SeededSpacePointFinder_ATL.h:239
InDet::TRT_SeededSpacePointFinder_ATL::invar_bypass_struct::min_phi
double min_phi
Definition: TRT_SeededSpacePointFinder_ATL.h:245
InDet::TRT_SeededSpacePointFinder_ATL::bypass_struct::b
double b
Definition: TRT_SeededSpacePointFinder_ATL.h:239