StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFmsClusterFinder.h
Go to the documentation of this file.
1 // $Id: StFmsClusterFinder.h,v 1.5 2015/10/30 21:33:55 akio Exp $
2 //
3 // $Log: StFmsClusterFinder.h,v $
4 // Revision 1.5 2015/10/30 21:33:55 akio
5 // fix parameter initialization
6 // adding new cluster categorization method
7 //
8 // Revision 1.4 2015/10/29 21:14:55 akio
9 // increase max number of clusters
10 // a bug fixes in valley tower association
11 // removing some debug comments
12 //
13 // Revision 1.3 2015/10/21 15:58:04 akio
14 // Code speed up (~x2) by optimizing minimization fuctions and showershape function
15 // Add option to merge small cells to large, so that it finds cluster at border
16 // Add option to perform 1photon fit when 2photon fit faield
17 // Add option to turn on/off global refit
18 // Moment analysis done without ECUTOFF when no tower in cluster exceed ECUTOFF=0.5GeV
19 //
20 // Revision 1.2 2015/09/02 15:01:32 akio
21 // Removing StFmsGeometry class, and now it uses StFmsDbMaker to get appropriate parameters.
22 //
23 // Revision 1.1 2015/03/10 14:38:53 jeromel
24 // First version of FmsUtil from Yuxi Pan - reviewd 2015/02
25 //
35 #ifndef STROOT_STFMSPOINTMAKER_STFMSCLUSTERFINDER_H_
36 #define STROOT_STFMSPOINTMAKER_STFMSCLUSTERFINDER_H_
37 
38 #include <list>
39 #include <memory> // For std::unique_ptr
40 
41 #include "Rtypes.h" // Provides ROOT ClassDef macro
42 class TObjArray;
43 
44 namespace FMSCluster { // $NMSPC
45 class StFmsTowerCluster;
46 class StFmsTower;
47 // Typedef a list of cluster unique_ptrs for convenience.
48 // Hide it from CINT as it can't handle parsing the header :(
49 #ifndef __CINT__
50 typedef std::list<std::unique_ptr<StFmsTowerCluster>> ClusterList;
51 #endif // __CINT__
52 
58  public:
59  // Typedef StFmsTower pointer list for convenience
60  typedef std::list<FMSCluster::StFmsTower*> TowerList;
67  StFmsClusterFinder(double energyCutoff = 0.5);
68  // Use default copy constructor and assignment operator.
70  virtual ~StFmsClusterFinder();
76  void calculateClusterMoments(StFmsTowerCluster* cluster) const;
83  int categorise(StFmsTowerCluster* cluster);
84  int categorise2(StFmsTowerCluster* cluster);
85 
87  double momentEnergyCutoff() const { return mEnergyCutoff; }
88 #ifndef __CINT__ // Hide ClusterList from CINT
89 
102  int findClusters(TowerList* towers, ClusterList* clusters, int detetorId);
103 #endif // __CINT__
104 
105  private:
106  static const unsigned kMaxNClusters = 25;
107 #ifndef __CINT__ // Hide ClusterList from CINT
108 
115  unsigned locateClusterSeeds(TowerList* towers, TowerList* neighbors,
116  ClusterList* clusters) const;
132  unsigned associateTowersWithClusters(TowerList* neighbors,
133  ClusterList* clusters,
134  TObjArray* valleys) const;
146  unsigned associateValleyTowersWithClusters(TowerList* neighbors,
147  ClusterList* clusters,
148  TObjArray* valleys) const;
156  unsigned associateResidualTowersWithClusters(TowerList* neighbors,
157  ClusterList* clusters) const;
165  void associateSubThresholdTowersWithClusters(TowerList* towers,
166  ClusterList* clusters) const;
167 
168 #endif // __CINT__
169  Double_t mEnergyCutoff;
170  Int_t mNClusts;
171  Int_t mDetectorId; //current working detectorId
172 
173  ClassDef(StFmsClusterFinder, 0)
174 }; // class StFmsClusterFinder
175 } // namespace FMSCluster
176 #endif // STROOT_STFMSPOINTMAKER_STFMSCLUSTERFINDER_H_
StFmsClusterFinder(double energyCutoff=0.5)
int categorise(StFmsTowerCluster *cluster)
void calculateClusterMoments(StFmsTowerCluster *cluster) const
int findClusters(TowerList *towers, ClusterList *clusters, int detetorId)