1 package org.lcsim.recon.tracking.trfcyl;
2
3 import org.lcsim.recon.tracking.trfbase.Interactor;
4 import org.lcsim.recon.tracking.trfbase.ETrack;
5 import org.lcsim.recon.tracking.trfbase.TrackVector;
6 import org.lcsim.recon.tracking.trfbase.TrackError;
7 import org.lcsim.recon.tracking.trfcyl.SurfCylinder;
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 public class ThickCylMs extends Interactor
23 {
24
25 private double _pathLength;
26 private double _radLength;
27
28
29
30
31
32
33
34
35
36
37
38
39 public ThickCylMs(double pathLength, double radLength)
40 {
41 _pathLength = pathLength;
42 _radLength = radLength;
43 }
44
45
46
47
48
49
50
51 public Interactor newCopy()
52 {
53 return new ThickCylMs(_pathLength, _radLength);
54 }
55
56
57
58
59
60
61
62
63
64
65
66 public void interact(ETrack tre)
67 {
68
69
70 if(_pathLength==0 || _radLength==0) return;
71
72
73
74
75
76
77
78
79 TrackError cleanError = tre.error();
80 TrackError newError = cleanError;
81
82 TrackVector theVec = tre.vector();
83
84
85 double trackMomentum = Math.abs(theVec.get(SurfCylinder.IQPT)*Math.cos(Math.atan(theVec.get(SurfCylinder.ITLM))));
86
87
88
89 double dE = 0.01*(_pathLength/_radLength)/(trackMomentum);
90
91
92
93
94
95
96 double stdTheta = (0.0136)*trackMomentum*Math.sqrt(_pathLength/_radLength)*
97 (1 + 0.038*Math.log(_pathLength/_radLength));
98
99
100
101
102
103 double correl = Math.sqrt(3.0)/2;
104
105
106
107
108
109 double ThetaSqr = stdTheta*stdTheta;
110 double tlamSqr = theVec.get(SurfCylinder.ITLM)*theVec.get(SurfCylinder.ITLM);
111
112
113 double radius = tre.spacePoint().rxy();
114
115 double sSqr = _pathLength*_pathLength;
116 double rSqr = radius * radius;
117
118 double val = newError.get(SurfCylinder.IZ,SurfCylinder.IZ) + sSqr*ThetaSqr*(1 + tlamSqr)/3;
119 newError.set(SurfCylinder.IZ,SurfCylinder.IZ, val);
120 val = newError.get(SurfCylinder.IALF,SurfCylinder.IALF) + ThetaSqr*( (1 + tlamSqr) + sSqr/(3*rSqr) );;
121 newError.set(SurfCylinder.IALF,SurfCylinder.IALF,val);
122
123 val = newError.get(SurfCylinder.IPHI,SurfCylinder.IPHI) + sSqr*ThetaSqr/(3*rSqr);
124 newError.set(SurfCylinder.IPHI,SurfCylinder.IPHI,val);
125
126
127 val = newError.get(SurfCylinder.ITLM,SurfCylinder.ITLM) + ThetaSqr*(1 + tlamSqr)*(1 + tlamSqr);
128 newError.set(SurfCylinder.ITLM,SurfCylinder.ITLM,val);
129 val = newError.get(SurfCylinder.IQPT,SurfCylinder.IQPT) + ThetaSqr*theVec.get(SurfCylinder.IQPT)*theVec.get(SurfCylinder.IQPT)*tlamSqr;
130 newError.set(SurfCylinder.IQPT,SurfCylinder.IQPT,val);
131
132
133
134
135 val = newError.get(SurfCylinder.IZ,SurfCylinder.ITLM) + correl*Math.sqrt(ThetaSqr)*(1 + tlamSqr) * Math.sqrt( sSqr*ThetaSqr*(1 + tlamSqr)/3 );
136 newError.set(SurfCylinder.IZ,SurfCylinder.ITLM,val);
137 newError.set(SurfCylinder.ITLM,SurfCylinder.IZ,val);
138
139 val = newError.get(SurfCylinder.ITLM,SurfCylinder.IQPT) + ThetaSqr*theVec.get(SurfCylinder.ITLM)*theVec.get(SurfCylinder.IQPT)*(1.0+tlamSqr);
140 newError.set(SurfCylinder.ITLM,SurfCylinder.IQPT,val);
141 newError.set(SurfCylinder.IQPT,SurfCylinder.ITLM, val);
142
143 val = newError.get(SurfCylinder.IALF,SurfCylinder.IPHI) + correl * ThetaSqr * Math.sqrt(sSqr/(3*rSqr) * ( (1 + tlamSqr) + sSqr/(3*rSqr)) );
144 newError.set(SurfCylinder.IALF,SurfCylinder.IPHI,val);
145 newError.set(SurfCylinder.IPHI,SurfCylinder.IALF,val);
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160 tre.setError( newError );
161 }
162
163
164
165
166
167
168 public double radLength()
169 {
170 return _radLength;
171 }
172
173
174
175
176
177
178 public double pathLength()
179 {
180 return _pathLength;
181 }
182
183
184
185
186
187
188
189 public String toString()
190 {
191 return "ThickCylMs with "+_radLength+" radiation lengths and "+_pathLength+" thickness.";
192 }
193
194 }