#ifndef TPCCLUSTERFINDERSIMPLE_HH #define TPCCLUSTERFINDERSIMPLE_HH #include #include #include #include "TpcAbsClusterFinder.h" #include "TpcDigiAge.h" #include "McIdCollection.h" #include "TVector3.h" #include "TpcPrelimCluster.h" class TpcPadPlane; class TpcDigi; class TpcCluster; class TpcPrelimCluster; //bool sortClusterSize2D(TpcPrelimCluster c1, TpcPrelimCluster c2); /* class TpcPrelimCluster{ */ /* private: */ /* void cog(double zJitter); */ /* TVector3 fpos; */ /* TVector3 ferr; */ /* double famp; */ /* double fcogT; */ /* int fid; */ /* double fG; */ /* double fC; */ /* std::vector fdigis; */ /* std::map fdigiShares; */ /* std::set fpossiblePads; // pads neighbouring unshared digis */ /* std::set fpossiblePadsShared; // pads neighbouring shared digis */ /* std::map > fSharedClusters; // clusters to which digis are shared */ /* unsigned int fnUnsharedDigis; */ /* TpcPadPlane* fpadplane; */ /* double ftimeslice; */ /* McIdCollection fmcidCol; */ /* bool isInTimeWindow(const TpcDigi* const); */ /* public: */ /* TpcPrelimCluster(TpcPadPlane*, double, int, double G, double C); */ /* virtual ~TpcPrelimCluster(); */ /* void addHit(TpcDigi*, bool noXclust=false, double share=1., bool check=false); */ /* void addSharedCluster(TpcDigi* d, TpcPrelimCluster* c) {fSharedClusters[d].insert(c);} */ /* void removeSharedCluster(TpcDigi* d, TpcPrelimCluster* c) {fSharedClusters[d].erase(fSharedClusters[d].find(c));} */ /* unsigned int getNSharedClusters(TpcDigi* d) {return fSharedClusters[d].size();} */ /* TpcPrelimCluster* getSharedCluster(TpcDigi* d, unsigned int i); */ /* double getCogT(){return fcogT;} */ /* double getAmp() {return famp;} */ /* TpcDigi* getDigi(unsigned int id){return fdigis[id];} */ /* unsigned int getNDigis() const {return fdigis.size();} */ /* unsigned int getNUnsharedDigis() const {return fnUnsharedDigis;} */ /* int isInCluster(const TpcDigi* const); // 0 = not a neighbor; 1 = neighbour to an unshared digi; 2 = neighbour to a shared digi */ /* TpcCluster* convTpcCluster(unsigned int sectorId, double zJitter, bool saveRaw); */ /* }; */ bool sortPrelimClustersAmp(TpcPrelimCluster* lhs, TpcPrelimCluster* rhs); class TpcClusterFinderSimple : public TpcAbsClusterFinder{ public: // Constructors/Destructors --------- TpcClusterFinderSimple(TpcPadPlane*, std::vector*, unsigned int, double G=1, double C=1); ~TpcClusterFinderSimple(); virtual void process(std::vector&); virtual void reset(); virtual void checkConsistency(); void setMaxClusterSlice(unsigned int i){maxClusterSlice = i;} void setSectorize(bool opt=true){sectorize=opt;} void setNoXclust(bool b=true){noXclust=b;} void setClusterMerge(bool b=true){fClusterMerge=b;} void setRecalcDigiPos(Bool_t opt=kTRUE){frecalcDigiPos=opt;} void setDoPRF(bool opt=true){fDoPRF=opt;} unsigned int NsplitDigis(){return splitDigis;} private: virtual void processSector(std::vector&, int sectorID); double getTimeslice(TpcDigi* d); std::map* > fsectormap; TpcPadPlane* fpadplane; unsigned int fnSectors; std::map* > fpadIDsectorIDmap; std::vector* foutput_buffer; bool sectorize; bool noXclust; bool fClusterMerge; bool frecalcDigiPos; bool fDoPRF; unsigned int fdt; // time slice in units of sample time unsigned int splitDigis; double fG; double fC; double zJitter; unsigned int maxClusterSlice; }; #endif