StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTofINLCorr.h
1 /*******************************************************************
2  *
3  * $Id: StTofINLCorr.h,v 1.4 2008/03/27 00:15:38 dongx Exp $
4  *
5  * Author: Xin Dong
6  *****************************************************************
7  *
8  * Description: INL correction for all TDIG board channels
9  *
10  *****************************************************************
11  *
12  * $Log: StTofINLCorr.h,v $
13  * Revision 1.4 2008/03/27 00:15:38 dongx
14  * Update for Run8 finished.
15  *
16  * Revision 1.3 2007/11/29 22:39:30 dongx
17  * vpd trayId changed to 121 (East) and 122 (West), be consistent
18  *
19  * Revision 1.2 2007/11/22 00:04:13 dongx
20  * - update for tof8++
21  * - added ValidTrays() function
22  *
23  *
24  *******************************************************************/
25 #ifndef STTOFINLCORR_H
26 #define STTOFINLCORR_H
27 
28 #include "StObject.h"
29 #include "StMaker.h"
30 #include <assert.h>
31 #include "Stypes.h"
32 #include "TDataSet.h"
33 #include "TDataSetIter.h"
34 #include "TObjectSet.h"
35 #include <string>
36 
37 
39  private:
40  static const Int_t mNTray = 120;
41  static const Int_t mNTDIGOnTray = 8;
42  static const Int_t mNGLOBALCHANMAX = 192;
43 
44  static const Int_t mNTDIGMAX = 1200;
45  static const Int_t mNChanOnTDIG = 24;
46  static const Int_t mNChanMAX = 1024;
47  static const Int_t mNBoardIdMAX = 4800;
48 
49  static const Int_t mEastVpdTrayId = 122;
50  static const Int_t mWestVpdTrayId = 121;
51 
52  Int_t mTdigOnTray[mNTray][mNTDIGOnTray];
53  Int_t mTdigOnEastVpd[mNTDIGOnTray];
54  Int_t mTdigOnWestVpd[mNTDIGOnTray];
55 
56  Int_t mBoardId[mNTDIGMAX];
57  Int_t mBoardId2Index[mNBoardIdMAX]; // index in mNTDIGMAX for board #Id
58  Float_t mINLCorr[mNTDIGMAX][mNChanOnTDIG][mNChanMAX];
59 
60  Int_t mNValidTrays;
61 
62  public:
63  StTofINLCorr();
64  ~StTofINLCorr();
65 
66  void init();
67  void init(StMaker *maker);
68  void initFromDbase(StMaker *maker);
69  void Reset();
70 
71  float getTrayINLCorr(int trayId, int globalTdcChan, int bin);
72  float getVpdINLCorr(int ewId, int globalTdcChan, int bin);
73 
74  void setNValidTrays(int ntrays);
75 };
76 
77 inline void StTofINLCorr::setNValidTrays(int ntrays) { mNValidTrays = ntrays; }
78 
79 #endif