@@ -229,3 +229,78 @@ float Response3inchR14374::HitTimeSmearing(float Q)
229229 float timingResolution = 0.6 *fSclFacTTS ;
230230 return fRand ->Gaus (0 ., timingResolution);
231231}
232+
233+ // /////////////////////////////////////////////////////////////////
234+ // /////////////////////////////////////////////////////////////////
235+ Response3inchR14374_WCTE::Response3inchR14374_WCTE (int seed, const string &pmtname)
236+ {
237+ double charge[14 ] =
238+ {
239+ 0.2 , 0.4 , 0.6 , 0.8 , 1.0 ,
240+ 1.2 , 1.4 , 1.6 , 1.8 , 2.0 ,
241+ 2.5 , 3.0 , 3.5 , 4.0
242+ };
243+ double resol[14 ] =
244+ {
245+ 1.1654 , 0.61088 , 0.4186 , 0.32532 , 0.26484 ,
246+ 0.23084 , 0.20969 , 0.19297 , 0.17716 , 0.17046 ,
247+ 0.15455 , 0.1427 , 0.13699 , 0.13229
248+ };
249+ gTResol = new TGraph (14 ,charge,resol);
250+
251+ this ->Initialize (seed, pmtname);
252+ }
253+
254+ Response3inchR14374_WCTE::Response3inchR14374_WCTE ()
255+ {
256+ double charge[14 ] =
257+ {
258+ 0.2 , 0.4 , 0.6 , 0.8 , 1.0 ,
259+ 1.2 , 1.4 , 1.6 , 1.8 , 2.0 ,
260+ 2.5 , 3.0 , 3.5 , 4.0
261+ };
262+ double resol[14 ] =
263+ {
264+ 1.1654 , 0.61088 , 0.4186 , 0.32532 , 0.26484 ,
265+ 0.23084 , 0.20969 , 0.19297 , 0.17716 , 0.17046 ,
266+ 0.15455 , 0.1427 , 0.13699 , 0.13229
267+ };
268+ gTResol = new TGraph (14 ,charge,resol);
269+ }
270+
271+ Response3inchR14374_WCTE::~Response3inchR14374_WCTE ()
272+ {
273+ delete gTResol ;
274+ }
275+
276+ void Response3inchR14374_WCTE::Initialize (int seed, const string &pmtname)
277+ {
278+ fPMTType = pmtname;
279+ fRand = new MTRandom (seed);
280+
281+ map<string, string> s;
282+ s[" ScalFactorTTS" ] = " ScalFactorTTS" ;
283+ s[" SPECDFFile" ] = " SPECDFFile" ;
284+ if ( fPMTType !=" " )
285+ {
286+ map<string, string>::iterator i;
287+ for (i=s.begin (); i!=s.end (); i++)
288+ {
289+ i->second += " _" + fPMTType ;
290+ }
291+ }
292+ Configuration *Conf = Configuration::GetInstance ();
293+ Conf->GetValue <float >(s[" ScalFactorTTS" ], fSclFacTTS );
294+ Conf->GetValue <string>(s[" SPECDFFile" ], fTxtFileSPECDF );
295+ this ->LoadCDFOfSPE (fTxtFileSPECDF );
296+ }
297+
298+ float Response3inchR14374_WCTE::HitTimeSmearing (float Q)
299+ {
300+ float pmt_tts = 1.5 ;
301+ if (Q>4.0 ) Q = 4.0 ; // limit Q to valid range
302+ float val = gTResol ->Eval (Q,0 ," S" );
303+ float timingResolution = sqrt (pmt_tts*pmt_tts+val*val)/2.355 ; // conversion from FWHM to sigma
304+ timingResolution *= fSclFacTTS ;
305+ return fRand ->Gaus (0.0 ,timingResolution);
306+ }
0 commit comments