]>
Commit | Line | Data |
---|---|---|
5f91c9e8 | 1 | // $Id$ |
2 | // Category: basic | |
3 | // | |
4 | // Class AliMpConstants | |
5 | // -------------------- | |
6 | // Class for globally used constants definition. | |
dbe945cc | 7 | // Included in AliRoot: 2003/05/02 |
5f91c9e8 | 8 | // Authors: David Guez, Ivana Hrivnacova; IPN Orsay |
9 | ||
10 | #include <TMath.h> | |
2998a151 | 11 | #include <TVector2.h> |
5f91c9e8 | 12 | |
13 | #include "AliMpConstants.h" | |
14 | ||
15 | ClassImp(AliMpConstants) | |
16 | ||
17 | // static data | |
18 | const Double_t AliMpConstants::fgkLengthTolerance = 1e-04; // 0.1 mum; | |
19 | const Double_t AliMpConstants::fgkLengthStep = 1.; // 1 mm; | |
20 | const Int_t AliMpConstants::fgkStartPadIndex = 1; | |
21 | ||
22 | //_____________________________________________________________________________ | |
23 | AliMpConstants::AliMpConstants() | |
24 | : TObject() { | |
25 | // | |
26 | } | |
27 | ||
28 | //_____________________________________________________________________________ | |
29 | AliMpConstants::~AliMpConstants() { | |
30 | // | |
31 | } | |
32 | ||
33 | //_____________________________________________________________________________ | |
34 | Bool_t AliMpConstants::IsEqual(Double_t length1, Double_t length2) | |
35 | { | |
36 | // Compares lengths within the length tolerance. | |
37 | // --- | |
38 | ||
39 | return TMath::Abs(length1 - length2) < fgkLengthTolerance; | |
40 | } | |
41 | ||
42 | ||
43 | //_____________________________________________________________________________ | |
44 | Bool_t AliMpConstants::IsEqual(const TVector2& v1, const TVector2& v2) | |
45 | { | |
46 | // Compares x, y vector coordinates within the length tolerance. | |
47 | // --- | |
48 | ||
49 | return ( TMath::Abs(v1.X() - v2.X()) | |
50 | + TMath::Abs(v1.Y() - v2.Y())) < 2.*fgkLengthTolerance; | |
51 | } |