]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpMotifSpecial.h
New class - the factory for building mapping segmentations
[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.7 2005/09/26 16:10:46 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 #ifdef WITH_STL
19 #include <vector>
20 #endif
21
22 #ifdef WITH_ROOT
23 #include <TObjArray.h>
24 #include "AliMpExMap.h"
25 #endif
26
27 #include <TVector2.h>
28
29 #include "AliMpVMotif.h"
30
31 class TString;
32
33 class AliMpMotifSpecial : public AliMpVMotif
34 {
35  public:
36 #ifdef WITH_STL
37   typedef std::vector< TVector2 > DimensionsMap;
38   typedef std::vector< TVector2 > DimensionsMap2;
39 #endif    
40 #ifdef WITH_ROOT
41   typedef AliMpExMap DimensionsMap;
42   typedef TObjArray  DimensionsMap2;
43 #endif    
44
45  public:
46   AliMpMotifSpecial(const TString &id, AliMpMotifType *motifType);
47   AliMpMotifSpecial();
48   virtual ~AliMpMotifSpecial();
49
50   // Access methods
51   virtual TVector2 GetPadDimensions(const AliMpIntPair& localIndices) const;
52   virtual Int_t    GetNofPadDimensions() const;
53   virtual TVector2 GetPadDimensions(Int_t i) const;
54
55   // Set methods
56   void SetPadDimensions(const AliMpIntPair& localIndices,
57                         const TVector2& dimensions);
58   
59   // Geometry
60   virtual TVector2 Dimensions() const;
61
62   // Other methods
63   virtual TVector2     PadPositionLocal(const AliMpIntPair& localIndices) const;
64   virtual AliMpIntPair PadIndicesLocal(const TVector2& localPos) const;
65
66  private:
67   // methods
68   Int_t VectorIndex(const AliMpIntPair& indices) const;
69
70   // data members
71   DimensionsMap   fPadDimensionsVector;  // the vector of pad dimensions
72   DimensionsMap2  fPadDimensionsVector2; // the vector of different pad dimensions
73
74   ClassDef(AliMpMotifSpecial,1) // A motif with its ID
75 };
76
77 #endif //ALI_MP_MOTIF_SPECIAL_H