Replacement of AliMpIntPair object with algoritmic
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpVMotif.h
CommitLineData
dee1d5f1 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
5f91c9e8 4// $Id$
13985652 5// $MpId: AliMpVMotif.h,v 1.8 2006/05/24 13:58:18 ivana Exp $
dee1d5f1 6
7/// \ingroup motif
8/// \class AliMpVMotif
9/// \brief Abstract base class for a motif with its unique ID and the motif type.
10///
13985652 11/// \author David Guez, Ivana Hrivnacova; IPN Orsay
5f91c9e8 12
13#ifndef ALI_MP_V_MOTIF_H
14#define ALI_MP_V_MOTIF_H
15
168e9c4d 16#include "AliMpEncodePair.h"
17
5f91c9e8 18#include <TObject.h>
19#include <TString.h>
20#include <TVector2.h>
21
22class AliMpMotifType;
23class AliMpConnection;
5f91c9e8 24
25class AliMpVMotif : public TObject
26{
27 public:
28 AliMpVMotif(const TString &id, AliMpMotifType *motifType);
29 AliMpVMotif();
2998a151 30 virtual ~AliMpVMotif();
5f91c9e8 31
32 // Access methods
33 AliMpMotifType *GetMotifType() const;
34 TString GetID() const;
f5671fc3 35 /// Return the number of pad dimensions
5f91c9e8 36 virtual Int_t GetNofPadDimensions() const=0;
f5671fc3 37 /// Return the i-th pad dimensions
5f91c9e8 38 virtual TVector2 GetPadDimensions(Int_t i) const=0;
f5671fc3 39 /// Return the dimensions of the pad specified by localIndices
168e9c4d 40 virtual TVector2 GetPadDimensionsByIndices(MpPair_t localIndices) const=0;
41 /// Return the dimensions of the pad specified by localIndices
42 virtual TVector2 GetPadDimensionsByIndices(Int_t ixLocal, Int_t iyLocal) const=0;
5f91c9e8 43
44 // Geometry
f5671fc3 45 /// Return dimensions
5f91c9e8 46 virtual TVector2 Dimensions() const=0;
47
48 // Other methods
49 AliMpConnection *FindConnectionByLocalPos(const TVector2& localPos) const;
50 virtual void Print(Option_t *option) const;
f5671fc3 51 /// Return local position of the pad specified by local indices
168e9c4d 52 virtual TVector2 PadPositionLocal(MpPair_t localIndices) const=0;
53 /// Return local position of the pad specified by local indices
54 virtual TVector2 PadPositionLocal(Int_t ixLocal, Int_t iyLocal) const=0;
f5671fc3 55 /// Return local indices of the pad specified by local position
168e9c4d 56 virtual MpPair_t PadIndicesLocal(const TVector2& localPos) const=0;
5f91c9e8 57
13e7956b 58 private:
f5671fc3 59 /// Not implemented
fb1bf5c0 60 AliMpVMotif(const AliMpVMotif& right);
f5671fc3 61 /// Not implemented
fb1bf5c0 62 AliMpVMotif& operator = (const AliMpVMotif& right);
63
5f91c9e8 64 // data members
829425a5 65 TString fID; ///< identifier
66 AliMpMotifType *fMotifType; ///< the motif type
5f91c9e8 67
68 ClassDef(AliMpVMotif,1) // A motif with its ID
69};
70
71// inline functions
72
f5671fc3 73/// Return the motif type
5f91c9e8 74inline AliMpMotifType* AliMpVMotif::GetMotifType() const {return fMotifType;}
f5671fc3 75
76/// Return the motif identifier
5f91c9e8 77inline TString AliMpVMotif::GetID() const {return fID;}
78
79#endif //ALI_MP_V_MOTIF_H