ATLAS Offline Software
Loading...
Searching...
No Matches
TrigInDetTrackFollowingTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRIGINDETTRACKFITTER_TRIGINDETTRACKFOLLOWINGTOOL_H
6#define TRIGINDETTRACKFITTER_TRIGINDETTRACKFOLLOWINGTOOL_H
7
9#include "GaudiKernel/ToolHandle.h"
10#include "GaudiKernel/ServiceHandle.h"
11
14
15// MagField cache
18
21
22namespace Trk {
23 class PrepRawData;
24 class PlaneSurface;
25 class SpacePoint;
26}
27
33
34TrigFTF_HitAssignment(const Trk::PrepRawData* p, double const* X, double const* C, double dchi2, int ndof) : m_pPRD(p), m_dchi2(dchi2), m_ndof(ndof) {
35 if(m_pPRD!=nullptr) {
36 memcpy(&m_Xk[0], X, sizeof(m_Xk));
37 memcpy(&m_Ck[0], C, sizeof(m_Ck));
38 }
39 else {
40 memset(&m_Xk[0], 0, sizeof(m_Xk));
41 memset(&m_Ck[0], 0, sizeof(m_Ck));
42 }
43}
44
46 double m_Xk[5];
47 double m_Ck[15];
48 double m_dchi2;
49 int m_ndof;
50};
51
53
57
58 TrigFTF_ExtendedTrackState(double const*, const Trk::PlaneSurface*);
59
60 void AddHole();
61 void AddHit(const Trk::PrepRawData*, double, int);
62 void SwapTheEnds();
63 void correctAngles();
64 void report() const;
65
66 double m_Xk[10];
67 double m_Gk[10][10];
68 double m_chi2;
69 double m_ndof;
70
71 const Trk::PlaneSurface* m_pS;//moving plane - the "head"
72 const Trk::PlaneSurface* m_pO;//initial plane- the "tail"
73
74 std::list<TrigFTF_HitAssignment> m_track;
75
78
80
81};
82
84{
85 public:
86 TrigInDetTrackFollowingTool( const std::string&, const std::string&, const IInterface* );
87 virtual StatusCode initialize();
88 virtual StatusCode finalize();
89
90 virtual Trk::Track* getTrack(const std::vector<const Trk::SpacePoint*>&, const std::vector<const InDetDD::SiDetectorElement*>&, const EventContext&) const;
91
92private:
93
94 ToolHandle<ITrigL2LayerNumberTool> m_layerNumberTool {this, "LayerNumberTool", "TrigL2LayerNumberToolITk"};
95
96 std::unique_ptr<TrigFTF_ExtendedTrackState> fitTheSeed(const std::vector<const Trk::SpacePoint*>&, MagField::AtlasFieldCache&) const;
97
100
102
103 int RungeKutta34(double*, double*, const Trk::PlaneSurface*, MagField::AtlasFieldCache&, bool) const;
104
105 bool tentativeExtrapolation(double const*, double*, const Trk::PlaneSurface*, const Trk::PlaneSurface*, MagField::AtlasFieldCache&) const;
106
107 inline double processHit(const InDet::PixelCluster*, double*, double*, const TrigFTF_ExtendedTrackState&) const;
108 inline double processHit(const InDet::SCT_Cluster*, int, double&, double&, double*, const TrigFTF_ExtendedTrackState&) const;
109
110 inline void findNearestHit(int, const InDet::PixelClusterCollection*, const double*, std::vector<std::tuple<double, const Trk::PrepRawData*, int> >&) const;
111 inline void findNearestHit(int, const InDet::SCT_ClusterCollection*, int, const double*, std::vector<std::tuple<double, const Trk::PrepRawData*, int> >&) const;
112
113 inline void crossProduct(double const *, double const *, double*) const;
114
115 double estimateRK_Step(const Trk::PlaneSurface*, double const *) const;
116
117 Gaudi::Property<int> m_nClustersMin {this, "nClustersMin", 7, "Minimum number of clusters on track"};
118 Gaudi::Property<int> m_nHolesMax {this, "nHolesMax", 100, "Maximum number of holes on track"};
119 Gaudi::Property<double> m_maxChi2Dist_Pixels {this, "Chi2MaxPixels", 25.0, "the Pixel hit chi2 cut"};
120 Gaudi::Property<double> m_maxChi2Dist_Strips {this, "Chi2MaxStrips", 12.0, "the Strip hit chi2 cut"};
121
122 Gaudi::Property<double> m_winX_Pixels {this, "XSearchWindowPixels", 3.0, "x-size of hit search window for Pixels"};
123 Gaudi::Property<double> m_winY_Pixels {this, "YSearchWindowPixels", 3.0, "y-size of hit search window for Pixels"};
124 Gaudi::Property<double> m_winX_Strips {this, "XSearchWindowStrips", 3.0, "x-size of hit search window for Strips"};
125
126 Gaudi::Property<bool> m_useHitErrors {this, "UseHitErrors", false, "use PrepRawData errors"};
127 Gaudi::Property<bool> m_useDetectorThickness {this, "UseDetectorThickness", false, "get Si-modules thickness from InDet Geometry"};
128 Gaudi::Property<double> m_nominalRadLength {this, "ModuleRadLength", 0.04, "fixed radiation thickness of the detector modules"};
129
130 SG::ReadCondHandleKey<AtlasFieldCacheCondObj> m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj", "Name of the Magnetic Field conditions object key"};
131 SG::ReadHandleKey<InDet::PixelClusterContainer> m_pixcontainerkey{this, "PixelClusterContainer","ITkPixelClusters"};
132 SG::ReadHandleKey<InDet::SCT_ClusterContainer> m_sctcontainerkey{this, "SCT_ClusterContainer", "ITkStripClusters"};
133
134};
135
136#endif
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Local cache for magnetic field (based on MagFieldServices/AtlasFieldSvcTLS.h)
Property holding a SG store/key/clid from which a ReadHandle is made.
Gaudi::Property< double > m_winX_Pixels
int extrapolateTrackState(TrigFTF_ExtendedTrackState &, const Trk::PlaneSurface *, MagField::AtlasFieldCache &) const
std::unique_ptr< TrigFTF_ExtendedTrackState > fitTheSeed(const std::vector< const Trk::SpacePoint * > &, MagField::AtlasFieldCache &) const
void findNearestHit(int, const InDet::PixelClusterCollection *, const double *, std::vector< std::tuple< double, const Trk::PrepRawData *, int > > &) const
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_sctcontainerkey
SG::ReadHandleKey< InDet::PixelClusterContainer > m_pixcontainerkey
double processHit(const InDet::PixelCluster *, double *, double *, const TrigFTF_ExtendedTrackState &) const
TrigInDetTrackFollowingTool(const std::string &, const std::string &, const IInterface *)
Gaudi::Property< double > m_winX_Strips
int RungeKutta34(double *, double *, const Trk::PlaneSurface *, MagField::AtlasFieldCache &, bool) const
const Trk::PrepRawData * updateTrackState(const InDet::PixelCluster *, TrigFTF_ExtendedTrackState &, bool) const
double estimateRK_Step(const Trk::PlaneSurface *, double const *) const
ToolHandle< ITrigL2LayerNumberTool > m_layerNumberTool
Gaudi::Property< double > m_nominalRadLength
void crossProduct(double const *, double const *, double *) const
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Gaudi::Property< double > m_winY_Pixels
Gaudi::Property< double > m_maxChi2Dist_Strips
bool tentativeExtrapolation(double const *, double *, const Trk::PlaneSurface *, const Trk::PlaneSurface *, MagField::AtlasFieldCache &) const
virtual Trk::Track * getTrack(const std::vector< const Trk::SpacePoint * > &, const std::vector< const InDetDD::SiDetectorElement * > &, const EventContext &) const
Gaudi::Property< double > m_maxChi2Dist_Pixels
Gaudi::Property< bool > m_useDetectorThickness
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
struct color C
Ensure that the ATLAS eigen extensions are properly loaded.
void AddHit(const Trk::PrepRawData *, double, int)
std::list< TrigFTF_HitAssignment > m_track
TrigFTF_ExtendedTrackState & operator=(const TrigFTF_ExtendedTrackState &)=delete
const Trk::PrepRawData * m_pPRD
TrigFTF_HitAssignment(const Trk::PrepRawData *p, double const *X, double const *C, double dchi2, int ndof)
TrigFTF_HitAssignment(const TrigFTF_HitAssignment &)=delete
TrigFTF_HitAssignment & operator=(const TrigFTF_HitAssignment &)=delete
TrigFTF_HitAssignment()=delete