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
StEEmcSmdCluster Class Reference

A base class for representing clusters of EEMC smd strips. More...

#include <StEEmcSmdCluster.h>

Inheritance diagram for StEEmcSmdCluster:
StEEmcBaseCluster

Public Member Functions

 StEEmcSmdCluster (const StEEmcSmdCluster &c)
 
void add (const StEEmcStrip &strip, Float_t weight=1.0)
 
void add (const StEEmcStripVec_t &strips)
 
Float_t energy () const
 
Float_t mean () const
 
Float_t sigma () const
 
void mean (Float_t x)
 
void sigma (Float_t s)
 
Float_t energy (Int_t nmax, Option_t *opts="mean") const
 
Float_t sigma (Int_t nmax, Option_t *opts="mean") const
 
Int_t size () const
 
StEEmcTowerVec_t & towers ()
 
const StEEmcTowerVec_t & towers () const
 
Int_t numberOfMatchedTowers () const
 
StEEmcTowertower (Int_t t)
 
const StEEmcTowertower (Int_t t) const
 
Bool_t operator< (const StEEmcSmdCluster &other) const
 One cluster is greater than another if energy is greater than the other.
 
Bool_t operator> (const StEEmcSmdCluster &other) const
 
Int_t numberOfStrips () const
 
StEEmcStripstrip (Int_t s)
 Returns the specified smd strip w/in the cluster.
 
const StEEmcStripstrip (Int_t s) const
 
Float_t weight (Int_t s) const
 
StEEmcStripseed ()
 Returns the seed strip (by convention, the first strip added to the cluster).
 
const StEEmcStripseed () const
 
Int_t plane () const
 
Int_t sector () const
 
void sector (Int_t s)
 
void plane (Int_t p)
 
StEmcClusterstemc ()
 
void stemc (StEmcCluster *c)
 Set pointer to StEmcCluster.
 
void print (Option_t *opts="") const
 
void printLine (Bool_t endline=false) const
 
Int_t next (Int_t direct) const
 
void copy (TH1F *h) const
 
 StEEmcSmdCluster (const StEEmcSmdCluster &c)
 copy constructor
 
void add (StEEmcStrip strip, Float_t weight=1.0)
 
Int_t key ()
 Return a unique key assigned by the cluster maker.
 
Int_t key () const
 
void key (Int_t k)
 
Float_t energy ()
 Return the energy of this cluster.
 
Float_t energy () const
 
Float_t mean ()
 Return the mean strip number of this cluster.
 
Float_t mean () const
 
Float_t sigma ()
 Return the sigma – sqrt(variance) – of the cluster.
 
Float_t sigma () const
 
Float_t energy (Int_t nmax, Option_t *opts="mean")
 
Float_t sigma (Int_t nmax, Option_t *opts="mean")
 As above, but returns sigma instead of energy.
 
Float_t energy3 ()
 For interactive root sessions...
 
Float_t energy5 ()
 
Float_t sigma3 ()
 
Float_t sigma5 ()
 
Int_t size ()
 Return the size (number of strips) of the cluster.
 
StEEmcTowerVec_t towers ()
 Return list of towers matching this cluster.
 
Int_t numberOfMatchedTowers ()
 Return number of towers matching this cluster.
 
StEEmcTower tower (Int_t t)
 Return a specific tower matching this SMD cluster.
 
Bool_t operator> (StEEmcSmdCluster &other)
 
Int_t numberOfStrips ()
 Returns the number of SMD strips in the cluster.
 
StEEmcStrip strip (Int_t s)
 Returns the specified smd strip w/in the cluster.
 
Int_t plane ()
 
Int_t sector ()
 
StEmcClusterstemc ()
 Returns a new StEmcCluster.
 
void stemc (StEmcCluster *c)
 
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 (StEEmcSmdCluster, 1)
 
 ClassDef (StEEmcSmdCluster, 1)
 
- Protected Member Functions inherited from StEEmcBaseCluster
 ClassDef (StEEmcBaseCluster, 1)
 

Protected Attributes

StEEmcStripVec_t mStrips
 Vector of strips belonging to this SMD cluster.
 
std::vector< Float_t > mWeights
 Vector of strip weights.
 
Int_t mSize
 Kludge so that root will store number of smd strips.
 
Float_t mSumXW
 Running sums to calculate mean, sigma of cluster.
 
Float_t mSumX2W
 Running sums to calculate mean, sigma of cluster.
 
Float_t mMean
 Mean and sigma computed after each strip is added.
 
Float_t mSigma
 Sigma.
 
Int_t mPlane
 Plane.
 
Int_t mSector
 Sector.
 
StEEmcTowerVec_t mMatchedTowers
 Vector of hit towers above this SMD cluster.
 
Int_t mLeft
 index of next strip to the left
 
Int_t mRight
 index of next strip to the right
 
StEmcClustermEmcCluster
 POinter to EMC cluster.
 
Int_t mKey
 
Float_t mEnergy
 Energy of this SMD cluster.
 
- 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 representing clusters of EEMC smd strips.

This class is designed to represent clusters of smd strips in the endcap.

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

steemcsmdcluster_conventions

By convention, the first strip added to the cluster is considered to be the "seed" strip.

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

Class which represents an SMD 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

*
* StEEmcSmdClusterVec_t list_of_clusters;
* StEEmcSmdCluster cluster;
*
* // Get the seed strip from StEEmcA2EMaker 0=tower 1=pre1 2=pre2 3=post
* Int_t plane = 0;
* StEEmcStrip seed = mEEanalysis -> strip( sector, plane, index_of_seed_strip );
*
* cluster.add( seed );
*
* // Next, loop over all hit strips and add any which satisfy your clustering
* // criteria by using cluster.add(strip).
*
* // Finally, add the cluster to storage
* list_of_clusters.push_back(cluster);
*
*

The energy, mean and sigma of the cluster are calculated in flight. One can override this by calling the energy(e), mean(m) and sigma(s) methods.

Strips can be added with a weight.

Definition at line 53 of file StEEmcSmdCluster.h.

Member Function Documentation

void StEEmcSmdCluster::add ( StEEmcStrip  strip,
Float_t  weight = 1.0 
)

Add an SMD strip to this cluster with the specified weight

Definition at line 41 of file StEEmcSmdCluster.cxx.

References StEEmcElement::energy(), StEEmcStrip::index(), mEnergy, mMean, mSigma, mSize, mStrips, mSumX2W, mSumXW, and mWeights.

Float_t StEEmcSmdCluster::energy ( Int_t  nmax,
Option_t *  opts = "mean" 
)

Return the energy of this cluster summed over +/- nmax strips about either the mean (opts=="mean") or seed (opts=="seed") smd strip.

Definition at line 95 of file StEEmcSmdCluster.cxx.

References StEEmcElement::energy(), StEEmcStrip::index(), and mStrips.

void StEEmcSmdCluster::key ( Int_t  k)
inline

Set a unique id for this cluster... k>=0 is intended to be assigned within the cluster maker. k<0 intended for error flags to kill off clusters.

Definition at line 31 of file StEEmcSmdCluster.h.

Int_t StEEmcSmdCluster::next ( Int_t  direct) const
inline

return the index of the next strip in the specified direction.

Parameters
direct, negative is left, positive is right

Definition at line 113 of file StEEmcSmdCluster.h.

References mLeft, and mRight.

Bool_t StEEmcSmdCluster::operator> ( StEEmcSmdCluster other)
inline

One cluster is greater than another if energy is greater than the other.

Definition at line 131 of file StEEmcSmdCluster.h.

StEmcCluster * StEEmcSmdCluster::stemc ( )

Returns a new StEmcCluster or the corresponding StEmcCluster if it already exists

Definition at line 127 of file StEEmcSmdCluster.cxx.

References mEmcCluster, and mStrips.

Referenced by StEEmcClusterMaker::fillStEvent().


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