1 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
5 // $MpId: AliMpVMotif.h,v 1.8 2006/05/24 13:58:18 ivana Exp $
9 /// \brief Abstract base class for a motif with its unique ID and the motif type.
11 /// \author David Guez, Ivana Hrivnacova; IPN Orsay
13 #ifndef ALI_MP_V_MOTIF_H
14 #define ALI_MP_V_MOTIF_H
16 #include "AliMpEncodePair.h"
22 class AliMpConnection;
24 class AliMpVMotif : public TObject
27 AliMpVMotif(const TString &id, AliMpMotifType *motifType);
29 virtual ~AliMpVMotif();
32 AliMpMotifType *GetMotifType() const;
33 TString GetID() const;
35 /// Return the number of pad dimensions
36 virtual Int_t GetNofPadDimensions() const=0;
37 /// Return the i-th pad x dimension
38 virtual Double_t GetPadDimensionX(Int_t i) const=0;
39 /// Return the i-th pad y dimension
40 virtual Double_t GetPadDimensionY(Int_t i) const=0;
42 /// Return the dimensions of the pad specified by localIndices
43 virtual void GetPadDimensionsByIndices(MpPair_t localIndices,
44 Double_t& dx, Double_t& dy) const=0;
45 /// Return the dimensions of the pad specified by localIndices
46 virtual void GetPadDimensionsByIndices(Int_t ixLocal, Int_t iyLocal,
47 Double_t& dx, Double_t& dy) const=0;
50 /// Return x dimensions
51 virtual Double_t DimensionX() const=0;
52 /// Return y dimensions
53 virtual Double_t DimensionY() const=0;
56 /// Fill local position of the pad specified by local indices
57 virtual void PadPositionLocal(MpPair_t localIndices,
58 Double_t& posx, Double_t& posy ) const=0;
59 /// Fill local position of the pad specified by local indices
60 virtual void PadPositionLocal(Int_t ixLocal, Int_t iyLocal,
61 Double_t& posx, Double_t& posy ) const=0;
63 AliMpConnection *FindConnectionByLocalPos(
64 Double_t localPosX, Double_t localPosY) const;
66 /// Return local indices of the pad specified by local position
67 virtual MpPair_t PadIndicesLocal(Double_t localPosX, Double_t localPosY) const=0;
69 virtual void Print(Option_t *option) const;
73 AliMpVMotif(const AliMpVMotif& right);
75 AliMpVMotif& operator = (const AliMpVMotif& right);
78 TString fID; ///< identifier
79 AliMpMotifType *fMotifType; ///< the motif type
81 ClassDef(AliMpVMotif,1) // A motif with its ID
86 /// Return the motif type
87 inline AliMpMotifType* AliMpVMotif::GetMotifType() const {return fMotifType;}
89 /// Return the motif identifier
90 inline TString AliMpVMotif::GetID() const {return fID;}
92 #endif //ALI_MP_V_MOTIF_H