ATLAS Offline Software
Public Member Functions | Protected Member Functions | List of all members
InDet::SeedFitterTool Class Reference

Estimate the initial track parameters for a list of spacepoints/measurements (i.e. Track candidates), which latter can be used as input for the track fitter. The method is based on a simple linear conformal mapping. More...

#include <SeedFitterTool.h>

Inheritance diagram for InDet::SeedFitterTool:
Collaboration diagram for InDet::SeedFitterTool:

Public Member Functions

 SeedFitterTool (const std::string &, const std::string &, const IInterface *)
 
virtual std::unique_ptr< const Trk::TrackParametersfit (const std::vector< const Trk::SpacePoint * > &spacepoints) const override
 
virtual MsgStream & dump (MsgStream &out) const override
 
virtual std::ostream & dump (std::ostream &out) const override
 
MsgStream & dumpevent (MsgStream &out) const
 

Protected Member Functions

 SeedFitterTool ()=delete
 
 SeedFitterTool (const SeedFitterTool &)=delete
 
SeedFitterTooloperator= (const SeedFitterTool &)=delete
 

Detailed Description

Estimate the initial track parameters for a list of spacepoints/measurements (i.e. Track candidates), which latter can be used as input for the track fitter. The method is based on a simple linear conformal mapping.

Author
xiang.nosp@m.yang.nosp@m..ju@c.nosp@m.ern..nosp@m.ch

Definition at line 22 of file SeedFitterTool.h.

Constructor & Destructor Documentation

◆ SeedFitterTool() [1/3]

InDet::SeedFitterTool::SeedFitterTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 11 of file SeedFitterTool.cxx.

12  :
13  base_class(type, name, parent)
14 {
15  declareInterface<ISeedFitter>(this);
16 }

◆ SeedFitterTool() [2/3]

InDet::SeedFitterTool::SeedFitterTool ( )
protecteddelete

◆ SeedFitterTool() [3/3]

InDet::SeedFitterTool::SeedFitterTool ( const SeedFitterTool )
protecteddelete

Member Function Documentation

◆ dump() [1/2]

MsgStream & InDet::SeedFitterTool::dump ( MsgStream &  out) const
overridevirtual

Definition at line 120 of file SeedFitterTool.cxx.

121 {
122  out<<std::endl;
123  return dumpevent(out);
124 }

◆ dump() [2/2]

std::ostream & InDet::SeedFitterTool::dump ( std::ostream &  out) const
overridevirtual

Definition at line 126 of file SeedFitterTool.cxx.

127 {
128  return out;
129 }

◆ dumpevent()

MsgStream & InDet::SeedFitterTool::dumpevent ( MsgStream &  out) const

Definition at line 131 of file SeedFitterTool.cxx.

132 {
133  out<<"|Nothing to dump-|"
134  <<std::endl;
135  return out;
136 }

◆ fit()

std::unique_ptr< const Trk::TrackParameters > InDet::SeedFitterTool::fit ( const std::vector< const Trk::SpacePoint * > &  spacepoints) const
overridevirtual

get the first cluster on the first hit

and use the surface from this cluster as our reference plane

local x of the surface in the global frame

local y of the surface in the global frame

centre of the surface in the global frame

location of the first SP w.r.t centre of the surface

local x, y - coordinates of the first SP in the local frame

Definition at line 18 of file SeedFitterTool.cxx.

20 {
24 
27 
28  if (spacePoints.size() < 3) {
29  return nullptr;
30  }
31 
33  const Trk::PrepRawData* cl = spacePoints[0]->clusterList().first;
34  if(!cl) return nullptr;
36  const Trk::PlaneSurface* pla =
37  static_cast<const Trk::PlaneSurface*>(&cl->detectorElement()->surface());
38  if(!pla) return nullptr;
39 
40  // translate second and third SP w.r.t first one
41  double x0 = spacePoints[0]->globalPosition().x();
42  double y0 = spacePoints[0]->globalPosition().y();
43  double z0 = spacePoints[0]->globalPosition().z();
44 
45  double x1 = spacePoints[1]->globalPosition().x() - x0;
46  double y1 = spacePoints[1]->globalPosition().y() - y0;
47 
48  double x2 = spacePoints[2]->globalPosition().x() - x0;
49  double y2 = spacePoints[2]->globalPosition().y() - y0;
50  double z2 = spacePoints[2]->globalPosition().z() - z0;
51 
52  // distance of second SP to first in transverse plane
53  // Also happens to be u-coordinate of second SP in conformal mapping
54  double u1 = 1./std::sqrt(x1*x1+y1*y1);
55  // denominator for conformal mapping
56  double rn = x2*x2+y2*y2;
57  double r2 = 1./rn;
58  // coordinate system for conformal mapping - this is local x
59  double a = x1*u1;
60  double b = y1*u1;
61  // u/v-coordinate of third SP in conformal mapping
62  double u2 = (a*x2+b*y2)*r2;
63  double v2 = (a*y2-b*x2)*r2;
64  // A,B are slope and intercept of the straight line in the u,v plane
65  // connecting the three points.
66  double A = v2/(u2-u1);
67  double T = z2*sqrt(r2);
68 
69  const Amg::Transform3D& Tp = pla->transform();
70 
72  double Ax[3] = {Tp(0,0),Tp(1,0),Tp(2,0)};
74  double Ay[3] = {Tp(0,1),Tp(1,1),Tp(2,1)};
76  double D [3] = {Tp(0,3),Tp(1,3),Tp(2,3)};
78  double d[3] = {x0-D[0],y0-D[1],z0-D[2]};
79 
80  double track_paras[5];
82  track_paras[0] = d[0]*Ax[0]+d[1]*Ax[1]+d[2]*Ax[2];
83  track_paras[1] = d[0]*Ay[0]+d[1]*Ay[1]+d[2]*Ay[2];
84  track_paras[2] = std::atan2(b+a*A, a-b*A);
85  track_paras[3] = std::atan2(1.,T) ;
86  track_paras[4] = 0.001/std::sqrt(1.+T*T); // qoverp from qoverpt and theta
87 
89  "linearConformalMapping: \n" << \
90  "\nlocal x = " << track_paras[0] << \
91  "\nlocal y = " << track_paras[1] << \
92  "\nphi = " << track_paras[2] << \
93  "\ntheta = " << track_paras[3] << \
94  "\nqoverp = " << track_paras[4]);
95 
96  bool any_nan = false;
97  for (int i = 0; i < 5; i++) {
98  if (std::isnan(track_paras[i])) {
99  any_nan = true;
100  break;
101  }
102  }
103  if (any_nan){
104  ATH_MSG_DEBUG("Seed parameters contain NaN elements - skipping this track ");
105  return nullptr;
106  }
107 
108  std::unique_ptr<const Trk::TrackParameters> trkParameters(
109  pla->createUniqueTrackParameters(track_paras[0],track_paras[1],track_paras[2],track_paras[3],track_paras[4],std::nullopt));
110 
111  if (!trkParameters) {
112  ATH_MSG_DEBUG("Failed to create track parameters");
113  return nullptr;
114  }
115 
116  return trkParameters;
117 }

◆ operator=()

SeedFitterTool& InDet::SeedFitterTool::operator= ( const SeedFitterTool )
protecteddelete

The documentation for this class was generated from the following files:
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
hist_file_dump.d
d
Definition: hist_file_dump.py:137
plotBeamSpotCompare.x2
x2
Definition: plotBeamSpotCompare.py:218
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
MCP::ScaleSmearParam::r2
@ r2
makeTRTBarrelCans.y1
tuple y1
Definition: makeTRTBarrelCans.py:15
A
InDet::SeedFitterTool::dumpevent
MsgStream & dumpevent(MsgStream &out) const
Definition: SeedFitterTool.cxx:131
lumiFormat.i
int i
Definition: lumiFormat.py:85
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
makeTRTBarrelCans.y2
tuple y2
Definition: makeTRTBarrelCans.py:18
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
python.BunchSpacingUtils.rn
rn
Definition: BunchSpacingUtils.py:87
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
MuonR4::SegmentFit::ParamDefs::x0
@ x0
Trk::PrepRawData
Definition: PrepRawData.h:62
MuonR4::SegmentFit::ParamDefs::y0
@ y0
Trk::PlaneSurface::createUniqueTrackParameters
virtual Surface::ChargedTrackParametersUniquePtr createUniqueTrackParameters(double l1, double l2, double phi, double theta, double qop, std::optional< AmgSymMatrix(5)> cov=std::nullopt) const override final
Use the Surface as a ParametersBase constructor, from local parameters - charged.
Definition: PlaneSurface.cxx:149
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
ReadCellNoiseFromCoolCompare.v2
v2
Definition: ReadCellNoiseFromCoolCompare.py:364
a
TList * a
Definition: liststreamerinfos.cxx:10
Trk::PlaneSurface
Definition: PlaneSurface.h:64
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Trk::Surface::transform
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
dq_make_web_display.cl
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
Definition: dq_make_web_display.py:26
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35