StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcSmdCluster.h
1 #ifndef __StEEmcSmdCluster_h__
2 #define __StEEmcSmdCluster_h__
3 
4 #include <TObject.h>
5 #include "StEEmcStrip.h"
6 #include "StEEmcTower.h"
7 
8 class StEmcCluster;
9 
10 class StEEmcSmdCluster : public TObject {
11 
12  public:
13 
15  ~StEEmcSmdCluster(){ /* nada */ };
16 
19 
22  void add( StEEmcStrip strip, Float_t weight=1.0 );
23 
25  Int_t key(){ return mKey; }
26  Int_t key()const { return mKey; }
27 
31  void key(Int_t k){ mKey=k; }
32 
34  Float_t energy();
35  Float_t energy()const;
37  Float_t mean();
38  Float_t mean()const;
40  Float_t sigma();
41  Float_t sigma()const;
42 
46  Float_t energy( Int_t nmax, Option_t *opts="mean" );
48  Float_t sigma( Int_t nmax, Option_t *opts="mean" );
49 
51  Float_t energy3(){ return energy(3,"seed"); }
52  Float_t energy5(){ return energy(5,"seed"); }
53  Float_t sigma3(){ return sigma(3,"seed"); }
54  Float_t sigma5(){ return sigma(5,"seed"); }
55 
57  Int_t size();
58 
60  StEEmcTowerVec_t towers();
62  Int_t numberOfMatchedTowers();
64  StEEmcTower tower(Int_t t);
65 
68  Bool_t operator>( StEEmcSmdCluster &other );
69 
71  Int_t numberOfStrips(){ return (Int_t)mStrips.size(); }
72 
74  StEEmcStrip strip(Int_t s){ return mStrips[s]; }
75 
76  Int_t plane(){ return mStrips[0].plane(); }
77  Int_t sector(){ return mStrips[0].sector(); }
78 
81 
82  void stemc( StEmcCluster *c ){ mEmcCluster = c; }
83 
84  void print();
85 
86  private:
87  protected:
88 
89  Int_t mKey;
90 
92  StEEmcStripVec_t mStrips;
93  std::vector<Float_t> mWeights;
94 
96  Int_t mSize;
97 
99  Float_t mEnergy;
100 
102  Float_t mSumXW;
103  Float_t mSumX2W;
104 
106  Float_t mMean;
107  Float_t mSigma;
108 
110  StEEmcTowerVec_t mMatchedTowers;
111 
113 
114  ClassDef(StEEmcSmdCluster,1);
115 
116 };
117 
118 inline Float_t StEEmcSmdCluster::energy(){ return mEnergy; }
119 inline Float_t StEEmcSmdCluster::mean(){ return mMean; }
120 inline Float_t StEEmcSmdCluster::sigma(){ return mSigma; }
121 
122 inline Float_t StEEmcSmdCluster::energy()const{ return mEnergy; }
123 inline Float_t StEEmcSmdCluster::mean()const{ return mMean; }
124 inline Float_t StEEmcSmdCluster::sigma()const{ return mSigma; }
125 
126 inline Int_t StEEmcSmdCluster::size(){ return (Int_t)mSize; }
127 
128 inline StEEmcTowerVec_t StEEmcSmdCluster::towers(){ return mMatchedTowers; }
129 inline Int_t StEEmcSmdCluster::numberOfMatchedTowers(){ return (Int_t)mMatchedTowers.size(); }
130 inline StEEmcTower StEEmcSmdCluster::tower(Int_t t){ return mMatchedTowers[t]; }
131 inline Bool_t StEEmcSmdCluster::operator>(StEEmcSmdCluster &other){ return (this->energy() > other.energy()); }
132 
133 
135 inline Bool_t inner( const StEEmcSmdCluster &me, const StEEmcSmdCluster &you) { return me.mean()<you.mean(); }
137 inline Bool_t outer( const StEEmcSmdCluster &me, const StEEmcSmdCluster &you) { return me.mean()>you.mean(); }
139 inline Bool_t Energy( const StEEmcSmdCluster &me, const StEEmcSmdCluster &you) { return me.energy()>you.energy(); }
141 inline Bool_t Key( const StEEmcSmdCluster &me, const StEEmcSmdCluster &you) { return me.key()<you.key(); }
142 
143 
144 
145 typedef std::vector<StEEmcSmdCluster> StEEmcSmdClusterVec_t;
146 
147 #endif
void key(Int_t k)
Float_t mEnergy
Energy of this SMD cluster.
Float_t energy3()
For interactive root sessions...
Float_t mMean
Mean and sigma computed after each strip is added.
Base class for representing tower, preshower and postshower elements.
Definition: StEEmcTower.h:11
std::vector< Float_t > mWeights
Vector of strip weights.
Int_t key()
Return a unique key assigned by the cluster maker.
StEmcCluster * stemc()
Float_t mSumX2W
Running sums to calculate mean, sigma of cluster.
StEEmcStripVec_t mStrips
Vector of strips belonging to this SMD cluster.
A base class for representing clusters of EEMC smd strips.
Float_t mSigma
Sigma.
StEmcCluster * mEmcCluster
POinter to EMC cluster.
Int_t numberOfStrips()
Returns the number of SMD strips in the cluster.
Int_t mSize
Kludge so that root will store number of smd strips.
StEEmcTowerVec_t mMatchedTowers
Vector of hit towers above this SMD cluster.
StEEmcStrip & strip(Int_t s)
Returns the specified smd strip w/in the cluster.
Base class for describing an endcap SMD strip.
Definition: StEEmcStrip.h:8
StEEmcStrip strip(Int_t s)
Returns the specified smd strip w/in the cluster.
Float_t mSumXW
Running sums to calculate mean, sigma of cluster.