00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 #ifndef STAR_StPmdClustering
00040 #define STAR_StPmdClustering
00041 #include <TH2.h>
00042 #include<math.h>
00043 #include <TH1.h>
00044 #include <TCanvas.h>
00045 #include <TArrayF.h>
00046 #include <TArrayI.h>
00047 #include "StPmdAbsClustering.h"
00048 #include "StThreeVectorF.hh"
00049 class StPmdHit;
00050 class StPmdCluster;
00051 class StPmdModule;
00052 class StPmdDetector;
00053 class StPmdClusterCollection;
00054 class StPmdClustering:public StPmdAbsClustering
00055 {
00056
00057 private:
00058
00059
00060 Bool_t mOptCalibrate;
00061 Bool_t mOptSimulate;
00062 Bool_t mOptRefineCluster;
00063 Double_t cutoff;
00064 StThreeVectorF mVertexPos;
00065
00066 StPmdClusterCollection * pmdclus;
00067
00068
00069 static const Int_t NColumnMax = 96;;
00070 static const Int_t NRowMax = 72;
00071
00072 static const Int_t CutOff = 7;
00073 static const Int_t MaxHits = 15000;
00074 static const Int_t MaxSuperSize = 2000;
00075 static const Int_t MaxLocalPeaks = 700;
00076 static const Int_t MaxClusterSize = 2000;
00077 static const Int_t MaxNeighLP = 35;
00078
00079
00080 static const Int_t debug = 0;
00081
00082
00083 void CellXY(Int_t, Int_t, Float_t&, Float_t&);
00084
00085
00086 Int_t CheckBoundary(Int_t, Int_t, Int_t);
00087
00088
00089 protected:
00090
00091
00092 public:
00093
00095 StPmdClustering(StPmdDetector *pmd_det = 0, StPmdDetector* cpv_det = 0);
00097 virtual ~StPmdClustering();
00098
00099
00100
00102
00103 Bool_t findPmdClusters2(StPmdDetector *);
00104
00105 Int_t MakeClusters(TClonesArray *);
00106
00107
00108 Int_t MakeSuperClusters(Int_t, StPmdModule*,TClonesArray*);
00109
00110 Int_t GetLocalPeaks(Int_t*,TList *);
00111
00112 Bool_t BreakSuperCluster(Int_t, Int_t*, TList * );
00113
00114 Float_t BuildCluster(StPmdCluster*, Float_t*);
00115
00116 void Cell_eta_phi(Float_t, Float_t, Float_t &, Float_t &);
00117
00118
00119
00121
00122 void findPmdClusters(StPmdDetector *);
00123
00125 Int_t crclust(Double_t , Double_t, Int_t, Int_t);
00127 void refclust(StPmdDetector*,Int_t, Int_t, Int_t,StPmdClusterCollection*);
00128
00130 void order(Int_t);
00132 void arrange(Int_t);
00133 Double_t Dist(Double_t, Double_t, Double_t, Double_t);
00134
00136
00138 void printclust(Int_t,Int_t, StPmdCluster*);
00140 Int_t CentroidCal(Int_t,Int_t,Double_t&,Double_t&,Double_t&,Double_t&,Double_t&,Double_t&,Double_t&,Double_t&,Double_t&);
00141 void SetAdcCutOff(Double_t adccutoff);
00142 void SetVertexPos(const StThreeVectorF&);
00143 void Cluster_Eta_Phi(Float_t, Float_t, Float_t,Float_t&, Float_t&);
00144
00145
00146 void SetOptCalibrate(Bool_t a=kTRUE){mOptCalibrate = a;}
00147 void SetOptSimulate(Bool_t a=kFALSE){mOptSimulate = a;}
00148 void SetOptRefineCluster(Bool_t a=kFALSE){mOptRefineCluster = a;}
00149
00150
00152
00153 StPmdHit* GetHit(StPmdDetector*, Int_t, Double_t, Double_t);
00154
00155 ClassDef(StPmdClustering, 1)
00156 };
00157
00158 inline void StPmdClustering::SetAdcCutOff(Double_t adccutoff){
00159 cutoff = adccutoff;
00160 }
00161
00162 inline void StPmdClustering::SetVertexPos(const StThreeVectorF& vertexPos){
00163 mVertexPos = vertexPos;
00164 }
00165
00166
00167
00168
00169 #endif
00170
00171
00172
00173
00174