StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFmsFpsMaker.h
1 // \class StFmsFpsMaker
2 // \author Akio Ogawa
3 //
4 // This is analysis for FMS-FPS correlations.
5 //
6 // $Id: StFmsFpsMaker.h,v 1.7 2016/06/07 17:58:06 akio Exp $
7 // $Log: StFmsFpsMaker.h,v $
8 // Revision 1.7 2016/06/07 17:58:06 akio
9 // Added more comments on setReadMuDST()
10 // Added setMeanVertexZ(float v)
11 // Added protection for setting >2.0 for setMaxDistanceToAssociate()
12 // Added c++ style data member initializations
13 // Added project() and distance() as private member function (from global scope)
14 //
15 // Revision 1.6 2016/01/26 19:53:14 akio
16 // Drop QA/alignment histograms and just do the analysis/filling StEvent structure
17 // Offline QA and Alignment histograms will be moved to StRoot/StSpinPool/StFmsOfflineQaMaker
18 //
19 // Revision 1.5 2015/12/08 17:00:03 akio
20 // updates
21 //
22 // Revision 1.4 2015/10/29 21:22:01 akio
23 // more cuts for QA
24 //
25 // Revision 1.3 2015/10/21 15:51:01 akio
26 // Add more QA for debugging FMS reconstruciton code
27 //
28 // Revision 1.2 2015/09/18 18:50:06 akio
29 // cleaning up and adding QA histos
30 //
31 // Revision 1.1 2015/09/02 14:56:12 akio
32 // Initial version of FMS-FPS correation analysis
33 //
34 
35 #ifndef STAR_StFmsFpsMaker_HH
36 #define STAR_StFmsFpsMaker_HH
37 
38 #include "StMaker.h"
39 #include "StEnumerations.h"
40 
41 class StFmsDbMaker;
42 class StFmsCollection;
43 
44 class StFmsFpsMaker : public StMaker{
45 public:
46  StFmsFpsMaker(const Char_t* name="FmsFps");
47  ~StFmsFpsMaker();
48  Int_t Init();
49  Int_t Make();
50 
51  //Read MuDST hits if available, and update FPS hits in StEvent using current DB values
52  //If this is set to 0 (default), use hits as is (new DB values will NOT be applied)
53  //You only need this when you want to apply new calibration from DB to overwrite
54  //old calibration which was in place when the Mudst is produced. This is the case
55  //typically when you are running on FastOffline Mudst to calibrate FPS.
56  void setReadMuDST(int v=1){mReadMuDST=v;}
57 
58  //mean z vertex to be used for interpration between FMS and vertex
59  void setMeanVertexZ(float v) {mMeanVertexZ=v;}
60 
61  //max distance to associate FPS slat to FMS point
62  void setMaxDistanceToAssociate(float v) {if(v>0.0 && v<2.0) mMaxDistanceToAssociate=v;}
63 
64  //0=take closest slat, 1=take sum of all slat associated
65  void setPidMethod(int v) {mPidMethod=v;}
66 
67 private:
68  StFmsDbMaker* mFmsDbMaker=0;
69  StFmsCollection* mFmsColl=0;
70 
71  int mReadMuDST=0;
72  void readMuDST();
73 
74  float mMeanVertexZ=0.0; //[cm]
75  float mMaxDistanceToAssociate=2.0; //[cm] making this >2cm causes more than 4 slats to associate with FMS hit!
76  int mPidMethod=1;
77 
78  void corrFmsFps();
79  void pid(int opt=0);
80  void isolationCone();
81 
82  Float_t project(float x, float z, float zp, float vz);
83  Float_t distance(float x, float y, float x0, float y0, float xw, float yw);
84 
85  virtual const char *GetCVS() const
86  {static const char cvs[]="Tag $Name: $ $Id: StFmsFpsMaker.h,v 1.7 2016/06/07 17:58:06 akio Exp $ built " __DATE__ " " __TIME__ ; return cvs;}
87 
88  ClassDef(StFmsFpsMaker,0);
89 };
90 
91 #endif