StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcClusterMaker.h
1 #ifndef __StEEmcClusterMaker_h__
2 #define __StEEmcClusterMaker_h__
3 
4 #include "StMaker.h"
5 #include "StEEmcCluster.h"
6 #include "StEEmcSmdCluster.h"
7 #include "StEEmcA2EMaker.h"
8 #include "TString.h"
9 #include "StEEmcUtil/EEmcGeom/EEmcGeomSimple.h"
10 #include "StEEmcUtil/EEmcSmdMap/EEmcSmdMap.h"
11 #include "StEEmcUtil/StEEmcSmd/EEmcSmdGeom.h"
12 
13 #include <map>
14 
15 class StEEmcClusterMaker : public StMaker {
16 
17  public:
18 
19  StEEmcClusterMaker( const Char_t *name = "mEEclusters" );
20  ~StEEmcClusterMaker(){ /* nada */ };
21 
22  Int_t Init();
23  Int_t Make();
24  void Clear(Option_t *opts="");
25 
27  void analysis ( const Char_t *name );
28 
31  void seedEnergy( Float_t energy, Int_t layer=0 );
32 
34  void setMaxExtent( Int_t m );
35 
38  void setSeedFloor( Float_t f=2.0 );
39 
41  Int_t numberOfClusters(Int_t sec, Int_t layer);
43  Int_t numberOfSmdClusters(Int_t sec, Int_t plane);
44 
46  StEEmcCluster cluster(Int_t sec, Int_t layer, Int_t index);
48  StEEmcSmdCluster smdcluster(Int_t sec, Int_t plane, Int_t index);
49 
50 
53  StEEmcCluster cluster( StEmcCluster *cl ){ return mEtoEE[ cl ]; }
57 
59  StEEmcClusterVec_t clusters( Int_t sec, Int_t layer );
61  StEEmcSmdClusterVec_t smdclusters( Int_t sec, Int_t plane );
62 
65  void setFillStEvent(){ mFillStEvent=true; }
66 
68  void suppress(){ mSuppress=true; }
69 
70  void print();
71 
72  private:
73  protected:
74 
75  Int_t mClusterId;
76 
77  Bool_t mSuppress;
78 
81  std::vector< std::vector< StEEmcTowerVec_t > > mSeedTowers;
82 
86  std::vector< std::vector< StEEmcClusterVec_t > > mTowerClusters;
89  std::vector< std::vector< StEEmcSmdClusterVec_t > > mSmdClusters;
90 
92  Int_t mNumberOfClusters[6];
93 
95  Float_t mSeedEnergy[6];
97  Int_t mMaxExtent;
99  Float_t mSeedFloor;
100 
102  Bool_t buildTowerClusters();
103 
105  Bool_t buildSmdClusters();
106 
108  void fillStEvent();
109 
112  Bool_t verifyStEvent();
113 
118 
120  TString mAnalysisName;
123 
124  Bool_t mFillStEvent;
125 
127  std::map< StEmcCluster *, StEEmcCluster > mEtoEE;
128  // ... and for smd clusters
129  std::map< StEmcCluster *, StEEmcSmdCluster > mEtoEEsmd;
130 
131  ClassDef(StEEmcClusterMaker,1);
132 
133 };
134 
135 inline void StEEmcClusterMaker::analysis( const Char_t *name ){ mAnalysisName=name; }
136 inline void StEEmcClusterMaker::seedEnergy(Float_t energy, Int_t layer){ mSeedEnergy[layer]=energy; }
137 
138 inline void StEEmcClusterMaker::setMaxExtent(Int_t m){ mMaxExtent=m; }
139 inline void StEEmcClusterMaker::setSeedFloor(Float_t f){ mSeedFloor=f; }
140 
141 inline Int_t StEEmcClusterMaker::numberOfClusters(Int_t s, Int_t l)
142  { return (Int_t)mTowerClusters[s][l].size(); }
143 inline Int_t StEEmcClusterMaker::numberOfSmdClusters(Int_t s, Int_t p)
144  { return (Int_t)mSmdClusters[s][p].size(); }
145 
146 inline StEEmcCluster StEEmcClusterMaker::cluster(Int_t s, Int_t l, Int_t i)
147  { return mTowerClusters[s][l][i]; }
148 inline StEEmcSmdCluster StEEmcClusterMaker::smdcluster(Int_t s,Int_t p,Int_t i)
149  { return mSmdClusters[s][p][i]; }
150 
151 inline StEEmcClusterVec_t StEEmcClusterMaker::clusters(Int_t s, Int_t l)
152  { return mTowerClusters[s][l]; }
153 
154 inline StEEmcSmdClusterVec_t StEEmcClusterMaker::smdclusters(Int_t s, Int_t l)
155  { return mSmdClusters[s][l]; }
156 
157 #endif
Int_t mSuppress
Supress seeds adjacent to clusters.
virtual void Clear(Option_t *opts="")
Clear clusters for next event.
void analysis(const Char_t *name)
Set the name of the ADC–&gt;E maker.
EEmc ADC –&gt; energy maker.
void setSeedFloor(Float_t f=2.0)
StEEmcClusterMaker(const Char_t *name="mEEclusters")
Int_t numberOfClusters(Int_t sec, Int_t layer) const
Return number of clusters for a given sector, layer.
std::vector< std::vector< StEEmcSmdClusterVec_t > > mSmdClusters
StEEmcCluster & cluster(Int_t sec, Int_t layer, Int_t index)
Return a specific cluster from a given sector, layer.
const EEmcSmdMap * mEEmap
Int_t numberOfSmdClusters(Int_t sec, Int_t plane) const
Return number of smd clusters for a given sector, plane.
const EEmcSmdGeom * mEEsmd
Int_t mNumberOfClusters[6]
Counts clusters for full eemc, 0=T, 1=P, 2=Q, 3=R, 4=U, 5=V.
std::vector< std::vector< StEEmcClusterVec_t > > mTowerClusters
void setMaxExtent(Int_t m)
Maximum distance around seed strip to cluster smd strips.
std::vector< std::vector< StEEmcTowerVec_t > > mSeedTowers
Float_t mSeedFloor
blah...
Bool_t mFillStEvent
Option to fill StEvent.
std::map< StEmcCluster *, StEEmcCluster > mEtoEE
Map StEEmcClusters to StEmcClusters.
TString mAnalysisName
ADC–&gt;E maker name.
StEEmcA2EMaker * mEEanalysis
ADC–&gt;E maker.
virtual Bool_t buildSmdClusters()
Constructs smd clusters.
virtual Bool_t buildTowerClusters()
Constructs tower clusters.
StEEmcCluster cluster(StEmcCluster *cl)
virtual Int_t Init()
Initialize.
StEEmcSmdCluster smdcluster(StEmcCluster *cl)
Float_t mSeedEnergy[6]
Seed energy for 0=T, 1=P, 2=Q, 3=R, 4=U, 5=V.
Int_t mMaxExtent
Maximum distance from SMD seed strips.
EEMC simple geometry.
A base class for representing clusters of EEMC smd strips.
virtual Int_t Make()
Make clusters for this event.
void suppress()
Suppress cluster splitting.
void print() const
Event summary.
std::map< const StEmcCluster *, StEEmcCluster > mEtoEE
Map StEEmcClusters to StEmcClusters.
Bool_t verifyStEvent() const
A base class for describing clusters of EEMC towers.
Definition: StEEmcCluster.h:50
std::map< const StEmcCluster *, StEEmcSmdCluster > mEtoEEsmd
... and for smd clusters
void seedEnergy(Float_t energy, Int_t layer=0)
EEmcGeomSimple * mEEtow
Geometry classes.
StEEmcSmdCluster & smdcluster(Int_t sec, Int_t plane, Int_t index)
return a specific cluster from a given sector, plane
StEEmcClusterVec_t & clusters(Int_t sec, Int_t layer)
Return a vector of tower clusters.
void fillStEvent()
Fills StEvent cluster collections if the option is selected.
Int_t mClusterId
Keep track of clusters.
StEEmcSmdClusterVec_t & smdclusters(Int_t sec, Int_t plane)
Return a vector of smd clusters.
A cluster maker for the EEMC.