StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Attributes | List of all members
FMSCluster::StFmsTower Class Reference

#include <StFmsTower.h>

Inheritance 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 StFmsHithit () const
 
Int_t column () const
 
Int_t row () const
 
Int_t cluster () const
 
void setCluster (Int_t cluster)
 
void setXY (double x, double y)
 
double x () const
 
double y () const
 
double e () const
 
double w () const
 

Protected Attributes

const StFmsHitmHit
 Hit information, not owned by StFmsTower.
 
Int_t mColumn
 
Int_t mRow
 < Column number, starts at 1, horizontal (STAR x-coord)
 
Int_t mCluster
 < Row number, starts at 1, vertical (STAR y-coord)
 
Double_t mX
 < Index of cluster the tower is associated with
 
Double_t mY
 local x [cm]
 
Double_t mE
 local y [cm]
 
Double_t mW
 Energy.
 

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 48 of file StFmsTower.h.

Constructor & Destructor Documentation

FMSCluster::StFmsTower::StFmsTower ( )

Default constructor.

Definition at line 32 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 35 of file StFmsTower.cxx.

FMSCluster::StFmsTower::~StFmsTower ( )

Destructor.

Definition at line 38 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 96 of file StFmsTower.h.

References mCluster.

Referenced by setCluster().

Int_t FMSCluster::StFmsTower::column ( ) const
inline
const StFmsHit* FMSCluster::StFmsTower::hit ( ) const
inline

Returns the hit information for this tower.

(nullptr if unknown, in which case you probably shouln't use this tower!)

Definition at line 90 of file StFmsTower.h.

References mHit.

Referenced by FMSCluster::StFmsTowerCluster::calculateClusterMoments(), FMSCluster::TowerClusterAssociation::canAssociate(), FMSCluster::StFmsTowerCluster::getSigma(), isNeighbor(), and FMSCluster::TowerClusterAssociation::separation().

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 40 of file StFmsTower.cxx.

References StFmsDbMaker::getColumnNumber(), StFmsDbMaker::getRowNumber(), StFmsDbMaker::getXWidth(), StFmsDbMaker::getYWidth(), mE, mHit, mRow, and mW.

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 53 of file StFmsTower.cxx.

References column(), hit(), mHit, mRow, and row().

Referenced by FMSCluster::TowerClusterAssociation::canAssociate().

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

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

Definition at line 70 of file StFmsTower.h.

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

Sets the cluster index and returns the new index.

Definition at line 98 of file StFmsTower.h.

References cluster(), and mCluster.

Referenced by FMSCluster::TowerClusterAssociation::associate().

void FMSCluster::StFmsTower::setXY ( double  x,
double  y 
)
inline

Set & get local xy

Definition at line 100 of file StFmsTower.h.

References mX, and mY.

Referenced by FMSCluster::StFmsTowerCluster::getSigma().


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