AliRoot Core  edcc906 (edcc906)
AliMpSectorSegmentation Class Reference

A segmentation of the sector. More...

#include <AliMpSectorSegmentation.h>

Inheritance diagram for AliMpSectorSegmentation:

Public Member Functions

 AliMpSectorSegmentation (const AliMpSector *sector, Bool_t own=false)
 
 AliMpSectorSegmentation ()
 
virtual ~AliMpSectorSegmentation ()
 
virtual AliMpVPadIteratorCreateIterator (const AliMpArea &area) const
 Create iterator over pads in the given area. More...
 
virtual AliMpVPadIteratorCreateIterator () const
 Create a pad iterator over the whole area. More...
 
virtual Int_t GetNeighbours (const AliMpPad &pad, TObjArray &neighbours, Bool_t includeSelf=kFALSE, Bool_t includeVoid=kFALSE) const
 
virtual AliMpPad PadByLocation (Int_t manuId, Int_t manuChannel, Bool_t warning=kTRUE) const
 Find pad by location. More...
 
virtual AliMpPad PadByIndices (Int_t ix, Int_t iy, Bool_t warning=kTRUE) const
 Find pad by indices. More...
 
virtual AliMpPad PadByPosition (Double_t x, Double_t y, Bool_t warning=kTRUE) const
 Find pad by position. More...
 
virtual AliMpPad PadByDirection (Double_t startx, Double_t starty, Double_t distance) const
 
virtual Bool_t HasPadByIndices (Int_t ix, Int_t iy) const
 
virtual Bool_t HasPadByLocation (Int_t manuId, Int_t manuChannel) const
 Return true if the pad with given location exists. More...
 
virtual Int_t MaxPadIndexX () const
 Return maximum pad index in X direction. More...
 
virtual Int_t MaxPadIndexY () const
 Return maximum pad index in Y direction. More...
 
virtual Int_t NofPads () const
 Return the number of pads in the detection element. More...
 
virtual void GetAllElectronicCardIDs (TArrayI &ecn) const
 Fill the given array with the electronic card IDs. More...
 
virtual Int_t GetNofElectronicCards () const
 Get the number of electronic card IDs. More...
 
virtual Bool_t HasMotifPosition (Int_t motifPositionID) const
 Whether or not we have a given manu. More...
 
virtual AliMpMotifPositionMotifPosition (Int_t manuId) const
 Return the position of a given manu (aka motifPosition) More...
 
virtual AliMp::PlaneType PlaneType () const
 Return the plane type. More...
 
virtual AliMp::StationType StationType () const
 Return station type. More...
 
virtual Double_t GetDimensionX () const
 Return the x half-sizes of the detection element. More...
 
virtual Double_t GetDimensionY () const
 Return the y half-sizes of the detection element. More...
 
virtual Double_t GetPositionX () const
 Return the x position of the origin of the detection element. More...
 
virtual Double_t GetPositionY () const
 Return the y position of the origin of the detection element. More...
 
virtual void Print (Option_t *opt="") const
 
Double_t GetMinPadDimensionX () const
 
Double_t GetMinPadDimensionY () const
 
Bool_t CircleTest (Int_t ix, Int_t iy) const
 
const AliMpSectorGetSector () const
 Return the sector. More...
 
- Public Member Functions inherited from AliMpVSegmentation
 AliMpVSegmentation ()
 
virtual ~AliMpVSegmentation ()
 

Private Member Functions

 AliMpSectorSegmentation (const AliMpSectorSegmentation &right)
 Not implemented. More...
 
AliMpSectorSegmentationoperator= (const AliMpSectorSegmentation &right)
 Not implemented. More...
 
AliMpMotifPositionFindMotifPosition (Int_t ix, Int_t iy) const
 
virtual AliMpPad PadByXDirection (Double_t startx, Double_t starty, Double_t maxX) const
 
virtual AliMpPad PadByYDirection (Double_t startx, Double_t starty, Double_t maxY) const
 

Private Attributes

const AliMpSectorfkSector
 Sector. More...
 
Bool_t fIsOwner
 Sector ownership. More...
 
AliMpPadfPadBuffer
 The pad buffer. More...
 
Int_t fMaxIndexInX
 maximum pad index in x More...
 
Int_t fMaxIndexInY
 maximum pad index in y More...
 

Detailed Description

A segmentation of the sector.

Provides methods related to pads:
conversion between pad indices, pad location, pad position; finding pad neighbour.

Author
David Guez, Ivana Hrivnacova; IPN Orsay

Definition at line 30 of file AliMpSectorSegmentation.h.

Constructor & Destructor Documentation

AliMpSectorSegmentation::AliMpSectorSegmentation ( const AliMpSector sector,
Bool_t  own = false 
)

Standard constructor

Definition at line 60 of file AliMpSectorSegmentation.cxx.

AliMpSectorSegmentation::AliMpSectorSegmentation ( )

Default constructor

Definition at line 79 of file AliMpSectorSegmentation.cxx.

AliMpSectorSegmentation::~AliMpSectorSegmentation ( )
virtual

Destructor

Definition at line 93 of file AliMpSectorSegmentation.cxx.

AliMpSectorSegmentation::AliMpSectorSegmentation ( const AliMpSectorSegmentation right)
private

Not implemented.

Member Function Documentation

Bool_t AliMpSectorSegmentation::CircleTest ( Int_t  ix,
Int_t  iy 
) const

Verify that all methods for retrieving pads are consistents between them. Return true if the pad with specified indices was found and verified, false otherwise.

Definition at line 589 of file AliMpSectorSegmentation.cxx.

AliMpVPadIterator * AliMpSectorSegmentation::CreateIterator ( const AliMpArea area) const
virtual

Create iterator over pads in the given area.

Create the area iterator.

Implements AliMpVSegmentation.

Definition at line 247 of file AliMpSectorSegmentation.cxx.

AliMpVPadIterator * AliMpSectorSegmentation::CreateIterator ( ) const
virtual

Create a pad iterator over the whole area.

Create the sector iterator

Implements AliMpVSegmentation.

Definition at line 265 of file AliMpSectorSegmentation.cxx.

AliMpMotifPosition * AliMpSectorSegmentation::FindMotifPosition ( Int_t  ix,
Int_t  iy 
) const
private

Find the motif position which contains the given pad indices return 0 if not found

Definition at line 111 of file AliMpSectorSegmentation.cxx.

Referenced by HasPadByIndices(), and PadByIndices().

void AliMpSectorSegmentation::GetAllElectronicCardIDs ( TArrayI &  ecn) const
virtual

Fill the given array with the electronic card IDs.

Fill the array ecn with all manuIds

Implements AliMpVSegmentation.

Definition at line 490 of file AliMpSectorSegmentation.cxx.

Double_t AliMpSectorSegmentation::GetDimensionX ( ) const
virtual

Return the x half-sizes of the detection element.

Return sector x dimensions

Implements AliMpVSegmentation.

Definition at line 531 of file AliMpSectorSegmentation.cxx.

Double_t AliMpSectorSegmentation::GetDimensionY ( ) const
virtual

Return the y half-sizes of the detection element.

Return sector y dimensions

Implements AliMpVSegmentation.

Definition at line 539 of file AliMpSectorSegmentation.cxx.

Double_t AliMpSectorSegmentation::GetMinPadDimensionX ( ) const

Return the x dimension of the smallest pad.

Definition at line 571 of file AliMpSectorSegmentation.cxx.

Referenced by AliMpSectorAreaVPadIterator::MoveRight().

Double_t AliMpSectorSegmentation::GetMinPadDimensionY ( ) const

Return the y dimension of the smallest pad.

Definition at line 580 of file AliMpSectorSegmentation.cxx.

Referenced by AliMpSectorAreaHPadIterator::MoveUp().

Int_t AliMpSectorSegmentation::GetNeighbours ( const AliMpPad pad,
TObjArray neighbours,
Bool_t  includeSelf = kFALSE,
Bool_t  includeVoid = kFALSE 
) const
virtual

Fill the array with the pads that are neighbours of pad. Returns the number of neighbours.

Uses default implementation

Returns the list of neighbours of pad testPositions are the positions (L,T,R,B) relative to pad's center (O) were we'll try to get a neighbouring pad, by getting a little bit outside the pad itself. The pad density can only decrease when going from left to right except for round slates where it is the opposite. The pad density can only decrease when going from bottom to top but to be symmetric we also consider the opposite. The order in which we actually test the positions has some importance, i.e. when using this information to compute status map later on. Here's the sequence :

4- 5- 6-7
|       |
3       8
|   0   |
2       9
|       |
1-12-11-10

Implements AliMpVSegmentation.

Definition at line 274 of file AliMpSectorSegmentation.cxx.

Int_t AliMpSectorSegmentation::GetNofElectronicCards ( ) const
virtual

Get the number of electronic card IDs.

Get the number of manus of this sector

Implements AliMpVSegmentation.

Definition at line 499 of file AliMpSectorSegmentation.cxx.

Double_t AliMpSectorSegmentation::GetPositionX ( ) const
virtual

Return the x position of the origin of the detection element.

Return x position

Implements AliMpVSegmentation.

Definition at line 547 of file AliMpSectorSegmentation.cxx.

Double_t AliMpSectorSegmentation::GetPositionY ( ) const
virtual

Return the y position of the origin of the detection element.

Return y position

Implements AliMpVSegmentation.

Definition at line 555 of file AliMpSectorSegmentation.cxx.

const AliMpSector * AliMpSectorSegmentation::GetSector ( ) const
inline
Bool_t AliMpSectorSegmentation::HasMotifPosition ( Int_t  manuId) const
virtual

Whether or not we have a given manu.

Whether we get a given manu. Uses default implementation

Default implementation to know if we hold a given manu

Implements AliMpVSegmentation.

Definition at line 508 of file AliMpSectorSegmentation.cxx.

Bool_t AliMpSectorSegmentation::HasPadByIndices ( Int_t  ix,
Int_t  iy 
) const
virtual

Return true if the pad with given indices exists. Compared with the PadByIndices method, this one can generally be implemented faster, as one does not have to create an AliMpPad object...

Whether or not we have a pad at indices=(ix,iy)

Default implementation. Must be overwritten if can be made more efficient in the child class

Reimplemented from AliMpVSegmentation.

Definition at line 437 of file AliMpSectorSegmentation.cxx.

Referenced by CircleTest().

Bool_t AliMpSectorSegmentation::HasPadByLocation ( Int_t  manuId,
Int_t  manuChannel 
) const
virtual

Return true if the pad with given location exists.

Whether or not we have a pad at location=(manuId,manuChannel)

Default implementation. Must be overwritten if can be made more efficient in the child class

Reimplemented from AliMpVSegmentation.

Definition at line 452 of file AliMpSectorSegmentation.cxx.

Int_t AliMpSectorSegmentation::MaxPadIndexX ( ) const
virtual

Return maximum pad index in X direction.

Return maximum pad index in x

Implements AliMpVSegmentation.

Definition at line 465 of file AliMpSectorSegmentation.cxx.

Int_t AliMpSectorSegmentation::MaxPadIndexY ( ) const
virtual

Return maximum pad index in Y direction.

Return maximum pad index in y

Implements AliMpVSegmentation.

Definition at line 473 of file AliMpSectorSegmentation.cxx.

AliMpMotifPosition * AliMpSectorSegmentation::MotifPosition ( Int_t  manuId) const
virtual

Return the position of a given manu (aka motifPosition)

Return a given manu

Implements AliMpVSegmentation.

Definition at line 516 of file AliMpSectorSegmentation.cxx.

Int_t AliMpSectorSegmentation::NofPads ( ) const
virtual

Return the number of pads in the detection element.

Return number of pads defined in the sector

Implements AliMpVSegmentation.

Definition at line 481 of file AliMpSectorSegmentation.cxx.

AliMpSectorSegmentation& AliMpSectorSegmentation::operator= ( const AliMpSectorSegmentation right)
private

Not implemented.

AliMpPad AliMpSectorSegmentation::PadByDirection ( Double_t  startx,
Double_t  starty,
Double_t  distance 
) const
virtual

Find the first valid pad from starting position in the direction of pad lines/columns up to the specified distance. Pad lines are the lines of pads in the sector with constant pad y size, pad columns are the columns of pads in the sector with constant pad x size.

Definition at line 415 of file AliMpSectorSegmentation.cxx.

Referenced by AliMpSectorAreaHPadIterator::First(), AliMpSectorAreaVPadIterator::First(), AliMpSectorAreaVPadIterator::MoveRight(), AliMpSectorAreaHPadIterator::MoveUp(), AliMpSectorAreaHPadIterator::Next(), and AliMpSectorAreaVPadIterator::Next().

AliMpPad AliMpSectorSegmentation::PadByIndices ( Int_t  ix,
Int_t  iy,
Bool_t  warning = kTRUE 
) const
virtual

Find pad by indices.

Find the pad which corresponds to the given indices

Implements AliMpVSegmentation.

Definition at line 321 of file AliMpSectorSegmentation.cxx.

Referenced by CircleTest().

AliMpPad AliMpSectorSegmentation::PadByLocation ( Int_t  manuId,
Int_t  manuChannel,
Bool_t  warning = kTRUE 
) const
virtual

Find pad by location.

Find the pad which corresponds to the given location

Implements AliMpVSegmentation.

Definition at line 284 of file AliMpSectorSegmentation.cxx.

Referenced by CircleTest().

AliMpPad AliMpSectorSegmentation::PadByPosition ( Double_t  x,
Double_t  y,
Bool_t  warning = kTRUE 
) const
virtual

Find pad by position.

Find the pad which corresponds to the given position

Implements AliMpVSegmentation.

Definition at line 363 of file AliMpSectorSegmentation.cxx.

Referenced by CircleTest(), PadByXDirection(), and PadByYDirection().

AliMpPad AliMpSectorSegmentation::PadByXDirection ( Double_t  startx,
Double_t  starty,
Double_t  maxX 
) const
privatevirtual

Find the first valid pad from starting position in the direction of pad lines up to distance dx.

Definition at line 187 of file AliMpSectorSegmentation.cxx.

Referenced by PadByDirection().

AliMpPad AliMpSectorSegmentation::PadByYDirection ( Double_t  startx,
Double_t  starty,
Double_t  maxY 
) const
privatevirtual

Find the first valid pad from starting position in the direction of pad columns up to distance dx.

Definition at line 215 of file AliMpSectorSegmentation.cxx.

Referenced by PadByDirection().

AliMp::PlaneType AliMpSectorSegmentation::PlaneType ( ) const
virtual

Return the plane type.

Implements AliMpVSegmentation.

Definition at line 524 of file AliMpSectorSegmentation.cxx.

void AliMpSectorSegmentation::Print ( Option_t *  opt = "") const
virtual

Print the sector

Definition at line 563 of file AliMpSectorSegmentation.cxx.

AliMp::StationType AliMpSectorSegmentation::StationType ( ) const
inlinevirtual

Return station type.

Implements AliMpVSegmentation.

Definition at line 116 of file AliMpSectorSegmentation.h.

Member Data Documentation

Bool_t AliMpSectorSegmentation::fIsOwner
private

Sector ownership.

Definition at line 100 of file AliMpSectorSegmentation.h.

Referenced by ~AliMpSectorSegmentation().

Int_t AliMpSectorSegmentation::fMaxIndexInX
private

maximum pad index in x

Definition at line 102 of file AliMpSectorSegmentation.h.

Int_t AliMpSectorSegmentation::fMaxIndexInY
private

maximum pad index in y

Definition at line 103 of file AliMpSectorSegmentation.h.

AliMpPad* AliMpSectorSegmentation::fPadBuffer
private

The pad buffer.

Definition at line 101 of file AliMpSectorSegmentation.h.

Referenced by PadByIndices(), PadByLocation(), PadByPosition(), and ~AliMpSectorSegmentation().


The documentation for this class was generated from the following files: