]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/mapping/AliMpConstants.cxx
added headers needed for compilation
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpConstants.cxx
index fc57fb29aca31a0b641bb91c06e1ed6a21ae8277..eb7b774320f4848f53b23b87e87bc5f46a261308 100755 (executable)
 // $Id$
 // $MpId: AliMpConstants.cxx,v 1.11 2006/05/24 13:58:29 ivana Exp $
 // Category: basic
-//
+
+//-----------------------------------------------------------------------------
 // Class AliMpConstants
 // --------------------
 // Class for globally used constants definition.
 // Included in AliRoot: 2003/05/02
 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+//-----------------------------------------------------------------------------
 
 #include "AliMpConstants.h"
 
 #include <TMath.h>
-#include <TVector2.h>
 
 /// \cond CLASSIMP
 ClassImp(AliMpConstants)
@@ -36,9 +37,15 @@ ClassImp(AliMpConstants)
 const Double_t AliMpConstants::fgkLengthTolerance = 1e-05; // 0.1 mum
 const Double_t AliMpConstants::fgkLengthStep = 0.1; // 1 mm
 const Int_t    AliMpConstants::fgkStartPadIndex = 1;
+const Int_t    AliMpConstants::fgkNofCathodes = 2;
 const Int_t    AliMpConstants::fgkNofChambers = 14;
+const Int_t    AliMpConstants::fgkNofTrackingChambers = 10;
 const Int_t    AliMpConstants::fgkNofGeomModules = 20;
-const Int_t AliMpConstants::fgkNonBendingManuMask(1<<10);
+const Int_t    AliMpConstants::fgkNofLocalBoards = 234;
+const Int_t    AliMpConstants::fgkTotalNofLocalBoards = 242;
+const Int_t    AliMpConstants::fgkNonBendingManuMask(1<<10);
+const Int_t    AliMpConstants::fgkManuNofChannels(64);
+const Int_t    AliMpConstants::fgkLocalBoardNofChannels(16);
 
 //_____________________________________________________________________________
 AliMpConstants::AliMpConstants()
@@ -61,21 +68,28 @@ Bool_t  AliMpConstants::IsEqual(Double_t length1, Double_t length2)
   return TMath::Abs(length1 - length2) < fgkLengthTolerance;
 }  
 
-
 //_____________________________________________________________________________
-Bool_t  AliMpConstants::IsEqual(const TVector2& v1, const TVector2& v2)
+Bool_t  AliMpConstants::IsEqual(Double_t v1x, Double_t v1y, 
+                                Double_t v2x, Double_t v2y)
 {
 /// Compare x, y vector coordinates within the length tolerance.
 
-  return (  TMath::Abs(v1.X() - v2.X()
-          + TMath::Abs(v1.Y() - v2.Y())) < 2.*fgkLengthTolerance;
+  return (  TMath::Abs(v1x - v2x
+          + TMath::Abs(v1y - v2y)) < 2.*fgkLengthTolerance;
 }
 
 //_____________________________________________________________________________
-Int_t
-AliMpConstants::ManuMask(AliMp::PlaneType planeType)
+Int_t AliMpConstants::ManuMask(AliMp::PlaneType planeType)
 {
 /// The manuIDs get an offset if they are in the non-bending plane
 
   return ( planeType == AliMp::kNonBendingPlane ) ? fgkNonBendingManuMask : 0;
 }
+
+//_____________________________________________________________________________
+Int_t AliMpConstants::NofTriggerChambers() 
+{ 
+/// Return number of trigger chambers
+
+  return fgkNofChambers - fgkNofTrackingChambers;
+}