Replacement of AliMpIntPair object with algoritmic
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpMotif.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: AliMpMotif.h,v 1.8 2006/05/24 13:58:18 ivana Exp $
dee1d5f1 6
7/// \ingroup motif
8/// \class AliMpMotif
9/// \brief A motif with its unique ID and the motif type.
10///
13985652 11/// \author David Guez, Ivana Hrivnacova; IPN Orsay
5f91c9e8 12
2998a151 13#ifndef ALI_MP_MOTIF_H
14#define ALI_MP_MOTIF_H
5f91c9e8 15
2a7ea2e6 16#include "AliMpVMotif.h"
168e9c4d 17#include "AliMpEncodePair.h"
2a7ea2e6 18
5f91c9e8 19#include <TObject.h>
5f91c9e8 20#include <TVector2.h>
21
2998a151 22class TString;
23
5f91c9e8 24class AliMpMotif : public AliMpVMotif
25{
26 public:
27 AliMpMotif(const TString &id,AliMpMotifType *motifType, const TVector2& padDimension);
28 AliMpMotif();
2998a151 29 virtual ~AliMpMotif();
5f91c9e8 30
31 // Access methods
32 virtual Int_t GetNofPadDimensions() const;
2998a151 33 virtual TVector2 GetPadDimensions(Int_t /*i*/ = 0) const;
168e9c4d 34 virtual TVector2 GetPadDimensionsByIndices(MpPair_t localIndices) const;
35 virtual TVector2 GetPadDimensionsByIndices(Int_t ixLocal, Int_t iyLocal) const;
5f91c9e8 36
37 // Geometry
38 virtual TVector2 Dimensions() const;
39
40 // Other methods
168e9c4d 41 virtual TVector2 PadPositionLocal(MpPair_t localIndices) const;
42 virtual TVector2 PadPositionLocal(Int_t ixLocal, Int_t iyLocal) const;
43 virtual MpPair_t PadIndicesLocal(const TVector2& localPos) const;
5f91c9e8 44
45 private:
46 // methods
47
48 // data members
829425a5 49 TVector2 fPadDimensions; ///< pad dimensions (halflength x, y size)
5f91c9e8 50
51 ClassDef(AliMpMotif,1) // A motif with its ID
52};
53
54// inline functions
55
f5671fc3 56 /// Return 1 as the number of pad dimensions
2998a151 57inline Int_t AliMpMotif::GetNofPadDimensions() const
58{ return 1; }
59
f5671fc3 60 /// Return the pad dimensions
2998a151 61inline TVector2 AliMpMotif::GetPadDimensions(Int_t /*i*/) const
62{ return fPadDimensions; }
5f91c9e8 63
2998a151 64#endif //ALI_MP_MOTIF_H