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 */
8 ////////////////////////////////////////////////////////////////////////////////
10 // Author: Artur Szostak
11 // Email: artur@alice.phy.uct.ac.za | artursz@iafrica.com
13 ////////////////////////////////////////////////////////////////////////////////
15 #include "AliHLTMUONDataTypes.h"
18 * Note: this class uses static global variables so thread protection must be
19 * explicit in any multi-threaded usage.
21 class AliHLTMUONCalculations
25 /* Computes the momentum components based on the equations given in the
26 ALICE dimuon spectrometer Technical Design Report (TDR-5): trigger section.
30 Addendum 1 to ALICE TDR 5
33 Section 3.1.2 pages 144 and 145.
35 Input can be in meters, cm or mm.
38 static bool ComputeMomentum(
40 AliHLTFloat32_t y1, AliHLTFloat32_t y2,
41 AliHLTFloat32_t z1, AliHLTFloat32_t z2
44 static AliHLTFloat32_t Zf() { return fgZf; }
45 static void Zf(AliHLTFloat32_t value) { fgZf = value; }
46 static AliHLTFloat32_t QBL();
47 static void QBL(AliHLTFloat32_t value);
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; }
54 /// Calculates the invariant mass for a pair of particles.
55 static AliHLTFloat32_t ComputeMass(
56 AliHLTFloat32_t massA,
60 AliHLTFloat32_t massB,
68 // Prevent destroying or creating of this object.
69 AliHLTMUONCalculations();
70 ~AliHLTMUONCalculations();
72 static AliHLTFloat32_t fgZf; // The Z coordinate of the middle of the dipole magnetic field.
73 static AliHLTFloat32_t fgQBLScaled; // The integrated field strength times units of charge (T.m.*c/1e9)
75 static AliHLTMUONParticleSign fgSign; // The calculated sign.
76 static AliHLTFloat32_t fgPx; // The calculated X momentum (GeV/c).
77 static AliHLTFloat32_t fgPy; // The calculated Y momentum (GeV/c).
78 static AliHLTFloat32_t fgPz; // The calculated Z momentum (GeV/c).
81 #endif // ALIHLTMUONCALCULATIONS_H