AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMpFastSegmentation Class Reference

Fast version of AliMpVSegmentation. More...

#include <AliMpFastSegmentation.h>

Inheritance diagram for AliMpFastSegmentation:

Public Member Functions

 AliMpFastSegmentation (AliMpVSegmentation *seg)
 
virtual ~AliMpFastSegmentation ()
 
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 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 AliMpPad PadByLocation (Int_t manuId, Int_t manuChannel, Bool_t warning=true) const
 Find pad by location. More...
 
virtual AliMpPad PadByIndices (Int_t ix, Int_t iy, Bool_t warning=true) const
 Find pad by indices. More...
 
virtual AliMpPad PadByPosition (Double_t x, Double_t y, Bool_t warning=true) const
 Find pad by position. 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 AliMp::PlaneType PlaneType () const
 Return the plane 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 AliMpMotifPositionMotifPosition (Int_t manuId) const
 Return the position of a given manu (aka motifPosition) More...
 
virtual Bool_t HasMotifPosition (Int_t manuId) const
 Whether or not we have a given manu. More...
 
virtual void Print (Option_t *opt="") const
 
AliMpVSegmentationGetHelper () const
 Return helper class. More...
 
AliMp::StationType StationType () const
 Return segmentation station type. More...
 
- Public Member Functions inherited from AliMpVSegmentation
 AliMpVSegmentation ()
 
virtual ~AliMpVSegmentation ()
 

Private Member Functions

 AliMpFastSegmentation (const AliMpFastSegmentation &rhs)
 Not implemented. More...
 
AliMpFastSegmentationoperator= (const AliMpFastSegmentation &rhs)
 Not implemented. More...
 
virtual AliMpMotifPositionInternalMotifPosition (Int_t index) const
 

Private Attributes

AliMpVSegmentationfHelper
 helper class (owner) More...
 
TObjArray fMotifPositions
 array of AliMpMotifPositions (not owner) More...
 
TExMap fIxIy
 map of (ix,iy) -> index in array above More...
 
TExMap fManuId
 map of (manuid) -> index in array above More...
 
Double_t fPositionX
 to compute pad positions More...
 
Double_t fPositionY
 to compute pad positions More...
 

Detailed Description

Fast version of AliMpVSegmentation.

An implementation of AliMpVSegmentation, which uses some internal maps to speed up the (Has)PadByIndices and PadByLocation methods.

L. Aphecetche, Subatech

Definition at line 33 of file AliMpFastSegmentation.h.

Constructor & Destructor Documentation

AliMpFastSegmentation::AliMpFastSegmentation ( AliMpVSegmentation seg)

Ctor. We adopt vseg.

Definition at line 78 of file AliMpFastSegmentation.cxx.

AliMpFastSegmentation::~AliMpFastSegmentation ( )
virtual

dtor

Definition at line 134 of file AliMpFastSegmentation.cxx.

AliMpFastSegmentation::AliMpFastSegmentation ( const AliMpFastSegmentation rhs)
private

Not implemented.

Member Function Documentation

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

Create iterator over pads in the given area.

Forward to our helper

Implements AliMpVSegmentation.

Definition at line 142 of file AliMpFastSegmentation.cxx.

AliMpVPadIterator * AliMpFastSegmentation::CreateIterator ( ) const
virtual

Create a pad iterator over the whole area.

Forward to our helper

Implements AliMpVSegmentation.

Definition at line 150 of file AliMpFastSegmentation.cxx.

Referenced by MotifPosition().

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

Fill the given array with the electronic card IDs.

Forward to our helper

Implements AliMpVSegmentation.

Definition at line 363 of file AliMpFastSegmentation.cxx.

Double_t AliMpFastSegmentation::GetDimensionX ( ) const
virtual

Return the x half-sizes of the detection element.

Forward to our helper

Implements AliMpVSegmentation.

Definition at line 428 of file AliMpFastSegmentation.cxx.

Double_t AliMpFastSegmentation::GetDimensionY ( ) const
virtual

Return the y half-sizes of the detection element.

Forward to our helper

Implements AliMpVSegmentation.

Definition at line 436 of file AliMpFastSegmentation.cxx.

AliMpVSegmentation* AliMpFastSegmentation::GetHelper ( ) const
inline

Return helper class.

Definition at line 76 of file AliMpFastSegmentation.h.

Referenced by AliMpSegmentation::GetSector(), AliMpSegmentation::GetSlat(), and AliMpSegmentation::GetTrigger().

Int_t AliMpFastSegmentation::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.

Use 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 158 of file AliMpFastSegmentation.cxx.

Int_t AliMpFastSegmentation::GetNofElectronicCards ( ) const
virtual

Get the number of electronic card IDs.

Forward to our helper

Implements AliMpVSegmentation.

Definition at line 355 of file AliMpFastSegmentation.cxx.

Double_t AliMpFastSegmentation::GetPositionX ( ) const
virtual

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

Forward to our helper

Implements AliMpVSegmentation.

Definition at line 444 of file AliMpFastSegmentation.cxx.

Double_t AliMpFastSegmentation::GetPositionY ( ) const
virtual

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

Forward to our helper

Implements AliMpVSegmentation.

Definition at line 452 of file AliMpFastSegmentation.cxx.

Bool_t AliMpFastSegmentation::HasMotifPosition ( Int_t  manuId) const
virtual

Whether or not we have a given manu.

Whether or not we have a given manu

Default implementation to know if we hold a given manu

Implements AliMpVSegmentation.

Definition at line 460 of file AliMpFastSegmentation.cxx.

Bool_t AliMpFastSegmentation::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 there is a pad at the given indices

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

Reimplemented from AliMpVSegmentation.

Definition at line 371 of file AliMpFastSegmentation.cxx.

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

Return true if the pad with given location exists.

Whether there is a pad at the given location (de,manuid)

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

Reimplemented from AliMpVSegmentation.

Definition at line 391 of file AliMpFastSegmentation.cxx.

AliMpMotifPosition * AliMpFastSegmentation::InternalMotifPosition ( Int_t  index) const
privatevirtual

Get the internal manu from the index

Definition at line 245 of file AliMpFastSegmentation.cxx.

Referenced by HasPadByIndices(), HasPadByLocation(), MotifPosition(), PadByIndices(), and PadByLocation().

Int_t AliMpFastSegmentation::MaxPadIndexX ( ) const
virtual

Return maximum pad index in X direction.

Forward to our helper

Implements AliMpVSegmentation.

Definition at line 331 of file AliMpFastSegmentation.cxx.

Int_t AliMpFastSegmentation::MaxPadIndexY ( ) const
virtual

Return maximum pad index in Y direction.

Forward to our helper

Implements AliMpVSegmentation.

Definition at line 339 of file AliMpFastSegmentation.cxx.

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

Return the position of a given manu (aka motifPosition)

Get the motifPosition object of a given manu

Implements AliMpVSegmentation.

Definition at line 468 of file AliMpFastSegmentation.cxx.

Int_t AliMpFastSegmentation::NofPads ( ) const
virtual

Return the number of pads in the detection element.

Forward to our helper

Implements AliMpVSegmentation.

Definition at line 347 of file AliMpFastSegmentation.cxx.

AliMpFastSegmentation& AliMpFastSegmentation::operator= ( const AliMpFastSegmentation rhs)
private

Not implemented.

AliMpPad AliMpFastSegmentation::PadByIndices ( Int_t  ix,
Int_t  iy,
Bool_t  warning = true 
) const
virtual

Find pad by indices.

Get pad by indices

Implements AliMpVSegmentation.

Definition at line 253 of file AliMpFastSegmentation.cxx.

AliMpPad AliMpFastSegmentation::PadByLocation ( Int_t  manuId,
Int_t  manuChannel,
Bool_t  warning = true 
) const
virtual

Find pad by location.

Get the pad by location, using the manuid map.

Implements AliMpVSegmentation.

Definition at line 168 of file AliMpFastSegmentation.cxx.

AliMpPad AliMpFastSegmentation::PadByPosition ( Double_t  x,
Double_t  y,
Bool_t  warning = true 
) const
virtual

Find pad by position.

Forward to our helper

Implements AliMpVSegmentation.

Definition at line 323 of file AliMpFastSegmentation.cxx.

AliMp::PlaneType AliMpFastSegmentation::PlaneType ( ) const
virtual

Return the plane type.

Forward to our helper

Implements AliMpVSegmentation.

Definition at line 420 of file AliMpFastSegmentation.cxx.

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

Forward to our helper

Definition at line 412 of file AliMpFastSegmentation.cxx.

Referenced by PadByIndices(), and PadByLocation().

AliMp::StationType AliMpFastSegmentation::StationType ( ) const
inlinevirtual

Return segmentation station type.

Implements AliMpVSegmentation.

Definition at line 79 of file AliMpFastSegmentation.h.

Member Data Documentation

TExMap AliMpFastSegmentation::fIxIy
mutableprivate

map of (ix,iy) -> index in array above

Definition at line 92 of file AliMpFastSegmentation.h.

Referenced by AliMpFastSegmentation(), HasPadByIndices(), and PadByIndices().

TExMap AliMpFastSegmentation::fManuId
mutableprivate

map of (manuid) -> index in array above

Definition at line 93 of file AliMpFastSegmentation.h.

Referenced by AliMpFastSegmentation(), HasMotifPosition(), HasPadByLocation(), MotifPosition(), and PadByLocation().

TObjArray AliMpFastSegmentation::fMotifPositions
private

array of AliMpMotifPositions (not owner)

Definition at line 91 of file AliMpFastSegmentation.h.

Referenced by AliMpFastSegmentation(), and InternalMotifPosition().

Double_t AliMpFastSegmentation::fPositionX
private

to compute pad positions

Definition at line 94 of file AliMpFastSegmentation.h.

Referenced by AliMpFastSegmentation(), PadByIndices(), and PadByLocation().

Double_t AliMpFastSegmentation::fPositionY
private

to compute pad positions

Definition at line 95 of file AliMpFastSegmentation.h.

Referenced by AliMpFastSegmentation(), PadByIndices(), and PadByLocation().


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