// calculation od induced charge using Weighting (Ramo) function //------------------------------------------------------------------- double Ramo_potential (double x, double y) { // x and y are the coorlocation of charge (e or hole) // induced chardege on the strip "istrip" situated at the height y = d // the center of the strip (istrip=0) is x = 0.004 [cm] double deltax = 0.0005, deltay = 0.00025, bulk_depth=0.0285, strip_pitch=0.008 ; double dx = x-0.004; if( x < 0.004) dx = 0.004 - x; if ( y < 0. || y > bulk_depth) return 0; int ix = int( dx / deltax ); if ( ix > 80 ) return 0.; int iy = int( y / deltay ); double fx = ( dx - ix*deltax) / deltax; double fy = ( y - iy*deltay) / deltay; int ix1 = ix + 1; int iy1 = iy + 1; double P = GetPotentialValue(ix,iy) *(1.-fx)*(1.-fy) + GetPotentialValue(ix1,iy) *fx*(1.-fy) + GetPotentialValue(ix,iy1) *(1.-fx)*fy + GetPotentialValue(ix1,iy1) *fx*fy ; // cout <<"x,y,iy="<