#ifndef PNDTRKLEGENDRETRANSFORM3_H #define PNDTRKLEGENDRETRANSFORM3_H #include "PndTrkParameters.h" #include "PndTrkHit.h" #include "PndTrkLegendreCluster.h" #include "PndTrkClusterList.h" #include "TObject.h" #include #include #include "KeySymbols.h" class PndTrkLegendreCluster; class PndTrkClusterList; class PndTrkLegendreTransform3 : public TObject { public: PndTrkLegendreTransform3(); PndTrkLegendreTransform3(double rmin, double rmax); ~PndTrkLegendreTransform3(); void SetUpLegendreHisto(); void Fill(PndTrkHit *hit, int globalstep); void FillLegendreHisto(PndTrkHit *hit, double x, double y, double radius); PndTrkLegendreCluster ExtractLegendreMaximum(int imax); Int_t GetNofMaxima(); void SearchSecondaryTracks() { fRMin = -1; fRMax = 1; fThetaStepping = (fThetaMax - fThetaMin)/NOFTHETASTEPS; fRadStepping = (fRMax - fRMin)/NOFRADSTEPS; fThreshold = 20; } void ExtractLineParameters(double theta, double r, double &slope, double &intercept); void ExtractLineParameters(PndTrkLegendreCluster *cluster, double &slope, double &intercept); PndTrkLegendreCluster ExtractLegendreMaximumWithLineParameters(int imax, double &slope, double &intercept); PndTrkLegendreCluster *ExtractHighestMaximum(); PndTrkLegendreCluster ExtractHighestMaximumWithLineParameters(double &slope, double &intercept); void ResetLegendre(); void Draw(); void DrawMaximum(int imax); void DrawMaximumHits(int imax); int FromThetaToThetaStep(double theta); double FromThetaStepToTheta(int thetastep); int FromRToRStep(double r) ; double FromRStepToR(int radstep); int FromThetaRStepToGlobalStep(int thetastep, int radstep); void FromGlobalStepToThetaRStep(int globalstep, int &thetastep, int &radstep); int FromThetaRToGlobalStep(double theta, double r); void FromGlobalStepToThetaR(int globalstep, double &theta, double &r); PndTrkClusterList GetClusterList(); private: Double_t fThetaMin, fThetaMax, fThetaStepping, fRMin, fRMax, fRadStepping; Int_t fThreshold; // from r, theta -> to rstep, thetastep -> to globalstep // globalstep = NOFTHETASTEPS * rstep + thetastep // // reverse: // rstep = globalstep / NOFTHETASTEPS // thetastep = globalstep - rstep * NOFTHETASTEPS // // map: globalstep <--> PndTrkLegendreCluster, i.e. list of pointers to PndTrkHist std::map < int, PndTrkLegendreCluster* > fLegendrePlane; // maxima std::vector< int > fMaxima; PndTrkClusterList fListOfClusters; PndTrkClusterList fListOfMaxima; ClassDef(PndTrkLegendreTransform3, 1) }; #endif