StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcIUPoint.h
1 #ifndef __StEEmcIUPoint_h__
2 #define __StEEmcIUPoint_h__
3 
4 #include "TObject.h"
5 #include "TVector3.h"
6 
7 #include "StEEmcPool/StEEmcA2EMaker/StEEmcTower.h"
8 #include "StEEmcIUSmdCluster.h"
9 
10 class StEmcPoint;
11 
12 class StEEmcIUPoint : public TObject {
13 
14  public:
15 
16  StEEmcIUPoint();
17  ~StEEmcIUPoint(){ /* nada */ };
18 
20  StEEmcIUPoint( const StEEmcIUPoint &p );
21 
23  void position( TVector3 p ) { mPosition=p; }
25  void energy( Float_t e, Int_t layer=0 ) { mEnergy[layer]=e; }
27  void fraction ( Float_t f ) { mFraction=f; }
29  void tower( StEEmcTower t, Float_t w=1. ) { mTowers.push_back(t); mWeights.push_back(w); }
31  void cluster( StEEmcIUSmdCluster c, Int_t plane ){mSmdClusters[plane]=c;mSector=c.sector();}
32 
34  void numberOfRelatives( Int_t r ){ mRelatives=r; }
35 
37  TVector3 position(){ return mPosition; }
39  Float_t energy(Int_t layer){ return mEnergy[layer]; }
41  Float_t fraction(){ return mFraction; }
43  Float_t energy(Int_t layer=0) const { return mEnergy[layer]; }
45  Int_t numberOfTowers(){ return (Int_t)mTowers.size(); }
47  StEEmcTower tower(Int_t t){ return mTowers[t]; }
49  Float_t weight(Int_t t){ return mWeights[t]; }
52  StEEmcIUSmdCluster cluster(Int_t c){ return mSmdClusters[c]; }
53 
56  Int_t numberOfRelatives(){ return mRelatives; }
57 
60  StEmcPoint *stemc();
61 
63  Int_t sector(){ return mSector; }
65  void sector(Int_t s){ mSector=s; }
66 
68  Float_t sigma(){ return mSigma; }
70  void sigma(Float_t s){ mSigma=s; }
71 
73  Float_t u(){ return mU; }
75  void u(Float_t uu){ mU=uu; }
76 
78  Float_t v(){ return mV; }
80  void v(Float_t vv){ mV=vv; }
81 
83  Float_t residueU(){ return mResidueU; }
85  void residueU(Float_t r){ mResidueU=r; }
87  Float_t residueV(){ return mResidueV; }
89  void residueV(Float_t r){ mResidueV=r; }
90 
91 
93  void print();
94 
96  Bool_t operator<( const StEEmcIUPoint &other ) const;
98  Bool_t chiSquare( const StEEmcIUPoint &other ) const;
99 
100  private:
101  protected:
102 
104  TVector3 mPosition;
106  Float_t mEnergy[4];
108  Float_t mFraction;
109 
111  Int_t mSector;
113  Float_t mSigma;
115  Float_t mU;
117  Float_t mV;
119  Float_t mResidueU;
121  Float_t mResidueV;
122 
125 
128  StEEmcTowerVec_t mTowers;
129  std::vector<Float_t> mWeights;
131 
133  Int_t mRelatives;
134 
137 
140 
141 };
142 
143 typedef std::vector<StEEmcIUPoint> StEEmcIUPointVec_t;
144 
145 inline Bool_t StEEmcIUPoint::operator<( const StEEmcIUPoint &other ) const { return this->energy() < other.energy(); }
146 inline Bool_t chiSquare( const StEEmcIUPoint &me, const StEEmcIUPoint &other ) { return me.chiSquare( other ); }
147 
148 //line Int_t StEEmcIUPoint::sector(){ if ( mSmdClusters[0].sector()==mSmdClusters[1].sector() ) return mSmdClusters[0].sector(); else return -1; }
149 
150 #endif
TVector3 position()
Get the position of this point.
Definition: StEEmcIUPoint.h:37
Int_t numberOfRelatives()
Definition: StEEmcIUPoint.h:56
Float_t mU
Mean U.
Bool_t chiSquare(const StEEmcIUPoint &other) const
Chi2 sort method.
void print()
print
Float_t sigma()
Returns the width.
Definition: StEEmcIUPoint.h:68
StEEmcIUSmdCluster cluster(Int_t c)
Definition: StEEmcIUPoint.h:52
void v(Float_t vv)
Sets mean U position.
Definition: StEEmcIUPoint.h:80
Int_t mRelatives
Number of points which share tower energy with this point.
StEmcPoint * mEmcPoint
Pointer to corresponding StEmcPoint (StEvent only)
ClassDef(StEEmcIUPoint, 1)
Makes class available to root.
void energy(Float_t e, Int_t layer=0)
Set the energy of this point.
Definition: StEEmcIUPoint.h:25
Float_t mFraction
...
Int_t mSector
Sector.
void fraction(Float_t f)
Set the fraction of the tower energy used.
Definition: StEEmcIUPoint.h:27
Float_t mEnergy[4]
Energy of the point.
void position(TVector3 p)
Set the position of this point at the SMD plane.
Definition: StEEmcIUPoint.h:23
Float_t mResidueV
Residual in V.
void u(Float_t uu)
Sets mean U position.
Definition: StEEmcIUPoint.h:75
Float_t fraction()
Get the fraction of tower energy associated with this point.
Definition: StEEmcIUPoint.h:41
Float_t energy(Int_t layer=0) const
Get the energy of this point.
Definition: StEEmcIUPoint.h:43
Float_t energy(Int_t layer)
Get the energy of this point.
Definition: StEEmcIUPoint.h:39
Float_t weight(Int_t t)
Gets the weight associated with a specific tower.
Definition: StEEmcIUPoint.h:49
Float_t mResidueU
Residual in U.
Float_t residueV()
Get the residual in the V plane.
Definition: StEEmcIUPoint.h:87
std::vector< Float_t > mWeights
Vector of weights.
StEEmcTowerVec_t mTowers
Float_t v()
Returns mean V position.
Definition: StEEmcIUPoint.h:78
Float_t u()
Returns mean U position.
Definition: StEEmcIUPoint.h:73
void cluster(StEEmcIUSmdCluster c, Int_t plane)
Add an smd cluster to this point.
Definition: StEEmcIUPoint.h:31
StEmcPoint * stemc()
Base class for representing tower, preshower and postshower elements.
Definition: StEEmcTower.h:11
Int_t sector()
Returns the sector.
Definition: StEEmcIUPoint.h:63
Int_t numberOfTowers()
Gets the number of towers.
Definition: StEEmcIUPoint.h:45
StEEmcIUSmdCluster mSmdClusters[2]
Smd clusters associated with this point.
TVector3 mPosition
Position of the point.
A base class for representing clusters of EEMC smd strips.
Base class for representing EEMC points.
Definition: StEEmcIUPoint.h:12
void sector(Int_t s)
Sets the sector.
Definition: StEEmcIUPoint.h:65
StEEmcTower tower(Int_t t)
Gets a specific tower.
Definition: StEEmcIUPoint.h:47
Float_t mV
Mean V.
void tower(StEEmcTower t, Float_t w=1.)
Add a tower with specified weight to the point.
Definition: StEEmcIUPoint.h:29
Float_t mSigma
Width.
void numberOfRelatives(Int_t r)
Set the number of other points which share tower energy.
Definition: StEEmcIUPoint.h:34
Float_t residueU()
Get the residual in the U plane.
Definition: StEEmcIUPoint.h:83
Int_t sector()
Return the sector of the cluster.
void residueU(Float_t r)
Set the residual in the U plane.
Definition: StEEmcIUPoint.h:85
Bool_t operator<(const StEEmcIUPoint &other) const
Point is less than another based on energy.
void residueV(Float_t r)
Set the residual in the V plane.
Definition: StEEmcIUPoint.h:89
void sigma(Float_t s)
Sets the width.
Definition: StEEmcIUPoint.h:70