1 #include "StFgtSimplePointAlgo.h"
2 #include "StRoot/StFgtUtil/geometry/StFgtGeom.h"
3 #include "StRoot/StEvent/StFgtHit.h"
4 #include "StRoot/StEvent/StFgtCollection.h"
5 #include "StRoot/StEvent/StFgtHitCollection.h"
6 #include "StRoot/StEvent/StFgtPoint.h"
7 #include "StRoot/StEvent/StFgtPointCollection.h"
8 #include "StRoot/St_base/StMessMgr.h"
10 StFgtSimplePointAlgo::StFgtSimplePointAlgo():
StFgtIPointAlgo(
"simple point algo",
"simple point algo"),mIsInitialized(0),m_maxChargeAsymmetry(0.1)
15 StFgtSimplePointAlgo::~StFgtSimplePointAlgo()
21 Int_t StFgtSimplePointAlgo::Init()
35 if( !pPointCollection ){
36 LOG_ERROR <<
"$Id: StFgtSimplePointAlgo.cxx,v 1.3 2013/04/04 20:24:50 akio Exp $ Error getting pointer to StFgtPointCollection from StFgtCollection" << endm;
40 for( UInt_t discIdx=0; discIdx<c.getNumDiscs() && !iErr; ++discIdx ){
45 Int_t numClusters=clusters.getNumHits();
52 LOG_WARN <<
"$Id: StFgtSimplePointAlgo.cxx,v 1.3 2013/04/04 20:24:50 akio Exp $ : number of cluster too large in disk " << discIdx<<
"! " <<endl;
67 Int_t clusterCounter=-1;
69 const StSPtrVecFgtHit& hitVec = clusters.getHitVec();
70 StSPtrVecFgtHitConstIterator iter1, iter2;
72 StSPtrVecFgtPoint& pointVec = points.getPointVec();
74 for( iter1 = hitVec.begin(); iter1 != hitVec.end(); ++iter1 )
76 Char_t iter1_layer = (*iter1)->getLayer();
77 Int_t iter1_quad=(*iter1)->getQuad();
79 for( iter2 = hitVec.begin(); iter2 != iter1; ++iter2 )
80 if( (*iter2)->getLayer() != iter1_layer && (iter1_quad==(*iter2)->getQuad()))
82 Float_t chargeAsymmetry=fabs( ((*iter1)->charge()-(*iter2)->charge())/((*iter1)->charge()+(*iter2)->charge()));
84 if(chargeAsymmetry>m_maxChargeAsymmetry)
92 pointVec.push_back(
new StFgtPoint ( *iter1, *iter2, ++clusterCounter,rank ) );
93 if( pointVec.back()->getKey() != clusterCounter ){
94 delete pointVec.back();
99 cout <<
"StFgtSimplePointAlgo: we have " << points.getNumPoints() <<
" points after disc = " << discIdx << endl;
Represents a point in the FGT.