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 "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 StEEmcClusterMaker : public StMaker {
18 public:
19 
20  StEEmcClusterMaker( const Char_t *name = "mEEclusters" );
21  virtual ~StEEmcClusterMaker(){ /* nada */ };
22 
24  virtual Int_t Init();
26  virtual Int_t Make();
28  virtual void Clear(Option_t *opts="");
29 
31  void analysis ( const Char_t *name ) { mAnalysisName=name; }
32 
35  void seedEnergy( Float_t energy, Int_t layer=0 ) { mSeedEnergy[layer]=energy; }
36 
38  void setMaxExtent( Int_t m ) { mMaxExtent=m; }
39 
41  void setMinStrips( Int_t m ){ mMinStrips=m; }
42 
45  void setSeedFloor( Float_t f=2.0 ) { mSeedFloor=f; }
46 
48  Int_t numberOfClusters(Int_t sec, Int_t layer) const { return (Int_t)mTowerClusters[sec][layer].size(); }
50  Int_t numberOfSmdClusters(Int_t sec, Int_t plane) const { return (Int_t)mSmdClusters[sec][plane].size(); }
51 
53  StEEmcCluster &cluster(Int_t sec, Int_t layer, Int_t index) { return mTowerClusters[sec][layer][index]; }
54  const StEEmcCluster &cluster(Int_t sec, Int_t layer, Int_t index) const { return mTowerClusters[sec][layer][index]; }
56  StEEmcSmdCluster &smdcluster(Int_t sec, Int_t plane, Int_t index) { return mSmdClusters[sec][plane][index]; }
57  const StEEmcSmdCluster &smdcluster(Int_t sec, Int_t plane, Int_t index) const { return mSmdClusters[sec][plane][index]; }
58 
60  StEEmcCluster &cluster(const StEmcCluster *cl ){ return (*(mEtoEE.find(cl))).second; }
61  const StEEmcCluster &cluster(const StEmcCluster *cl ) const { return (*(mEtoEE.find(cl))).second; }
63  StEEmcSmdCluster &smdcluster(const StEmcCluster *cl ){ return (*(mEtoEEsmd.find(cl))).second; }
64  const StEEmcSmdCluster &smdcluster(const StEmcCluster *cl ) const { return (*(mEtoEEsmd.find(cl))).second; }
65 
67  StEEmcClusterVec_t &clusters( Int_t sec, Int_t layer ) { return mTowerClusters[sec][layer]; }
68  const StEEmcClusterVec_t &clusters( Int_t sec, Int_t layer ) const { return mTowerClusters[sec][layer]; }
70  StEEmcSmdClusterVec_t &smdclusters( Int_t sec, Int_t plane ) { return mSmdClusters[sec][plane]; }
71  const StEEmcSmdClusterVec_t &smdclusters( Int_t sec, Int_t plane ) const { return mSmdClusters[sec][plane]; }
72 
75  void setFillStEvent(){ mFillStEvent=true; }
76 
79  void suppress(Int_t n=2){ mSuppress=n; }
80 
82  void skip(Bool_t s=true){ mSkip=s; }
83 
85  void loose(Bool_t l=true){ mLoose=l; }
86 
88  void print() const;
89 
90 protected:
91 
93  Int_t mClusterId;
94 
96  Int_t mSuppress;
98  Bool_t mSkip;
100  Bool_t mLoose;
101 
104  std::vector< std::vector< StEEmcTowerVec_t > > mSeedTowers;
105 
109  std::vector< std::vector< StEEmcClusterVec_t > > mTowerClusters;
112  std::vector< std::vector< StEEmcSmdClusterVec_t > > mSmdClusters;
113 
115  Int_t mNumberOfClusters[6];
116 
118  Float_t mSeedEnergy[6];
120  Int_t mMaxExtent;
122  Int_t mMinStrips;
124  Float_t mSeedFloor;
125 
127  virtual Bool_t buildTowerClusters();
128 
130  virtual Bool_t buildSmdClusters();
131 
133  void fillStEvent();
134 
137  Bool_t verifyStEvent() const;
138 
139  // Geometry classes
144  TString mAnalysisName;
148 
150  Bool_t mFillStEvent;
151 
153  std::map<const StEmcCluster *, StEEmcCluster > mEtoEE;
154  std::map<const StEmcCluster *, StEEmcSmdCluster > mEtoEEsmd;
156 
157  ClassDef(StEEmcClusterMaker,1);
158 };
159 
160 #endif
const StEEmcA2EMaker * mEEanalysis
ADC–&gt;E maker.
void setMinStrips(Int_t m)
Minimum number of strips to form a cluster.
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
Int_t mMinStrips
Minimum number of smd strips to form seed.
StEEmcCluster & cluster(Int_t sec, Int_t layer, Int_t index)
Return a specific cluster from a given sector, layer.
const EEmcSmdMap * mEEmap
void loose(Bool_t l=true)
Loose cuts (see code)
StEEmcCluster & cluster(const StEmcCluster *cl)
Given a StEmcCluster, return the StEEmcCluster where it came from.
const EEmcGeomSimple * mEEtow
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
StEEmcSmdCluster & smdcluster(const StEmcCluster *cl)
Given a StEmcCluster, return the StEEmcSmdCluster where it came from.
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.
Bool_t mLoose
Loose cuts option.
TString mAnalysisName
ADC–&gt;E maker name.
virtual Bool_t buildSmdClusters()
Constructs smd clusters.
virtual Bool_t buildTowerClusters()
Constructs tower clusters.
Bool_t mSkip
Skip strips if failbit set.
void suppress(Int_t n=2)
void skip(Bool_t s=true)
Skips over strips with &quot;fail&quot; bits set, if true.
virtual Int_t Init()
Initialize.
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 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)
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.