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 "StEEmcCluster.h"
7 #include "StEEmcSmdCluster.h"
8 #include "StEEmcPoint.h"
9 
10 #include "StEEmcPointUtils.h"
11 
12 #include <map>
13 
14 class StEEmcA2EMaker;
15 class StEEmcClusterMaker;
16 
17 class EEmcGeomSimple;
18 class EEmcSmdMap;
19 class EEmcSmdGeom;
20 
21 class StEEmcPointMaker : public StMaker, public StEEmcPointUtils {
22 
23  public:
24 
25  StEEmcPointMaker( const Char_t *name );
26  ~StEEmcPointMaker(){ /* nada */ };
27 
28  Int_t Init();
29  Int_t Make();
30 
31  void Clear(Option_t *opts="");
32 
33  void analysis(const Char_t *name);
34  void clusters(const Char_t *name);
35 
40  void towerThreshold( Float_t t) { mTowerThreshold=t; }
41 
43  StEEmcPointVec_t points();
45  Int_t numberOfPoints();
47  StEEmcPoint point(Int_t ipoint);
48 
50  Float_t energySeen(){ return mEseen; }
51 
54  void setFillStEvent(){ mFillStEvent=true; }
55 
58  void setEnergyMode(Int_t mode){ mEnergyMode=mode; }
59  void setLimit(Int_t l){ mLimit=l; }
60 
61 
64  StEEmcPoint point( StEmcPoint *p ){ return mEtoEE[p]; }
65 
66 
67  private:
68  protected:
69 
70  TString mNameAnalysis;
71  TString mNameClusters;
72 
75 
79 
81  void fillStEvent();
82  void verifyStEvent();
83 
85  StEEmcPointVec_t mPoints;
86 
88  StEEmcPointVec_t mSmdPoints;
89 
90  std::map< StEEmcSmdCluster, StEEmcPointVec_t > mUclusters2points;
91  std::map< StEEmcSmdCluster, StEEmcPointVec_t > mVclusters2points;
92 
94  StEEmcPointVec_t buildSmdPoints( Int_t sector, StEEmcSmdClusterVec_t &u, StEEmcSmdClusterVec_t &v );
96  Bool_t findPoints ( Int_t sector,
97  StEEmcSmdClusterVec_t u,
98  StEEmcSmdClusterVec_t v,
99  StEEmcPointVec_t &p );
100 
102  void shareEnergy();
103  void shareEnergySimple();
104  void shareEnergySmd();
105  void countRelatives();
106 
107  void removeCluster( StEEmcSmdClusterVec_t &clusters, Int_t key );
108 
112  Float_t fracp2t( StEEmcPoint &p, StEEmcTower &t );
113 
114  Float_t mTowerThreshold;
115 
116  Float_t mEseen;
117 
118  Bool_t mFillStEvent;
119  Int_t mEnergyMode;
120  Int_t mLimit;
121 
123  std::map<StEmcPoint *, StEEmcPoint> mEtoEE;
124 
125 
127 
128 };
129 
130 inline void StEEmcPointMaker::analysis(const Char_t *n){ mNameAnalysis=n; }
131 inline void StEEmcPointMaker::clusters(const Char_t *n){ mNameClusters=n; }
132 
133 inline StEEmcPointVec_t StEEmcPointMaker::points(){ return mPoints ; }
134 
135 inline Int_t StEEmcPointMaker::numberOfPoints(){ return mPoints.size(); }
136 inline StEEmcPoint StEEmcPointMaker::point(Int_t ip){ return mPoints[ip]; }
137 #endif
StEEmcA2EMaker * mEEanalysis
ADC2E.
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
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
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.
Int_t mEnergyMode
Option for dividing energy.
A cluster maker for the EEMC.