]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpMotifSpecial.h
Replacement of AliMpIntPair object with algoritmic
[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 "AliMpVMotif.h"
17 #include "AliMpExMap.h"
18
19 #include <TVector2.h>
20 #include <TObjArray.h>
21
22 class TString;
23
24 class AliMpMotifSpecial : public AliMpVMotif
25 {
26  public:
27   AliMpMotifSpecial(const TString &id, AliMpMotifType *motifType);
28   AliMpMotifSpecial(TRootIOCtor* ioCtor);
29   virtual ~AliMpMotifSpecial();
30
31   // Access methods
32   virtual TVector2 GetPadDimensionsByIndices(MpPair_t localIndices) const;
33   virtual TVector2 GetPadDimensionsByIndices(Int_t ixLocal, Int_t iyLocal) const;
34   virtual Int_t    GetNofPadDimensions() const;
35   virtual TVector2 GetPadDimensions(Int_t i) const;
36
37   // Set methods
38   void SetPadDimensions(MpPair_t localIndices,
39                         const TVector2& dimensions);
40   void SetPadDimensions(Int_t ixLocal, Int_t iyLocal,
41                         const TVector2& dimensions);
42   
43   // Geometry
44   void CalculateDimensions();
45   virtual TVector2 Dimensions() const;
46
47   // Other methods
48   virtual TVector2     PadPositionLocal(MpPair_t  localIndices) const;
49   virtual TVector2     PadPositionLocal(Int_t ixLocal, Int_t iyLocal) const;
50   virtual MpPair_t     PadIndicesLocal(const TVector2& localPos) const;
51
52  private:
53   /// Not implemented
54   AliMpMotifSpecial();
55
56   // data members
57   TVector2     fDimensions;           ///< motif dimensions
58   AliMpExMap   fPadDimensionsVector;  ///< the vector of pad dimensions
59   TObjArray    fPadDimensionsVector2; ///< the vector of different pad dimensions
60
61   ClassDef(AliMpMotifSpecial,2) // A motif with its ID
62 };
63
64 #endif //ALI_MP_MOTIF_SPECIAL_H