]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/mapping/AliMpMotifPosition.h
In Print(): added an option to print area borders
[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       HasPad(const AliMpIntPair& indices) const;
37
38   // Geometry
39   TVector2 Position() const;
40   TVector2 Dimensions() const;
41   
42   // Sets the ID (which is the MANU ID)
43   void SetID(Int_t id); 
44   // Sets the position.
45   void SetPosition(const TVector2& pos);
46
47   void Print(Option_t* option="") const;
48
49  private:
50   /// Not implemented
51   AliMpMotifPosition(const AliMpMotifPosition& right);
52   /// Not implemented
53   AliMpMotifPosition&  operator = (const AliMpMotifPosition& right);
54
55   // methods
56   // data members 
57   Int_t         fID;       ///< identifier=manu id
58   AliMpVMotif*  fMotif;    ///< motif
59   TVector2      fPosition; ///< position
60
61   ClassDef(AliMpMotifPosition,1) // A motif position
62 };
63
64 // inline functions
65
66 /// Return motif position ID = manu id
67 inline Int_t  AliMpMotifPosition::GetID() const 
68 { return fID; }
69
70 /// Return motif 
71 inline AliMpVMotif*  AliMpMotifPosition::GetMotif() const
72 { return fMotif; }
73  
74 /// Return position
75 inline TVector2 AliMpMotifPosition::Position() const
76 { return fPosition; }
77
78 /// Return dimensions
79 inline TVector2 AliMpMotifPosition::Dimensions() const
80 { return fMotif->Dimensions(); }
81
82 #endif //ALI_MP_MOTIF_POSITION_H