]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpMotifPosition.h
new class AliMUONLoader
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpMotifPosition.h
1 // $Id$
2 // Category: motif
3 //
4 // Class AliMpMotifPosition
5 // ------------------------
6 // Class that represents a placed motif.
7 //
8 // Authors: David Guez, Ivana Hrivnacova; IPN Orsay
9
10 #ifndef ALI_MP_MOTIF_POSITION_H
11 #define ALI_MP_MOTIF_POSITION_H
12
13 #include <TVector2.h>
14
15 #include "AliMpVIndexed.h"
16 #include "AliMpVMotif.h"
17
18 class AliMpVPadIterator;
19
20 class AliMpMotifPosition : public AliMpVIndexed
21 {
22  public:
23   AliMpMotifPosition(Int_t id, AliMpVMotif* motif, TVector2 position);
24   AliMpMotifPosition();
25   virtual ~AliMpMotifPosition();
26
27   // methods
28   virtual AliMpVPadIterator* CreateIterator() const;
29
30   // get methods
31   Int_t        GetID() const;
32   AliMpVMotif* GetMotif() const;
33   Bool_t       HasPad(const AliMpIntPair& indices) const;
34
35   // Geometry
36   TVector2 Position() const;
37   TVector2 Dimensions() const;
38
39  private:
40   // methods
41   // data members 
42   Int_t         fID;       //identifier
43   AliMpVMotif*  fMotif;    //motif
44   TVector2      fPosition; //position
45
46   ClassDef(AliMpMotifPosition,1) // A motif position
47 };
48
49 // inline functions
50
51 inline Int_t  AliMpMotifPosition::GetID() const 
52 { return fID; }
53
54 inline AliMpVMotif*  AliMpMotifPosition::GetMotif() const
55 { return fMotif; }
56  
57 inline TVector2 AliMpMotifPosition::Position() const
58 { return fPosition; }
59
60 inline TVector2 AliMpMotifPosition::Dimensions() const
61 { return fMotif->Dimensions(); }
62
63 #endif //ALI_MP_MOTIF_POSITION_H