]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpMotifSpecial.h
Coding conventions
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpMotifSpecial.h
1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice                               */
3
4 // $Id$
5 // $MpId: AliMpMotifSpecial.h,v 1.8 2006/03/17 11:37:51 ivana Exp $
6
7 /// \ingroup motif
8 /// \class AliMpMotifSpecial
9 /// \brief A special motif with varying pad dimensions
10 ///
11 /// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
12
13 #ifndef ALI_MP_MOTIF_SPECIAL_H
14 #define ALI_MP_MOTIF_SPECIAL_H
15
16 #include "AliMpContainers.h"
17
18 #include "AliMpVMotif.h"
19 #ifdef WITH_ROOT
20 #include "AliMpExMap.h"
21 #endif
22
23 #include <TVector2.h>
24 #ifdef WITH_ROOT
25 #include <TObjArray.h>
26 #endif
27
28 #ifdef WITH_STL
29 #include <vector>
30 #endif
31
32 class TString;
33
34 class AliMpMotifSpecial : public AliMpVMotif
35 {
36  public:
37 #ifdef WITH_STL
38   typedef std::vector< TVector2 > DimensionsMap;
39   typedef std::vector< TVector2 > DimensionsMap2;
40 #endif    
41 #ifdef WITH_ROOT
42   typedef AliMpExMap DimensionsMap;
43   typedef TObjArray  DimensionsMap2;
44 #endif    
45
46  public:
47   AliMpMotifSpecial(const TString &id, AliMpMotifType *motifType);
48   AliMpMotifSpecial();
49   virtual ~AliMpMotifSpecial();
50
51   // Access methods
52   virtual TVector2 GetPadDimensions(const AliMpIntPair& localIndices) const;
53   virtual Int_t    GetNofPadDimensions() const;
54   virtual TVector2 GetPadDimensions(Int_t i) const;
55
56   // Set methods
57   void SetPadDimensions(const AliMpIntPair& localIndices,
58                         const TVector2& dimensions);
59   
60   // Geometry
61   virtual TVector2 Dimensions() const;
62
63   // Other methods
64   virtual TVector2     PadPositionLocal(const AliMpIntPair& localIndices) const;
65   virtual AliMpIntPair PadIndicesLocal(const TVector2& localPos) const;
66
67  private:
68   // methods
69   Int_t VectorIndex(const AliMpIntPair& indices) const;
70
71   // data members
72   DimensionsMap   fPadDimensionsVector;  // the vector of pad dimensions
73   DimensionsMap2  fPadDimensionsVector2; // the vector of different pad dimensions
74
75   ClassDef(AliMpMotifSpecial,1) // A motif with its ID
76 };
77
78 #endif //ALI_MP_MOTIF_SPECIAL_H