AliRoot Core  edcc906 (edcc906)
AliMpMotif.h
Go to the documentation of this file.
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: AliMpMotif.h,v 1.8 2006/05/24 13:58:18 ivana Exp $
6 
12 
13 #ifndef ALI_MP_MOTIF_H
14 #define ALI_MP_MOTIF_H
15 
16 #include "AliMpVMotif.h"
17 #include "AliMpEncodePair.h"
18 
19 #include <TObject.h>
20 
21 class TString;
22 
23 class AliMpMotif : public AliMpVMotif
24 {
25  public:
26  AliMpMotif(const TString& id,
27  AliMpMotifType* motifType,
28  Double_t dx, Double_t dy);
29  AliMpMotif();
30  virtual ~AliMpMotif();
31 
32  TObject* Clone(const char* newid) const;
33 
34  // Access methods
35  virtual Int_t GetNofPadDimensions() const;
36  virtual Double_t GetPadDimensionX(Int_t /*i*/ = 0) const;
37  virtual Double_t GetPadDimensionY(Int_t /*i*/ = 0) const;
38 
39  virtual void GetPadDimensionsByIndices(MpPair_t localIndices,
40  Double_t& dx, Double_t& dy) const;
41  virtual void GetPadDimensionsByIndices(Int_t ixLocal, Int_t iyLocal,
42  Double_t& dx, Double_t& dy) const;
43 
44  // Geometry
45  virtual Double_t DimensionX() const;
46  virtual Double_t DimensionY() const;
47 
48  // Other methods
49  virtual void PadPositionLocal(MpPair_t localIndices,
50  Double_t& posx, Double_t& posy ) const;
51  virtual void PadPositionLocal(Int_t ixLocal, Int_t iyLocal,
52  Double_t& posx, Double_t& posy ) const;
53 
54  virtual MpPair_t PadIndicesLocal(
55  Double_t localPosX, Double_t localPosY) const;
56 
57  private:
58  // methods
59 
60  // data members
61  Double_t fPadDimensionX;
62  Double_t fPadDimensionY;
63 
64  ClassDef(AliMpMotif,2) // A motif with its ID
65 };
66 
67 // inline functions
68 
70 inline Int_t AliMpMotif::GetNofPadDimensions() const
71 { return 1; }
72 
74 inline Double_t AliMpMotif::GetPadDimensionX(Int_t /*i*/) const
75 { return fPadDimensionX; }
76 
78 inline Double_t AliMpMotif::GetPadDimensionY(Int_t /*i*/) const
79 { return fPadDimensionY; }
80 
81 #endif //ALI_MP_MOTIF_H
Double_t fPadDimensionX
pad dimensions (halflength x, y size)
Definition: AliMpMotif.h:61
virtual Double_t GetPadDimensionX(Int_t=0) const
Return the pad x dimension.
Definition: AliMpMotif.h:74
virtual Double_t DimensionY() const
Return y dimensions.
Definition: AliMpMotif.cxx:111
virtual Int_t GetNofPadDimensions() const
Return 1 as the number of pad dimensions.
Definition: AliMpMotif.h:70
virtual Double_t GetPadDimensionY(Int_t=0) const
Return the pad y dimension.
Definition: AliMpMotif.h:78
Double_t fPadDimensionY
pad dimensions (halflength x, y size)
Definition: AliMpMotif.h:62
virtual ~AliMpMotif()
Definition: AliMpMotif.cxx:70
virtual Double_t DimensionX() const
Return x dimensions.
Definition: AliMpMotif.cxx:103
Abstract base class for a motif with its unique ID and the motif type.
Definition: AliMpVMotif.h:24
Int_t MpPair_t
virtual void PadPositionLocal(MpPair_t localIndices, Double_t &posx, Double_t &posy) const
Fill local position of the pad specified by local indices.
Definition: AliMpMotif.cxx:119
virtual void GetPadDimensionsByIndices(MpPair_t localIndices, Double_t &dx, Double_t &dy) const
Return the dimensions of the pad specified by localIndices.
Definition: AliMpMotif.cxx:77
A motif with its unique ID and the motif type.
Definition: AliMpMotif.h:23
virtual MpPair_t PadIndicesLocal(Double_t localPosX, Double_t localPosY) const
Return local indices of the pad specified by local position.
Definition: AliMpMotif.cxx:142
TObject * Clone(const char *newid) const
Definition: AliMpMotif.cxx:62
Class that defines the motif properties.