GFEnergyLossCoulomb.h
Go to the documentation of this file.
1 /* Copyright 2008-2009, Technische Universitaet Muenchen,
2  Authors: Christian Hoeppner & Sebastian Neubert
3 
4  This file is part of GENFIT.
5 
6  GENFIT is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  GENFIT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 /** @addtogroup RKTrackRep
21  * @{
22  */
23 
24 #ifndef GFENERGYLOSSCOULOMB_H
25 #define GFENERGYLOSSCOULOMB_H
26 
27 #include"GFAbsEnergyLoss.h"
28 
29 
30 /** @brief Multiple scattering due to coulomb interaction
31  *
32  * @author Christian H&ouml;ppner (Technische Universit&auml;t M&uuml;nchen, original author)
33  * @author Sebastian Neubert (Technische Universit&auml;t M&uuml;nchen, original author)
34  * @author Johannes Rauch (Technische Universit&auml;t M&uuml;nchen, author)
35  *
36  *
37  *
38  *
39  *
40  */
41 namespace genf {
42 
44  public:
45  //! Optional calculation of multiple scattering
46  /** Only multiple scattering is calculated, the returned value for the energy loss is always 0.
47  * With the calculated multiple scattering angle, two noise matrices are calculated:
48  * - with respect to #directionBefore: #noiseBefore, which is then propagated with the jacobian
49  * - with respect to #directionAfter: #noiseAfter
50  * The mean value of these two matrices is added to the noise matrix #noise.
51  * This method gives better results than either calculating only noiseBefore or noiseAfter.
52  * \n\n
53  * This is a detailed description of the mathematics involved:
54  * \n
55  *
56  *
57  *
58  * We define a local coordinate system cs' with initial momentum in z-direction:
59  * \f[
60  * \left(\begin{array}{c}
61  * x'\\
62  * y'\\
63  * z'\\
64  * a_{x}'\\
65  * a_{y}'\\
66  * a_{z}'\\
67  * \frac{q}{p}'\end{array}\right)=\left(\begin{array}{ccccccc}
68  * \cos\psi & \sin\psi & 0\\
69  * -\cos\vartheta\sin\psi & \cos\vartheta\cos\psi & \sin\psi\\
70  * \sin\vartheta\sin\psi & -\sin\vartheta\cos\psi & \cos\vartheta\\
71  * & & & \cos\psi & \sin\psi & 0\\
72  * & & & -\cos\vartheta\sin\psi & \cos\vartheta\cos\psi & \sin\psi\\
73  * & & & \sin\vartheta\sin\psi & -\sin\vartheta\cos\psi & \cos\vartheta\\
74  * & & & & & & 1\end{array}\right)\left(\begin{array}{c}
75  * x\\
76  * y\\
77  * z\\
78  * a_{x}\\
79  * a_{y}\\
80  * a_{z}\\
81  * \frac{q}{p}\end{array}\right)=R^{T}\left(\begin{array}{c}
82  * x\\
83  * y\\
84  * z\\
85  * a_{x}\\
86  * a_{y}\\
87  * a_{z}\\
88  * \frac{q}{p}\end{array}\right)\f]
89  *
90  * \n
91  *
92  * Now the global coordinate system cs is:\n
93  * \f[
94  * \left(\begin{array}{c}
95  * x\\
96  * y\\
97  * z\\
98  * a_{x}\\
99  * a_{y}\\
100  * a_{z}\\
101  * \frac{q}{p}\end{array}\right)=\left(\begin{array}{ccccccc}
102  * \cos\psi & -\cos\vartheta\sin\psi & \sin\vartheta\sin\psi\\
103  * \sin\psi & \cos\vartheta\cos\psi & -\sin\vartheta\cos\psi\\
104  * 0 & \sin\psi & \cos\vartheta\\
105  * & & & \cos\psi & -\cos\vartheta\sin\psi & \sin\vartheta\sin\psi\\
106  * & & & \sin\psi & \cos\vartheta\cos\psi & -\sin\vartheta\cos\psi\\
107  * & & & 0 & \sin\psi & \cos\vartheta\\
108  * & & & & & & 1\end{array}\right)\left(\begin{array}{c}
109  * x'\\
110  * y'\\
111  * z'\\
112  * a_{x}'\\
113  * a_{y}'\\
114  * a_{z}'\\
115  * \frac{q}{p}'\end{array}\right)=R\left(\begin{array}{c}
116  * x'\\
117  * y'\\
118  * z'\\
119  * a_{x}'\\
120  * a_{y}'\\
121  * a_{z}'\\
122  * \frac{q}{p}'\end{array}\right) \f]
123  *
124  * \n
125  *
126  *
127  * with the Euler angles
128  *
129  * \f{eqnarray*}
130  * \psi & = &
131  * \begin{cases}
132  * \begin{cases}
133  * \frac{\pi}{2} & a_{x} \geq 0 \\
134  * \frac{3\pi}{2} & a_{x} < 0
135  * \end{cases}
136  * & a_{y}=0 \mbox{ resp. } |a_{y}|<10^{-14} \\
137  * - \arctan \frac{a_{x}}{a_{y}} & a_{y} < 0 \\
138  * \pi - \arctan \frac{a_{x}}{a_{y}} & a_{y} > 0
139  * \end{cases} \\
140  * \vartheta & = & \arccos a_{z}
141  * \f}
142  *
143  * \n
144  * \f$M\f$ is the multiple scattering error-matrix in the \f$\theta\f$ coordinate system.
145  * \f$\theta_{1/2}=0\f$ are the multiple scattering angles. There is only an error in direction
146  * (which later leads to an error in position, when \f$N_{before}\f$ is propagated with \f$T\f$).
147  * \f[
148  * M=\left(\begin{array}{cc}
149  * \sigma^{2} & 0\\
150  * 0 & \sigma^{2}\end{array}\right)\f]
151  *
152  * \n
153  * This translates into the noise matrix \f$\overline{M}\f$ in the local cs' via jacobian J.
154  * The mean scattering angle is always 0, this means that \f$\theta_{1/2}=0\f$):
155  *
156  * \f{eqnarray*}
157  * x' & = & x'\\
158  * y' & = & y'\\
159  * z' & = & z'\\
160  * a_{x}' & = & \sin\theta_{1}\\
161  * a_{y}' & = & \sin\theta_{2}\\
162  * a_{z}' & = & \sqrt{1-\sin^{2}\theta_{1}-\sin^{2}\theta_{2}}\\
163  * \frac{q}{p}' & = & \frac{q}{p}'\f}
164  *
165  *
166  *
167  * \f[
168  * M=\left(\begin{array}{cc}
169  * \sigma^{2} & 0\\
170  * 0 & \sigma^{2}\end{array}\right)\f]
171  *
172  * \n
173  *
174  * \f[
175  * J=\frac{\partial\left(x',y',z',a_{x}',a_{y}',a_{z}',\frac{q}{p}'\right)}{\partial\left(\theta_{1},\theta_{2}\right)}\f]
176  *
177  * \n
178  *
179  * \f[
180  * J=\left(\begin{array}{cc}
181  * 0 & 0\\
182  * 0 & 0\\
183  * 0 & 0\\
184  * \cos\theta_{1} & 0\\
185  * 0 & \cos\theta_{2}\\
186  * -\frac{\cos\theta_{1}\sin\theta_{1}}{\sqrt{\cos^{2}\theta_{1}-\sin^{2}\theta_{2}}} & -\frac{\cos\theta_{2}\sin\theta_{2}}{\sqrt{\cos^{2}\theta_{1}-\sin^{2}\theta_{2}}}\\
187  * 0 & 0\end{array}\right) \overset{\theta_{1/2}=0}{=} \left(\begin{array}{cc}
188  * 0 & 0\\
189  * 0 & 0\\
190  * 0 & 0\\
191  * 1 & 0\\
192  * 0 & 1\\
193  * 0 & 0\\
194  * 0 & 0\end{array}\right)\f]
195  * \n
196  *
197  * \f[
198  * \overline{M}=J\: M\: J^{T}=\left(\begin{array}{ccccccc}
199  * 0 & 0 & 0 & 0 & 0 & 0 & 0\\
200  * 0 & 0 & 0 & 0 & 0 & 0 & 0\\
201  * 0 & 0 & 0 & 0 & 0 & 0 & 0\\
202  * 0 & 0 & 0 & \sigma^{2} & 0 & 0 & 0\\
203  * 0 & 0 & 0 & 0 & \sigma^{2} & 0 & 0\\
204  * 0 & 0 & 0 & 0 & 0 & 0 & 0\\
205  * 0 & 0 & 0 & 0 & 0 & 0 & 0\end{array}\right)\f]
206  *
207  *
208  * The following transformation brings the noise matrix into the global coordinate system cs, resulting in \f$N\f$ :
209  *
210  *\f[
211  * N=R\overline{M}R^{T}=\sigma^{2}\left(\begin{array}{ccccccc}
212  * 0 & 0 & 0 & 0 & 0 & 0 & 0\\
213  * 0 & 0 & 0 & 0 & 0 & 0 & 0\\
214  * 0 & 0 & 0 & 0 & 0 & 0 & 0\\
215  * 0 & 0 & 0 & \cos^{2}\psi+\cos^{2}\theta-\cos^{2}\theta\cos^{2}\psi & \cos\psi\sin\psi\sin^{2}\theta & -\cos\theta\sin\psi\sin\theta & 0\\
216  * 0 & 0 & 0 & \cos\psi\sin\psi\sin^{2}\theta & \sin^{2}\psi+\cos^{2}\theta\cos^{2}\psi & \cos\theta\cos\psi\sin\theta & 0\\
217  * 0 & 0 & 0 & -\cos\theta\sin\psi\sin\theta & \cos\theta\cos\psi\sin\theta & \sin^{2}\theta & 0\\
218  * 0 & 0 & 0 & 0 & 0 & 0 & 0\end{array}\right)\f]
219  *
220  *
221  *
222  * \n
223  *
224  *
225  * Now two \f$N\f$ are calculated: \f$N_{before}\f$ (at the start point, with initial direction #directionBefore)
226  * and \f$N_{after}\f$ (at the final point, with direction #directionAfter).
227  * \f$N_{before}\f$ is the propagated with the #jacobian of extrapolation \f$T\f$.
228  * The new covariance matrix with multiple scattering in global cs is:
229  *
230  * \f{eqnarray*}
231  * C_{new} & = C_{old} + 0.5 \cdot T N_{before} T^{T} + 0.5 \cdot N_{after} \f}
232  *
233  *
234  * \n
235  * \n
236  * See also: Track following in dense media and inhomogeneous magnetic fields,
237  * A.Fontana, P.Genova, L.Lavezzi and A.Rotondi;
238  * PANDA Report PV/01-07
239  * \n
240  * \n
241  */
242  double energyLoss(const double& step,
243  const double& mom,
244  const int& pdg,
245  const double& matDensity,
246  const double& matZ,
247  const double& matA,
248  const double& radiationLength,
249  const double& meanExcitationEnergy,
250  const bool& doNoise = false,
251  TMatrixT<Double_t>* noise = NULL,
252  const TMatrixT<Double_t>* jacobian = NULL,
253  const TVector3* directionBefore = NULL,
254  const TVector3* directionAfter = NULL);
255  virtual ~GFEnergyLossCoulomb();
256 
257  // public:
258  //ClassDef(GFEnergyLossCoulomb,1);
259 
260 };
261 
262 } // namespace genf
263 
264 #endif
265 
266 /** @} */
267 
Generic Interface to magnetic fields in GENFIT.
Definition: GFAbsBField.h:35
double energyLoss(const double &step, const double &mom, const int &pdg, const double &matDensity, const double &matZ, const double &matA, const double &radiationLength, const double &meanExcitationEnergy, const bool &doNoise=false, TMatrixT< Double_t > *noise=NULL, const TMatrixT< Double_t > *jacobian=NULL, const TVector3 *directionBefore=NULL, const TVector3 *directionAfter=NULL)
Optional calculation of multiple scattering.