StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
FMSCluster::TowerClusterAssociation Class Reference
Inheritance diagram for FMSCluster::TowerClusterAssociation:

Public Member Functions

 TowerClusterAssociation (StFmsTower *tower, int detectorId)
 
StFmsTowertower ()
 
const StFmsTowertower () const
 
std::list< StFmsTowerCluster * > * clusters ()
 
double separation (const StFmsTower *tower)
 
double separation (const StFmsTowerCluster *cluster, const ETowerClusterDistance distance)
 
bool canAssociate (const StFmsTowerCluster *cluster)
 
void add (StFmsTowerCluster *cluster, const ETowerClusterDistance distance)
 
void associate (StFmsTowerCluster *cluster)
 
StFmsTowerClusternearestCluster ()
 

Detailed Description

Association information between a tower and clusters.

This class is used in determining correct tower-cluster association. Stores an StFmsTower, and a list of StFmsTowerCluster with which it could potentially be associated. This information is used in determining the true cluster with which the tower is actually associated.

Inherits from TObject to allow it to be placed in a ROOT container.

Definition at line 175 of file StFmsClusterFinder.cxx.

Constructor & Destructor Documentation

FMSCluster::TowerClusterAssociation::TowerClusterAssociation ( StFmsTower tower,
int  detectorId 
)
inlineexplicit

Constructor.

Initialise with the StFmsTower of interest.

Definition at line 182 of file StFmsClusterFinder.cxx.

Member Function Documentation

void FMSCluster::TowerClusterAssociation::add ( StFmsTowerCluster cluster,
const ETowerClusterDistance  distance 
)
inline

Attempt to add a potential associate cluster with this tower.

Add the cluster to the list of potential associates if this tower can associate with it (see canAssociate()). If there is already one or more clusters in the list:

  • if the new cluster is closer to the tower, replace the existing cluster(s).
  • if the new cluster if further away, do not add it.
  • if the new cluster is exactly the same separation as the existing cluster(s), add it to the list but keep the existing ones.

i.e. at any time there can only be clusters of the same (minimal) separation from the tower, but there can be multiple clusters of identical separation.

See separation(const StFmsTowerCluster*, const ETowerClusterDistance) for the meaning of the distance argument.

Returns true if the new cluster is added, false if not.

Definition at line 298 of file StFmsClusterFinder.cxx.

References associate(), canAssociate(), and separation().

void FMSCluster::TowerClusterAssociation::associate ( StFmsTowerCluster cluster)
inline

Add a cluster to the list and set this tower's cluster index

Definition at line 318 of file StFmsClusterFinder.cxx.

References FMSCluster::StFmsTowerCluster::index(), and FMSCluster::StFmsTower::setCluster().

Referenced by add().

bool FMSCluster::TowerClusterAssociation::canAssociate ( const StFmsTowerCluster cluster)
inline

Returns true if this tower can be associated with a cluster.

A tower is defined as associable with a cluster if it:

  • has energy less than that of the cluster's highest-energy tower.
  • is physically adjacent to at least one tower in the cluster, so long as...
  • it cannot fulfil the criterion for being a peak w.r.t. to the adjacent tower.

Note this is a "potential" association; a tower may pass the association test with more than one cluster, but it will eventually be assigned unambiguously to a single cluster.

Definition at line 260 of file StFmsClusterFinder.cxx.

References FMSCluster::StFmsTower::hit(), FMSCluster::StFmsTower::isNeighbor(), tower(), and FMSCluster::StFmsTowerCluster::towers().

Referenced by add().

std::list<StFmsTowerCluster*>* FMSCluster::TowerClusterAssociation::clusters ( )
inline

Returns the list of potential associate clusters

Definition at line 188 of file StFmsClusterFinder.cxx.

StFmsTowerCluster* FMSCluster::TowerClusterAssociation::nearestCluster ( )
inline

Calculate the nearest cluster out of the list of potential associates.

The distance is that between this tower and the cluster centre, (x0, y0), therefore StFmsTowerCluster::calculateClusterMoments() must have been called before doing this, in order to calculate x0 and y0 of the cluster.

Returns nullptr if there are no clusters in the list.

Definition at line 331 of file StFmsClusterFinder.cxx.

References separation().

double FMSCluster::TowerClusterAssociation::separation ( const StFmsTower tower)
inline

Calculate the separation between this tower and another.

The separation is in row-column coordinates i.e. the distance is in the number of towers, not in cm. e.g. a tower at (column=1, row=1) would be a distance of 1 from a tower at (1, 2), and sqrt(2) from a tower at (2, 2).

Definition at line 196 of file StFmsClusterFinder.cxx.

References FMSCluster::StFmsTower::column(), FMSCluster::StFmsTower::hit(), and FMSCluster::StFmsTower::row().

Referenced by add(), nearestCluster(), and separation().

double FMSCluster::TowerClusterAssociation::separation ( const StFmsTowerCluster cluster,
const ETowerClusterDistance  distance 
)
inline

Calculate the separation between this tower and a cluster.

Distances can be calculated in different ways:

  • distance=kPeakTower: distance from this tower to the peak (highest-energy) tower in the cluster.
  • distance=kClusterCenter: distance from this tower to the cluster center, based on cluster moment calculation. See separation(const StFmsTower*) for the distance definition.

Definition at line 229 of file StFmsClusterFinder.cxx.

References FMSCluster::StFmsTowerCluster::cluster(), FMSCluster::StFmsTower::column(), FMSCluster::StFmsTower::hit(), FMSCluster::StFmsTower::row(), separation(), and FMSCluster::StFmsTowerCluster::towers().

StFmsTower* FMSCluster::TowerClusterAssociation::tower ( )
inline

Returns this tower.

Definition at line 184 of file StFmsClusterFinder.cxx.

Referenced by canAssociate().

const StFmsTower* FMSCluster::TowerClusterAssociation::tower ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 186 of file StFmsClusterFinder.cxx.


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