40 #include "TObjArray.h"
64 Bool_t includeVoid)
const
87 static const Int_t kNofTestPositions(12);
88 static Double_t shiftx[12] = {-1., -1., -1., -1., -1./3., 1./3., 1., 1., 1., 1., 1./3., -1./3.};
89 static Double_t shifty[12] = {-1., -1./3., 1./3., 1., 1., 1., 1., 1./3., -1./3., -1., -1., -1.};
94 neighbours.SetOwner(kTRUE);
96 if ( ! pad.
IsValid() )
return 0;
108 else if ( includeVoid )
110 neighbours.Add(
new AliMpPad(invalid));
115 for ( Int_t i = 0; i < kNofTestPositions; ++i )
123 if ( p.
IsValid() && p != *previous )
126 neighbours.Add(previous);
129 else if ( includeVoid )
131 neighbours.Add(
new AliMpPad(invalid));
virtual Bool_t HasMotifPosition(Int_t manuId) const =0
Whether or not we have a given manu.
virtual AliMpMotifPosition * MotifPosition(Int_t manuId) const =0
Return the position of a given manu (aka motifPosition)
virtual Bool_t HasPadByIndices(Int_t ix, Int_t iy) const
virtual AliMpPad PadByIndices(Int_t ix, Int_t iy, Bool_t warning=true) const =0
Find pad by indices.
static AliMpPad Invalid()
Return invalid pad.
static Double_t LengthTolerance()
Return the length precision for tests.
Double_t GetPositionY() const
Return the pad x position (in cm)
virtual ~AliMpVSegmentation()
Bool_t IsValid() const
Return validity.
virtual AliMpPad PadByPosition(Double_t x, Double_t y, Bool_t warning=true) const =0
Find pad by position.
virtual Bool_t HasPadByLocation(Int_t manuId, Int_t manuChannel) const
Return true if the pad with given location exists.
The abstract base class for the segmentation.
Double_t GetDimensionY() const
Return the y pad dimension - half length (in cm)
virtual Int_t GetNeighbours(const AliMpPad &pad, TObjArray &neighbours, Bool_t includeSelf=kFALSE, Bool_t includeVoid=kFALSE) const =0
Class which encapsuate all information about a pad.
Double_t GetPositionX() const
Return the pad x position (in cm)
virtual AliMpPad PadByLocation(Int_t manuId, Int_t manuChannel, Bool_t warning=true) const =0
Find pad by location.
Double_t GetDimensionX() const
Return the x pad dimension - half length (in cm)