AliRoot Core  edcc906 (edcc906)
AliMpConstants.cxx
Go to the documentation of this file.
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 
16 // $Id$
17 // $MpId: AliMpConstants.cxx,v 1.11 2006/05/24 13:58:29 ivana Exp $
18 // Category: basic
19 
20 //-----------------------------------------------------------------------------
21 // Class AliMpConstants
22 // --------------------
23 // Class for globally used constants definition.
24 // Included in AliRoot: 2003/05/02
25 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
26 //-----------------------------------------------------------------------------
27 
28 #include "AliMpConstants.h"
29 
30 #include <TMath.h>
31 
33 ClassImp(AliMpConstants)
35 
36 // static data
37 const Double_t AliMpConstants::fgkLengthTolerance = 1e-05; // 0.1 mum
38 const Double_t AliMpConstants::fgkLengthStep = 0.1; // 1 mm
39 const Int_t AliMpConstants::fgkStartPadIndex = 1;
40 const Int_t AliMpConstants::fgkNofCathodes = 2;
41 const Int_t AliMpConstants::fgkNofChambers = 14;
42 const Int_t AliMpConstants::fgkNofTrackingChambers = 10;
43 const Int_t AliMpConstants::fgkNofGeomModules = 20;
44 const Int_t AliMpConstants::fgkNofLocalBoards = 234;
45 const Int_t AliMpConstants::fgkTotalNofLocalBoards = 242;
46 const Int_t AliMpConstants::fgkNonBendingManuMask(1<<10);
47 const Int_t AliMpConstants::fgkManuNofChannels(64);
48 const Int_t AliMpConstants::fgkLocalBoardNofChannels(16);
49 
50 //_____________________________________________________________________________
52  : TObject()
53 {
55 }
56 
57 //_____________________________________________________________________________
59 {
61 }
62 
63 //_____________________________________________________________________________
64 Bool_t AliMpConstants::IsEqual(Double_t length1, Double_t length2)
65 {
67 
68  return TMath::Abs(length1 - length2) < fgkLengthTolerance;
69 }
70 
71 //_____________________________________________________________________________
72 Bool_t AliMpConstants::IsEqual(Double_t v1x, Double_t v1y,
73  Double_t v2x, Double_t v2y)
74 {
76 
77  return ( TMath::Abs(v1x - v2x)
78  + TMath::Abs(v1y - v2y)) < 2.*fgkLengthTolerance;
79 }
80 
81 //_____________________________________________________________________________
83 {
85 
86  return ( planeType == AliMp::kNonBendingPlane ) ? fgkNonBendingManuMask : 0;
87 }
88 
89 //_____________________________________________________________________________
91 {
93 
95 }
static const Int_t fgkNonBendingManuMask
bit to set to indicate a manu located in non-bending plane
virtual ~AliMpConstants()
static const Int_t fgkNofChambers
number of chambers
static const Int_t fgkNofTrackingChambers
number of tracking chambers
non-bending plane
static Bool_t IsEqual(Double_t length1, Double_t length2)
static const Double_t fgkLengthTolerance
the length precision for tests
Globally used constants definition.
static Int_t ManuMask(AliMp::PlaneType planeType)
static Int_t NofTriggerChambers()