Ignore:
Timestamp:
Jul 15, 2013, 2:08:33 PM (11 years ago)
Author:
moretto
Message:

changes from biktem r:3032

File:
1 edited

Legend:

Unmodified
Added
Removed
  • esaf_lal/branches/camille/packages/simulation/detector/G4Detector/G4fresnellens/src/FresnelSurface.cc

    r16 r184  
    4646    }
    4747    fSurfacesIns.clear();
     48}
     49
     50//__________________________________________________________________________________
     51int FresnelSurface::FindTooth( double rho ) {
     52    return BinarySearch(theToothEdges, rho, 0, theToothN);
     53}
     54
     55//__________________________________________________________________________________
     56double FresnelSurface::PointOnSurf(double rho) {
     57    int n_tooth = FindTooth( rho );
     58    if( n_tooth<0 ) return kInfinity;
     59    return fSurfacesIns[ n_tooth*2 ]->PointOnSurf( rho );   
    4860}
    4961
     
    180192      }
    181193    #endif
    182     int n_tooth = BinarySearch(theToothEdges,rho,0,theToothN);
     194    int n_tooth = FindTooth( rho );
    183195    if( n_tooth<0 ) {
    184196        printf("Warning. Tooth not found. Shouldn't happen (rho=%g of [%g, %g]).",
     
    255267    }// approach to the limiting surface
    256268
    257     int theCurrentToothIndex=BinarySearch(theToothEdges, perp, 0, theToothN);
     269    int theCurrentToothIndex=FindTooth( perp );
    258270    if ( theCurrentToothIndex<0 ) return kInfinity;
    259271    vector<SSurface*>::const_iterator it=fSurfaces.begin()+theCurrentToothIndex*2;
Note: See TracChangeset for help on using the changeset viewer.