]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpVMotif.h
Adding new option to get the DE by its name (moreover to get it by its ID).
[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
16#include <TObject.h>
17#include <TString.h>
18#include <TVector2.h>
19
20class AliMpMotifType;
21class AliMpConnection;
22class AliMpIntPair;
23
24class 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;
f5671fc3 34 /// Return the number of pad dimensions
5f91c9e8 35 virtual Int_t GetNofPadDimensions() const=0;
f5671fc3 36 /// Return the i-th pad dimensions
5f91c9e8 37 virtual TVector2 GetPadDimensions(Int_t i) const=0;
f5671fc3 38 /// Return the dimensions of the pad specified by localIndices
5f91c9e8 39 virtual TVector2 GetPadDimensions(const AliMpIntPair& localIndices) const=0;
40
41 // Geometry
f5671fc3 42 /// Return dimensions
5f91c9e8 43 virtual TVector2 Dimensions() const=0;
44
45 // Other methods
46 AliMpConnection *FindConnectionByLocalPos(const TVector2& localPos) const;
47 virtual void Print(Option_t *option) const;
f5671fc3 48 /// Return local position of the pad specified by local indices
49 virtual TVector2 PadPositionLocal(const AliMpIntPair& localIndices) const=0;
50 /// Return local indices of the pad specified by local position
5f91c9e8 51 virtual AliMpIntPair PadIndicesLocal(const TVector2& localPos) const=0;
52
13e7956b 53 private:
f5671fc3 54 /// Not implemented
fb1bf5c0 55 AliMpVMotif(const AliMpVMotif& right);
f5671fc3 56 /// Not implemented
fb1bf5c0 57 AliMpVMotif& operator = (const AliMpVMotif& right);
58
5f91c9e8 59 // data members
829425a5 60 TString fID; ///< identifier
61 AliMpMotifType *fMotifType; ///< the motif type
5f91c9e8 62
63 ClassDef(AliMpVMotif,1) // A motif with its ID
64};
65
66// inline functions
67
f5671fc3 68/// Return the motif type
5f91c9e8 69inline AliMpMotifType* AliMpVMotif::GetMotifType() const {return fMotifType;}
f5671fc3 70
71/// Return the motif identifier
5f91c9e8 72inline TString AliMpVMotif::GetID() const {return fID;}
73
74#endif //ALI_MP_V_MOTIF_H