Updating info about the test script, including stuff about the CDB
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpConstants.cxx
CommitLineData
dee1d5f1 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
5f91c9e8 16// $Id$
96f021b2 17// $MpId: AliMpConstants.cxx,v 1.8 2006/01/11 10:10:31 ivana Exp $
5f91c9e8 18// Category: basic
19//
20// Class AliMpConstants
21// --------------------
22// Class for globally used constants definition.
dbe945cc 23// Included in AliRoot: 2003/05/02
5f91c9e8 24// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
25
26#include <TMath.h>
2998a151 27#include <TVector2.h>
5f91c9e8 28
29#include "AliMpConstants.h"
30
31ClassImp(AliMpConstants)
32
33// static data
973884d7 34const Double_t AliMpConstants::fgkLengthTolerance = 1e-05; // 0.1 mum;
35const Double_t AliMpConstants::fgkLengthStep = 0.1; // 1 mm;
5f91c9e8 36const Int_t AliMpConstants::fgkStartPadIndex = 1;
96f021b2 37const Int_t AliMpConstants::fgkNCh = 14;
5f91c9e8 38
39//_____________________________________________________________________________
40AliMpConstants::AliMpConstants()
dee1d5f1 41 : TObject()
42{
43/// Default constructor
5f91c9e8 44}
45
46//_____________________________________________________________________________
dee1d5f1 47AliMpConstants::~AliMpConstants()
48{
49///Destructor
5f91c9e8 50}
51
52//_____________________________________________________________________________
53Bool_t AliMpConstants::IsEqual(Double_t length1, Double_t length2)
54{
dee1d5f1 55/// Compare lengths within the length tolerance.
5f91c9e8 56
57 return TMath::Abs(length1 - length2) < fgkLengthTolerance;
58}
59
60
61//_____________________________________________________________________________
62Bool_t AliMpConstants::IsEqual(const TVector2& v1, const TVector2& v2)
63{
dee1d5f1 64/// Compare x, y vector coordinates within the length tolerance.
5f91c9e8 65
66 return ( TMath::Abs(v1.X() - v2.X())
67 + TMath::Abs(v1.Y() - v2.Y())) < 2.*fgkLengthTolerance;
68}