ATLAS Offline Software
Loading...
Searching...
No Matches
TrigInDetTrackHelper Class Reference

#include <TrigInDetTrackHelper.h>

Collaboration diagram for TrigInDetTrackHelper:

Public Member Functions

 TrigInDetTrackHelper (const TrigInDetTrackFitPar *par)
 ~TrigInDetTrackHelper ()
void extrapolate (double rC, double zC, double &phiC, double &etaC) const

Private Attributes

const TrigInDetTrackFitParm_param

Detailed Description

Definition at line 12 of file TrigInDetTrackHelper.h.

Constructor & Destructor Documentation

◆ TrigInDetTrackHelper()

TrigInDetTrackHelper::TrigInDetTrackHelper ( const TrigInDetTrackFitPar * par)
inline

Definition at line 15 of file TrigInDetTrackHelper.h.

15: m_param(par) {}
const TrigInDetTrackFitPar * m_param

◆ ~TrigInDetTrackHelper()

TrigInDetTrackHelper::~TrigInDetTrackHelper ( )
inline

Definition at line 16 of file TrigInDetTrackHelper.h.

16{};

Member Function Documentation

◆ extrapolate()

void TrigInDetTrackHelper::extrapolate ( double rC,
double zC,
double & phiC,
double & etaC ) const

Definition at line 10 of file TrigInDetTrackHelper.cxx.

10 {
11/*----------------------------------------------------------------------*
12
13 * pt (I) : pt *
14 * pz (I) : pz *
15 * q (I) : charge *
16 * phi0 (I) : phi of dirn vec at closest approach to (0,0) *
17 * d0 (I) : dist. (mm) of close appr. to (0,0) in xy plane *
18 * z0 (I) : z at r=d0 (mm) *
19 * rC (I) : radius of Cylinder (mm) *
20 * zC (I) : half-length in z of Cylinder (mm) *
21 * phiC (O) : phi of track at (rC, zC) *
22 * etaC (O) : eta of track at (rC, zC) *
23 * *
24 * Note : looping tracks are not treated correctly, phiC is set twopi *
25 * *
26 * Author : John Baines Date : 12/11/97 *
27 * from an original concept by Simon George *
28 * *
29 *----------------------------------------------------------------------*/
30#define BFIELD 2.0
31 double Rcurv{0}, r{0}, z{0}, xD{0}, xN{0}, dphi{0};
32
33 double pt = m_param->pT();
34 double eta = m_param->eta();
35 double q = 1.;
36 if (pt < 0) q = -1.;
37 double theta = 2.*atan(exp(-fabs(eta)));
38 double pz = fabs(pt) / tan(theta);
39 if (eta < 0) pz = -pz;
40 double d0 = m_param->a0();
41 double z0 = m_param->z0();
42 double phi0 = m_param->phi0();
43
44 phiC = 0;
45 etaC = 0;
46 if (rC > 0 && fabs(zC) > 0 && pt != 0 && fabs(z0) < zC) {
47
48 /* r, z of intersection with cylinder */
49
50 z = z0 + pz * (rC - fabs(d0)) / fabs(pt);
51 if (fabs(z) > fabs(zC)) {
52 /* track passes through the end of the cylinder */
53 if (z > 0) z = fabs(zC); else z = -fabs(zC);
54 r = fabs(d0) + (z - z0) * fabs(pt) / pz;
55 r = fabs(r); /* NOT SURE IF -ve r is handled correctly */
56 } else r = rC; /* hits barrel of cylinder */
57
58 theta = atan2(r, fabs(z)) / 2.;
59 if (z > 0) etaC = -log(tan(theta));
60 else etaC = log(tan(theta));
61
62 /* Now calculate phiC */
63
64 if (q == 0) { /* Neutral Track */
65 if (fabs(d0) <= r) phiC = phi0 - asin(fabs(d0)/r);
66 } else { /* Charged track */
67 Rcurv = fabs(pt)/(0.3*BFIELD);
68 xD = 2. * r*(Rcurv + d0);
69 if (xD != 0) {
70 xN = d0 * d0 + r * r + 2. * Rcurv * d0;
71 if (fabs(xN)/fabs(xD) > 1) {
72 /* trajectory does not reach r, track loops
73 ***temporary set dphi to 0 for this case */
74 phiC = 2. * M_PI;
75 } else {
76 dphi = q*acos(xN/xD);
77 /* two solutions from the 2 intersections of the 2 circles,
78 but phi0 defines a direction a direction, so the first solution
79 should be the one we want....*/
80 phiC = phi0 - q*M_PI_2 + dphi;
81 }
82 } else phiC = 0; /* means track is orbiting the origin */
83
84 }
85 /* fold back into -pi to pi */
86 while (phiC > M_PI) phiC = phiC - 2. * M_PI;
87 while (phiC < -M_PI) phiC = phiC + 2. * M_PI;
88 }
89}
#define M_PI
Scalar eta() const
pseudorapidity method
Scalar theta() const
theta method
#define BFIELD
#define z
int r
Definition globals.cxx:22

Member Data Documentation

◆ m_param

const TrigInDetTrackFitPar* TrigInDetTrackHelper::m_param
private

Definition at line 25 of file TrigInDetTrackHelper.h.


The documentation for this class was generated from the following files: