1 package org.lcsim.recon.tracking.spacegeom;
2
3
4
5
6
7
8
9 public class SphericalPointVector extends SpacePointVector
10 {
11
12
13
14
15
16
17
18
19
20
21 public SphericalPointVector(double r, double phi, double theta, double vr, double vtheta, double vphi)
22 {
23 super(new SphericalPoint(r,phi,theta));
24 _vx = sinTheta()*cosPhi()*vr
25 + cosTheta()*cosPhi()*vtheta - sinPhi()*vphi;
26 _vy = sinTheta()*sinPhi()*vr
27 + cosTheta()*sinPhi()*vtheta + cosPhi()*vphi;
28 _vz = cosTheta()*vr - sinTheta()*vtheta;
29 }
30
31
32
33
34
35
36
37
38 public SphericalPointVector(SpacePoint spt, double vr, double vtheta, double vphi)
39 {
40 super(spt);
41 _vx = sinTheta()*cosPhi()*vr
42 + cosTheta()*cosPhi()*vtheta - sinPhi()*vphi;
43 _vy = sinTheta()*sinPhi()*vr
44 + cosTheta()*sinPhi()*vtheta + cosPhi()*vphi;
45 _vz = cosTheta()*vr - sinTheta()*vtheta;
46 }
47 }