StFms  0.0.0
FMS software in the STAR framework
FMSCluster::StFmsTower Class Reference

#include <StFmsTower.h>

Inheritance diagram for FMSCluster::StFmsTower:
Collaboration diagram for FMSCluster::StFmsTower:

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

FMSCluster::StFmsTower::StFmsTower ( )

Default constructor.

Definition at line 19 of file StFmsTower.cxx.

FMSCluster::StFmsTower::StFmsTower ( StFmsHit *  fmsHit)
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.

Member Function Documentation

Int_t FMSCluster::StFmsTower::cluster ( ) const
inline

Returns the cluster index of this tower (-1 if unassociated).

Definition at line 86 of file StFmsTower.h.

Here is the caller graph for this function:

Int_t FMSCluster::StFmsTower::column ( ) const
inline

Returns the row of this tower (-1 if unknown).

Definition at line 82 of file StFmsTower.h.

Here is the caller graph for this function:

const StFmsHit* FMSCluster::StFmsTower::hit ( ) const
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.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

Bool_t FMSCluster::StFmsTower::IsSortable ( ) const
inline

Returns true, as StFmsTower can be sorted in a ROOT container.

Definition at line 60 of file StFmsTower.h.

Int_t FMSCluster::StFmsTower::row ( ) const
inline

Returns the column of this tower (-1 if unknown).

Definition at line 84 of file StFmsTower.h.

Here is the caller graph for this function:

void FMSCluster::StFmsTower::setCluster ( Int_t  cluster)
inline

Sets the cluster index and returns the new index.

Definition at line 88 of file StFmsTower.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Int_t FMSCluster::StFmsTower::mCluster
protected

Index of cluster the tower is associated with.

Definition at line 94 of file StFmsTower.h.

Int_t FMSCluster::StFmsTower::mColumn
protected

Column number, starts at 1, horizontal (STAR x-coord)

Definition at line 92 of file StFmsTower.h.

const StFmsHit* FMSCluster::StFmsTower::mHit
protected

Hit information, not owned by StFmsTower.

Definition at line 91 of file StFmsTower.h.

Int_t FMSCluster::StFmsTower::mRow
protected

Row number, starts at 1, vertical (STAR y-coord)

Definition at line 93 of file StFmsTower.h.


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