47 #include "StFgtMaxClusterAlgo.h"
48 #include "StRoot/StFgtUtil/geometry/StFgtGeom.h"
51 #include "StRoot/StEvent/StFgtStripCollection.h"
52 #include "StRoot/StEvent/StFgtStrip.h"
53 #include "StRoot/StEvent/StFgtHitCollection.h"
54 #include "StRoot/StEvent/StFgtHit.h"
55 #include "StRoot/StFgtDbMaker/StFgtDbMaker.h"
56 #include "StRoot/StFgtDbMaker/StFgtDb.h"
58 StFgtMaxClusterAlgo::StFgtMaxClusterAlgo()
63 Int_t StFgtMaxClusterAlgo::Init()
76 Short_t disc, quadrant;
78 Double_t ordinate, lowerSpan, upperSpan;
79 Double_t maxRCharge=0;
80 Double_t maxPhiCharge=0;
81 Double_t phiOrdinate,rOrdinate;
82 Int_t phiGeoId, rGeoId;
88 for( StSPtrVecFgtStripIterator it=strips.getStripVec().begin();it!=strips.getStripVec().end();++it)
90 StFgtGeom::getPhysicalCoordinate((*it)->getGeoId(),disc,quadrant,layer,ordinate,lowerSpan,upperSpan);
94 if(isR && ((*it)->getCharge() > maxRCharge))
96 maxRCharge=(*it)->getCharge();
98 rGeoId=(*it)->getGeoId();
101 if(isPhi && ((*it)->getCharge() > maxPhiCharge))
103 maxPhiCharge=(*it)->getCharge();
104 phiOrdinate=ordinate;
105 phiGeoId=(*it)->getGeoId();
116 rHit =
new StFgtHit( clusters.getHitVec().size(),rGeoId,maxRCharge, disc, quadrant,
'R', rOrdinate, 2*StFgtGeom::radStrip_pitch(), 0.0, 0.0, 0.0, 0.0);
119 clusters.getHitVec().push_back( rHit );
120 stripWeightMap_t &stripWeightMap = rHit->getStripWeightMap();
121 stripWeightMap[ rStripPtr ] = 1;
127 phiHit =
new StFgtHit( clusters.getHitVec().size(), phiGeoId,maxPhiCharge, disc, quadrant,
'P', 0.0, 0.0,phiOrdinate, 2*StFgtGeom::phiStrip_pitch(),0.0,0.0);
131 clusters.getHitVec().push_back( phiHit );
132 stripWeightMap_t &stripWeightMap = phiHit->getStripWeightMap();
133 stripWeightMap[ phiStripPtr ] = 1;
140 StFgtMaxClusterAlgo::~StFgtMaxClusterAlgo()
virtual Int_t doClustering(const StFgtCollection &fgtCollection, StFgtStripCollection &strips, StFgtHitCollection &clusters)
main work functions getting strips above pedestal for each disk