]>
Commit | Line | Data |
---|---|---|
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> | |
5f91c9e8 | 20 | |
21 | class AliMpMotifType; | |
22 | class AliMpConnection; | |
5f91c9e8 | 23 | |
24 | class AliMpVMotif : public TObject | |
25 | { | |
26 | public: | |
27 | AliMpVMotif(const TString &id, AliMpMotifType *motifType); | |
28 | AliMpVMotif(); | |
2998a151 | 29 | virtual ~AliMpVMotif(); |
5f91c9e8 | 30 | |
31 | // Access methods | |
32 | AliMpMotifType *GetMotifType() const; | |
33 | TString GetID() const; | |
6e97fbb8 | 34 | |
f5671fc3 | 35 | /// Return the number of pad dimensions |
5f91c9e8 | 36 | virtual Int_t GetNofPadDimensions() const=0; |
6e97fbb8 | 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; | |
41 | ||
f5671fc3 | 42 | /// Return the dimensions of the pad specified by localIndices |
6e97fbb8 | 43 | virtual void GetPadDimensionsByIndices(MpPair_t localIndices, |
44 | Double_t& dx, Double_t& dy) const=0; | |
168e9c4d | 45 | /// Return the dimensions of the pad specified by localIndices |
6e97fbb8 | 46 | virtual void GetPadDimensionsByIndices(Int_t ixLocal, Int_t iyLocal, |
47 | Double_t& dx, Double_t& dy) const=0; | |
5f91c9e8 | 48 | |
49 | // Geometry | |
6e97fbb8 | 50 | /// Return x dimensions |
51 | virtual Double_t DimensionX() const=0; | |
52 | /// Return y dimensions | |
53 | virtual Double_t DimensionY() const=0; | |
5f91c9e8 | 54 | |
55 | // Other methods | |
6e97fbb8 | 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; | |
62 | ||
63 | AliMpConnection *FindConnectionByLocalPos( | |
64 | Double_t localPosX, Double_t localPosY) const; | |
65 | ||
f5671fc3 | 66 | /// Return local indices of the pad specified by local position |
6e97fbb8 | 67 | virtual MpPair_t PadIndicesLocal(Double_t localPosX, Double_t localPosY) const=0; |
68 | ||
69 | virtual void Print(Option_t *option) const; | |
5f91c9e8 | 70 | |
13e7956b | 71 | private: |
f5671fc3 | 72 | /// Not implemented |
fb1bf5c0 | 73 | AliMpVMotif(const AliMpVMotif& right); |
f5671fc3 | 74 | /// Not implemented |
fb1bf5c0 | 75 | AliMpVMotif& operator = (const AliMpVMotif& right); |
76 | ||
5f91c9e8 | 77 | // data members |
829425a5 | 78 | TString fID; ///< identifier |
79 | AliMpMotifType *fMotifType; ///< the motif type | |
5f91c9e8 | 80 | |
81 | ClassDef(AliMpVMotif,1) // A motif with its ID | |
82 | }; | |
83 | ||
84 | // inline functions | |
85 | ||
f5671fc3 | 86 | /// Return the motif type |
5f91c9e8 | 87 | inline AliMpMotifType* AliMpVMotif::GetMotifType() const {return fMotifType;} |
f5671fc3 | 88 | |
89 | /// Return the motif identifier | |
5f91c9e8 | 90 | inline TString AliMpVMotif::GetID() const {return fID;} |
91 | ||
92 | #endif //ALI_MP_V_MOTIF_H |