StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcIUPointMaker.h
1 #ifndef __StEEmcIUPointMaker_h__
2 #define __StEEmcIUPointMaker_h__
3 
4 #include "StMaker.h"
5 #include "TString.h"
6 #include "StEEmcIUCluster.h"
7 #include "StEEmcIUSmdCluster.h"
8 #include "StEEmcIUPoint.h"
9 
10 
11 #include <map>
12 
13 class StEEmcA2EMaker;
15 class TH1F;
16 class TH2F;
17 class EEmcGeomSimple;
18 class EEmcSmdMap;
19 class EEmcSmdGeom;
20 
21 class StEEmcIUPointMaker : public StMaker {
22 
23  public:
24 
25  StEEmcIUPointMaker( const Char_t *name );
26  ~StEEmcIUPointMaker(){ /* nada */ };
27 
29  Int_t Init();
31  Int_t Make();
33  void Clear(Option_t *opts="");
35  void analysis(const Char_t *name);
37  void clusters(const Char_t *name);
38 
43  void towerThreshold( Float_t t) { mTowerThreshold=t; }
44 
46  void smdMatch( Float_t s ){ mSmdMatch = s; }
48  //Int_t key(){ return mKey; }
50  //Int_t key()const { return mKey; }
51 
55  //void key(Int_t k){ mKey=k; }
56 
58  StEEmcIUPointVec_t points();
60  Int_t numberOfPoints();
62  StEEmcIUPoint point(Int_t ipoint);
63 
67  StEEmcIUPointVec_t smdPoints();
69  Int_t numberOfSmdPoints();
71  StEEmcIUPoint smdPoint(Int_t ip);
72 
74  Float_t energySeen(){ return mEseen; }
75 
78  void setFillStEvent(){ mFillStEvent=true; }
79 
82  void setEnergyMode(Int_t mode){ mEnergyMode=mode; }
84  void setLimit(Int_t l){ mLimit=l; }
85 
86 
89  StEEmcIUPoint point( StEmcPoint *p ){ return mEtoEE[p]; }
90 
91 
92  private:
93  protected:
94  Int_t ukey;
95  Int_t vkey;
96 
97  TString mNameAnalysis;
98  TString mNameClusters;
104 
109  EEmcSmdMap *mEEmap;
111  TH1F *hZEratio;
112  TH1F *pointet;
113  TH2F *pointgeo;
115  void fillStEvent();
117  void verifyStEvent();
118 
120  StEEmcIUPointVec_t mPoints;
121 
123  StEEmcIUPointVec_t mSmdPoints;
124 
126  std::map< StEEmcIUSmdCluster, StEEmcIUPointVec_t > mUclusters2points;
127  std::map< StEEmcIUSmdCluster, StEEmcIUPointVec_t > mVclusters2points;
129 
131  StEEmcIUPointVec_t buildSmdPoints( Int_t sector, StEEmcIUSmdClusterVec_t &u, StEEmcIUSmdClusterVec_t &v );
133  Bool_t findPoints ( Int_t sector,
134  StEEmcIUSmdClusterVec_t u,
135  StEEmcIUSmdClusterVec_t v,
136  StEEmcIUPointVec_t &p );
137 
139  void shareEnergy();
141  void shareEnergySimple();
143  void shareEnergySmd();
145  void countRelatives();
147  void removeCluster( StEEmcIUSmdClusterVec_t &clusters, Int_t key );
148 
152  Float_t fracp2t( StEEmcIUPoint &p, StEEmcTower &t );
153 
161  Float_t mSmdMatch;
163  Float_t mEseen;
165  Bool_t mFillStEvent;
167  Int_t mEnergyMode;
169  Int_t mLimit;
170 
172  std::map<StEmcPoint *, StEEmcIUPoint> mEtoEE;
173 
176 
177 };
178 
179 inline void StEEmcIUPointMaker::analysis(const Char_t *n){ mNameAnalysis=n; }
180 inline void StEEmcIUPointMaker::clusters(const Char_t *n){ mNameClusters=n; }
181 
182 inline StEEmcIUPointVec_t StEEmcIUPointMaker::points(){ return mPoints ; }
183 inline Int_t StEEmcIUPointMaker::numberOfPoints(){ return mPoints.size(); }
184 inline StEEmcIUPoint StEEmcIUPointMaker::point(Int_t ip){ return mPoints[ip]; }
185 
186 inline StEEmcIUPointVec_t StEEmcIUPointMaker::smdPoints(){ return mSmdPoints; }
187 inline Int_t StEEmcIUPointMaker::numberOfSmdPoints(){ return mSmdPoints.size(); }
188 inline StEEmcIUPoint StEEmcIUPointMaker::smdPoint(Int_t ip){ return mSmdPoints[ip]; }
189 #endif
Bool_t findPoints(Int_t sector, StEEmcIUSmdClusterVec_t u, StEEmcIUSmdClusterVec_t v, StEEmcIUPointVec_t &p)
find points in the endcap
Int_t numberOfSmdPoints()
Return the total number of smd points.
EEmc ADC –&gt; energy maker.
std::map< StEEmcIUSmdCluster, StEEmcIUPointVec_t > mVclusters2points
maps smd clusters to points
Float_t energySeen()
Total energy seen by the algorithm.
void shareEnergySimple()
Divide energy of eemc towers between identified smd points (doesn&#39;t work as well as smd algo) ...
void Clear(Option_t *opts="")
Clear old points.
StEEmcIUPointVec_t mSmdPoints
SMD only points.
Float_t mEseen
Energy seen by the algorithm.
Bool_t mFillStEvent
Option to fill StEvent.
StEEmcIUPointVec_t points()
Return a unique key assigned by the cluster maker.
EEmcSmdMap * mEEmap
Tower to smd map.
std::map< StEmcPoint *, StEEmcIUPoint > mEtoEE
Map connecting StEEmcIUPoint to StEmcPoint.
Int_t Init()
Initialize.
StEEmcIUPointVec_t buildSmdPoints(Int_t sector, StEEmcIUSmdClusterVec_t &u, StEEmcIUSmdClusterVec_t &v)
build smd points and associations between smd points and clusters
Class for building points from smd clusters.
void fillStEvent()
Fills the StEmcPoint collection.
StEEmcIUPoint point(StEmcPoint *p)
Int_t numberOfPoints()
Return number of points.
A cluster maker for the EEMC.
void removeCluster(StEEmcIUSmdClusterVec_t &clusters, Int_t key)
Remove a cluster from the list of clusters.
void verifyStEvent()
Checks that StEvent is properly saved.
void analysis(const Char_t *name)
Set adc to energy maker.
StEEmcIUPoint smdPoint(Int_t ip)
Return a specified smd point.
Int_t Make()
Build points for this event.
Int_t mEnergyMode
Option for dividing energy.
Base class for representing tower, preshower and postshower elements.
Definition: StEEmcTower.h:11
void shareEnergySmd()
Divide energy of eemc towers between identified smd points in proportion to the smd energy...
StEEmcA2EMaker * mEEanalysis
ADC2E.
StEEmcIUPointMaker(const Char_t *name)
StEEmcIUPoint point(Int_t ipoint)
Return a specified point.
void smdMatch(Float_t s)
Sets an smd matching requirement, Eu&gt;s*Ev&amp;&amp;Ev&gt;2*Eu.
Int_t mLimit
How many iterations for the tower energy sharing mode.
void setEnergyMode(Int_t mode)
EEMC simple geometry.
void clusters(const Char_t *name)
Set cluster maker.
Base class for representing EEMC points.
Definition: StEEmcIUPoint.h:12
EEmcSmdGeom * mEEsmd
Smd geometry.
EEmcGeomSimple * mEEtow
Tower geometry.
ClassDef(StEEmcIUPointMaker, 1)
Makes class available to root.
StEEmcIUPointVec_t smdPoints()
std::map< StEEmcIUSmdCluster, StEEmcIUPointVec_t > mUclusters2points
maps smd clusters to points
StEEmcIUPointVec_t mPoints
All fully reconstructed points.
Float_t fracp2t(StEEmcIUPoint &p, StEEmcTower &t)
void towerThreshold(Float_t t)
void setLimit(Int_t l)
Number of iterations for tower-shape mode.
void shareEnergy()
Divide energy of eemc towers between identified smd points using fit (doesn&#39;t work) ...
StEEmcIUClusterMaker * mEEclusters
Clusters.
void countRelatives()
Determine the number of points which share tower energy with another point.