AliRoot Core  3abf5b4 (3abf5b4)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpSlatSegmentation Class Reference

Implementation of AliMpVSegmentation for St345 slats. More...

#include <AliMpSlatSegmentation.h>

Inheritance diagram for AliMpSlatSegmentation:

Public Member Functions

 AliMpSlatSegmentation ()
 
 AliMpSlatSegmentation (const AliMpSlat *slat, Bool_t own=false)
 
virtual ~AliMpSlatSegmentation ()
 
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
 
const char * GetName () const
 
Int_t MaxPadIndexX () const
 Return maximum pad index in X direction. More...
 
Int_t MaxPadIndexY () const
 Return maximum pad index in Y direction. More...
 
Int_t NofPads () const
 Return the number of pads in the detection element. More...
 
virtual AliMpPad PadByLocation (Int_t manuId, Int_t manuChannel, Bool_t warning) const
 Find pad by location. More...
 
virtual AliMpPad PadByIndices (Int_t ix, Int_t iy, Bool_t warning) const
 Find pad by indices. More...
 
virtual AliMpPad PadByPosition (Double_t x, Double_t y, Bool_t warning) const
 Find pad by position. More...
 
virtual void Print (Option_t *opt) const
 
const AliMpSlatSlat () const
 
void GetAllElectronicCardIDs (TArrayI &ecn) const
 Fill the given array with the electronic card IDs. 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 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 GetNofElectronicCards () const
 Get the number of electronic card IDs. 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 Bool_t HasMotifPosition (Int_t manuId) 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...
 
- Public Member Functions inherited from AliMpVSegmentation
 AliMpVSegmentation ()
 
virtual ~AliMpVSegmentation ()
 

Private Member Functions

 AliMpSlatSegmentation (const AliMpSlatSegmentation &right)
 Not implemented. More...
 
AliMpSlatSegmentationoperator= (const AliMpSlatSegmentation &right)
 Not implemented. More...
 

Private Attributes

const AliMpSlatfkSlat
 Slat. More...
 
Bool_t fIsOwner
 Slat ownership. More...
 

Detailed Description

Implementation of AliMpVSegmentation for St345 slats.

Note that integer indices start at (0,0) on the bottom-left of the slat, while floating point positions are relative to the center of the slat (where the slat is to be understood as N PCBs of fixed size = 40cm even if not all pads of a given PCBs are actually physically there).

Author
Laurent Aphecetche

Definition at line 37 of file AliMpSlatSegmentation.h.

Constructor & Destructor Documentation

AliMpSlatSegmentation::AliMpSlatSegmentation ( )

Default ctor. Not to be used really.

Definition at line 46 of file AliMpSlatSegmentation.cxx.

AliMpSlatSegmentation::AliMpSlatSegmentation ( const AliMpSlat slat,
Bool_t  own = false 
)

Normal ctor.

Definition at line 58 of file AliMpSlatSegmentation.cxx.

AliMpSlatSegmentation::~AliMpSlatSegmentation ( )
virtual

Dtor (empty).

Definition at line 70 of file AliMpSlatSegmentation.cxx.

AliMpSlatSegmentation::AliMpSlatSegmentation ( const AliMpSlatSegmentation right)
private

Not implemented.

Member Function Documentation

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

Create iterator over pads in the given area.

Returns an iterator to loop over the pad contained within given area.

Implements AliMpVSegmentation.

Definition at line 84 of file AliMpSlatSegmentation.cxx.

AliMpVPadIterator * AliMpSlatSegmentation::CreateIterator ( ) const
virtual

Create a pad iterator over the whole area.

Returns an iterator to loop over all pads of that segmentation

FIXME: we currently just forward this to the other CreateIterator, with the proper region. Might be more efficient to write a dedicated iterator ? Test that idea.

Implements AliMpVSegmentation.

Definition at line 106 of file AliMpSlatSegmentation.cxx.

void AliMpSlatSegmentation::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 147 of file AliMpSlatSegmentation.cxx.

Double_t AliMpSlatSegmentation::GetDimensionX ( ) const
virtual

Return the x half-sizes of the detection element.

Return slat x dimensions

Implements AliMpVSegmentation.

Definition at line 131 of file AliMpSlatSegmentation.cxx.

Double_t AliMpSlatSegmentation::GetDimensionY ( ) const
virtual

Return the y half-sizes of the detection element.

Return slat y dimensions

Implements AliMpVSegmentation.

Definition at line 139 of file AliMpSlatSegmentation.cxx.

const char * AliMpSlatSegmentation::GetName ( ) const

The name of this segmentation is "SlatSegmentation"+slatName

Definition at line 156 of file AliMpSlatSegmentation.cxx.

Int_t AliMpSlatSegmentation::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 120 of file AliMpSlatSegmentation.cxx.

Int_t AliMpSlatSegmentation::GetNofElectronicCards ( ) const
virtual

Get the number of electronic card IDs.

Get the number of manus of this slat

Implements AliMpVSegmentation.

Definition at line 427 of file AliMpSlatSegmentation.cxx.

Double_t AliMpSlatSegmentation::GetPositionX ( ) const
virtual

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

Return x position of slat origin

Implements AliMpVSegmentation.

Definition at line 436 of file AliMpSlatSegmentation.cxx.

Double_t AliMpSlatSegmentation::GetPositionY ( ) const
virtual

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

Return y position of slat origin

Implements AliMpVSegmentation.

Definition at line 444 of file AliMpSlatSegmentation.cxx.

Bool_t AliMpSlatSegmentation::HasMotifPosition ( Int_t  manuId) const
virtual

Whether or not we have a given manu.

Use default implementation

Default implementation to know if we hold a given manu

Implements AliMpVSegmentation.

Definition at line 453 of file AliMpSlatSegmentation.cxx.

Bool_t AliMpSlatSegmentation::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...

Tell whether 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 400 of file AliMpSlatSegmentation.cxx.

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

Return true if the pad with given location exists.

Tell whether 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 413 of file AliMpSlatSegmentation.cxx.

Int_t AliMpSlatSegmentation::MaxPadIndexX ( ) const
virtual

Return maximum pad index in X direction.

Returns the value of the largest pad index in x-direction.

Implements AliMpVSegmentation.

Definition at line 171 of file AliMpSlatSegmentation.cxx.

Int_t AliMpSlatSegmentation::MaxPadIndexY ( ) const
virtual

Return maximum pad index in Y direction.

Returns the value of the largest pad index in y-direction.

Implements AliMpVSegmentation.

Definition at line 182 of file AliMpSlatSegmentation.cxx.

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

Return the position of a given manu (aka motifPosition)

Get back a given manu

Implements AliMpVSegmentation.

Definition at line 461 of file AliMpSlatSegmentation.cxx.

Int_t AliMpSlatSegmentation::NofPads ( ) const
virtual

Return the number of pads in the detection element.

Return number of pads defined in the slat

Implements AliMpVSegmentation.

Definition at line 193 of file AliMpSlatSegmentation.cxx.

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

Not implemented.

AliMpPad AliMpSlatSegmentation::PadByIndices ( Int_t  ix,
Int_t  iy,
Bool_t  warning 
) const
virtual

Find pad by indices.

Returns the pad specified by its integer indices. If warning=kTRUE and the pad does not exist, a warning message is printed.

AliMpPad::Invalid() is returned if there's no pad at the given location.

FIXME: except for the FindMotifPosition below, this method is exactly as the one in AliMpSectorSegmentation. See if we can merge them somehow.

Implements AliMpVSegmentation.

Definition at line 253 of file AliMpSlatSegmentation.cxx.

Referenced by AliMpPCBPadIterator::SetPad().

AliMpPad AliMpSlatSegmentation::PadByLocation ( Int_t  manuId,
Int_t  manuChannel,
Bool_t  warning 
) const
virtual

Find pad by location.

Returns the pad specified by its location, where location is the pair (ManuID,ManuChannel). If warning=kTRUE and the pad does not exist, a warning message is printed.

AliMpPad::Invalid() is returned if there's no pad at the given location.

Implements AliMpVSegmentation.

Definition at line 202 of file AliMpSlatSegmentation.cxx.

AliMpPad AliMpSlatSegmentation::PadByPosition ( Double_t  x,
Double_t  y,
Bool_t  warning 
) const
virtual

Find pad by position.

Returns the pad specified by its (floating point) position. If warning=kTRUE and the pad does not exist, a warning message is printed.

AliMpPad::Invalid() is returned if there's no pad at the given location.

Implements AliMpVSegmentation.

Definition at line 308 of file AliMpSlatSegmentation.cxx.

AliMp::PlaneType AliMpSlatSegmentation::PlaneType ( ) const
virtual

Return the plane type.

Implements AliMpVSegmentation.

Definition at line 373 of file AliMpSlatSegmentation.cxx.

void AliMpSlatSegmentation::Print ( Option_t *  opt) const
virtual

Printing

Definition at line 380 of file AliMpSlatSegmentation.cxx.

const AliMpSlat * AliMpSlatSegmentation::Slat ( ) const
AliMp::StationType AliMpSlatSegmentation::StationType ( ) const
inlinevirtual

Return station type.

Implements AliMpVSegmentation.

Definition at line 105 of file AliMpSlatSegmentation.h.

Member Data Documentation

Bool_t AliMpSlatSegmentation::fIsOwner
private

Slat ownership.

Definition at line 99 of file AliMpSlatSegmentation.h.

Referenced by ~AliMpSlatSegmentation().

const AliMpSlat* AliMpSlatSegmentation::fkSlat
private

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