1 package org.lcsim.recon.tracking.trfcyl;
2
3
4 import org.lcsim.recon.tracking.trfbase.Interactor;
5 import org.lcsim.recon.tracking.trfbase.ETrack;
6 import org.lcsim.recon.tracking.trfbase.PropDir;
7 import org.lcsim.recon.tracking.trfbase.TrackVector;
8 import org.lcsim.recon.tracking.trfbase.TrackError;
9
10
11
12
13
14
15
16
17
18
19
20
21 public class ThinCylMs extends Interactor
22 {
23
24 private double _radLength;
25
26
27
28
29
30
31
32
33
34
35
36 public ThinCylMs(double radLength)
37 {
38 _radLength = radLength;
39 }
40
41
42
43
44
45
46
47
48
49
50
51
52 public void interact(ETrack tre)
53 {
54
55
56 TrackError cleanError = tre.error();
57 TrackError newError = cleanError;
58
59
60
61
62
63
64
65 TrackVector theVec = tre.vector();
66 double trackMomentum = Math.abs(theVec.get(SurfCylinder.IQPT)*Math.cos(Math.atan(theVec.get(SurfCylinder.ITLM))));
67
68 double trueLength = _radLength/Math.abs(Math.cos(theVec.get(SurfCylinder.IALF)))*Math.sqrt(1.0 +
69 theVec.get(SurfCylinder.ITLM)*theVec.get(SurfCylinder.ITLM));
70
71 double stdTheta = (0.0136)*trackMomentum*Math.sqrt(trueLength)*
72 (1 + 0.038*Math.log(trueLength));
73
74
75
76
77
78
79
80
81 double stdThetaSqr = stdTheta*stdTheta;
82 double tlamSqr = theVec.get(SurfCylinder.ITLM)*theVec.get(SurfCylinder.ITLM);
83
84
85 double val = newError.get(SurfCylinder.IALF,SurfCylinder.IALF)+stdThetaSqr*(1 + tlamSqr);
86 newError.set(SurfCylinder.IALF,SurfCylinder.IALF,val);
87
88 val = newError.get(SurfCylinder.ITLM,SurfCylinder.ITLM) + stdThetaSqr*(1 + tlamSqr)*(1 + tlamSqr);
89 newError.set(SurfCylinder.ITLM,SurfCylinder.ITLM,val);
90
91 val = newError.get(SurfCylinder.IQPT,SurfCylinder.IQPT)+stdThetaSqr*theVec.get(SurfCylinder.IQPT)*theVec.get(SurfCylinder.IQPT)*tlamSqr;
92 newError.set(SurfCylinder.IQPT,SurfCylinder.IQPT,val);
93 val = newError.get(SurfCylinder.ITLM,SurfCylinder.IQPT) + stdThetaSqr*theVec.get(SurfCylinder.ITLM)*theVec.get(SurfCylinder.IQPT) * (1.0 + tlamSqr);
94
95 newError.set(SurfCylinder.ITLM,SurfCylinder.IQPT,val);
96 newError.set(SurfCylinder.IQPT,SurfCylinder.ITLM,val);
97
98
99
100 tre.setError( newError );
101
102 }
103
104
105 public void interact_dir(ETrack theTrack, PropDir direction )
106 {
107 interact(theTrack);
108 }
109
110
111
112
113
114
115
116
117 public double radLength()
118 {
119 return _radLength;
120 }
121
122
123
124
125
126
127
128
129 public Interactor newCopy()
130 {
131 return new ThinCylMs(_radLength);
132 }
133
134
135
136
137
138
139
140
141 public String toString()
142 {
143 return "ThinCylMs with "+_radLength+" radiation lengths.";
144 }
145
146 }
147