StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcGenericPointMaker.h
1 #ifndef __StEEmcGenericPointMaker_h__
2 #define __StEEmcGenericPointMaker_h__
3 
43 #include "StMaker.h"
44 
45 #include <vector>
46 #include <map>
47 
48 #include "StEEmcPool/StEEmcA2EMaker/StEEmcA2EMaker.h"
49 #include "StEEmcPool/StEEmcClusterMaker/StEEmcGenericClusterMaker.h"
50 
51 #include "StEEmcPoint.h"
52 //#include "StEvent/StEmcPoint.h"
53 
54 #include "StEEmcUtil/EEmcGeom/EEmcGeomSimple.h"
55 #include "StEEmcUtil/StEEmcSmd/EEmcSmdGeom.h"
56 #include "StEEmcUtil/EEmcSmdMap/EEmcSmdMap.h"
57 
58 class TH1F;
59 class TH2F;
60 
62 {
63 public:
64  StEEmcGenericPointMaker(const Char_t *name="EEmcPointMaker", const StEEmcA2EMaker *a2e=NULL, const StEEmcGenericClusterMaker *cl=NULL );
65  virtual ~StEEmcGenericPointMaker(){ /* nada */ };
66 
67  virtual Int_t Init();
68  virtual Int_t Make();
69  virtual void Clear(Option_t *opts="");
70 
72  StEEmcPointVec_t &points() { return mPoints ; }
73  const StEEmcPointVec_t &points() const { return mPoints ; }
75  StEEmcPointVec_t &smdPoints() { return mSmdPoints; }
76  const StEEmcPointVec_t &smdPoints() const { return mSmdPoints; }
78  StEEmcPointVec_t &towerPoints() { return mTowerPoints;}
79  const StEEmcPointVec_t &towerPoints() const { return mTowerPoints;}
80 
82  Int_t numberOfPoints() const { return mPoints.size(); }
84  Int_t numberOfSmdPoints() const { return mSmdPoints.size(); }
86  Int_t numberOfTowerPoints() const { return mTowerPoints.size(); }
87 
90  StEEmcPoint &point( Int_t ipoint ) { return mPoints[ipoint]; }
91  const StEEmcPoint &point( Int_t ipoint ) const { return mPoints[ipoint]; }
94  StEEmcPoint &smdPoint( Int_t ipoint ) { return mSmdPoints[ipoint]; }
95  const StEEmcPoint &smdPoint( Int_t ipoint ) const { return mSmdPoints[ipoint]; }
98  StEEmcPoint &towerPoint( Int_t ipoint ) { return mTowerPoints[ipoint]; }
99  const StEEmcPoint &towerPoint( Int_t ipoint ) const { return mTowerPoints[ipoint]; }
100 
101  void addPoint(const StEEmcPoint &point );
102  void addSmdPoint(const StEEmcPoint &point );
103  void addTowerPoint(const StEEmcPoint &point );
104 
105  StEEmcPointVec_t &points(const StEEmcCluster &cluster ) { return (*(mCluster2points.find(cluster.key()))).second; }
106  const StEEmcPointVec_t &points(const StEEmcCluster &cluster ) const { return (*(mCluster2points.find(cluster.key()))).second; }
107  Int_t numberOfPoints(const StEEmcCluster &c ) const { return (Int_t)(*(mCluster2points.find(c.key()))).second.size(); }
108 
109  StEEmcCluster &cluster(const StEEmcPoint &point ){ return (*(mPoint2cluster.find(point.key()))).second; }
110 
111 protected:
112 
113  Int_t mKey;
114  Int_t nextPointId(){ return mKey++; }
115 
119  StEEmcPointVec_t mPoints;
120  StEEmcPointVec_t mSmdPoints;
121  StEEmcPointVec_t mTowerPoints;
123  StEEmcPointVec_t buildSmdPoints(Int_t sector, const StEEmcSmdClusterVec_t &u, const StEEmcSmdClusterVec_t &v);
124  StEEmcPointVec_t buildTowerPoints(Int_t sector, const StEEmcClusterVec_t &c );
125  StEEmcPointVec_t buildPoints( const StEEmcClusterVec_t &towerClusters, const StEEmcSmdClusterVec_t &u, const StEEmcSmdClusterVec_t &v );
131  void fillStEvent();
132 
133  TH1F *hNumberOfPoints;
134  TH1F *hEnergyOfPoints;
135  TH2F *hDistributionOfPoints;
136 
137  TH1F *hTotalEnergy[6];
138  TH1F *hTotalPointEnergy[6];
140  std::map< Int_t, StEEmcPointVec_t > mCluster2points;
141  std::map< Int_t, StEEmcCluster > mPoint2cluster;
142 
143  ClassDef(StEEmcGenericPointMaker,1);
144 };
145 
146 #endif
const StEEmcA2EMaker * mEEanalysis
Int_t numberOfSmdPoints() const
Number of smd-only points.
EEmc ADC –&gt; energy maker.
Base class for representing EEMC points.
Definition: StEEmcPoint.h:24
StEEmcPointVec_t buildSmdPoints(Int_t sector, const StEEmcSmdClusterVec_t &u, const StEEmcSmdClusterVec_t &v)
Int_t numberOfPoints() const
Number of points.
StEEmcPointVec_t buildPoints(const StEEmcClusterVec_t &towerClusters, const StEEmcSmdClusterVec_t &u, const StEEmcSmdClusterVec_t &v)
StEEmcPointVec_t buildTowerPoints(Int_t sector, const StEEmcClusterVec_t &c)
StEEmcPointVec_t & towerPoints()
Return vector of tower-only points.
StEEmcPoint & towerPoint(Int_t ipoint)
const StEEmcGenericClusterMaker * mEEclusters
StEEmcPoint & smdPoint(Int_t ipoint)
const EEmcGeomSimple * mEEtow
EEMC simple geometry.
virtual void Clear(Option_t *opts="")
User defined functions.
StEEmcPointVec_t & points()
Return vector of EEmc points.
StEEmcPointVec_t & smdPoints()
Return vector of smd-only points.
A base class for describing clusters of EEMC towers.
Definition: StEEmcCluster.h:50
Int_t numberOfTowerPoints() const
Number of tower-only points.
StEEmcPoint & point(Int_t ipoint)