12 const std::string&
type,
const std::string&
name,
const IInterface*
parent):
15 declareInterface<ISeedFitter>(
this);
19 const std::vector<const Trk::SpacePoint*>& spacePoints)
const
28 if (spacePoints.size() < 3) {
34 if(!
cl)
return nullptr;
38 if(!pla)
return nullptr;
41 double x0 = spacePoints[0]->globalPosition().x();
42 double y0 = spacePoints[0]->globalPosition().y();
43 double z0 = spacePoints[0]->globalPosition().z();
45 double x1 = spacePoints[1]->globalPosition().x() - x0;
46 double y1 = spacePoints[1]->globalPosition().y() - y0;
48 double x2 = spacePoints[2]->globalPosition().x() - x0;
49 double y2 = spacePoints[2]->globalPosition().y() - y0;
50 double z2 = spacePoints[2]->globalPosition().z() -
z0;
54 double u1 = 1./std::sqrt(
x1*
x1+
y1*
y1);
62 double u2 = (
a*
x2+
b*
y2)*r2;
66 double A =
v2/(u2-u1);
67 double T = z2*sqrt(r2);
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]};
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);
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]);
97 for (
int i = 0;
i < 5;
i++) {
98 if (std::isnan(track_paras[
i])) {
104 ATH_MSG_WARNING(
"Seed parameters contain NaN elements - skipping this track ");
108 std::unique_ptr<const Trk::TrackParameters> trkParameters(
111 if (!trkParameters) {
116 return trkParameters;
133 out<<
"|Nothing to dump-|"