]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/MUONmapping/AliMpConstants.cxx
Fixes for object target dependencies
[u/mrichter/AliRoot.git] / MUON / MUONmapping / 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$
13985652 17// $MpId: AliMpConstants.cxx,v 1.11 2006/05/24 13:58:29 ivana Exp $
5f91c9e8 18// Category: basic
3d1463c8 19
20//-----------------------------------------------------------------------------
5f91c9e8 21// Class AliMpConstants
22// --------------------
23// Class for globally used constants definition.
dbe945cc 24// Included in AliRoot: 2003/05/02
5f91c9e8 25// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
3d1463c8 26//-----------------------------------------------------------------------------
5f91c9e8 27
5f91c9e8 28#include "AliMpConstants.h"
29
d08b9187 30#include <TMath.h>
5f91c9e8 31
13985652 32/// \cond CLASSIMP
33ClassImp(AliMpConstants)
34/// \endcond
35
5f91c9e8 36// static data
d08b9187 37const Double_t AliMpConstants::fgkLengthTolerance = 1e-05; // 0.1 mum
38const Double_t AliMpConstants::fgkLengthStep = 0.1; // 1 mm
5f91c9e8 39const Int_t AliMpConstants::fgkStartPadIndex = 1;
6ebccce6 40const Int_t AliMpConstants::fgkNofCathodes = 2;
185ce53f 41const Int_t AliMpConstants::fgkNofChambers = 14;
6061eac6 42const Int_t AliMpConstants::fgkNofTrackingChambers = 10;
185ce53f 43const Int_t AliMpConstants::fgkNofGeomModules = 20;
fa09302e 44const Int_t AliMpConstants::fgkNofLocalBoards = 234;
6a906d1e 45const Int_t AliMpConstants::fgkTotalNofLocalBoards = 242;
35a22829 46const Int_t AliMpConstants::fgkNonBendingManuMask(1<<10);
47const Int_t AliMpConstants::fgkManuNofChannels(64);
48const Int_t AliMpConstants::fgkLocalBoardNofChannels(16);
d08b9187 49
5f91c9e8 50//_____________________________________________________________________________
51AliMpConstants::AliMpConstants()
dee1d5f1 52 : TObject()
53{
54/// Default constructor
5f91c9e8 55}
56
57//_____________________________________________________________________________
dee1d5f1 58AliMpConstants::~AliMpConstants()
59{
60///Destructor
5f91c9e8 61}
62
63//_____________________________________________________________________________
64Bool_t AliMpConstants::IsEqual(Double_t length1, Double_t length2)
65{
dee1d5f1 66/// Compare lengths within the length tolerance.
5f91c9e8 67
68 return TMath::Abs(length1 - length2) < fgkLengthTolerance;
69}
70
5f91c9e8 71//_____________________________________________________________________________
6e97fbb8 72Bool_t AliMpConstants::IsEqual(Double_t v1x, Double_t v1y,
73 Double_t v2x, Double_t v2y)
5f91c9e8 74{
dee1d5f1 75/// Compare x, y vector coordinates within the length tolerance.
5f91c9e8 76
6e97fbb8 77 return ( TMath::Abs(v1x - v2x)
78 + TMath::Abs(v1y - v2y)) < 2.*fgkLengthTolerance;
5f91c9e8 79}
d08b9187 80
81//_____________________________________________________________________________
fa09302e 82Int_t AliMpConstants::ManuMask(AliMp::PlaneType planeType)
d08b9187 83{
f5671fc3 84/// The manuIDs get an offset if they are in the non-bending plane
85
cddd101e 86 return ( planeType == AliMp::kNonBendingPlane ) ? fgkNonBendingManuMask : 0;
d08b9187 87}
fa09302e 88
89//_____________________________________________________________________________
90Int_t AliMpConstants::NofTriggerChambers()
91{
92/// Return number of trigger chambers
93
94 return fgkNofChambers - fgkNofTrackingChambers;
95}