]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpMotifPosition.h
In mapping:
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpMotifPosition.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: AliMpMotifPosition.h,v 1.9 2006/05/24 13:58:18 ivana Exp $
6
7 /// \ingroup motif
8 /// \class AliMpMotifPosition
9 /// \brief A placed motif.
10 ///
11 /// \author David Guez, Ivana Hrivnacova; IPN Orsay
12
13 #ifndef ALI_MP_MOTIF_POSITION_H
14 #define ALI_MP_MOTIF_POSITION_H
15
16 #include "AliMpVIndexed.h"
17 #include "AliMpVMotif.h"
18
19 #include <TVector2.h>
20
21 class AliMpVPadIterator;
22
23 class AliMpMotifPosition : public AliMpVIndexed
24 {
25  public:
26   AliMpMotifPosition(Int_t id, AliMpVMotif* motif, TVector2 position);
27   AliMpMotifPosition();
28   virtual ~AliMpMotifPosition();
29
30   // methods
31   virtual AliMpVPadIterator* CreateIterator() const;
32
33   // get methods
34   Int_t        GetID() const;
35   AliMpVMotif* GetMotif() const;
36   Bool_t       HasPadByIndices(const AliMpIntPair& indices) const;
37   Bool_t       HasPadByManuChannel(Int_t manuChannel) const;
38
39   // Geometry
40   TVector2 Position() const;
41   TVector2 Dimensions() const;
42   
43   // Sets the ID (which is the MANU ID)
44   void SetID(Int_t id); 
45   // Sets the position.
46   void SetPosition(const TVector2& pos);
47
48   void Print(Option_t* option="") const;
49
50  private:
51   /// Not implemented
52   AliMpMotifPosition(const AliMpMotifPosition& right);
53   /// Not implemented
54   AliMpMotifPosition&  operator = (const AliMpMotifPosition& right);
55
56   // methods
57   // data members 
58   Int_t         fID;       ///< identifier=manu id
59   AliMpVMotif*  fMotif;    ///< motif
60   TVector2      fPosition; ///< position
61
62   ClassDef(AliMpMotifPosition,1) // A motif position
63 };
64
65 // inline functions
66
67 /// Return motif position ID = manu id
68 inline Int_t  AliMpMotifPosition::GetID() const 
69 { return fID; }
70
71 /// Return motif 
72 inline AliMpVMotif*  AliMpMotifPosition::GetMotif() const
73 { return fMotif; }
74  
75 /// Return position
76 inline TVector2 AliMpMotifPosition::Position() const
77 { return fPosition; }
78
79 /// Return dimensions
80 inline TVector2 AliMpMotifPosition::Dimensions() const
81 { return fMotif->Dimensions(); }
82
83 #endif //ALI_MP_MOTIF_POSITION_H