ATLAS Offline Software
SiSpacePointsSeedMaker_Cosmic.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
5 */
6 
8 // Header file for class SiSpacePointsSeedMaker_Cosmic
10 // Version 1.0 3/10/2004 I.Gavrilenko
12 
13 #ifndef SiSpacePointsSeedMaker_Cosmic_H
14 #define SiSpacePointsSeedMaker_Cosmic_H
15 
18 
24 
25 #include <iosfwd>
26 #include <list>
27 #include <vector>
29 // MagField cache
33 
34 class MsgStream;
35 
36 namespace InDet {
37 
38  using EventData = SiSpacePointsSeedMakerEventData;
39 
52  public extends<AthAlgTool, ISiSpacePointsSeedMaker>
53  {
55  // Public methods:
57 
58  public:
59 
63 
65  (const std::string&, const std::string&, const IInterface*);
66  virtual ~SiSpacePointsSeedMaker_Cosmic() = default;
67  virtual StatusCode initialize() override;
68  virtual StatusCode finalize() override;
70 
74 
75  virtual void newEvent (const EventContext& ctx, EventData& data, int iteration) const override;
76  virtual void newRegion(const EventContext& ctx, EventData& data,
77  const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT) const override;
78  virtual void newRegion(const EventContext& ctx, EventData& data,
79  const std::vector<IdentifierHash>& vPixel, const std::vector<IdentifierHash>& vSCT,
80  const IRoiDescriptor& iRD) const override;
82 
86 
87 
89  virtual void find2Sp(EventData& data, const std::list<Trk::Vertex>& lv) const override;
90 
92  virtual void find3Sp(const EventContext& ctx, EventData& data, const std::list<Trk::Vertex>& lv) const override;
93 
96  virtual void find3Sp(const EventContext& ctx, EventData& data, const std::list<Trk::Vertex>& lv, const double* zVertex) const override;
97 
100  virtual void findVSp(const EventContext& ctx, EventData& data, const std::list<Trk::Vertex>& lv) const override;
102 
107 
108  virtual const SiSpacePointsSeed* next(const EventContext& ctx, EventData& data) const override;
110 
111  virtual void writeNtuple(const SiSpacePointsSeed* seed, const Trk::Track* track, int seedType, long eventNumber) const override;
112 
113  virtual bool getWriteNtupleBoolProperty() const override;
114 
118 
119  virtual MsgStream& dump(EventData& data, MsgStream& out) const override;
121 
122  private:
124  enum Size {SizeRF=53,
125  SizeZ=11,
127  SizeI=12};
128 
130  // Private data and methods
132 
134 
135  SG::ReadHandleKey<SpacePointContainer> m_spacepointsSCT{this, "SpacePointsSCTName", "SCT_SpacePoints"};
136  SG::ReadHandleKey<SpacePointContainer> m_spacepointsPixel{this, "SpacePointsPixelName", "PixelSpacePoints"};
137  SG::ReadHandleKey<SpacePointOverlapCollection> m_spacepointsOverlap{this, "SpacePointsOverlapName", "OverlapSpacePoints"};
138  SG::ReadHandleKey<Trk::PRDtoTrackMap>m_prdToTrackMap{this,"PRDtoTrackMap","","option PRD-to-track association"};
139  // Read handle for conditions object to get the field cache
140  SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj",
141  "Name of the Magnetic Field conditions object key"};
143 
145 
146  BooleanProperty m_pixel{this, "usePixel", true};
147  BooleanProperty m_sct{this, "useSCT", true};
148  BooleanProperty m_useOverlap{this, "useOverlapSpCollection", false};
149  IntegerProperty m_maxsize{this, "maxSize", 100};
150  IntegerProperty m_maxsizeSP{this, "maxSizeSP", 1500};
151  FloatProperty m_drmin{this, "mindRadius", 5.};
152  FloatProperty m_drmax{this, "maxdRadius", 1000.};
153  FloatProperty m_r_rmax{this, "radMax", 600.};
154  FloatProperty m_r_rstep{this, "radStep", 5.};
156 
158 
159  FloatProperty m_ptmin{this, "pTmin", 500.};
160  FloatProperty m_etamax{this, "etaMax", 2.3};
161  FloatProperty m_fieldScale{this, "fieldScale", 1.};
163 
165 
166  bool m_initialized{false};
168  int m_r_size{};
169  int m_fNmax{};
170  int m_rfz_b[SizeRFZ]{};
171  int m_rfz_t[SizeRFZ]{};
174  float m_dzdrmin{};
175  float m_dzdrmax{};
176  float m_sF{};
178 
180  // Private methods
183 
188 
189  MsgStream& dumpConditions(MsgStream& out) const;
190  static MsgStream& dumpEvent(EventData& data, MsgStream& out) ;
191 
192  void buildFrameWork();
193 
195  (EventData& data, const Trk::SpacePoint*const&) ;
197  (EventData& data, const Trk::SpacePoint*const&, const float*) ;
198  void newSeed
199  (EventData& data,
200  const Trk::SpacePoint*&,const Trk::SpacePoint*&,
201  const float&) const;
202  void newSeed
203  (EventData& data,
204  const Trk::SpacePoint*&,const Trk::SpacePoint*&,
205  const Trk::SpacePoint*&,const float&) const;
206  void fillLists(EventData& data) const;
207  static void erase(EventData& data) ;
208  static void production2Sp(EventData& data) ;
209  void production3Sp(const EventContext& ctx, EventData& data) const;
210  void production3Sp
211  (EventData& data,
216  int,int,float,float) const;
217 
220  (EventData& data,
225  int,int,float) const;
226 
227  bool isUsed(const Trk::SpacePoint*, const Trk::PRDtoTrackMap &prd_to_track_map) const;
228 
229  void initializeEventData(EventData& data) const;
230  };
231 
232 } // end of name space
233 
234 
235 namespace InDet {
236 
237  inline
238  bool InDet::SiSpacePointsSeedMaker_Cosmic::isUsed(const Trk::SpacePoint* sp, const Trk::PRDtoTrackMap &prd_to_track_map) const {
239  const Trk::PrepRawData* d = sp->clusterList().first;
240  if (!d || !prd_to_track_map.isUsed(*d)) return false;
241 
242  d = sp->clusterList().second;
243  if (!d || prd_to_track_map.isUsed(*d)) return true;
244 
245  return false;
246 
247  }
248 }
249 
250 #endif // SiSpacePointsSeedMaker_Cosmic_H
Trk::SpacePoint::clusterList
const std::pair< const PrepRawData *, const PrepRawData * > & clusterList() const
return the pair of cluster pointers by reference
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:127
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
SiSpacePointsSeedMakerEventData.h
InDet::SiSpacePointsSeedMaker_Cosmic::finalize
virtual StatusCode finalize() override
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:73
Trk::SpacePoint
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePoint.h:35
PRDtoTrackMap.h
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
InDet::SiSpacePointsSeedMaker_Cosmic::m_etamax
FloatProperty m_etamax
Definition: SiSpacePointsSeedMaker_Cosmic.h:160
InDet::SiSpacePointsSeedMaker_Cosmic::initializeEventData
void initializeEventData(EventData &data) const
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:1145
InDet::SiSpacePointForSeed
Definition: SiSpacePointForSeed.h:30
InDet::SiSpacePointsSeedMaker_Cosmic::production3Sp
void production3Sp(const EventContext &ctx, EventData &data) const
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:662
InDet::SiSpacePointsSeedMaker_Cosmic::next
virtual const SiSpacePointsSeed * next(const EventContext &ctx, EventData &data) const override
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:1022
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
InDet::SiSpacePointsSeedMaker_Cosmic::SiSpacePointsSeedMaker_Cosmic
SiSpacePointsSeedMaker_Cosmic()=delete
InDet::SiSpacePointsSeedMaker_Cosmic::m_fieldScale
FloatProperty m_fieldScale
Definition: SiSpacePointsSeedMaker_Cosmic.h:161
Trk::PRDtoTrackMap
Definition: PRDtoTrackMap.h:17
AtlasFieldCacheCondObj.h
InDet::SiSpacePointsSeedMaker_Cosmic::SizeRFZ
@ SizeRFZ
Definition: SiSpacePointsSeedMaker_Cosmic.h:126
InDet::SiSpacePointsSeedMaker_Cosmic::dumpConditions
MsgStream & dumpConditions(MsgStream &out) const
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:401
hist_file_dump.d
d
Definition: hist_file_dump.py:137
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
InDet::SiSpacePointsSeedMaker_Cosmic::m_rfz_it
int m_rfz_it[SizeRFZ][SizeI]
Definition: SiSpacePointsSeedMaker_Cosmic.h:173
InDet::SiSpacePointsSeedMaker_Cosmic::m_r_rmax
FloatProperty m_r_rmax
Definition: SiSpacePointsSeedMaker_Cosmic.h:153
InDet::SiSpacePointsSeedMaker_Cosmic::operator=
SiSpacePointsSeedMaker_Cosmic & operator=(const SiSpacePointsSeedMaker_Cosmic &)=delete
InDet::SiSpacePointsSeedMaker_Cosmic::findVSp
virtual void findVSp(const EventContext &ctx, EventData &data, const std::list< Trk::Vertex > &lv) const override
with variable number space points with or without vertex constraint Variable means (2,...
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:357
InDet::SiSpacePointsSeedMaker_Cosmic::m_spacepointsSCT
SG::ReadHandleKey< SpacePointContainer > m_spacepointsSCT
Definition: SiSpacePointsSeedMaker_Cosmic.h:135
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
InDet::SiSpacePointsSeedMaker_Cosmic::dumpEvent
static MsgStream & dumpEvent(EventData &data, MsgStream &out)
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:458
InDet::SiSpacePointsSeedMaker_Cosmic::m_useOverlap
BooleanProperty m_useOverlap
Definition: SiSpacePointsSeedMaker_Cosmic.h:148
InDet::SiSpacePointsSeedMaker_Cosmic::initialize
virtual StatusCode initialize() override
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:36
InDet::SiSpacePointsSeedMaker_Cosmic::m_drmax
FloatProperty m_drmax
Definition: SiSpacePointsSeedMaker_Cosmic.h:152
InDet::SiSpacePointsSeedMaker_Cosmic::m_fNmax
int m_fNmax
Definition: SiSpacePointsSeedMaker_Cosmic.h:169
SG::ReadHandleKey< SpacePointContainer >
InDet::SiSpacePointsSeedMaker_Cosmic::m_pixel
BooleanProperty m_pixel
Definition: SiSpacePointsSeedMaker_Cosmic.h:146
InDet::SiSpacePointsSeedMaker_Cosmic::buildFrameWork
void buildFrameWork()
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:480
InDet::SiSpacePointsSeedMaker_Cosmic
Definition: SiSpacePointsSeedMaker_Cosmic.h:53
InDet::SiSpacePointsSeedMaker_Cosmic::m_dzdrmin
float m_dzdrmin
Definition: SiSpacePointsSeedMaker_Cosmic.h:174
InDet::SiSpacePointsSeedMaker_Cosmic::newSpacePoint
static SiSpacePointForSeed * newSpacePoint(EventData &data, const Trk::SpacePoint *const &)
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:1037
SpacePointContainer.h
InDet::SiSpacePointsSeedMaker_Cosmic::~SiSpacePointsSeedMaker_Cosmic
virtual ~SiSpacePointsSeedMaker_Cosmic()=default
InDet::SiSpacePointsSeedMaker_Cosmic::newEvent
virtual void newEvent(const EventContext &ctx, EventData &data, int iteration) const override
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:82
InDet::SiSpacePointsSeedMaker_Cosmic::isUsed
bool isUsed(const Trk::SpacePoint *, const Trk::PRDtoTrackMap &prd_to_track_map) const
Definition: SiSpacePointsSeedMaker_Cosmic.h:238
InDet::SiSpacePointsSeedMaker_Cosmic::m_rfz_b
int m_rfz_b[SizeRFZ]
Definition: SiSpacePointsSeedMaker_Cosmic.h:170
InDet::SiSpacePointsSeedMaker_Cosmic::SizeZ
@ SizeZ
Definition: SiSpacePointsSeedMaker_Cosmic.h:125
InDet::SiSpacePointsSeedMaker_Cosmic::erase
static void erase(EventData &data)
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:621
InDet::SiSpacePointsSeedMaker_Cosmic::m_r_size
int m_r_size
Definition: SiSpacePointsSeedMaker_Cosmic.h:168
InDet::SiSpacePointsSeedMaker_Cosmic::dump
virtual MsgStream & dump(EventData &data, MsgStream &out) const override
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:389
InDet::SiSpacePointsSeedMaker_Cosmic::m_sct
BooleanProperty m_sct
Definition: SiSpacePointsSeedMaker_Cosmic.h:147
InDet::SiSpacePointsSeedMaker_Cosmic::SizeRF
@ SizeRF
Definition: SiSpacePointsSeedMaker_Cosmic.h:124
InDet::SiSpacePointsSeedMaker_Cosmic::m_initialized
bool m_initialized
Definition: SiSpacePointsSeedMaker_Cosmic.h:166
InDet::SiSpacePointsSeedMaker_Cosmic::m_ptmin
FloatProperty m_ptmin
Definition: SiSpacePointsSeedMaker_Cosmic.h:159
InDet::SiSpacePointsSeed
Definition: SiSpacePointsSeed.h:30
InDet::SiSpacePointsSeedMaker_Cosmic::SiSpacePointsSeedMaker_Cosmic
SiSpacePointsSeedMaker_Cosmic(const SiSpacePointsSeedMaker_Cosmic &)=delete
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
IRoiDescriptor
Describes the API of the Region of Ineterest geometry.
Definition: IRoiDescriptor.h:23
SiSpacePointForSeed.h
AthAlgTool.h
SpacePointOverlapCollection.h
AtlasFieldCache.h
EventData
Definition: Trigger/TrigAccel/TrigCudaFitter/src/EventData.h:11
InDet::SiSpacePointsSeedMaker_Cosmic::m_fieldCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Definition: SiSpacePointsSeedMaker_Cosmic.h:140
InDet::SiSpacePointsSeedMaker_Cosmic::m_spacepointsPixel
SG::ReadHandleKey< SpacePointContainer > m_spacepointsPixel
Definition: SiSpacePointsSeedMaker_Cosmic.h:136
InDet::SiSpacePointsSeedMaker_Cosmic::m_prdToTrackMap
SG::ReadHandleKey< Trk::PRDtoTrackMap > m_prdToTrackMap
Definition: SiSpacePointsSeedMaker_Cosmic.h:138
InDet::SiSpacePointsSeedMaker_Cosmic::m_rfz_ib
int m_rfz_ib[SizeRFZ][SizeI]
Definition: SiSpacePointsSeedMaker_Cosmic.h:172
xAOD::eventNumber
eventNumber
Definition: EventInfo_v1.cxx:124
Trk::PRDtoTrackMap::isUsed
bool isUsed(const PrepRawData &prd) const
does this PRD belong to at least one track?
InDet::SiSpacePointsSeedMaker_Cosmic::find2Sp
virtual void find2Sp(EventData &data, const std::list< Trk::Vertex > &lv) const override
with two space points with or without vertex constraint
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:279
Trk::PrepRawData
Definition: PrepRawData.h:62
ISiSpacePointsSeedMaker.h
InDet::SiSpacePointsSeedMaker_Cosmic::m_maxsizeSP
IntegerProperty m_maxsizeSP
Definition: SiSpacePointsSeedMaker_Cosmic.h:150
InDet::SiSpacePointsSeedMaker_Cosmic::newSeed
void newSeed(EventData &data, const Trk::SpacePoint *&, const Trk::SpacePoint *&, const float &) const
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:1088
InDet::SiSpacePointsSeedMaker_Cosmic::SizeI
@ SizeI
Definition: SiSpacePointsSeedMaker_Cosmic.h:127
InDet::SiSpacePointsSeedMaker_Cosmic::production3SpWithoutField
void production3SpWithoutField(EventData &data) const
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:729
InDet::SiSpacePointsSeedMaker_Cosmic::production2Sp
static void production2Sp(EventData &data)
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:653
InDet::SiSpacePointsSeedMaker_Cosmic::m_maxsize
IntegerProperty m_maxsize
Definition: SiSpacePointsSeedMaker_Cosmic.h:149
InDet::SiSpacePointsSeedMaker_Cosmic::m_rfz_t
int m_rfz_t[SizeRFZ]
Definition: SiSpacePointsSeedMaker_Cosmic.h:171
SG::ReadCondHandleKey< AtlasFieldCacheCondObj >
InDet::SiSpacePointsSeedMaker_Cosmic::getWriteNtupleBoolProperty
virtual bool getWriteNtupleBoolProperty() const override
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:1160
InDet::SiSpacePointsSeedMaker_Cosmic::fillLists
void fillLists(EventData &data) const
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:577
InDet::SiSpacePointsSeedMaker_Cosmic::m_drmin
FloatProperty m_drmin
Definition: SiSpacePointsSeedMaker_Cosmic.h:151
InDet::SiSpacePointsSeedMaker_Cosmic::m_r_rstep
FloatProperty m_r_rstep
Definition: SiSpacePointsSeedMaker_Cosmic.h:154
InDet::SiSpacePointsSeedMaker_Cosmic::find3Sp
virtual void find3Sp(const EventContext &ctx, EventData &data, const std::list< Trk::Vertex > &lv) const override
with three space points with or without vertex constraint
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:315
InDet::SiSpacePointsSeedMaker_Cosmic::newRegion
virtual void newRegion(const EventContext &ctx, EventData &data, const std::vector< IdentifierHash > &vPixel, const std::vector< IdentifierHash > &vSCT) const override
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:184
InDet::SiSpacePointsSeedMaker_Cosmic::Size
Size
enum for array sizes
Definition: SiSpacePointsSeedMaker_Cosmic.h:124
InDet::SiSpacePointsSeedMaker_Cosmic::writeNtuple
virtual void writeNtuple(const SiSpacePointsSeed *seed, const Trk::Track *track, int seedType, long eventNumber) const override
Definition: SiSpacePointsSeedMaker_Cosmic.cxx:1157
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
InDet::SiSpacePointsSeedMaker_Cosmic::m_outputlevel
int m_outputlevel
Definition: SiSpacePointsSeedMaker_Cosmic.h:167
InDet::SiSpacePointsSeedMaker_Cosmic::m_spacepointsOverlap
SG::ReadHandleKey< SpacePointOverlapCollection > m_spacepointsOverlap
Definition: SiSpacePointsSeedMaker_Cosmic.h:137
InDet::SiSpacePointsSeedMaker_Cosmic::m_dzdrmax
float m_dzdrmax
Definition: SiSpacePointsSeedMaker_Cosmic.h:175
InDet::SiSpacePointsSeedMaker_Cosmic::m_sF
float m_sF
Definition: SiSpacePointsSeedMaker_Cosmic.h:176