]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpRowSegment.h
adaption to new logging class, added functionality to AliHLTSystem to build a task...
[u/mrichter/AliRoot.git] / MUON / mapping / AliMpRowSegment.h
CommitLineData
5f91c9e8 1// $Id$
2// Category: sector
3//
4// Class AliMpRowSegment
5// ---------------------
6// Class describing a row segment composed of the
7// the identic motifs.
8//
9// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
10
11#ifndef ALI_MP_ROW_SEGMENT_H
12#define ALI_MP_ROW_SEGMENT_H
13
14#include <TVector2.h>
15
16#include "AliMpVRowSegment.h"
17
18class AliMpRow;
19class AliMpVMotif;
ffb47139 20class AliMpIntPair;
5f91c9e8 21
22class AliMpRowSegment : public AliMpVRowSegment
23{
24 public:
25 AliMpRowSegment(AliMpRow* row, AliMpVMotif* motif, AliMpIntPair padOffset,
26 Int_t nofMotifs, Int_t motifPositionId, Int_t motifPositionDId);
27 AliMpRowSegment();
28 virtual ~AliMpRowSegment();
29
30 // methods
31 virtual Double_t LeftBorderX() const;
32 virtual Double_t RightBorderX() const;
33 virtual Double_t HalfSizeY() const;
34
35 // find methods
36 virtual AliMpVMotif* FindMotif(const TVector2& position) const;
37 virtual Int_t FindMotifPositionId(const TVector2& position) const;
38 virtual Bool_t HasMotifPosition(Int_t motifPositionId) const;
39 virtual TVector2 MotifCenter(Int_t motifPositionId) const;
40
41 // geometry
42 virtual TVector2 Position() const;
43 virtual TVector2 Dimensions() const;
44
45 // set methods
46 virtual void SetOffset(const TVector2& offset);
580c28fd 47 virtual void SetGlobalIndices(AliMpRow* rowBefore);
ffb47139 48 virtual Int_t SetIndicesToMotifPosition(Int_t i,
49 const AliMpIntPair& indices);
5f91c9e8 50
51 // get methods
52 virtual AliMpRow* GetRow() const;
53 virtual Int_t GetNofMotifs() const;
ffb47139 54 virtual AliMpVMotif* GetMotif(Int_t /*i*/) const;
5f91c9e8 55 virtual Int_t GetMotifPositionId(Int_t i) const;
56
fb1bf5c0 57 protected:
58 AliMpRowSegment(const AliMpRowSegment& right);
59 AliMpRowSegment& operator = (const AliMpRowSegment& right);
60
5f91c9e8 61 private:
62 // methods
63 Double_t FirstMotifCenterX() const;
64 Double_t LastMotifCenterX() const;
65 Double_t MotifCenterX(Int_t motifPositionId) const;
66 Double_t MotifCenterY(Int_t motifPositionId) const;
67 Bool_t IsInside(const TVector2& position, Bool_t warn = true) const;
68
69 // data members
70 Int_t fNofMotifs; //number of motifs
71 AliMpIntPair fPadOffset; //the offset in nof pads
72 TVector2 fOffset; //the position of the centre of the first motif
73 //(x wtr to left border, y wtr to row center)
74 AliMpRow* fRow; //the row containing this segment
75 AliMpVMotif* fMotif; //the motif
76 Int_t fMotifPositionId; // the first motif position id
77 Int_t fMotifPositionDId; // +1 if ids are increasing, -1 if decreasing
78
79 ClassDef(AliMpRowSegment,1) //Row segment
80};
81
82#endif //ALI_MP_ROW_SEGMENT_H
83