]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpConstants.cxx
Mapping test macros (D. Guez, I. Hrivnacova)
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpConstants.cxx
CommitLineData
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
15ClassImp(AliMpConstants)
16
17// static data
18const Double_t AliMpConstants::fgkLengthTolerance = 1e-04; // 0.1 mum;
19const Double_t AliMpConstants::fgkLengthStep = 1.; // 1 mm;
20const Int_t AliMpConstants::fgkStartPadIndex = 1;
21
22//_____________________________________________________________________________
23AliMpConstants::AliMpConstants()
24 : TObject() {
25//
26}
27
28//_____________________________________________________________________________
29AliMpConstants::~AliMpConstants() {
30//
31}
32
33//_____________________________________________________________________________
34Bool_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//_____________________________________________________________________________
44Bool_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}