#ifndef ALI_MP_V_ROW_SEGMENT_SPECIAL_H
#define ALI_MP_V_ROW_SEGMENT_SPECIAL_H
-#include "AliMpContainers.h"
-
#include "AliMpVRowSegment.h"
#include "AliMpVMotif.h"
#include <TVector2.h>
-#ifdef WITH_ROOT
#include <TArrayI.h>
#include <TObjArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
class AliMpRow;
class AliMpPadRow;
class AliMpVPadRowSegment;
-class AliMpIntPair;
class AliMpVRowSegmentSpecial : public AliMpVRowSegment
{
- public:
-#ifdef WITH_STL
- typedef std::vector<AliMpPadRow*> PadRowVector;
- typedef std::vector<AliMpVMotif*> MotifVector;
- typedef std::vector<Int_t> MotifPositionIdVector;
-#endif
-#ifdef WITH_ROOT
- typedef TObjArray PadRowVector;
- typedef TObjArray MotifVector;
- typedef TArrayI MotifPositionIdVector;
-#endif
-
public:
AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX);
AliMpVRowSegmentSpecial();
virtual ~AliMpVRowSegmentSpecial();
+ //
// methods
+ //
void AddPadRow(AliMpPadRow* padRow);
void UpdateMotifVector();
+ /// Update pads offset
virtual void UpdatePadsOffset() = 0;
+ /// Return the x coordinate of the left border in the global coordinate system.
virtual Double_t LeftBorderX() const = 0;
+ /// Return the x coordinate of the right border in the global coordinate system.
virtual Double_t RightBorderX() const= 0;
+ /// Return the half size in y of this row segment.
virtual Double_t HalfSizeY() const;
+ //
// find methods
- virtual AliMpVMotif* FindMotif(const TVector2& position) const;
- virtual Int_t FindMotifPositionId(const TVector2& position) const;
+ //
+ virtual AliMpVMotif* FindMotif(Double_t x, Double_t y) const;
+ virtual Int_t FindMotifPositionId(Double_t x, Double_t y) const;
virtual Bool_t HasMotifPosition(Int_t motifPositionId) const;
- virtual TVector2 MotifCenter(Int_t motifPositionId) const;
+ virtual void MotifCenter(Int_t motifPositionId,
+ Double_t& x, Double_t& y) const;
+
+ //
// geometry
- virtual TVector2 Position() const = 0;
- virtual TVector2 Dimensions() const;
+ //
+ /// Return the x position of the row segment centre.
+ virtual Double_t GetPositionX() const = 0;
+ /// Return the y position of the row segment centre.
+ virtual Double_t GetPositionY() const = 0;
+
+
+ /// Return the x dimension of the row segment centre.
+ virtual Double_t GetDimensionX() const;
+ /// Return the y dimension of the row segment centre.
+ virtual Double_t GetDimensionY() const;
+ //
// set methods
- virtual void SetOffset(const TVector2& /*offset*/) {}
+ //
+ /// Calculate offset
+ virtual void SetOffset(Double_t /*x*/, Double_t /*y*/) {}
+ /// Set global indices limits.
virtual void SetGlobalIndices(AliMpRow* rowBefore) = 0;
- virtual Int_t SetIndicesToMotifPosition(Int_t i,
- const AliMpIntPair& indices) = 0;
+ /// Set global indices to i-th motif position and returns next index in x.
+ virtual Int_t SetIndicesToMotifPosition(Int_t i, MpPair_t indices) = 0;
+ //
// get methods
+ //
virtual AliMpRow* GetRow() const;
virtual Int_t GetNofMotifs() const;
virtual AliMpVMotif* GetMotif(Int_t i) const;
protected:
// methods
- virtual TVector2 MotifCenterSlow(Int_t motifPositionId) const = 0;
+ /// Return the coordinates of the motif specified with the given motif position Id \n
+ virtual void MotifCenterSlow(Int_t motifPositionId,
+ Double_t& x, Double_t& y) const = 0;
AliMpPadRow* FindPadRow(Double_t y) const;
AliMpVPadRowSegment* FindPadRowSegment(Int_t motifPositionId) const;
- AliMpIntPair FindRelativeLowIndicesOf(Int_t motifPositionId) const;
+ MpPair_t FindRelativeLowIndicesOf(Int_t motifPositionId) const;
Int_t MaxNofPadsInRow() const;
Bool_t HasMotif(const AliMpVMotif* motif) const;
Double_t GetOffsetX() const;
private:
+ /// Not implemented
AliMpVRowSegmentSpecial(const AliMpVRowSegmentSpecial& right);
+ /// Not implemented
AliMpVRowSegmentSpecial& operator = (const AliMpVRowSegmentSpecial& right);
-#ifdef WITH_ROOT
// static data members
- static const Int_t fgkMaxNofMotifPositionIds; // dimension of fMotifPositionIds
-#endif
+ static const Int_t fgkMaxNofMotifPositionIds; ///< dimension of fMotifPositionIds
// data members
- AliMpRow* fRow; ///< the row containing this segment
- Double_t fOffsetX; ///< \brief the x position of the border that touches a standard
- /// row segment
- PadRowVector fPadRows; ///< pad rows vector
- MotifVector fMotifs; ///< motifs vector
- MotifPositionIdVector fMotifPositionIds; ///< motifs position Ids vector
-
-#ifdef WITH_ROOT
- Int_t fNofMotifPositionIds; ///< number of motif positions Ids
-#endif
+ AliMpRow* fRow; ///< the row containing this segment
+ Double_t fOffsetX; ///< \brief the x position of the border that touches a standard
+ /// row segment
+ TObjArray fPadRows; ///< pad rows vector
+ TObjArray fMotifs; ///< motifs vector
+ TArrayI fMotifPositionIds; ///< motifs position Ids vector
+ Int_t fNofMotifPositionIds; ///< number of motif positions Ids
ClassDef(AliMpVRowSegmentSpecial,1) //Row segment
};
// inline functions
+/// Return the x position of the border that touches a standard row segment
inline Double_t AliMpVRowSegmentSpecial::GetOffsetX() const
{ return fOffsetX; }