]>
Commit | Line | Data |
---|---|---|
364df03a | 1 | #ifndef ALIHLTMUONCALCULATIONS_H |
2 | #define ALIHLTMUONCALCULATIONS_H | |
3 | /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //////////////////////////////////////////////////////////////////////////////// | |
9 | // | |
10 | // Author: Artur Szostak | |
11 | // Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com | |
12 | // | |
13 | //////////////////////////////////////////////////////////////////////////////// | |
14 | ||
15 | #include "AliHLTMUONDataTypes.h" | |
16 | ||
b92524d0 | 17 | /* |
18 | * Note: this class is not reentrant so thread protection must be explicit in | |
19 | * any multi-threaded usage. | |
364df03a | 20 | */ |
e6357f88 | 21 | class AliHLTMUONCalculations |
22 | { | |
23 | public: | |
24 | ||
b92524d0 | 25 | /* Computes the momentum components based on the equations given in the |
26 | ALICE dimuon spectrometer Technical Design Report (TDR-5): trigger section. | |
27 | ||
28 | Reference: | |
29 | "CERN/LHCC 2000-046 | |
30 | Addendum 1 to ALICE TDR 5 | |
31 | 15 Dec 2000" | |
32 | ||
33 | Section 3.1.2 pages 144 and 145. | |
34 | ||
35 | Input can be in meters, cm or mm. | |
36 | Output is in GeV. | |
37 | */ | |
e6357f88 | 38 | static bool ComputeMomentum( |
39 | AliHLTFloat32_t x1, | |
40 | AliHLTFloat32_t y1, AliHLTFloat32_t y2, | |
41 | AliHLTFloat32_t z1, AliHLTFloat32_t z2 | |
42 | ); | |
43 | ||
44 | static AliHLTFloat32_t Zf() { return fgZf; } | |
45 | static void Zf(AliHLTFloat32_t value) { fgZf = value; } | |
b92524d0 | 46 | static AliHLTFloat32_t QBL(); |
47 | static void QBL(AliHLTFloat32_t value); | |
e6357f88 | 48 | |
49 | static AliHLTMUONParticleSign Sign() { return fgSign; } | |
50 | static AliHLTFloat32_t Px() { return fgPx; } | |
51 | static AliHLTFloat32_t Py() { return fgPy; } | |
52 | static AliHLTFloat32_t Pz() { return fgPz; } | |
53 | ||
54 | private: | |
55 | ||
56 | // Prevent destroying or creating of this object. | |
57 | AliHLTMUONCalculations(); | |
58 | ~AliHLTMUONCalculations(); | |
59 | ||
60 | static AliHLTFloat32_t fgZf; // The Z coordinate of the middle of the dipole magnetic field. | |
b92524d0 | 61 | static AliHLTFloat32_t fgQBLScaled; // The integrated field strength times units of charge (T.m.*c/1e9) |
e6357f88 | 62 | |
63 | static AliHLTMUONParticleSign fgSign; // The calculated sign. | |
b92524d0 | 64 | static AliHLTFloat32_t fgPx; // The calculated X momentum (GeV/c). |
65 | static AliHLTFloat32_t fgPy; // The calculated Y momentum (GeV/c). | |
66 | static AliHLTFloat32_t fgPz; // The calculated Z momentum (GeV/c). | |
e6357f88 | 67 | }; |
364df03a | 68 | |
69 | #endif // ALIHLTMUONCALCULATIONS_H |