]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/mapping/AliMpRowSegment.h
new class AliMUONLoader
[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;
20
21class AliMpRowSegment : public AliMpVRowSegment
22{
23 public:
24 AliMpRowSegment(AliMpRow* row, AliMpVMotif* motif, AliMpIntPair padOffset,
25 Int_t nofMotifs, Int_t motifPositionId, Int_t motifPositionDId);
26 AliMpRowSegment();
27 virtual ~AliMpRowSegment();
28
29 // methods
30 virtual Double_t LeftBorderX() const;
31 virtual Double_t RightBorderX() const;
32 virtual Double_t HalfSizeY() const;
33
34 // find methods
35 virtual AliMpVMotif* FindMotif(const TVector2& position) const;
36 virtual Int_t FindMotifPositionId(const TVector2& position) const;
37 virtual Bool_t HasMotifPosition(Int_t motifPositionId) const;
38 virtual TVector2 MotifCenter(Int_t motifPositionId) const;
39
40 // geometry
41 virtual TVector2 Position() const;
42 virtual TVector2 Dimensions() const;
43
44 // set methods
45 virtual void SetOffset(const TVector2& offset);
46 virtual void SetGlobalIndices();
47 virtual Int_t SetIndicesToMotifPosition(Int_t i, AliMpIntPair indices);
48
49 // get methods
50 virtual AliMpRow* GetRow() const;
51 virtual Int_t GetNofMotifs() const;
52 virtual AliMpVMotif* GetMotif(Int_t i) const;
53 virtual Int_t GetMotifPositionId(Int_t i) const;
54
55 private:
56 // methods
57 Double_t FirstMotifCenterX() const;
58 Double_t LastMotifCenterX() const;
59 Double_t MotifCenterX(Int_t motifPositionId) const;
60 Double_t MotifCenterY(Int_t motifPositionId) const;
61 Bool_t IsInside(const TVector2& position, Bool_t warn = true) const;
62
63 // data members
64 Int_t fNofMotifs; //number of motifs
65 AliMpIntPair fPadOffset; //the offset in nof pads
66 TVector2 fOffset; //the position of the centre of the first motif
67 //(x wtr to left border, y wtr to row center)
68 AliMpRow* fRow; //the row containing this segment
69 AliMpVMotif* fMotif; //the motif
70 Int_t fMotifPositionId; // the first motif position id
71 Int_t fMotifPositionDId; // +1 if ids are increasing, -1 if decreasing
72
73 ClassDef(AliMpRowSegment,1) //Row segment
74};
75
76#endif //ALI_MP_ROW_SEGMENT_H
77