StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFmsPointMaker.h
Go to the documentation of this file.
1 // $Id: StFmsPointMaker.h,v 1.10 2019/06/26 16:49:43 akio Exp $
2 //
3 // $Log: StFmsPointMaker.h,v $
4 // Revision 1.10 2019/06/26 16:49:43 akio
5 // shower shape scaling for all shapes
6 //
7 // Revision 1.9 2018/03/08 20:07:27 akio
8 // initialization of mObjectCount and mMaxEnergySum was missing
9 //
10 // Revision 1.8 2018/03/02 20:26:44 akio
11 // Big update from Zhanwen Zhu with new shower shape and six z slices
12 //
13 // Revision 1.7 2015/11/05 17:53:09 akio
14 // Adding setScaleShowerShape() option for scaling up shower shape function for large cell
15 //
16 // Revision 1.6 2015/11/02 22:40:04 akio
17 // adding option for new cluster categorization
18 //
19 // Revision 1.5 2015/10/21 15:49:12 akio
20 // Adding 3 options to control how reconstruction works:
21 // setGlobalRefit(int v=1)
22 // setMergeSmallToLarge(int v=1)
23 // setTry1PhotonFit(int v=1)
24 //
25 // Revision 1.4 2015/09/18 18:46:47 akio
26 // Move energy sum check for killing LED tail event to whole FMS, not each module
27 // Also make it not dependent on beam energy, so that it runs on simulation as well.
28 //
29 // Revision 1.3 2015/09/02 14:52:15 akio
30 // Adding readMuDst() to give options when reading back from mudst
31 //
39 #ifndef STROOT_STFMSPOINTMAKER_STFMSPOINTMAKER_H_
40 #define STROOT_STFMSPOINTMAKER_STFMSPOINTMAKER_H_
41 
42 #include <map>
43 #include <vector>
44 
45 #include "StMaker.h"
46 //#include "StRoot/StFmsUtil/StFmsGeometry.h"
47 
48 class StFmsCollection;
49 class StFmsDbMaker;
50 class StFmsPoint;
51 class StMuDst;
52 
53 namespace FMSCluster {
54 class StFmsFittedPhoton;
55 class StFmsTower;
56 class StFmsTowerCluster;
57 } // namespace FMSCluster
58 
71 class StFmsPointMaker : public StMaker {
72  public:
74  explicit StFmsPointMaker(const char* name = "StFmsPointMaker");
78  Int_t InitRun(Int_t runNumber);
80  Int_t Make();
82  void Clear(Option_t* option = "");
83 
85  void setMaxEnergySum(Float_t v) {mMaxEnergySum=v;}
86 
89  void SetReadMuDst(int v=1) {mReadMuDst=v;}
90 
91  /* Set this to perform gloal refit of all photons in a detector */
92  void setGlobalRefit(int v=1) {mGlobalRefit=v;}
93 
94  /* Set this to cluster small and large cell together... experimental for now */
95  void setMergeSmallToLarge(int v=1) {mMergeSmallToLarge=v;}
96 
97  /* set this to perform 1 photon fit if 2 photon fit failed */
98  void setTry1PhotonFit(int v=1) {mTry1PhotonFitWhen2PhotonFitFailed=v;}
99 
100  /* set cluster categorization algo */
101  void setCategorizationAlgo(int v=1) {mCategorizationAlgo=v;}
102 
103  /* set to scale shower shape for large cell, recomended values are*/
104  // large small
105  //old(1slice) 1.6 1.0
106  //Zhanwen's 0.8 0.6
107  //Yuxi's 1.2 0.8
108  void setScaleShowerShape(float large=0.8, float small=0.6) {mScaleShowerShapeLarge=large; mScaleShowerShapeSmall=small;}
109 
110  /* 0=original shower shape, 1=new shower shape with 6 z slices, 2=Yuxi's 6 slices */
111  void setShowerShapeWithAngle(int v=1) {mShowerShapeWithAngle=v;}
112 
113  /* 0=no vertex correction, 1=take vertex from Mudst BBC based on run11 calibration */
114  void setVertexZ(int v=1) {mVertexZ=v;}
115 
116  private:
118  typedef std::vector<FMSCluster::StFmsTower> TowerList;
120  typedef std::map<int, TowerList> TowerMap;
124  StFmsPointMaker& operator=(const StFmsPointMaker&);
130  StFmsCollection* getFmsCollection();
138  int clusterEvent();
148  int clusterDetector(TowerList* towers, int detectorId);
149 
156  //bool validateTowerEnergySum(const TowerList& towers) const;
157 
169  bool processTowerCluster(FMSCluster::StFmsTowerCluster* towerCluster,
170  int detectorId);
172  StFmsPoint* makeFmsPoint(const FMSCluster::StFmsFittedPhoton& photon,
173  int detectorId);
175  bool populateTowerLists();
183  bool isValidChannel(int detector, int row, int col);
184  StFmsDbMaker* mFmsDbMaker;
185  //FMSCluster::StFmsGeometry mGeometry; //!< Access to current FMS geometry
186  StFmsCollection* mFmsCollection;
187  TowerMap mTowers;
188  int mObjectCount=0;
189 
190  Float_t mMaxEnergySum=255.0;
191 
192  Int_t readMuDst();
193  Int_t mReadMuDst=0;
194 
196  Int_t mGlobalRefit=0;
197  Int_t mMergeSmallToLarge=1;
198  Int_t mTry1PhotonFitWhen2PhotonFitFailed=1;
199  Int_t mCategorizationAlgo=1;
200  Float_t mScaleShowerShapeLarge=0.8;
201  Float_t mScaleShowerShapeSmall=0.6;
202  Int_t mShowerShapeWithAngle=1;
203  Int_t mVertexZ=0;
204  Double_t vertexz=0.0;
205 
206  StMuDst* muDst;
207 
208  virtual const Char_t *GetCVS() const {static const Char_t cvs[]="Tag " __DATE__ " " __TIME__ ; return cvs;}
209  ClassDef(StFmsPointMaker, 0)
210 };
211 #endif // STROOT_STFMSPOINTMAKER_STFMSPOINTMAKER_H_
void setMaxEnergySum(Float_t v)
Int_t InitRun(Int_t runNumber)
void SetReadMuDst(int v=1)
StFmsPointMaker(const char *name="StFmsPointMaker")
void Clear(Option_t *option="")