]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpMotifSpecial.h
In SetNofManusPerModule(): return false if no action
[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.11 2006/05/24 13:58:18 ivana Exp $
6
7 /// \ingroup motif
8 /// \class AliMpMotifSpecial
9 /// \brief A special motif with varying pad dimensions
10 ///
11 /// \author 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   /// Dimensions map type
39   typedef std::vector< TVector2 > DimensionsMap;
40   /// Dimensions map iterator type
41   typedef std::vector< TVector2 > DimensionsMap2;
42 #endif    
43 #ifdef WITH_ROOT
44   /// Dimensions map type
45   typedef AliMpExMap DimensionsMap;
46   /// Dimensions map iterator type
47   typedef TObjArray  DimensionsMap2;
48 #endif    
49
50  public:
51   AliMpMotifSpecial(const TString &id, AliMpMotifType *motifType);
52   AliMpMotifSpecial();
53   virtual ~AliMpMotifSpecial();
54
55   // Access methods
56   virtual TVector2 GetPadDimensions(const AliMpIntPair& localIndices) const;
57   virtual Int_t    GetNofPadDimensions() const;
58   virtual TVector2 GetPadDimensions(Int_t i) const;
59
60   // Set methods
61   void SetPadDimensions(const AliMpIntPair& localIndices,
62                         const TVector2& dimensions);
63   
64   // Geometry
65   void CalculateDimensions();
66   virtual TVector2 Dimensions() const;
67
68   // Other methods
69   virtual TVector2     PadPositionLocal(const AliMpIntPair& localIndices) const;
70   virtual AliMpIntPair PadIndicesLocal(const TVector2& localPos) const;
71
72  private:
73   // methods
74   Int_t VectorIndex(const AliMpIntPair& indices) const;
75
76   // data members
77   TVector2        fDimensions;           ///< motif dimensions
78   DimensionsMap   fPadDimensionsVector;  ///< the vector of pad dimensions
79   DimensionsMap2  fPadDimensionsVector2; ///< the vector of different pad dimensions
80
81   ClassDef(AliMpMotifSpecial,2) // A motif with its ID
82 };
83
84 #endif //ALI_MP_MOTIF_SPECIAL_H