#ifndef TPCCLUSTERFINDERSIMPLE_HH #define TPCCLUSTERFINDERSIMPLE_HH #include #include #include #include "PndTpcAbsClusterFinder.h" #include "PndTpcDigiAge.h" #include "McIdCollection.h" #include "TVector3.h" class PndTpcPadPlane; class PndTpcDigi; class PndTpcCluster; class PndTpcPrelimCluster{ private: void cog(); TVector3 fpos; TVector3 ferr; double famp; double fcogT; int fid; double fG; double fC; std::vector fdigis; std::map fdigiShares; std::set fpossiblePads; PndTpcPadPlane* fpadplane; double ftimeslice; McIdCollection fmcidCol; bool isInTimeWindow(const PndTpcDigi* const); public: PndTpcPrelimCluster(PndTpcPadPlane*, double, int, double G, double C); virtual ~PndTpcPrelimCluster(); void addHit(PndTpcDigi*, bool noXclust=false, double share=1.); double getCogT(){return fcogT;} PndTpcDigi* getDigi(unsigned int id){return fdigis[id];} bool isInCluster(const PndTpcDigi* const); PndTpcCluster* convPndTpcCluster(bool saveRaw); }; class PndTpcClusterFinderSimple : public PndTpcAbsClusterFinder{ public: // Constructors/Destructors --------- PndTpcClusterFinderSimple(PndTpcPadPlane*, std::vector*, unsigned int, double G=1, double C=1); ~PndTpcClusterFinderSimple(); virtual void process(std::vector&); virtual void reset(); virtual void checkConsistency(); void setMaxClusterSlice(unsigned int i){maxClusterSlice = i;} void setNoXclust(bool b=true){noXclust=b;} unsigned int NsplitDigis(){return splitDigis;} private: std::map* > fsectormap; PndTpcPadPlane* fpadplane; std::vector* foutput_buffer; bool noXclust; unsigned int fdt; // time slice in units of sample time unsigned int splitDigis; double fG; double fC; unsigned int maxClusterSlice; }; #endif