00001
00002
00003
00004
00005
00006
00007
00009
00010 #ifndef ALGSUBSHOWERSRLIST_H
00011 #define ALGSUBSHOWERSRLIST_H
00012
00013 #include "Algorithm/AlgBase.h"
00014 #include "Algorithm/AlgConfig.h"
00015 #include "Algorithm/AlgHandle.h"
00016 #include "RecoBase/CandStripHandle.h"
00017 #include "RecoBase/CandSliceListHandle.h"
00018 #include "TH1.h"
00019 #include "TH2.h"
00020 #include "TF1.h"
00021
00022 struct window {
00023 Int_t plane;
00024 Int_t upper;
00025 Int_t lower;
00026 Double_t upper_tpos;
00027 Double_t lower_tpos;
00028 Int_t type;
00029 Double_t ph;
00030 Double_t centroid;
00031 Double_t phpos;
00032 Double_t phwidth;
00033 };
00034
00035 class AlgSubShowerSRList : public AlgBase
00036 {
00037
00038 public:
00039 AlgSubShowerSRList();
00040 virtual ~AlgSubShowerSRList();
00041 virtual void RunAlg(AlgConfig &ac, CandHandle &ch, CandContext &cx);
00042 virtual void Trace(const char *c) const;
00043 static NavKey StripKeyFromPlane(const CandStripHandle *);
00044
00045 private:
00046
00047 Bool_t FindCluster(TObjArray*,TObjArray*,Int_t);
00048 Bool_t TestOverLap(TObjArray*,CandHandle&,const CandSliceHandle*);
00049 Bool_t TimeTest(TObjArray*,TObjArray *allStrips=NULL);
00050 std::vector<window> TransCluster(std::vector<window>,Int_t);
00051 std::vector<window> HoughTransCluster(std::vector<window>,Int_t);
00052 Bool_t CleanUp(TObjArray*,CandHandle&,Int_t,
00053 const CandSliceHandle* cslice=NULL);
00054 Bool_t FormHalo(TObjArray*,CandHandle&,CandContext&,
00055 AlgHandle&,const CandSliceListHandle*,Int_t);
00056 std::vector<Double_t> BestHough(std::vector<window>,Bool_t);
00057
00058 Double_t fLongWindowMipCut;
00059 Int_t fLongWindowGapPlaneCut;
00060 Int_t fMinHoughPlanes;
00061 Double_t fMinHoughPH;
00062 Double_t fBestHoughMaxPHFrac;
00063 Double_t fCleanUpTimeCut;
00064 Int_t fCleanUpPlaneCut;
00065 Double_t fCleanUpStripCut;
00066 Int_t fFormHalo;
00067 Int_t fHaloMaxPlaneGap;
00068 Int_t fHaloNPeakFindingBins;
00069 Double_t fMinStripPE;
00070
00071 TH1F *vtxHist;
00072 TH2F *houghHist;
00073 TH2F *phHoughHist;
00074 TF1 *ssPol1;
00075
00076 ClassDef(AlgSubShowerSRList,0)
00077
00078 };
00079
00080 #endif // ALGSUBSHOWERSRLIST_H