StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcPointMaker.h
1 #ifndef __StEEmcPointMaker_h__
2 #define __StEEmcPointMaker_h__
3 
4 #include "StMaker.h"
5 #include "TString.h"
6 #include "StEEmcPool/StEEmcClusterMaker/StEEmcCluster.h"
7 #include "StEEmcPool/StEEmcClusterMaker/StEEmcSmdCluster.h"
8 #include "StEEmcPoint.h"
9 
10 
11 #include <map>
12 
13 class StEEmcA2EMaker;
14 class StEEmcClusterMaker;
15 
16 class EEmcGeomSimple;
17 class EEmcSmdMap;
18 class EEmcSmdGeom;
19 
20 class StEEmcPointMaker : public StMaker {
21 
22  public:
23 
24  StEEmcPointMaker( const Char_t *name );
25  ~StEEmcPointMaker(){ /* nada */ };
26 
28  Int_t Init();
30  Int_t Make();
32  void Clear(Option_t *opts="");
34  void analysis(const Char_t *name);
36  void clusters(const Char_t *name);
37 
42  void towerThreshold( Float_t t) { mTowerThreshold=t; }
43 
45  void smdMatch( Float_t s ){ mSmdMatch = s; }
46 
48  StEEmcPointVec_t points();
50  Int_t numberOfPoints();
52  StEEmcPoint point(Int_t ipoint);
53 
57  StEEmcPointVec_t smdPoints();
59  Int_t numberOfSmdPoints();
61  StEEmcPoint smdPoint(Int_t ip);
62 
64  Float_t energySeen(){ return mEseen; }
65 
68  void setFillStEvent(){ mFillStEvent=true; }
69 
72  void setEnergyMode(Int_t mode){ mEnergyMode=mode; }
74  void setLimit(Int_t l){ mLimit=l; }
75 
76 
79  StEEmcPoint point( StEmcPoint *p ){ return mEtoEE[p]; }
80 
81 
82  private:
83  protected:
84 
85  TString mNameAnalysis;
86  TString mNameClusters;
92 
99 
101  void fillStEvent();
103  void verifyStEvent();
104 
106  StEEmcPointVec_t mPoints;
107 
109  StEEmcPointVec_t mSmdPoints;
110 
112  std::map< StEEmcSmdCluster, StEEmcPointVec_t > mUclusters2points;
113  std::map< StEEmcSmdCluster, StEEmcPointVec_t > mVclusters2points;
115 
117  StEEmcPointVec_t buildSmdPoints( Int_t sector, StEEmcSmdClusterVec_t &u, StEEmcSmdClusterVec_t &v );
119  Bool_t findPoints ( Int_t sector,
120  StEEmcSmdClusterVec_t u,
121  StEEmcSmdClusterVec_t v,
122  StEEmcPointVec_t &p );
123 
125  void shareEnergy();
127  void shareEnergySimple();
129  void shareEnergySmd();
131  void countRelatives();
133  void removeCluster( StEEmcSmdClusterVec_t &clusters, Int_t key );
134 
138  Float_t fracp2t( StEEmcPoint &p, StEEmcTower &t );
139 
147  Float_t mSmdMatch;
149  Float_t mEseen;
151  Bool_t mFillStEvent;
153  Int_t mEnergyMode;
155  Int_t mLimit;
156 
158  std::map<StEmcPoint *, StEEmcPoint> mEtoEE;
159 
162 
163 };
164 
165 inline void StEEmcPointMaker::analysis(const Char_t *n){ mNameAnalysis=n; }
166 inline void StEEmcPointMaker::clusters(const Char_t *n){ mNameClusters=n; }
167 
168 inline StEEmcPointVec_t StEEmcPointMaker::points(){ return mPoints ; }
169 inline Int_t StEEmcPointMaker::numberOfPoints(){ return mPoints.size(); }
170 inline StEEmcPoint StEEmcPointMaker::point(Int_t ip){ return mPoints[ip]; }
171 
172 inline StEEmcPointVec_t StEEmcPointMaker::smdPoints(){ return mSmdPoints; }
173 inline Int_t StEEmcPointMaker::numberOfSmdPoints(){ return mSmdPoints.size(); }
174 inline StEEmcPoint StEEmcPointMaker::smdPoint(Int_t ip){ return mSmdPoints[ip]; }
175 #endif
StEEmcA2EMaker * mEEanalysis
ADC2E.
void smdMatch(Float_t s)
Sets an smd matching requirement, Eu&gt;s*Ev&amp;&amp;Ev&gt;2*Eu.
void shareEnergySmd()
Divide energy of eemc towers between identified smd points in proportion to the smd energy...
EEmc ADC –&gt; energy maker.
Base class for representing EEMC points.
Definition: StEEmcPoint.h:24
StEEmcPoint point(StEmcPoint *p)
Float_t mEseen
Energy seen by the algorithm.
StEEmcPointVec_t mPoints
All fully reconstructed points.
Bool_t mFillStEvent
Option to fill StEvent.
Float_t energySeen()
Total energy seen by the algorithm.
void setLimit(Int_t l)
Number of iterations for tower-shape mode.
void shareEnergySimple()
Divide energy of eemc towers between identified smd points (doesn&#39;t work as well as smd algo) ...
void verifyStEvent()
Checks that StEvent is properly saved.
StEEmcPoint point(Int_t ipoint)
Return a specified point.
EEmcSmdMap * mEEmap
Tower to smd map.
StEEmcPointVec_t points()
Return vector of all points found in endcap.
void analysis(const Char_t *name)
Set adc to energy maker.
Int_t Init()
Initialize.
void shareEnergy()
Divide energy of eemc towers between identified smd points using fit (doesn&#39;t work) ...
Class for building points from smd clusters.
StEEmcPointMaker(const Char_t *name)
std::map< StEEmcSmdCluster, StEEmcPointVec_t > mUclusters2points
maps smd clusters to points
void setEnergyMode(Int_t mode)
ClassDef(StEEmcPointMaker, 1)
Makes class available to root.
std::map< StEmcPoint *, StEEmcPoint > mEtoEE
Map connecting StEEmcPoint to StEmcPoint.
Int_t numberOfPoints()
Return number of points.
Base class for representing tower, preshower and postshower elements.
Definition: StEEmcTower.h:11
StEEmcPoint smdPoint(Int_t ip)
Return a specified smd point.
StEEmcPointVec_t buildSmdPoints(Int_t sector, StEEmcSmdClusterVec_t &u, StEEmcSmdClusterVec_t &v)
build smd points and associations between smd points and clusters
Bool_t findPoints(Int_t sector, StEEmcSmdClusterVec_t u, StEEmcSmdClusterVec_t v, StEEmcPointVec_t &p)
find points in the endcap
Int_t numberOfSmdPoints()
Return the total number of smd points.
StEEmcPointVec_t mSmdPoints
SMD only points.
void countRelatives()
Determine the number of points which share tower energy with another point.
void clusters(const Char_t *name)
Set cluster maker.
EEMC simple geometry.
void removeCluster(StEEmcSmdClusterVec_t &clusters, Int_t key)
Remove a cluster from the list of clusters.
EEmcGeomSimple * mEEtow
Tower geometry.
void towerThreshold(Float_t t)
std::map< StEEmcSmdCluster, StEEmcPointVec_t > mVclusters2points
maps smd clusters to points
void Clear(Option_t *opts="")
Clear old points.
EEmcSmdGeom * mEEsmd
Smd geometry.
Int_t mLimit
How many iterations for the tower energy sharing mode.
Float_t fracp2t(StEEmcPoint &p, StEEmcTower &t)
void fillStEvent()
Fills the StEmcPoint collection.
StEEmcClusterMaker * mEEclusters
Clusters.
Int_t Make()
Build points for this event.
StEEmcPointVec_t smdPoints()
Int_t mEnergyMode
Option for dividing energy.
A cluster maker for the EEMC.