![]() |
AliRoot Core
a565103 (a565103)
|
Fast version of AliMpVSegmentation. More...
#include <AliMpFastSegmentation.h>
Public Member Functions | |
AliMpFastSegmentation (AliMpVSegmentation *seg) | |
virtual | ~AliMpFastSegmentation () |
virtual AliMpVPadIterator * | CreateIterator (const AliMpArea &area) const |
Create iterator over pads in the given area. More... | |
virtual AliMpVPadIterator * | CreateIterator () 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 AliMpMotifPosition * | MotifPosition (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 |
AliMpVSegmentation * | GetHelper () const |
Return helper class. More... | |
AliMp::StationType | StationType () const |
Return segmentation station type. More... | |
![]() | |
AliMpVSegmentation () | |
virtual | ~AliMpVSegmentation () |
Private Member Functions | |
AliMpFastSegmentation (const AliMpFastSegmentation &rhs) | |
Not implemented. More... | |
AliMpFastSegmentation & | operator= (const AliMpFastSegmentation &rhs) |
Not implemented. More... | |
virtual AliMpMotifPosition * | InternalMotifPosition (Int_t index) const |
Private Attributes | |
AliMpVSegmentation * | fHelper |
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... | |
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.
AliMpFastSegmentation::AliMpFastSegmentation | ( | AliMpVSegmentation * | seg | ) |
Ctor. We adopt vseg.
Definition at line 78 of file AliMpFastSegmentation.cxx.
|
virtual |
dtor
Definition at line 134 of file AliMpFastSegmentation.cxx.
|
private |
Not implemented.
|
virtual |
Create iterator over pads in the given area.
Forward to our helper
Implements AliMpVSegmentation.
Definition at line 142 of file AliMpFastSegmentation.cxx.
|
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().
|
virtual |
Fill the given array with the electronic card IDs.
Forward to our helper
Implements AliMpVSegmentation.
Definition at line 363 of file AliMpFastSegmentation.cxx.
|
virtual |
Return the x half-sizes of the detection element.
Forward to our helper
Implements AliMpVSegmentation.
Definition at line 428 of file AliMpFastSegmentation.cxx.
|
virtual |
Return the y half-sizes of the detection element.
Forward to our helper
Implements AliMpVSegmentation.
Definition at line 436 of file AliMpFastSegmentation.cxx.
|
inline |
Return helper class.
Definition at line 76 of file AliMpFastSegmentation.h.
Referenced by AliMpSegmentation::GetSector(), AliMpSegmentation::GetSlat(), and AliMpSegmentation::GetTrigger().
|
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.
|
virtual |
Get the number of electronic card IDs.
Forward to our helper
Implements AliMpVSegmentation.
Definition at line 355 of file AliMpFastSegmentation.cxx.
|
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.
|
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.
|
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.
|
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.
|
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.
|
privatevirtual |
Get the internal manu from the index
Definition at line 245 of file AliMpFastSegmentation.cxx.
Referenced by HasPadByIndices(), HasPadByLocation(), MotifPosition(), PadByIndices(), and PadByLocation().
|
virtual |
Return maximum pad index in X direction.
Forward to our helper
Implements AliMpVSegmentation.
Definition at line 331 of file AliMpFastSegmentation.cxx.
|
virtual |
Return maximum pad index in Y direction.
Forward to our helper
Implements AliMpVSegmentation.
Definition at line 339 of file AliMpFastSegmentation.cxx.
|
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.
|
virtual |
Return the number of pads in the detection element.
Forward to our helper
Implements AliMpVSegmentation.
Definition at line 347 of file AliMpFastSegmentation.cxx.
|
private |
Not implemented.
|
virtual |
Find pad by indices.
Get pad by indices
Implements AliMpVSegmentation.
Definition at line 253 of file AliMpFastSegmentation.cxx.
|
virtual |
Find pad by location.
Get the pad by location, using the manuid map.
Implements AliMpVSegmentation.
Definition at line 168 of file AliMpFastSegmentation.cxx.
|
virtual |
Find pad by position.
Forward to our helper
Implements AliMpVSegmentation.
Definition at line 323 of file AliMpFastSegmentation.cxx.
|
virtual |
Return the plane type.
Forward to our helper
Implements AliMpVSegmentation.
Definition at line 420 of file AliMpFastSegmentation.cxx.
|
virtual |
Forward to our helper
Definition at line 412 of file AliMpFastSegmentation.cxx.
Referenced by PadByIndices(), and PadByLocation().
|
inlinevirtual |
Return segmentation station type.
Implements AliMpVSegmentation.
Definition at line 79 of file AliMpFastSegmentation.h.
|
private |
helper class (owner)
Definition at line 90 of file AliMpFastSegmentation.h.
Referenced by CreateIterator(), GetAllElectronicCardIDs(), GetDimensionX(), GetDimensionY(), GetHelper(), GetNofElectronicCards(), GetPositionX(), GetPositionY(), HasPadByIndices(), HasPadByLocation(), MaxPadIndexX(), MaxPadIndexY(), NofPads(), PadByIndices(), PadByLocation(), PadByPosition(), PlaneType(), Print(), StationType(), and ~AliMpFastSegmentation().
|
mutableprivate |
map of (ix,iy) -> index in array above
Definition at line 92 of file AliMpFastSegmentation.h.
Referenced by AliMpFastSegmentation(), HasPadByIndices(), and PadByIndices().
|
mutableprivate |
map of (manuid) -> index in array above
Definition at line 93 of file AliMpFastSegmentation.h.
Referenced by AliMpFastSegmentation(), HasMotifPosition(), HasPadByLocation(), MotifPosition(), and PadByLocation().
|
private |
array of AliMpMotifPositions (not owner)
Definition at line 91 of file AliMpFastSegmentation.h.
Referenced by AliMpFastSegmentation(), and InternalMotifPosition().
|
private |
to compute pad positions
Definition at line 94 of file AliMpFastSegmentation.h.
Referenced by AliMpFastSegmentation(), PadByIndices(), and PadByLocation().
|
private |
to compute pad positions
Definition at line 95 of file AliMpFastSegmentation.h.
Referenced by AliMpFastSegmentation(), PadByIndices(), and PadByLocation().