#include <TrackTrajectory.h>
Collaboration diagram for Atlfast::TrackTrajectory:
Public Methods | |
TrackTrajectory () | |
Default Constructor. | |
TrackTrajectory (TrackParameters,::HepPoint3D, double) | |
Explicit Constructor. | |
TrackTrajectory (const Hep3Vector &p, const Hep3Vector &vertex, double charge, double bField) | |
Constructor from a 3-momentum, vertex, charge and magnetic field. | |
TrackTrajectory (const TrackTrajectory &src) | |
Copy Constructor. | |
~TrackTrajectory () | |
Destructor. | |
TrackTrajectory & | operator= (const TrackTrajectory &src) |
Assignment. | |
TrackParameters | parameters () const |
int | signOfCharge () const |
HepPoint3D | startPoint () const |
double | radius () const |
double | curvature () const |
Private Attributes | |
TrackParameters | m_parameters |
::HepPoint3D | m_startPoint |
double | m_curvature |
Definition at line 36 of file TrackTrajectory.h.
|
Default Constructor.
Definition at line 48 of file TrackTrajectory.h.
00048 {} |
|
Explicit Constructor.
Definition at line 92 of file TrackTrajectory.cxx.
00095 : 00096 m_parameters(p), m_startPoint(startPoint), m_curvature(curvature) 00097 { } |
|
Constructor from a 3-momentum, vertex, charge and magnetic field.
Definition at line 116 of file TrackTrajectory.cxx. References m_curvature, m_parameters, m_startPoint, and radius().
00122 { 00123 double pt = momentum.perp(); 00124 double q = charge; 00125 q /= abs(q); // q = |1| 00126 00127 // calculate helix radius of curvature and centre 00128 00129 double radius = pt/(2*0.00149898*bField); 00130 double x0 = vertex.x() + q*radius*sin(momentum.phi()); 00131 double y0 = vertex.y() - q*radius*cos(momentum.phi()); 00132 Hep3Vector hCentre(x0,y0); 00133 00134 // calculate parameters 00135 // Tidier version of Fortran code zvhepa.F - Tarta 00136 00137 double impactParameter = -q*(hCentre.perp() - radius); 00138 double theta = momentum.theta(); 00139 double cotTheta = 1/tan(theta); 00140 double eta = momentum.pseudoRapidity(); 00141 double zPerigee; 00142 double phi; 00143 00144 // Calculate Phi 00145 00146 if (abs(vertex.x()) < 1e-4 && abs(vertex.y()) < 1e-4) 00147 {phi = momentum.phi();} else 00148 {if ( (vertex.phi() - hCentre.phi()) > 0 ) 00149 { phi = hCentre.phi() + M_PI/2; } else 00150 { phi = hCentre.phi() - M_PI/2;} } 00151 00152 double x1 = sin(phi)*q*hCentre.perp()/(radius*radius); 00153 double y1 = -cos(phi)*q*hCentre.perp()/(radius*radius); 00154 if (x1*x0 < 0 || y1*y0 < 0) {phi += M_PI;} 00155 if (phi < 0) {phi += 2.*M_PI;} else 00156 { if(phi > 2.*M_PI) {phi -= 2.*M_PI;} } 00157 00158 // z of perigee 00159 00160 double dot = vertex.x()*momentum.x() + vertex.y()*momentum.y(); 00161 double dotsign = dot/abs(dot) ; 00162 double dV = (vertex.perp()*vertex.perp()) - 00163 (impactParameter*impactParameter); 00164 double denom = hCentre.perp()/radius; 00165 00166 // NAN protection 00167 if (dV < 0) {dV = 0;} 00168 if (abs(dotsign)!=1) dotsign=0; 00169 00170 zPerigee = vertex.z() - (2*q*radius)*dotsign*cotTheta* 00171 asin((sqrt(dV/(denom)))*q/(2*radius) ); 00172 00173 // set parameters 00174 m_parameters = TrackParameters 00175 (eta, phi, pt, impactParameter, zPerigee, cotTheta, q/pt ); 00176 m_startPoint = HepPoint3D(vertex); 00177 m_curvature = radius; 00178 } |
|
Copy Constructor.
Definition at line 100 of file TrackTrajectory.cxx.
00101 { 00102 (*this) = other; 00103 } |
|
Destructor.
Definition at line 113 of file TrackTrajectory.cxx.
00113 {} |
|
Definition at line 189 of file TrackTrajectory.cxx. References m_curvature. Referenced by Atlfast::operator<<().
00190 { return m_curvature ; } |
|
Assignment.
Definition at line 105 of file TrackTrajectory.cxx. References m_curvature, m_parameters, and m_startPoint.
00105 { 00106 m_parameters = other.m_parameters ; 00107 m_startPoint = other.m_startPoint; 00108 m_curvature = other.m_curvature; 00109 return *this ; 00110 } |
|
Definition at line 181 of file TrackTrajectory.cxx. References m_parameters. Referenced by Atlfast::operator<<().
00181 { 00182 return m_parameters; 00183 } |
|
Definition at line 186 of file TrackTrajectory.cxx. References m_startPoint. Referenced by Atlfast::operator<<(), and TrackTrajectory().
00187 { return m_startPoint.perp() ; } |
|
Definition at line 192 of file TrackTrajectory.cxx. References Atlfast::TrackParameters::invPtCharge(), and m_parameters.
00193 { return int( abs(m_parameters.invPtCharge() )/m_parameters.invPtCharge() ) ; } |
|
Definition at line 184 of file TrackTrajectory.cxx. References m_startPoint.
00185 { return m_startPoint ; } |
|
Definition at line 43 of file TrackTrajectory.h. Referenced by curvature(), operator=(), and TrackTrajectory(). |
|
Definition at line 41 of file TrackTrajectory.h. Referenced by operator=(), parameters(), signOfCharge(), and TrackTrajectory(). |
|
Definition at line 42 of file TrackTrajectory.h. Referenced by operator=(), radius(), startPoint(), and TrackTrajectory(). |