3 #include "StFstClusterMaker.h"
6 #include "StFstUtil/StFstCollection.h"
7 #include "StEvent/StFstRawHit.h"
8 #include "StFstUtil/StFstRawHitCollection.h"
9 #include "StFstUtil/StFstCluster.h"
10 #include "StFstUtil/StFstClusterCollection.h"
11 #include "StEvent/StFstConsts.h"
12 #include "StFstClusterMaker/StFstIClusterAlgo.h"
13 #include "StFstClusterMaker/StFstScanRadiusClusterAlgo.h"
14 StFstClusterMaker::StFstClusterMaker(
const char *name ) :
StMaker(name), mFstCollectionPtr(0), mClusterAlgoPtr(0), mTimeBin(UCHAR_MAX), mSplitCluster(true)
17 StFstClusterMaker::~StFstClusterMaker()
20 delete mClusterAlgoPtr;
25 if ( mFstCollectionPtr ) {
26 for (
unsigned char i = 0; i < kFstNumWedges; ++i ) {
27 mFstCollectionPtr->getRawHitCollection(i)->Clear(
"" );
28 mFstCollectionPtr->getClusterCollection(i)->Clear(
"" );
46 LOG_WARN <<
"Make() - fstRawHitAndCluster dataset not found. No FST clusters will be built" << endm;
52 if (!mFstCollectionPtr) {
53 LOG_WARN <<
"Make() - StFstCollection not found. No FST clusters will be built" << endm;
57 mClusterAlgoPtr->setUsedTimeBin(mTimeBin);
58 mClusterAlgoPtr->setSplitFlag(mSplitCluster);
59 mClusterAlgoPtr->doClustering(*mFstCollectionPtr);
64 LOG_DEBUG <<
"End of StFstClusterMaker::Make()" << endm
65 <<
"Total raw hits: " << mFstCollectionPtr->getNumRawHits()
66 <<
", total clusters: " << mFstCollectionPtr->getNumClusters() << endm;
68 for (
unsigned char iWedge = 0; iWedge < kFstNumWedges; iWedge++)
70 LOG_DEBUG <<
"Content: iWedge=" << (short) iWedge + 1
71 <<
" # of : raw hits=" << mFstCollectionPtr->getNumRawHits(iWedge)
72 <<
" clusters=" << mFstCollectionPtr->getNumClusters( iWedge) << endm;
76 size_t nTimeBins = mFstCollectionPtr->getNumTimeBins();
77 rawHitPtr->Print(nTimeBins);
90 mClusterAlgoPtr = algo;
93 Int_t StFstClusterMaker::Init()
95 if ( !mClusterAlgoPtr ) {
96 LOG_INFO <<
"FST clustering algorithm: Scanning Radius algorithm" << endm;
void Clear(Option_t *opts="")
User defined functions.
virtual TObject * GetObject() const
The depricated method (left here for the sake of the backward compatibility)