]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpMotif.h
Adding functions for iterating over motif positions
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpMotif.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: AliMpMotif.h,v 1.8 2006/05/24 13:58:18 ivana Exp $
6
7 /// \ingroup motif
8 /// \class AliMpMotif
9 /// \brief A motif with its unique ID and the motif type.
10 ///
11 /// \author David Guez, Ivana Hrivnacova; IPN Orsay
12
13 #ifndef ALI_MP_MOTIF_H
14 #define ALI_MP_MOTIF_H
15
16 #include "AliMpVMotif.h"
17
18 #include <TObject.h>
19 #include <TVector2.h>
20
21 class TString;
22
23 class AliMpMotif : public AliMpVMotif
24 {
25  public:
26   AliMpMotif(const TString &id,AliMpMotifType *motifType, const TVector2& padDimension);
27   AliMpMotif();
28   virtual ~AliMpMotif();
29
30   // Access methods
31   virtual Int_t    GetNofPadDimensions() const;
32   virtual TVector2 GetPadDimensions(Int_t /*i*/ = 0) const;
33   virtual TVector2 GetPadDimensions(const AliMpIntPair& localIndices) const;
34
35   // Geometry
36   virtual TVector2 Dimensions() const;
37
38   // Other methods
39   virtual TVector2 PadPositionLocal(const AliMpIntPair& localIndices) const;
40   virtual AliMpIntPair PadIndicesLocal(const TVector2& localPos) const;
41
42  private:
43   // methods
44
45   // data members 
46   TVector2  fPadDimensions; ///< pad dimensions (halflength x, y size) 
47
48   ClassDef(AliMpMotif,1) // A motif with its ID
49 };
50
51 // inline functions
52
53 inline Int_t    AliMpMotif::GetNofPadDimensions() const 
54 { return 1; }
55
56 inline TVector2 AliMpMotif::GetPadDimensions(Int_t /*i*/) const 
57 { return fPadDimensions; }  
58
59 #endif //ALI_MP_MOTIF_H