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