StFms
0.0.0
FMS software in the STAR framework
|
#include <StFmsTower.h>
Public Member Functions | |
StFmsTower () | |
StFmsTower (StFmsHit *fmsHit) | |
~StFmsTower () | |
Bool_t | initialize (StFmsDbMaker *database) |
Bool_t | IsSortable () const |
Bool_t | isNeighbor (const StFmsTower &tower) const |
const StFmsHit * | hit () const |
Int_t | column () const |
Int_t | row () const |
Int_t | cluster () const |
void | setCluster (Int_t cluster) |
Protected Attributes | |
const StFmsHit * | mHit |
Hit information, not owned by StFmsTower. More... | |
Int_t | mColumn |
Column number, starts at 1, horizontal (STAR x-coord) More... | |
Int_t | mRow |
Row number, starts at 1, vertical (STAR y-coord) More... | |
Int_t | mCluster |
Index of cluster the tower is associated with. More... | |
Lightweight wrapper around an StFmsHit for use in tower clustering.
Clustering requires identifying tower neighbors, which is most easily done via row and column number. As these aren't stored in StFmsHit, we store an StFmsHit pointer here with its row and column number. This removes the need to recalculate row and column (which requires database access) each time they are needed. We also store the index of the cluster (if any) that the tower becomes associated with during clustering.
The StFmsTower does not own the StFmsHit; it merely references it. Therefore it is vital that the StFmsHit have a longer lifetime than the StFmsTower i.e. do not clear your StFmsCollection until after you have finished clustering!
Inherits from TObject so it can be stored in a ROOT container.
Definition at line 38 of file StFmsTower.h.
FMSCluster::StFmsTower::StFmsTower | ( | ) |
Default constructor.
Definition at line 19 of file StFmsTower.cxx.
|
explicit |
Constructor.
Initialize with an StFmsHit, which the StFmsTower does now own. It should therefore have longer lifetime that the StFmsTower.
Definition at line 22 of file StFmsTower.cxx.
FMSCluster::StFmsTower::~StFmsTower | ( | ) |
Destructor.
Definition at line 25 of file StFmsTower.cxx.
|
inline |
Returns the cluster index of this tower (-1 if unassociated).
Definition at line 86 of file StFmsTower.h.
|
inline |
Returns the row of this tower (-1 if unknown).
Definition at line 82 of file StFmsTower.h.
|
inline |
Returns the hit information for this tower.
(NULL if unknown, in which case you probably shouln't use this tower!)
Definition at line 80 of file StFmsTower.h.
Bool_t FMSCluster::StFmsTower::initialize | ( | StFmsDbMaker * | database | ) |
Initialize tower row and column information from the database.
Returns true upon successful initialization, false if something goes wrong. Important: an uninitialized tower should NOT be used!
Definition at line 27 of file StFmsTower.cxx.
Bool_t FMSCluster::StFmsTower::isNeighbor | ( | const StFmsTower & | tower | ) | const |
Test if another StFmsTower is a neighbor of this tower.
A neighbor is the tower immediately above, below, left or right of this one i.e. NOT diagonally adjacent towers.
i.e. _ _|_|_ |_|_|_| |_|
Definition at line 37 of file StFmsTower.cxx.
|
inline |
Returns true, as StFmsTower can be sorted in a ROOT container.
Definition at line 60 of file StFmsTower.h.
|
inline |
Returns the column of this tower (-1 if unknown).
Definition at line 84 of file StFmsTower.h.
|
inline |
Sets the cluster index and returns the new index.
Definition at line 88 of file StFmsTower.h.
|
protected |
Index of cluster the tower is associated with.
Definition at line 94 of file StFmsTower.h.
|
protected |
Column number, starts at 1, horizontal (STAR x-coord)
Definition at line 92 of file StFmsTower.h.
|
protected |
Hit information, not owned by StFmsTower.
Definition at line 91 of file StFmsTower.h.
|
protected |
Row number, starts at 1, vertical (STAR y-coord)
Definition at line 93 of file StFmsTower.h.