Fixing a backward compatibility issue
[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
2998a151 21class TString;
22
5f91c9e8 23class AliMpMotif : public AliMpVMotif
24{
25 public:
6e97fbb8 26 AliMpMotif(const TString& id,
27 AliMpMotifType* motifType,
28 Double_t dx, Double_t dy);
5f91c9e8 29 AliMpMotif();
2998a151 30 virtual ~AliMpMotif();
5f91c9e8 31
32 // Access methods
33 virtual Int_t GetNofPadDimensions() const;
6e97fbb8 34 virtual Double_t GetPadDimensionX(Int_t /*i*/ = 0) const;
35 virtual Double_t GetPadDimensionY(Int_t /*i*/ = 0) const;
36
37 virtual void GetPadDimensionsByIndices(MpPair_t localIndices,
38 Double_t& dx, Double_t& dy) const;
39 virtual void GetPadDimensionsByIndices(Int_t ixLocal, Int_t iyLocal,
40 Double_t& dx, Double_t& dy) const;
5f91c9e8 41
42 // Geometry
6e97fbb8 43 virtual Double_t DimensionX() const;
44 virtual Double_t DimensionY() const;
5f91c9e8 45
46 // Other methods
6e97fbb8 47 virtual void PadPositionLocal(MpPair_t localIndices,
48 Double_t& posx, Double_t& posy ) const;
49 virtual void PadPositionLocal(Int_t ixLocal, Int_t iyLocal,
50 Double_t& posx, Double_t& posy ) const;
51
52 virtual MpPair_t PadIndicesLocal(
53 Double_t localPosX, Double_t localPosY) const;
5f91c9e8 54
55 private:
56 // methods
57
58 // data members
6e97fbb8 59 Double_t fPadDimensionX; ///< pad dimensions (halflength x, y size)
60 Double_t fPadDimensionY; ///< pad dimensions (halflength x, y size)
5f91c9e8 61
6e97fbb8 62 ClassDef(AliMpMotif,2) // A motif with its ID
5f91c9e8 63};
64
65// inline functions
66
f5671fc3 67 /// Return 1 as the number of pad dimensions
2998a151 68inline Int_t AliMpMotif::GetNofPadDimensions() const
69{ return 1; }
70
6e97fbb8 71 /// Return the pad x dimension
72inline Double_t AliMpMotif::GetPadDimensionX(Int_t /*i*/) const
73{ return fPadDimensionX; }
74
75 /// Return the pad y dimension
76inline Double_t AliMpMotif::GetPadDimensionY(Int_t /*i*/) const
77{ return fPadDimensionY; }
5f91c9e8 78
2998a151 79#endif //ALI_MP_MOTIF_H