StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPmdCalibConstMaker.h
1 
14 #ifndef STAR_StPmdCalibConstMaker
15 #define STAR_StPmdCalibConstMaker
16 #ifndef StMaker_H
17 #include "StMaker.h"
18 #endif
19 
20 #include "tables/St_pmdBrdMipCalib_Table.h"
21 #include "tables/St_pmdCalSummary_Table.h"
22 #include "TString.h"
23 #include "StPmdUtil/StPmdGeom.h"
24 #include "StPmdUtil/StPmdDBUtil.h"
25 #define PMD_CELL_NEIGHBOUR 6
26 #define MIP_MIN_ENTRY 1000 // new entry
27 #define MIP_CH_MAX 100// check it
28 
29 class StTrack;
30 class StEvent;
31 
32 class StPmdCollection;
33 class StPmdDetector;
35 
36  private:
37  static Int_t neibx[PMD_CELL_NEIGHBOUR];
38  static Int_t neiby[PMD_CELL_NEIGHBOUR];
39  static Int_t imax[2*PMD_CRAMS_MAX];
40  static Int_t jmax[2*PMD_CRAMS_MAX];
41  int mDate;
42  int mTime;
43  Bool_t mSaveCalibToDB;
44  Bool_t mOptHist;
45  Float_t mMipPeak[PMD_BOARD_MAX][PMD_BOARD_CH_MAX];
46  Float_t mMipWidth[PMD_BOARD_MAX][PMD_BOARD_CH_MAX];
47 
48  StPmdGeom * mPmdGeom;
49  StPmdDBUtil * mPmdDbUtil;
50  void InitMipParams();
51  void ClearHists();
52  void ClearMipArray();
53  void BookHistograms(); // Book hists for MIP
54  void GetIsoHit(StPmdDetector*, StPmdDetector*); // Find Isolated hits
55  protected:
56 
58  TH1F *mMipEnergy[2*PMD_CRAMS_MAX][PMD_ROW_MAX][PMD_COL_MAX];
59  Float_t normFactor[2*PMD_CRAMS_MAX][PMD_ROW_MAX][PMD_COL_MAX];
60  Float_t MPV_Entry[2*PMD_CRAMS_MAX][PMD_ROW_MAX][PMD_COL_MAX];
61  public:
62  StPmdCalibConstMaker(const char *name="PmdCalib");
63  virtual ~StPmdCalibConstMaker();
64 
65  virtual Int_t Init();
66  virtual Int_t Make();
67  virtual Int_t FindMipParameters(); // Obtain MIP params from fitting
68  virtual Int_t Finish();
69 
70  void SaveCalibration(); //Save calibration constants to DB
71  void SetSaveCalibToDB(Bool_t a) { mSaveCalibToDB = a; }
72  void SetOptHist(Bool_t a) { mOptHist = a; }
73 
74  ClassDef(StPmdCalibConstMaker, 1)
75  };
76 
77 #endif
78 
79 
80 
81 
82 
83 
84 
85 
86 
87 
88 
89 
90 
91 
92 
93 
94 
95 
TH1F * mMipEnergy[2 *PMD_CRAMS_MAX][PMD_ROW_MAX][PMD_COL_MAX]
booking Pmd cluster histograms
virtual Int_t Init()
Init method.
virtual ~StPmdCalibConstMaker()
Default destructor.
Float_t normFactor[2 *PMD_CRAMS_MAX][PMD_ROW_MAX][PMD_COL_MAX]
deposited energy of isolated cells
virtual Int_t Make()
Make mathod - process each event.
virtual Int_t Finish()
Finish method - save final numbers.
virtual Int_t FindMipParameters()