StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StRHICfDbMaker.h
1 /***************************************************************************
2  * $Id: StRHICfDbMaker.h,v 1.23 2018/03/09 21:36:18 smirnovd Exp $
3  * \author: akio ogawa, Minho Kim, Seunghwan Lee
4  ***************************************************************************
5  *
6  * Description: RHICf DB access Maker
7  *
8  ***************************************************************************
9  *
10  * $Log: StRHICfDbMaker.h,v $
11  *
12  **************************************************************************/
13 
14 #ifndef STRHICFDBMAKER_H
15 #define STRHICFDBMAKER_H
16 
17 #ifndef StMaker_H
18 #include "StMaker.h"
19 #endif
20 
21 #include <TH2D.h>
22 
23 struct rhicfBarMap_st;
24 struct rhicfBarPos_st;
25 struct rhicfPedestal_st;
26 struct rhicfPedestalF_st;
27 struct rhicfGain_st;
28 struct rhicfPlateRange_st;
29 struct rhicfCrossTalk_st;
30 struct rhicfNeutronLeakageOut_st;
31 struct rhicfPhotonLeakageOut_st;
32 struct rhicfPhotonLeakageIn_st;
33 
34 class StRHICfDbMaker : public StMaker
35 {
36  public:
37  StRHICfDbMaker(const Char_t *name="rhicfDb");
38  virtual ~StRHICfDbMaker();
39  virtual Int_t Init();
40  virtual Int_t InitRun(Int_t runNumber);
41  virtual Int_t Make();
42  virtual Int_t Finish();
43  virtual void Clear(const Char_t *opt);
44 
45  void setDebug(Int_t debug);
46 
47  // Important note: the _RHICf_ Run and Event numbers are distinct from the _STAR_ Run and Event numbers,
48  // originating from RHICf's own raw data acquisition and studies outside of the STAR framework
49  unsigned int getRHICfRunNumberAddress() const;
50  unsigned int getRHICfEventNumberAddress() const;
51  unsigned int getRunTRGMAddress() const;
52  unsigned int getTriggerAddress() const;
53  unsigned int getBunchNumberAddress() const;
54  unsigned int getRunTimeAddress(unsigned int idx) const;
55  unsigned int getTDCAddress(unsigned int idx) const;
56  unsigned int getCAD0Address(unsigned int idx) const;
57  unsigned int getGPI0Address(unsigned int idx) const;
58  unsigned int getGPI1Address(unsigned int idx) const;
59 
60  unsigned int getAdcAddress(unsigned int tower, unsigned int plate, unsigned int range) const;
61  unsigned int getAdcDAddress(unsigned int tower, unsigned int plate, unsigned int range) const;
62  unsigned short getScifiAddress(unsigned int tower, unsigned int layer, unsigned xy, unsigned pos) const;
63 
64  Float_t getPlatePedestal(unsigned int tower, unsigned int plate) const;
65  Float_t getBarPedestal(unsigned int tower, unsigned int layer, unsigned int xy, unsigned int pos) const;
66  Float_t getBarPedestalF(unsigned int tower, unsigned int layer, unsigned int xy, unsigned int pos) const;
67  Float_t getPlateGain(unsigned int, unsigned int plate) const;
68  Float_t getBarGain(unsigned int tower, unsigned int layer, unsigned int xy, unsigned int pos) const;
69  Float_t getPlateRangePar(unsigned int tower, unsigned int plate, unsigned int parnum) const;
70  Float_t getBarPos(unsigned int tower, unsigned int layer, unsigned xy, unsigned pos) const;
71  Float_t getCrossTalk(unsigned int i, unsigned int j) const;
72 
73  TH2D* getLeakOutNeutron(unsigned int tower);
74  TH2D* getLeakOutPhoton(unsigned int tower, unsigned int plate);
75  TH2D* getLeakInPhoton(unsigned int tower, unsigned int plate);
76 
77  private:
78  Int_t mDebug=0;
79 
80  rhicfPedestal_st *mPedestal=0;
81  rhicfPedestalF_st *mPedestalF=0; // pedestal table.
82  rhicfGain_st *mGain=0; // Gain table.
83  rhicfPlateRange_st *mPlateRange=0; // Combine two ADC ragnes to one.
84  rhicfBarMap_st *mBarMap=0; // Address for bar arrays.
85  rhicfBarPos_st *mBarPos=0; // GSOBar position table.
86  rhicfCrossTalk_st *mCrossTalk=0; // CrossTalk table.
87 
88  rhicfNeutronLeakageOut_st *mNeutronLeakageOut=0;
89  rhicfPhotonLeakageOut_st *mPhotonLeakageOut=0;
90  rhicfPhotonLeakageIn_st *mPhotonLeakageIn=0;
91 
92  TH2D* h2_TSneuLeakOut;
93  TH2D* h2_TLneuLeakOut;
94  TH2D* h2_TSphoLeakOut[15];
95  TH2D* h2_TLphoLeakOut[15];
96  TH2D* h2_TSphoLeakIn[15];
97  TH2D* h2_TLphoLeakIn[15];
98 
99  virtual const Char_t *GetCVS() const {static const Char_t cvs[]="Tag $Name:" __DATE__ " " __TIME__ ; return cvs;}
100  ClassDef(StRHICfDbMaker, 0)
101 };
102 
103 #endif
104 
105 
virtual Int_t InitRun(Int_t runNumber)
virtual Int_t Make()
void setDebug(Int_t debug)
debug mode, 0 for minimal message, &gt;0 for more debug messages
virtual Int_t Finish()