StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTofSimParam.h
1 /*******************************************************************
2  *
3  * $Id: StTofSimParam.h,v 1.2 2008/08/28 18:43:20 dongx Exp $
4  *
5  * Author: Frank Geurts
6  *****************************************************************
7  *
8  * Description: Simulation Paramers for TOFp/TOFr/TOF
9  *
10  *****************************************************************
11  *
12  * $Log: StTofSimParam.h,v $
13  * Revision 1.2 2008/08/28 18:43:20 dongx
14  * Added MRPC-TOF simulation parameters
15  * Added TOF/VPD fast simulation parameters
16  *
17  * Revision 1.1 2001/09/28 19:09:40 llope
18  * first version
19  *
20  *******************************************************************/
21 #ifndef STTOFSIMPARAM_H
22 #define STTOFSIMPARAM
23 
25  private:
27  float m_adc_overflow ;
28  float m_amax_noise ;
29  float m_amin_noise ;
30  float m_attlen ;
31  float m_cath_eff ;
32  float m_cath_surf ;
33  float m_delay ;
34  float m_elec_noise ;
35  float m_gate_t0 ;
36  float m_gate_width ;
37  float m_geo_from_geant ;
38  float m_GeV_2_n_photons ;
39  float m_nphe_to_adc ;
40  float m_phys_noise ;
41  float m_position_tolerance ;
42  float m_slat_para ;
43  float m_start_res ;
44  float m_surf_loss ;
45  float m_tdc_overflow ;
46  float m_time_res ;
47 
49  int m_n_gap ;
50  int m_nmax_clus ;
51  float m_d_in ;
52  float m_d_out ;
53  float m_d_gap ;
54  float m_alpha_dg ;
55  float m_er ;
56  float m_clus_par[4] ;
57  float m_vd_mean ;
58  float m_nmean_e ;
59  float m_nmax_e ;
60  float m_dt ;
61  int m_ndt ;
62  float m_toffset ;
63  float m_adc_thre ;
64  float m_xtalk_dy ;
65  float m_res_fee ;
66 
68  float m_res_tof ;
69  float m_thre_tof ;
70  float m_res_vpd ;
71  float m_thre_vpd ;
72 
74  float m_eff_tof[120][192] ;
75  float m_eff_vpd[50] ;
76 
78  bool mSimuTofp ;
79  bool mSimuVpd ;
80  bool mSimuTofFast ;
81  bool mSimuTofSlow ;
82 
83  public:
84  StTofSimParam();
86  void init();
87  void print();
88 
89  float adc_overflow() const;
90  float attlen() const;
91  float cath_eff() const;
92  float cath_surf() const;
93  float delay() const;
94  float elec_noise() const;
95  float gate_t0() const;
96  float gate_width() const;
97  float geo_from_geant() const;
98  float GeV_2_n_photons() const;
99  float nphe_to_adc() const;
100  float phys_noise() const;
101  float position_tolerance() const;
102  float slat_para() const;
103  float start_res() const;
104  float surf_loss() const;
105  float tdc_overflow() const;
106  float time_res() const;
107 
108  int ngap() const;
109  int nmaxclus() const;
110  float din() const;
111  float dout() const;
112  float dg() const;
113  float alpha() const;
114  float er() const;
115  float ka() const;
116  float nclus(float beta) const;
117  float vd_mean() const;
118  float nmeane() const;
119  float nmaxe() const;
120  float dt() const;
121  int ndt() const;
122  float toffset() const;
123  float adc_thre() const;
124  float dy_xtalk() const;
125  float timeres_fee() const;
126 
127  float timeres_tof() const;
128  float thre_tof() const;
129  float timeres_vpd() const;
130  float thre_vpd() const;
131 
132  float eff_tof(int itray, int imodule, int icell) const;
133  float eff_vpd(int itray, int itube) const;
134 
135  bool simuTofp() const;
136  bool simuVpd() const;
137  bool simuTofFast() const;
138  bool simuTofSlow() const;
139 
140  void setSimuTofp(bool val) ;
141  void setSimuVpd(bool val) ;
142  void setSimuTofFast(bool val) ;
143  void setSimuTofSlow(bool val) ;
144 
145 };
146 
147 inline float StTofSimParam::adc_overflow() const {return m_adc_overflow;}
148 inline float StTofSimParam::attlen() const {return m_attlen;}
149 inline float StTofSimParam::cath_eff() const {return m_cath_eff;}
150 inline float StTofSimParam::cath_surf() const {return m_cath_surf;}
151 inline float StTofSimParam::delay() const {return m_delay;}
152 inline float StTofSimParam::elec_noise() const {return m_elec_noise;}
153 inline float StTofSimParam::gate_t0() const {return m_gate_t0;}
154 inline float StTofSimParam::gate_width() const {return m_gate_width;}
155 inline float StTofSimParam::geo_from_geant() const {return m_geo_from_geant;}
156 inline float StTofSimParam::GeV_2_n_photons() const {return m_GeV_2_n_photons;}
157 inline float StTofSimParam::nphe_to_adc() const {return m_nphe_to_adc;}
158 inline float StTofSimParam::phys_noise() const {return m_phys_noise;}
159 inline float StTofSimParam::position_tolerance() const {return m_position_tolerance;}
160 inline float StTofSimParam::slat_para() const {return m_slat_para;}
161 inline float StTofSimParam::start_res() const {return m_start_res;}
162 inline float StTofSimParam::surf_loss() const {return m_surf_loss;}
163 inline float StTofSimParam::tdc_overflow() const {return m_tdc_overflow;}
164 inline float StTofSimParam::time_res() const {return m_time_res;}
165 
166 inline int StTofSimParam::ngap() const {return m_n_gap;}
167 inline int StTofSimParam::nmaxclus() const {return m_nmax_clus;}
168 inline float StTofSimParam::din() const {return m_d_in;}
169 inline float StTofSimParam::dout() const {return m_d_out;}
170 inline float StTofSimParam::dg() const {return m_d_gap;}
171 inline float StTofSimParam::alpha() const {return m_alpha_dg/m_d_gap;}
172 inline float StTofSimParam::er() const {return m_er;}
173 inline float StTofSimParam::ka() const {return m_er*m_d_gap/(m_n_gap*m_er*m_d_gap+(m_n_gap-1)*m_d_in+2*m_d_out);}
174 inline float StTofSimParam::vd_mean() const {return m_vd_mean;}
175 inline float StTofSimParam::nmeane() const {return m_nmean_e;}
176 inline float StTofSimParam::nmaxe() const {return m_nmax_e;}
177 inline float StTofSimParam::dt() const {return m_dt;}
178 inline int StTofSimParam::ndt() const {return m_ndt;}
179 inline float StTofSimParam::toffset() const {return m_toffset;}
180 inline float StTofSimParam::adc_thre() const {return m_adc_thre;}
181 inline float StTofSimParam::dy_xtalk() const {return m_xtalk_dy;}
182 inline float StTofSimParam::timeres_fee() const {return m_res_fee;}
183 inline float StTofSimParam::timeres_tof() const {return m_res_tof;}
184 inline float StTofSimParam::thre_tof() const {return m_thre_tof;}
185 inline float StTofSimParam::timeres_vpd() const {return m_res_vpd;}
186 inline float StTofSimParam::thre_vpd() const {return m_thre_vpd;}
187 inline float StTofSimParam::eff_tof(int itray, int imodule, int icell) const {return m_eff_tof[itray-1][(imodule-1)*6+(icell-1)];}
188 inline float StTofSimParam::eff_vpd(int itray, int itube) const {return m_eff_vpd[(itray-121)*19+itube-1];}
189 
190 inline bool StTofSimParam::simuTofp() const {return mSimuTofp;}
191 inline bool StTofSimParam::simuVpd() const {return mSimuVpd;}
192 inline bool StTofSimParam::simuTofFast() const {return mSimuTofFast;}
193 inline bool StTofSimParam::simuTofSlow() const {return mSimuTofSlow;}
194 
195 inline void StTofSimParam::setSimuTofp(bool val) {mSimuTofp=val;}
196 inline void StTofSimParam::setSimuVpd(bool val) {mSimuVpd=val;}
197 inline void StTofSimParam::setSimuTofFast(bool val) {mSimuTofFast=val;}
198 inline void StTofSimParam::setSimuTofSlow(bool val) {mSimuTofSlow=val;}
199 
200 #endif
StTofSimParam()
Slow simulator for MRPC-TOF.
~StTofSimParam()
default empty destructor
Time-of-Flight Simulation Utilities.
Definition: StTofSimParam.h:24
void init()
initializes calibration from XDF or dBase (not functioning yet)