2 #include "G4Poisson.hh" 3 #include "Randomize.hh" 10 map<string, double> dgtz;
11 vector<identifier> identity = aHit->
GetId();
17 double tdc_time_to_channel=20;
19 double adc_charge_tochannel=20;
20 double PbWO4_light_yield =120/MeV;
24 double APD_size = 25*mm*mm;
25 double APD_gain = 250;
26 double APD_noise = 0.006;
27 double AMP_input_noise = 4500;
28 double AMP_gain = 2500;
29 double light_speed =15;
37 int IDX = identity[0].id;
38 int IDY = identity[1].id;
46 vector<G4double> times = aHit->
GetTime();
47 vector<G4ThreeVector> Lpos = aHit->
GetLPos();
48 vector<G4double> Edep = aHit->
GetEdep();
51 for(
unsigned int s=0; s<nsteps; s++)
53 double dRight = length/2 - Lpos[s].z();
54 double timeR = times[s] + dRight/cm/light_speed;
55 if(Edep[s]>1*MeV) Tmin=min(Tmin,timeR);
57 TDC=int(Tmin*tdc_time_to_channel);
58 if(TDC>tdc_max) TDC=(int)tdc_max;
60 double npe=G4Poisson(Etot*PbWO4_light_yield/2*APD_qe*APD_size/width/width);
62 double nel=npe*APD_gain;
63 nel=nel*G4RandGauss::shoot(1.,APD_noise);
66 nel=nel+AMP_input_noise*G4RandGauss::shoot(0.,1.);
69 double crg=nel*AMP_gain*1.6e-7;
71 ADC= (int) (crg*adc_charge_tochannel);
86 id[
id.size()-1].id_sharing = 1;
93 map< string, vector <int> > MH;
vector< identifier > processID(vector< identifier >, G4Step *, detector)
vector< identifier > GetId()
map< string, double > integrateDgt(MHit *, int)
map< string, vector< int > > multiDgt(MHit *, int)
vector< G4ThreeVector > GetLPos()
vector< double > GetTime()
vector< double > dimensions
vector of dimensions. Size, units depends on solid type
vector< double > GetEdep()