]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpVRowSegment.h
Replacement of AliMpIntPair object with algoritmic
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpVRowSegment.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: AliMpVRowSegment.h,v 1.9 2006/05/24 13:58:21 ivana Exp $
dee1d5f1 6
7/// \ingroup sector
8/// \class AliMpVRowSegment
9/// \brief An interface for a row segment.
10///
13985652 11/// \author David Guez, Ivana Hrivnacova; IPN Orsay
5f91c9e8 12
13#ifndef ALI_MP_V_ROW_SEGMENT_H
14#define ALI_MP_V_ROW_SEGMENT_H
15
5f91c9e8 16#include "AliMpVIndexed.h"
5f91c9e8 17
2a7ea2e6 18#include <TVector2.h>
19
5f91c9e8 20class AliMpRow;
21class AliMpVMotif;
22
23class AliMpVRowSegment : public AliMpVIndexed
24{
25 public:
26 AliMpVRowSegment();
27 virtual ~AliMpVRowSegment();
28
f5671fc3 29 //
5f91c9e8 30 // methods
f5671fc3 31 //
32
33 /// Return the x coordinate of the left border in the global coordinate system.
5f91c9e8 34 virtual Double_t LeftBorderX() const = 0;
f5671fc3 35 /// Return the x coordinate of the right border in the global coordinate system.
5f91c9e8 36 virtual Double_t RightBorderX() const = 0;
f5671fc3 37 /// Return the half size in y of this row segment.
5f91c9e8 38 virtual Double_t HalfSizeY() const = 0;
39 virtual AliMpVPadIterator* CreateIterator() const;
40
f5671fc3 41 //
5f91c9e8 42 // find methods
f5671fc3 43 //
44
45 /// Find the motif in the given positions
5f91c9e8 46 virtual AliMpVMotif* FindMotif(const TVector2& position) const = 0;
f5671fc3 47 /// Find the motif position Id in the given positions
5f91c9e8 48 virtual Int_t FindMotifPositionId(const TVector2& position) const = 0;
f5671fc3 49 /// Has the motif position with the given Id ?
5f91c9e8 50 virtual Bool_t HasMotifPosition(Int_t motifPositionId) const = 0;
f5671fc3 51 /// Return the coordinates of the motif specified with the given motif position Id
5f91c9e8 52 virtual TVector2 MotifCenter(Int_t motifPositionId) const = 0;
53
f5671fc3 54 //
5f91c9e8 55 // geometry
f5671fc3 56 //
57
58 /// Return the position of the row segment centre.
5f91c9e8 59 virtual TVector2 Position() const = 0;
f5671fc3 60 /// Return the dimensions the row segment centre.
5f91c9e8 61 virtual TVector2 Dimensions() const = 0;
62
f5671fc3 63 //
5f91c9e8 64 // set methods
f5671fc3 65 //
66
67 /// Calculate offset
5f91c9e8 68 virtual void SetOffset(const TVector2& offset) = 0;
f5671fc3 69 /// Set global indices limits.
580c28fd 70 virtual void SetGlobalIndices(AliMpRow* rowBefore) = 0;
f5671fc3 71 /// Set global indices to i-th motif position and returns next index in x.
168e9c4d 72 virtual Int_t SetIndicesToMotifPosition(Int_t i, MpPair_t indices) = 0;
5f91c9e8 73
f5671fc3 74 //
5f91c9e8 75 // get methods
f5671fc3 76 //
77
78 /// Return the row.which this row segment belongs to
5f91c9e8 79 virtual AliMpRow* GetRow() const = 0;
f5671fc3 80 /// Return the number of motifs in this this row segment.
5f91c9e8 81 virtual Int_t GetNofMotifs() const = 0;
f5671fc3 82 /// Return the i-th motif of this row segment.
5f91c9e8 83 virtual AliMpVMotif* GetMotif(Int_t i) const = 0;
f5671fc3 84 /// Return the i-th motif position Id of this row segment.
5f91c9e8 85 virtual Int_t GetMotifPositionId(Int_t i) const = 0;
86
87 ClassDef(AliMpVRowSegment,1) //Row segment
88};
89
90#endif //ALI_MP_V_ROW_SEGMENT_H
91