1 #ifndef __StEEmcGenericClusterMaker_h__
2 #define __StEEmcGenericClusterMaker_h__
68 #include "StEEmcCluster.h"
69 #include "StEEmcSmdCluster.h"
75 #include "StEEmcUtil/EEmcGeom/EEmcGeomSimple.h"
76 #include "StEEmcUtil/StEEmcSmd/EEmcSmdGeom.h"
77 #include "StEEmcUtil/EEmcSmdMap/EEmcSmdMap.h"
81 #include "TRefArray.h"
82 #include "TClonesArray.h"
90 #include "StarClassLibrary/StPhysicalHelixD.hh"
101 virtual Int_t
Make();
103 void makeHistograms();
104 void makeClusterMap();
108 virtual void Clear(Option_t *opts=
"");
117 mSmdClusters[ c.sector() ][ c.plane() ].push_back( c );
129 StEEmcClusterVec_t &
clusters( Int_t sec, Int_t layer ) {
return mTowerClusters[sec][layer]; }
130 const StEEmcClusterVec_t &
clusters( Int_t sec, Int_t layer )
const {
return mTowerClusters[sec][layer]; }
133 StEEmcSmdClusterVec_t &
smdclusters( Int_t sec, Int_t plane ) {
return mSmdClusters[sec][plane]; }
134 const StEEmcSmdClusterVec_t &
smdclusters( Int_t sec, Int_t plane )
const {
return mSmdClusters[sec][plane]; }
140 StEEmcCluster &
cluster(Int_t sector, Int_t layer, Int_t index) {
return mTowerClusters[sector][layer][index]; }
141 const StEEmcCluster &
cluster(Int_t sector, Int_t layer, Int_t index)
const {
return mTowerClusters[sector][layer][index]; }
147 StEEmcSmdCluster &
smdcluster(Int_t sector, Int_t plane, Int_t index) {
if ( plane < 2 )
return mSmdClusters[sector][plane][index];
else assert(0); }
148 const StEEmcSmdCluster &
smdcluster(Int_t sector, Int_t plane, Int_t index)
const {
if ( plane < 2 )
return mSmdClusters[sector][plane][index];
else assert(0); }
153 Int_t numberOfBackgroundTracks(
const StEEmcCluster &cluster)
const {
return (Int_t)(*(mBackgroundTrackMap.find(cluster.key()))).second.size(); }
160 StMuTrack *backgroundTrack(
const StEEmcCluster &cluster, Int_t index)
const {
return (*(mBackgroundTrackMap.find(cluster.key()))).second[index]; }
167 return (Int_t)mTowerClusters[ sector ][ layer ].size();
168 else if ( layer < 6 )
169 return (Int_t)mSmdClusters[ sector ][ layer-4 ].size();
182 StEEmcClusterVec_t tower;
183 StEEmcClusterVec_t pre1;
184 StEEmcClusterVec_t pre2;
185 StEEmcClusterVec_t post;
186 StEEmcSmdClusterVec_t smdu;
187 StEEmcSmdClusterVec_t smdv;
188 StEEmcStripVec_t ustrips;
189 StEEmcStripVec_t vstrips;
214 void setTrackMatching( Float_t distance, Int_t layer ){ mClusterTrackSeparation[layer] = distance; }
228 Int_t maxClusterId()
const {
return mClusterId; }
230 virtual const char* GetCVS()
const
231 {
static const char cvs[]=
"Tag $Name: $ $Id: StEEmcGenericClusterMaker.h,v 1.8 2014/08/06 11:42:59 jeromel Exp $ built " __DATE__
" " __TIME__;
return cvs;}
246 std::vector< std::vector< StEEmcClusterVec_t > > mTowerClusters;
250 std::vector< std::vector< StEEmcSmdClusterVec_t > > mSmdClusters;
253 Int_t mNumberOfClusters[6];
282 Int_t mSmdMatchRange;
289 std::map< Int_t, EEmatch > mClusterMap;
293 std::map< Int_t, std::vector< StMuTrack* > > mClusterTrackMap;
294 std::map< Int_t, std::vector< StMuTrack* > > mBackgroundTrackMap;
298 std::map< Int_t, EEmatch > mTrackClusterMap;
302 Float_t mClusterTrackSeparation[6];
Int_t lastClusterId() const
Returns the current largest cluster ID.
StEEmcSmdClusterVec_t & smdclusters(Int_t sec, Int_t plane)
Return a vector of smd clusters.
EEmc ADC –> energy maker.
Int_t numberOfClusters() const
returns the total number of clusters summed over all layers
StEEmcGenericClusterMaker(const Char_t *name, const StEEmcA2EMaker *a2e=NULL)
virtual void Clear(Option_t *opts="")
User defined functions.
Bool_t extrapolateToZ(const StPhysicalHelixD &helix, const double z, TVector3 &r) const
extrapolates helix to position z (borrowed from StEEmcPool/TTM)
void setTrackMatching(Float_t distance, Int_t layer)
void add(const StEEmcCluster &cluster)
Add a tower (pre/postshower) cluster to the list of clusters.
Bool_t match(const StEEmcCluster &c1, const StEEmcCluster &c2) const
Int_t numberOfMatchingSmdClusters(const StEEmcCluster &cluster, Int_t plane) const
StEEmcClusterVec_t & clusters(Int_t sec, Int_t layer)
Return a vector of tower clusters.
void buildHistograms(const StEEmcCluster &cluster)
virtual Int_t buildSmdClusters()
builder for smd clusters
Int_t numberOfClusters(Int_t sector, Int_t layer) const
EEmatch & clusterMatch(const StEEmcCluster &c)
StEEmcSmdCluster & matchingSmdCluster(const StEEmcCluster &cluster, Int_t plane, Int_t index)
virtual Int_t buildPostshowerClusters()
builder for postshower clusters
Int_t key()
Return a unique key assigned by the cluster maker.
A base class for representing clusters of EEMC smd strips.
StEEmcSmdCluster & smdcluster(Int_t sector, Int_t plane, Int_t index)
Int_t numberOfClusters(Int_t layer) const
returns the total number of clusters in a given layer
StMuTrack * track(const StEEmcCluster &cluster, Int_t index) const
A base class for describing clusters of EEMC towers.
void add(const StEEmcSmdCluster &cluster)
Add a smd cluster to the list of clusters.
void plane(Int_t p)
Sets the plane for this SMD strip, 0=U, 1=V.
StEEmcStrip & strip(Int_t s)
Returns the specified smd strip w/in the cluster.
virtual Int_t buildPreshowerClusters()
builder for preshower clusters (both layers)
StEEmcCluster & cluster(Int_t sector, Int_t layer, Int_t index)
Int_t numberOfTracks(const StEEmcCluster &cluster) const
virtual Int_t buildTowerClusters()
builder for tower clusters