StRoot
1
|
#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) |
void | setXY (double x, double y) |
double | x () const |
double | y () const |
double | e () const |
double | w () const |
Protected Attributes | |
const StFmsHit * | mHit |
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. | |
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.
FMSCluster::StFmsTower::StFmsTower | ( | ) |
Default constructor.
Definition at line 32 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 35 of file StFmsTower.cxx.
FMSCluster::StFmsTower::~StFmsTower | ( | ) |
Destructor.
Definition at line 38 of file StFmsTower.cxx.
|
inline |
Returns the cluster index of this tower (-1 if unassociated).
Definition at line 96 of file StFmsTower.h.
References mCluster.
Referenced by setCluster().
|
inline |
Returns the column of this tower (-1 if unknown).
Definition at line 92 of file StFmsTower.h.
Referenced by FMSCluster::StFmsTowerCluster::calculateClusterMoments(), FMSCluster::StFmsTowerCluster::getSigma(), isNeighbor(), and FMSCluster::TowerClusterAssociation::separation().
|
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().
|
inline |
Returns true, as StFmsTower can be sorted in a ROOT container.
Definition at line 70 of file StFmsTower.h.
|
inline |
Returns the row of this tower (-1 if unknown).
Definition at line 94 of file StFmsTower.h.
References mRow.
Referenced by FMSCluster::StFmsTowerCluster::calculateClusterMoments(), FMSCluster::StFmsTowerCluster::getSigma(), isNeighbor(), and FMSCluster::TowerClusterAssociation::separation().
|
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().
|
inline |
Set & get local xy
Definition at line 100 of file StFmsTower.h.
Referenced by FMSCluster::StFmsTowerCluster::getSigma().