StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEEmcIUClusterMaker.h
1 #ifndef __StEEmcIUClusterMaker_h__
2 #define __StEEmcIUClusterMaker_h__
3 
4 #include "StMaker.h"
5 #include "StEEmcIUCluster.h"
6 #include "StEEmcIUSmdCluster.h"
7 #include "StEEmcPool/StEEmcA2EMaker/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 "StEEmcSimulatorMaker/SlowSimUtil.h"
14 
15 #include <map>
16 
17 class StEEmcIUClusterMaker : public StMaker { //, public SlowSimUtil {
18 
19  public:
20 
21  StEEmcIUClusterMaker( const Char_t *name = "mEEclusters" );
22  ~StEEmcIUClusterMaker(){ /* nada */ };
23 
25  Int_t Init();
27  Int_t Make();
29  void Clear(Option_t *opts="");
30 
32  void analysis ( const Char_t *name );
33 
36  void seedEnergy( Float_t energy, Int_t layer=0 );
37 
39  void setMaxExtent( Int_t m );
40 
42  void setMinStrips( Int_t m ){ mMinStrips=m; }
43 
46  void setSeedFloor( Float_t f=2.0 );
47 
49  Int_t numberOfClusters(Int_t sec, Int_t layer);
51  Int_t numberOfSmdClusters(Int_t sec, Int_t plane);
52  Int_t TnumberOfSmdClusters(Int_t sec, Int_t plane);
53  //return the difference of two u clusters' centroid
54  //float diffOf2uclusters();
55  //float diffOf2vclusters();
56  //return the number of seed in u plan all sectors
57  int numberOfUseed();
58  int numberOfVseed();
59  int UStripWidth();
60  int VStripWidth();
61  float Tenergyoftower();
62  float Tenergyofp1();
63  float Tenergyofp2();
64  float Tenergyofp3();
65  float Tenergyofsmdu();
66  float Tenergyofsmdv();
67  float UAmplitude();
68  float VAmplitude();
69 
71  StEEmcIUCluster cluster(Int_t sec, Int_t layer, Int_t index);
73  StEEmcIUSmdCluster smdcluster(Int_t sec, Int_t plane, Int_t index);
74 
75 
78  StEEmcIUCluster cluster( StEmcCluster *cl ){ return mEtoEE[ cl ]; }
82 
84  StEEmcIUClusterVec_t clusters( Int_t sec, Int_t layer );
86  StEEmcIUSmdClusterVec_t smdclusters( Int_t sec, Int_t plane );
87 
90  void setFillStEvent(){ mFillStEvent=true; }
91 
94  void suppress(Int_t n=0){ mSuppress=n; }
95 
97  void skip(Bool_t s=true){ mSkip=s; }
98 
100  void loose(Bool_t l=true){ mLoose=l; }
101 
103  void print();
104 
105  private:
106  protected:
107 
108  TH1D *clusize;
109  TH1D *tclusize;
110  TH1D *cludis;
112  Int_t mClusterId;
113 
115  Int_t mSuppress;
117  Bool_t mSkip;
119  Bool_t mLoose;
120 
123  std::vector< std::vector< StEEmcTowerVec_t > > mSeedTowers;
124 
128  std::vector< std::vector< StEEmcIUClusterVec_t > > mTowerClusters;
131  std::vector< std::vector< StEEmcIUSmdClusterVec_t > > mSmdClusters;
132  std::vector< std::vector< StEEmcIUSmdClusterVec_t > > TmSmdClusters;
133 
135  Int_t mNumberOfClusters[6];
136  Int_t TmNumberOfClusters[6];
137 
139  Float_t mSeedEnergy[6];
141  Int_t mMaxExtent;
143  Int_t mMinStrips;
145  Float_t mSeedFloor;
146  //float UMeanclust;
147  //float VMeanclust;
148  int countUseed;
149  int uswidth;
150  int vswidth;
151  float eeen;
152  int countVseed;
153  float uamp;
154  float vamp;
155  float ep1;
156  float ep2;
157  float ep3;
158  float esmdu;
159  float esmdv;
161  Bool_t buildTowerClusters();
162 
164  Bool_t buildSmdClusters();
165 
167  void fillStEvent();
168 
171  Bool_t verifyStEvent();
172 
173  FILE *fout;
174  FILE *fout2;
175 
176  // Geometry classes
181  TString mAnalysisName;
185 
187  Bool_t mFillStEvent;
188 
190  std::map< StEmcCluster *, StEEmcIUCluster > mEtoEE;
191  std::map< StEmcCluster *, StEEmcIUSmdCluster > mEtoEEsmd;
193 
196 
197 };
198 
199 inline void StEEmcIUClusterMaker::analysis( const Char_t *name ){ mAnalysisName=name; }
200 inline void StEEmcIUClusterMaker::seedEnergy(Float_t energy, Int_t layer){ mSeedEnergy[layer]=energy; }
201 
203 inline void StEEmcIUClusterMaker::setSeedFloor(Float_t f){ mSeedFloor=f; }
204 
205 inline Int_t StEEmcIUClusterMaker::numberOfClusters(Int_t s, Int_t l)
206  { return (Int_t)mTowerClusters[s][l].size(); }
207 inline Int_t StEEmcIUClusterMaker::numberOfSmdClusters(Int_t s, Int_t p)
208  { return (Int_t)mSmdClusters[s][p].size(); }
209 inline Int_t StEEmcIUClusterMaker::TnumberOfSmdClusters(Int_t s, Int_t p)
210  { return (Int_t)TmSmdClusters[s][p].size(); }
211 
212 inline StEEmcIUCluster StEEmcIUClusterMaker::cluster(Int_t s, Int_t l, Int_t i)
213  { return mTowerClusters[s][l][i]; }
215  { return mSmdClusters[s][p][i]; }
216 
217 inline StEEmcIUClusterVec_t StEEmcIUClusterMaker::clusters(Int_t s, Int_t l)
218  { return mTowerClusters[s][l]; }
219 
220 inline StEEmcIUSmdClusterVec_t StEEmcIUClusterMaker::smdclusters(Int_t s, Int_t l)
221  { return mSmdClusters[s][l]; }
222 //inline float StEEmcIUClusterMaker::diffOf2uclusters() { return (float) abs(UMeanclust); }
223 //inline float StEEmcIUClusterMaker::diffOf2vclusters() { return (float) abs(VMeanclust); }
224 inline int StEEmcIUClusterMaker::numberOfUseed() { return (int) countUseed; }
225 inline int StEEmcIUClusterMaker::numberOfVseed() { return (int) countVseed; }
226 inline float StEEmcIUClusterMaker::Tenergyoftower() { return (float) eeen; }
227 inline int StEEmcIUClusterMaker::UStripWidth() { return (int) uswidth; }
228 inline int StEEmcIUClusterMaker::VStripWidth() { return (int) vswidth; }
229 inline float StEEmcIUClusterMaker::UAmplitude() { return (float) uamp; }
230 inline float StEEmcIUClusterMaker::VAmplitude() { return (float) vamp; }
231 inline float StEEmcIUClusterMaker::Tenergyofp1() { return (float) ep1; }
232 inline float StEEmcIUClusterMaker::Tenergyofp2() { return (float) ep2; }
233 inline float StEEmcIUClusterMaker::Tenergyofp3() { return (float) ep3; }
234 inline float StEEmcIUClusterMaker::Tenergyofsmdu() { return (float) esmdu; }
235 inline float StEEmcIUClusterMaker::Tenergyofsmdv() { return (float) esmdv; }
236 #endif
void setMinStrips(Int_t m)
Minimum number of strips to form a cluster.
Int_t mClusterId
Keep track of clusters.
Int_t Init()
Initialize.
EEmc ADC –&gt; energy maker.
void setMaxExtent(Int_t m)
Maximum distance around seed strip to cluster smd strips.
std::map< StEmcCluster *, StEEmcIUCluster > mEtoEE
Map StEEmcIUClusters to StEmcClusters.
void print()
Event summary.
Int_t mSuppress
Supress seeds adjacent to clusters.
Int_t mMinStrips
Minimum number of smd strips to form seed.
void fillStEvent()
Fills StEvent cluster collections if the option is selected.
StEEmcIUCluster cluster(StEmcCluster *cl)
StEEmcIUSmdClusterVec_t smdclusters(Int_t sec, Int_t plane)
Return a vector of smd clusters.
std::map< StEmcCluster *, StEEmcIUSmdCluster > mEtoEEsmd
... and for smd clusters
Bool_t buildSmdClusters()
Constructs smd clusters.
Int_t numberOfSmdClusters(Int_t sec, Int_t plane)
Return number of smd clusters for a given sector, plane.
StEEmcIUSmdCluster smdcluster(Int_t sec, Int_t plane, Int_t index)
return a specific cluster from a given sector, plane
std::vector< std::vector< StEEmcTowerVec_t > > mSeedTowers
A base class for describing clusters of EEMC towers.
A cluster maker for the EEMC.
void analysis(const Char_t *name)
Set the name of the ADC–&gt;E maker.
Bool_t buildTowerClusters()
Constructs tower clusters.
void loose(Bool_t l=true)
Loose cuts (see code)
Bool_t mLoose
Loose cuts option.
StEEmcA2EMaker * mEEanalysis
ADC–&gt;E maker.
TString mAnalysisName
ADC–&gt;E maker name.
Int_t mMaxExtent
Maximum distance from SMD seed strips.
void skip(Bool_t s=true)
Skips over strips with &quot;fail&quot; bits set, if true.
StEEmcIUClusterMaker(const Char_t *name="mEEclusters")
StEEmcIUSmdCluster smdcluster(StEmcCluster *cl)
Int_t numberOfClusters(Int_t sec, Int_t layer)
Return number of clusters for a given sector, layer.
std::vector< std::vector< StEEmcIUClusterVec_t > > mTowerClusters
std::vector< std::vector< StEEmcIUSmdClusterVec_t > > mSmdClusters
Int_t mNumberOfClusters[6]
Counts clusters for full eemc, 0=T, 1=P, 2=Q, 3=R, 4=U, 5=V.
EEMC simple geometry.
void setSeedFloor(Float_t f=2.0)
Int_t Make()
Make clusters for this event.
A base class for representing clusters of EEMC smd strips.
StEEmcIUClusterVec_t clusters(Int_t sec, Int_t layer)
Return a vector of tower clusters.
void Clear(Option_t *opts="")
Clear clusters for next event.
void seedEnergy(Float_t energy, Int_t layer=0)
Bool_t mFillStEvent
Option to fill StEvent.
Float_t mSeedEnergy[6]
Seed energy for 0=T, 1=P, 2=Q, 3=R, 4=U, 5=V.
Bool_t mSkip
Skip strips if failbit set.
StEEmcIUCluster cluster(Int_t sec, Int_t layer, Int_t index)
Return a specific cluster from a given sector, layer.
ClassDef(StEEmcIUClusterMaker, 1)
Makes class available to root.