]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/MUONmapping/AliMpVRowSegmentSpecial.h
Fixes for object target dependencies
[u/mrichter/AliRoot.git] / MUON / MUONmapping / AliMpVRowSegmentSpecial.h
CommitLineData
dee1d5f1 1/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
2 * See cxx source for full Copyright notice */
3
ea4cae7a 4// $Id$
13985652 5// $MpId: AliMpVRowSegmentSpecial.h,v 1.10 2006/05/24 13:58:21 ivana Exp $
dee1d5f1 6
7/// \ingroup sector
8/// \class AliMpVRowSegmentSpecial
9/// \brief Abstract base class for a special row segment composed of the
10/// pad rows.
11///
13985652 12/// \author David Guez, Ivana Hrivnacova; IPN Orsay
ea4cae7a 13
14#ifndef ALI_MP_V_ROW_SEGMENT_SPECIAL_H
15#define ALI_MP_V_ROW_SEGMENT_SPECIAL_H
16
2a7ea2e6 17#include "AliMpVRowSegment.h"
18#include "AliMpVMotif.h"
5006ec94 19
2a7ea2e6 20#include <TVector2.h>
5006ec94 21#include <TArrayI.h>
22#include <TObjArray.h>
ea4cae7a 23
24class AliMpRow;
25class AliMpPadRow;
26class AliMpVPadRowSegment;
ea4cae7a 27
28class AliMpVRowSegmentSpecial : public AliMpVRowSegment
29{
30 public:
31 AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX);
32 AliMpVRowSegmentSpecial();
33 virtual ~AliMpVRowSegmentSpecial();
34
f5671fc3 35 //
ea4cae7a 36 // methods
f5671fc3 37 //
ea4cae7a 38 void AddPadRow(AliMpPadRow* padRow);
39 void UpdateMotifVector();
f5671fc3 40 /// Update pads offset
ea4cae7a 41 virtual void UpdatePadsOffset() = 0;
f5671fc3 42 /// Return the x coordinate of the left border in the global coordinate system.
ea4cae7a 43 virtual Double_t LeftBorderX() const = 0;
f5671fc3 44 /// Return the x coordinate of the right border in the global coordinate system.
ea4cae7a 45 virtual Double_t RightBorderX() const= 0;
f5671fc3 46 /// Return the half size in y of this row segment.
ea4cae7a 47 virtual Double_t HalfSizeY() const;
48
f5671fc3 49 //
ea4cae7a 50 // find methods
f5671fc3 51 //
6e97fbb8 52 virtual AliMpVMotif* FindMotif(Double_t x, Double_t y) const;
53 virtual Int_t FindMotifPositionId(Double_t x, Double_t y) const;
ea4cae7a 54 virtual Bool_t HasMotifPosition(Int_t motifPositionId) const;
6e97fbb8 55
56 virtual void MotifCenter(Int_t motifPositionId,
57 Double_t& x, Double_t& y) const;
ea4cae7a 58
f5671fc3 59 //
ea4cae7a 60 // geometry
f5671fc3 61 //
6e97fbb8 62 /// Return the x position of the row segment centre.
63 virtual Double_t GetPositionX() const = 0;
64 /// Return the y position of the row segment centre.
65 virtual Double_t GetPositionY() const = 0;
66
67
68 /// Return the x dimension of the row segment centre.
69 virtual Double_t GetDimensionX() const;
70 /// Return the y dimension of the row segment centre.
71 virtual Double_t GetDimensionY() const;
ea4cae7a 72
f5671fc3 73 //
ea4cae7a 74 // set methods
f5671fc3 75 //
76 /// Calculate offset
6e97fbb8 77 virtual void SetOffset(Double_t /*x*/, Double_t /*y*/) {}
f5671fc3 78 /// Set global indices limits.
580c28fd 79 virtual void SetGlobalIndices(AliMpRow* rowBefore) = 0;
f5671fc3 80 /// Set global indices to i-th motif position and returns next index in x.
168e9c4d 81 virtual Int_t SetIndicesToMotifPosition(Int_t i, MpPair_t indices) = 0;
ea4cae7a 82
f5671fc3 83 //
ea4cae7a 84 // get methods
f5671fc3 85 //
ea4cae7a 86 virtual AliMpRow* GetRow() const;
87 virtual Int_t GetNofMotifs() const;
88 virtual AliMpVMotif* GetMotif(Int_t i) const;
89 virtual Int_t GetMotifPositionId(Int_t i) const;
90
91 protected:
92 // methods
f5671fc3 93 /// Return the coordinates of the motif specified with the given motif position Id \n
6e97fbb8 94 virtual void MotifCenterSlow(Int_t motifPositionId,
95 Double_t& x, Double_t& y) const = 0;
ea4cae7a 96 AliMpPadRow* FindPadRow(Double_t y) const;
97 AliMpVPadRowSegment* FindPadRowSegment(Int_t motifPositionId) const;
168e9c4d 98 MpPair_t FindRelativeLowIndicesOf(Int_t motifPositionId) const;
ea4cae7a 99 Int_t MaxNofPadsInRow() const;
100 Bool_t HasMotif(const AliMpVMotif* motif) const;
101
102 // get methods
103 Int_t GetNofPadRows() const;
104 AliMpPadRow* GetPadRow(Int_t i) const;
105 Double_t GetOffsetX() const;
106
107 private:
f5671fc3 108 /// Not implemented
13e7956b 109 AliMpVRowSegmentSpecial(const AliMpVRowSegmentSpecial& right);
f5671fc3 110 /// Not implemented
13e7956b 111 AliMpVRowSegmentSpecial& operator = (const AliMpVRowSegmentSpecial& right);
112
f79c58a5 113 // static data members
f5671fc3 114 static const Int_t fgkMaxNofMotifPositionIds; ///< dimension of fMotifPositionIds
f79c58a5 115
ea4cae7a 116 // data members
2294822d 117 AliMpRow* fRow; ///< the row containing this segment
118 Double_t fOffsetX; ///< \brief the x position of the border that touches a standard
119 /// row segment
120 TObjArray fPadRows; ///< pad rows vector
121 TObjArray fMotifs; ///< motifs vector
122 TArrayI fMotifPositionIds; ///< motifs position Ids vector
123 Int_t fNofMotifPositionIds; ///< number of motif positions Ids
ea4cae7a 124
125 ClassDef(AliMpVRowSegmentSpecial,1) //Row segment
126};
127
128// inline functions
129
f5671fc3 130/// Return the x position of the border that touches a standard row segment
ea4cae7a 131inline Double_t AliMpVRowSegmentSpecial::GetOffsetX() const
132{ return fOffsetX; }
133
134#endif //ALI_MP_V_ROW_SEGMENT_SPECIAL_H