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

A base class for describing clusters of EEMC towers. More...

#include <StEEmcCluster.h>

Inheritance diagram for StEEmcCluster:
StEEmcBaseCluster

Public Member Functions

 StEEmcCluster (const StEEmcCluster &other)
 
virtual ~StEEmcCluster ()
 
void add (const StEEmcTower &t, Float_t weight=1.0)
 
Float_t energy () const
 Get energy of this cluster.
 
Float_t seedEnergy () const
 Get the energy of the seed tower.
 
TVector3 momentum () const
 
TVector3 position () const
 
Int_t numberOfTowers () const
 Get the number of towers in cluster.
 
StEEmcTowertower (Int_t t)
 Get the specified tower within the cluster.
 
const StEEmcTowertower (Int_t t) const
 
Float_t sigmaE () const
 
Float_t weight (Int_t t) const
 Get the weight associated with tower.
 
StEEmcTowerVec_t & towers ()
 Get the vector of towers in this cluster.
 
const StEEmcTowerVec_t & towers () const
 
void momentum (const TVector3 &p)
 
StEmcClusterstemc ()
 
void stemc (StEmcCluster *c)
 Pointer to StEmcCluster for embedding.
 
Bool_t operator== (const StEEmcCluster &other) const
 
void print () const
 Prints cluster data.
 
void printLine (Bool_t Endl=false) const
 
Bool_t isNeighbor (const StEEmcTower &tower) const
 Returns true if tower is adjacent to any tower in the cluster.
 
Float_t fracEtabin () const
 Returns the fractional mean etabin.
 
Float_t fracPhibin () const
 Returns the fractional mean phibin.
 
Float_t sigmaEtabin () const
 Returns the sigma (sqrt variance) in units of etabins.
 
Float_t sigmaPhibin () const
 
Bool_t hasTower (const StEEmcTower &tower) const
 Returns true if the specified tower is in the cluster.
 
Bool_t operator< (const StEEmcCluster &other) const
 
Bool_t operator> (const StEEmcCluster &other) const
 
Int_t numberOfEtabins () const
 
Int_t numberOfPhibins () const
 
void add (StEEmcTower, Float_t weight=1.0)
 
Float_t energy ()
 Get energy of this cluster.
 
Float_t seedEnergy ()
 Get the energy of the seed tower.
 
TVector3 momentum ()
 Get the momentum of this cluster.
 
Int_t numberOfTowers ()
 Get the number of towers in cluster.
 
StEEmcTower tower (Int_t t)
 Get the specified tower.
 
StEEmcTower tower (Int_t t) const
 
Float_t weight (Int_t t)
 Get the weight associated with tower.
 
StEEmcTowerVec_t towers ()
 Get the vector of towers in this cluster.
 
void momentum (TVector3 p)
 Set the momentum of this cluster.
 
StEmcClusterstemc ()
 
void stemc (StEmcCluster *c)
 
Int_t key ()
 
void key (Int_t k)
 
Bool_t operator== (const StEEmcCluster &other) const
 
void print ()
 
- Public Member Functions inherited from StEEmcBaseCluster
Int_t key () const
 
void key (Int_t k)
 
Bool_t split () const
 
void split (Bool_t s)
 
void addMatch (Int_t key, Int_t layer)
 
Int_t numberOfMatchingClusters (Int_t layer) const
 
Int_t getMatch (Int_t ith, Int_t layer) const
 
Float_t energy () const
 
void energy (Float_t e)
 
Int_t numberOfElements () const
 

Protected Member Functions

 ClassDef (StEEmcCluster, 1)
 
 ClassDef (StEEmcCluster, 1)
 
- Protected Member Functions inherited from StEEmcBaseCluster
 ClassDef (StEEmcBaseCluster, 1)
 

Protected Attributes

StEEmcTowerVec_t mTowers
 Vector of towers.
 
std::vector< Float_t > mWeights
 Vector of tower weights.
 
TVector3 mMomentum
 Momentum.
 
TVector3 mPosition
 
StEmcClustermEmcCluster
 Pointer to EMC cluster.
 
Float_t mfEtabin
 
Float_t mfPhibin
 
Float_t mSumEta2W
 
Float_t mSumEtaW
 
Float_t mSumPhi2W
 
Float_t mSumPhiW
 
Int_t mKey
 
Float_t mEnergy
 Energy.
 
- Protected Attributes inherited from StEEmcBaseCluster
Int_t mKey
 
Bool_t mSplit
 
std::vector< std::vector< Int_t > > mMatched
 
Float_t mEnergy
 
Int_t mNumberOfElements
 

Detailed Description

A base class for describing clusters of EEMC towers.

This class is designed to represent EEMC tower clusters. By "tower cluster" I mean a cluster of StEEmcTower objects, which can in principle be clusters of tower, preshower or postshower elements.

Author
Jason C. Webb
Date:
2010/08/26 22:49:25
Revision:
1.8

Conventions

By convention, we assume that the first tower added to the cluster is the "seed" tower.

Each cluster should be assigned its own unique "key" by the maker which produces it.

This class makes no assumtion about the size and/or shape of the cluster.

Author
Jason C. Webb Jason.nosp@m..Web.nosp@m.b@Val.nosp@m.po.e.nosp@m.du

Class which represents a tower, preshower or postshwoer cluster. This class derives from StEEmcBaseCluster, which allows matching of clusters between layers by storing a unique cluster ID.

To build a cluster, one uses something like the following recipe

*
* StEEmcClusterVec_t list_of_clusters;
* StEEmcCluster cluster;
*
* // Get the seed tower from StEEmcA2EMaker 0=tower 1=pre1 2=pre2 3=post
* Int_t layer = 0;
* StEEmcTower tower = mEEanalysis -> tower( index_of_seed_tower, layer );
*
* // Loop over neighboring towers and add them to the cluster if they exceed
* // a specified threshold
* for ( Int_t i=0;i<tower.numberOfNeighbors();i++ )
* {
* StEEmcTower neighbor=tower.neighbor(i);
* if ( tower.energy() > threshold_to_add_tower )
* {
* cluster.add(neighbor);
* }
* }
*
* // Add our cluster to the list of clusters
* list_of_clusters.push_back( cluster );
*
*

Definition at line 50 of file StEEmcCluster.h.

Constructor & Destructor Documentation

StEEmcCluster::~StEEmcCluster ( )
virtual

If we have created an StEmcCluster, delete it

Definition at line 79 of file StEEmcCluster.cxx.

References mTowers, and mWeights.

Member Function Documentation

void StEEmcCluster::add ( StEEmcTower  tower,
Float_t  weight = 1.0 
)

add a tower to this cluster. The code assumes that the first tower added is the seed tower, and hence is the most energetic.

Definition at line 19 of file StEEmcCluster.cxx.

References StEEmcElement::energy(), energy(), mEnergy, mTowers, and mWeights.

void StEEmcCluster::add ( const StEEmcTower t,
Float_t  weight = 1.0 
)

add a tower to this cluster. The code assumes that the first tower added is the seed tower, and hence is the most energetic.

Definition at line 87 of file StEEmcCluster.cxx.

References StEEmcElement::energy(), energy(), StEEmcTower::etabin(), EEmcGeomSimple::getTowerCenter(), mEnergy, mfEtabin, mfPhibin, mMomentum, mTowers, mWeights, StEEmcTower::phibin(), print(), StEEmcTower::sector(), StEEmcTower::subsector(), and weight().

Referenced by StEEmcClusterMaker::buildTowerClusters(), and StEEmcPi0Analysis::Make().

TVector3 StEEmcCluster::momentum ( ) const
inline

Get the momentum of this cluster. The internally calculated momentum assumes z=0.

Definition at line 69 of file StEEmcCluster.h.

References mMomentum.

Referenced by StMyClusterMaker::buildSmdClusters(), StEEmc2x2ClusterMaker::buildSmdClusters(), StEEmcClusterMaker::buildTowerClusters(), StEEmcClusterMaker::fillStEvent(), StMyPointMaker::Make(), and stemc().

void StEEmcCluster::momentum ( const TVector3 &  p)
inline

Set the momentum of this cluster. This overrides the momentum computed internally as towers are added to the cluster. If the momentum is changed before all towers are added, the position() of the cluster will become unreliable.

Definition at line 96 of file StEEmcCluster.h.

References mMomentum.

Bool_t StEEmcCluster::operator== ( const StEEmcCluster other) const
inline

Tests whether the cluster has the same seed tower as another cluster. If so, these clusters are considered equal

Definition at line 108 of file StEEmcCluster.h.

References StEEmcTower::index(), and tower().

TVector3 StEEmcCluster::position ( ) const
inline

Get the position of this cluster on the endcap. But see note for StEEmcCluster::momentum( TVector3 p ).

Definition at line 73 of file StEEmcCluster.h.

Float_t StEEmcCluster::sigmaE ( ) const

Returns the std. deviation in the energy of the towers which make up the cluster.

Definition at line 213 of file StEEmcCluster.cxx.

References StEEmcElement::energy(), mTowers, and mWeights.

StEmcCluster* StEEmcCluster::stemc ( )

Create and return an StEmcCluster using this cluster's hits, energy, etc... The StEmcCluster will be deleted when this cluster's destructor is called.

StEmcCluster * StEEmcCluster::stemc ( )

Create and return an StEmcCluster using this cluster's hits, energy, etc... The StEmcCluster will be deleted when this cluster's destructor is called.

Definition at line 138 of file StEEmcCluster.cxx.

References energy(), mEmcCluster, momentum(), mTowers, and numberOfTowers().

Referenced by StEEmcClusterMaker::fillStEvent().

Member Data Documentation

Float_t StEEmcCluster::mfEtabin
protected

Fractional mean etabin * energy

Definition at line 149 of file StEEmcCluster.h.

Referenced by add(), and fracEtabin().

Float_t StEEmcCluster::mfPhibin
protected

Fractional mean phibin * energy

Definition at line 150 of file StEEmcCluster.h.

Referenced by add(), and fracPhibin().


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