StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFcsClusterMaker.h
1 // $Id: StFcsClusterMaker.h,v 1.1 2021/03/30 13:40:02 akio Exp $
2 // $Log: StFcsClusterMaker.h,v $
3 // Revision 1.1 2021/03/30 13:40:02 akio
4 // FCS code after peer review and moved from $CVSROOT/offline/upgrades/akio
5 //
6 // Revision 1.13 2021/02/25 21:52:57 akio
7 // Int_t -> int
8 //
9 // Revision 1.12 2021/02/25 19:24:15 akio
10 // Modified for STAR code review (Hongwei)
11 //
12 // Revision 1.11 2020/12/17 21:18:01 akio
13 // Separate RATIO2SPLIT for ecal/hcal
14 //
15 // Revision 1.10 2020/09/03 19:42:24 akio
16 // moving sum & fit to StFcsWaveformFitMaker
17 //
18 // Revision 1.9 2019/11/22 17:26:17 akio
19 // fix typo
20 //
21 // Revision 1.8 2019/11/22 15:51:16 akio
22 // adding categorization
23 //
24 // Revision 1.7 2019/07/03 16:13:29 akio
25 // separate neighbor distance for ecal and hcal
26 //
27 // Revision 1.6 2019/06/27 16:12:42 akio
28 // Using getLocalXYinCell for cell/cluster distance measure and in moment analysis
29 //
30 // Revision 1.5 2019/06/26 18:00:34 akio
31 // added some adjustable parameters and way to select how to get energy
32 //
33 // Revision 1.4 2019/06/25 16:38:17 akio
34 // Added TOWER_E_RATIO2SPLIT, neighbor clusters
35 //
36 // Revision 1.3 2019/06/21 16:32:42 akio
37 // Added neighbor cluster and factor threshold for cluster splitting at valley
38 //
39 // Revision 1.2 2019/06/07 18:17:27 akio
40 // added summing adc
41 //
42 // Revision 1.1 2018/11/14 16:50:11 akio
43 // FCS codes in offline/upgrade/akio
44 //
45 
46 #ifndef STROOT_STFCSCLUSTERMAKER_STFCSCLUSTERMAKER_H_
47 #define STROOT_STFCSCLUSTERMAKER_STFCSCLUSTERMAKER_H_
48 
49 #include <map>
50 #include <vector>
51 
52 #include "StMaker.h"
53 
54 class StFcsCollection;
55 class StFcsHit;
56 class StFcsCluster;
57 class StFcsPoint;
58 class StFcsDb;
59 class StMuDst;
60 
61 class StFcsClusterMaker : public StMaker {
62 public:
63 
64  StFcsClusterMaker(const char* name = "StFcsClusterMaker");
66  int InitRun(int runNumber);
67  int Make();
68  void Clear(Option_t* option = "");
69 
70  void setDebug(int v) {SetDebug(v);}
71 
72  void setNeighborDistance(float e, float h){mNeighborDistance_Ecal=e; mNeighborDistance_Hcal=h;}
73  void setDistanceAdvantage(float e, float h){mDistanceAdvantage_Ecal=e; mDistanceAdvantage_Hcal=h;}
74  void setTowerEThreSeed(float e, float h){mTowerEThreSeed_Ecal=e; mTowerEThreSeed_Hcal=h;}
75  void setTowerEThreshold(float e, float h){mTowerEThreshold_Ecal=e; mTowerEThreshold_Hcal=h;}
76  void setTowerEThreMoment(float e, float h){mTowerEThreMoment_Ecal=e; mTowerEThreMoment_Hcal=h;}
77  void setTowerERatio2Split(float e, float h){mTowerERatio2Split_Ecal=e; mTowerERatio2Split_Hcal=h;}
78  void sortById(int v=1){mSortById=v;}
79 
80  private:
81  int makeCluster(int det);
82 
83  float isNeighbor(StFcsHit* hit, StFcsCluster* clu);
84  float distance(StFcsHit* hit1, StFcsHit* hit2);
85  float distance(StFcsHit* hit, StFcsCluster* clu);
86  void updateCluster(StFcsCluster* clu);
87  int clusterMomentAnalysis(StFcsCluster* clu, float ecut);
88  float getSigma(StFcsCluster* clu, double thetam, float ecut);
89  void categorization(StFcsCluster* clu);
90 
91  StFcsDb* mDb=0;
92  StFcsCollection* mFcsCollection=0;
93 
94  float mNeighborDistance = 1.01;
95  float mNeighborDistance_Ecal = 1.01;
96  float mNeighborDistance_Hcal = 2.01;
97 
98  float mDistanceAdvantage = 1.2;
99  float mDistanceAdvantage_Ecal = 1.2;
100  float mDistanceAdvantage_Hcal = 1.2;
101 
102  float mTowerEThreSeed = 1.0;
103  float mTowerEThreSeed_Ecal = 1.0;
104  float mTowerEThreSeed_Hcal = 1.0;
105 
106  float mTowerEThreshold = 0.01;
107  float mTowerEThreshold_Ecal = 0.01;
108  float mTowerEThreshold_Hcal = 0.01;
109 
110  float mTowerEThreMoment = 0.1;
111  float mTowerEThreMoment_Ecal = 0.1;
112  float mTowerEThreMoment_Hcal = 0.1;
113 
114  float mTowerERatio2Split = 1.5;
115  float mTowerERatio2Split_Ecal = 1.5;
116  float mTowerERatio2Split_Hcal = 2.0;
117 
118  int mSortById=0;
119 
120  virtual const Char_t *GetCVS() const {static const Char_t cvs[]="Tag " __DATE__ " " __TIME__ ; return cvs;}
121  ClassDef(StFcsClusterMaker, 1)
122 };
123 #endif // STROOT_STFCSCLUSTERMAKER_STFCSCLUSTERMAKER_H_
void Clear(Option_t *option="")
User defined functions.