ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_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
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
42class MsgStream ;
43class SCT_ID ;
44class SiSpacePointsSeed;
45
46namespace 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
56namespace InDet{
57
65
67 virtual public ITRT_SeededSpacePointFinder, public AthAlgTool
68 {
70 // Public methods:
72
73 public:
74
76
78
80 (const std::string&,const std::string&,const IInterface*);
82 virtual StatusCode initialize();
83 virtual StatusCode finalize ();
84
86
88
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
97
98 std::list<std::pair<const Trk::SpacePoint*,const Trk::SpacePoint*> > find2Sp (const EventContext& ctx,
101
103
105
107
109
111
112 MsgStream& dump (MsgStream & out) const;
113 std::ostream& dump (std::ostream& out) const;
114
115 protected:
116
118
120
121 StringProperty m_fieldmode{this, "MagneticFieldMode", "MapSolenoid",
122 "Magnetic field mode"};
123
125
126
128 const SCT_ID* m_sctId = nullptr;
129
131
133
134 DoubleProperty m_ptmin{this, "pTmin", 500., "Minimum pT cut"};
135
136 static constexpr double m_r_rmin = 0.;
137 static constexpr double m_r_rmax = 600.;
138 static constexpr double m_r_rstep = 10.;
139 static constexpr double m_r1max = 560.;
140 static constexpr double m_r12min = 400.;
141 static constexpr double m_r2min = 340.;
142 static constexpr double m_dzdrmin = -4.;
143 static constexpr double m_dzdrmax = 4.;
144
145 DoubleProperty m_xiC{this, "Xi2C", 100., "qOverP based chi2 cut"};
146 DoubleProperty m_xiTC{this, "Xi2TC", 100., "theta based chi2 cut"};
147 DoubleProperty m_xiFC{this, "Xi2FC", 100., "phi based chi2 cut"};
148 BooleanProperty m_search{this, "NeighborSearch", true, "Do full neighbor search"};
149 BooleanProperty m_loadFull{this, "LoadFull", true,
150 "Load full Si space point container"};
151 BooleanProperty m_doCosmics{this, "DoCosmics", false,
152 "Disable seed selection cuts during reconstruction of cosmics tracks"};
153
155
157
158 class EventData;
159 class EventData : public Trk::EventDataBase<EventData,InDet::ITRT_SeededSpacePointFinder::IEventData>
160 {
162 public:
164 : m_r_size(0),
165 m_ns(0),
166 m_fNmax(0),
167 m_nr(0),
168 m_nrf(0),
169 m_sF(0.)
170 {
171 m_r_index = 0 ;
172 m_r_map = 0 ;
173 }
175 if(m_r_index) delete [] m_r_index;
176 if(m_r_map ) delete [] m_r_map ;
177 }
178
179 protected:
180 void buildFrameWork(double r_rmax, double r_rstep, double ptmin);
181 void erase(); // unused?
182
183 int m_r_size{} ;
184 std::list<std::pair<const Trk::SpacePoint*,int> > m_rf_Sorted[530] ;
185 std::list<std::pair<const Trk::SpacePoint*,int> > m_newRfi_Sorted ;
186
187 int m_ns=0 ;
188 int m_fNmax=0 ;
189 int m_nr=0 ; int* m_r_index=nullptr; int* m_r_map=nullptr ;
190 int m_nrf=0 , m_rf_index [ 530]{}, m_rf_map [ 530]{} ;
191 double m_sF{};
192
193 };
194
196
198
199 SG::ReadHandleKey<SpacePointContainer> m_spacepointsPixname {this,"SpacePointsPixelName","PixelSpacePoints","RHK to retrieve Pixel SpacePointContainer"} ;
200 SG::ReadHandleKey<SpacePointContainer> m_spacepointsSCTname {this,"SpacePointsSCTName","SCT_SpacePoints","RHK to retrieve SCT SpacePointContainer"} ;
201 SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlapname {this,"SpacePointsOverlapName","OverlapSpacePoints","RHK to retrieve OverlapCollection"} ;
204
205 // Read handle for conditions object to get the field cache
207 "fieldCondObj", "Name of the Magnetic Field conditions object key"};
208
210
212
213 MsgStream& dumpConditions(MsgStream & out) const;
214 MsgStream& dumpEvent (MsgStream & out,InDet::TRT_SeededSpacePointFinder_ATL::EventData &event_data) const;
215
216
218 void fillLists (std::vector< std::vector<const Trk::SpacePoint*> > &r_Sorted,
220
221
223
224 // // // // // // // // // // // // // // // // //
225 void production2Spb (const EventContext& ctx, const Trk::TrackParameters&,
226 int,
227 std::list<std::pair<const Trk::SpacePoint*,const Trk::SpacePoint*> > &outputListBuffer,
229 // // // // // // // // // // // // // // // // //
230
232 void geoInfo(const Trk::SpacePoint*, int&, int&) const ;
233
234
236 void magneticFieldInit();
237
238 // ptr to SP-specific data to be stored after calculated only once
239 // instead of repeating the same computations many times in the
240 // nested loop (memory allocated and deallocated in production2Spb)
242 double X{}, Y{}, Z{};
243 double R{}, invR{};
244 double a{}, b{};
245 };
246
247 // place to keep scalar values needed for cuts, common to all seeds
248 // updated only once per production2Sp call instead or each cutTPb
253
255
256 // // // // // // // // // // // // // // // // //
257 bool cutTPb(const invar_bypass_struct &invar_bypass, const std::vector<bypass_struct> &prod_bypass,long, long, double) const;
258 // // // // // // // // // // // // // // // // //
259
260 };
261
263
265
271
272} // end of name space
273
274#endif // TRT_SeededSpacePointFinder_ATL_H
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Sorting function according to space point radial position.
bool operator()(std::pair< const Trk::SpacePoint *, int > sp1, std::pair< const Trk::SpacePoint *, int > sp2) const
std::list< std::pair< const Trk::SpacePoint *, int > > m_newRfi_Sorted
std::list< std::pair< const Trk::SpacePoint *, int > > m_rf_Sorted[530]
void buildFrameWork(double r_rmax, double r_rstep, double ptmin)
std::unique_ptr< InDet::ITRT_SeededSpacePointFinder::IEventData > newEvent() const
Method to initialize tool for new event.
static constexpr double m_dzdrmax
Min R-z direction cut.
DoubleProperty m_ptmin
Seed selection criteria.
SG::ReadHandleKey< SpacePointOverlapCollection > m_spacepointsOverlapname
static constexpr double m_r_rmax
Minimum SCT radius to be searched.
static constexpr double m_r1max
Step size for space point storage.
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.
static constexpr double m_dzdrmin
Min radius to search for SP pairs.
const SCT_ID * m_sctId
Magnetic field properties.
SG::ReadHandleKey< SpacePointContainer > m_spacepointsPixname
Space points containers.
TRT_SeededSpacePointFinder_ATL(const std::string &, const std::string &, const IInterface *)
Standard tool methods.
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap
static constexpr double m_r2min
Min radius of last SCT layer.
void magneticFieldInit()
Get magnetic field properties.
const SiSpacePointsSeed * next(ITRT_SeededSpacePointFinder::IEventData &event_data) const
Iterator through seed collection.Not used in this implementation.
SG::ReadHandleKey< SpacePointContainer > m_spacepointsSCTname
static constexpr double m_r12min
Max radius of last SCT layer.
void geoInfo(const Trk::SpacePoint *, int &, int &) const
Obtain geo model info for a specific space point.
MsgStream & dumpConditions(MsgStream &out) const
Protected methods.
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.
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.
MsgStream & dumpEvent(MsgStream &out, InDet::TRT_SeededSpacePointFinder_ATL::EventData &event_data) const
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.
static constexpr double m_r_rstep
Maximum STC radius to be searched.
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
std::unique_ptr< InDet::ITRT_SeededSpacePointFinder::IEventData > newRegion(const std::vector< IdentifierHash > &, const std::vector< IdentifierHash > &) const
StringProperty m_fieldmode
Protected data and methods.
SiSpacePointsSeedMakerEventData EventData
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
Property holding a SG store/key/clid from which a ReadHandle is made.
Base for a helper class to pass mutable storage to tools.
magnetic field properties to steer the behavior of the extrapolation
int r
Definition globals.cxx:22
Primary Vertex Finder.
ParametersBase< TrackParametersDim, Charged > TrackParameters
-event-from-file