// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration. It is provided under the terms and * // * conditions of the Geant4 Software License, included in the file * // * LICENSE and available at http://cern.ch/geant4/license . These * // * include a list of copyright holders. * // * * // * Neither the authors of this software system, nor their employing * // * institutes,nor the agencies providing financial support for this * // * work make any representation or warranty, express or implied, * // * regarding this software system or assume any liability for its * // * use. Please see the license in the file LICENSE and URL above * // * for the full disclaimer and the limitation of liability. * // * * // * This code implementation is the result of the scientific and * // * technical work of the GEANT4 collaboration. * // * By using, copying, modifying or distributing the software (or * // * any work based on the software) you agree to acknowledge its * // * use in resulting scientific publications, and indicate your * // * acceptance of all terms of the Geant4 Software license. * // ******************************************************************** // // // $Id: testPointOnSurface.cc,v 1.5 2007/02/12 11:29:23 gcosmo Exp $ // GEANT4 tag $Name: geant4-09-04-beta-cand-01 $ // // // -------------------------------------------------------------- // // Test for GetPointOnSurface() method of various solids. // Returns 0 if generated random points are located on surface. // // Author: Dionysios Anninos // // -------------------------------------------------------------- #include #include #include "globals.hh" #include "geomdefs.hh" #include "G4TwoVector.hh" #include "G4ThreeVector.hh" #include "G4Tubs.hh" #include "G4Ellipsoid.hh" #include "G4EllipticalTube.hh" #include "G4Hype.hh" #include "G4Orb.hh" #include "G4Sphere.hh" #include "G4Box.hh" #include "G4Torus.hh" #include "G4Trap.hh" #include "G4Cons.hh" #include "G4Para.hh" #include "G4Trd.hh" #include "G4Polycone.hh" #include "G4Tet.hh" #include "G4Polyhedra.hh" #include "G4EllipticalCone.hh" #include "G4ExtrudedSolid.hh" #include "G4Timer.hh" #include "Randomize.hh" #include "G4RotationMatrix.hh" #include "G4AffineTransform.hh" #include "G4VoxelLimits.hh" G4bool checkBox(G4int N) { G4cout<<"**************************************"< polygon; polygon.push_back(G4TwoVector(-30.*cm, -30.*cm)); polygon.push_back(G4TwoVector(-30.*cm, 30.*cm)); polygon.push_back(G4TwoVector( 30.*cm, 30.*cm)); polygon.push_back(G4TwoVector( 30.*cm, -30.*cm)); polygon.push_back(G4TwoVector( 15.*cm, -30.*cm)); polygon.push_back(G4TwoVector( 15.*cm, 15.*cm)); polygon.push_back(G4TwoVector(-15.*cm, 15.*cm)); polygon.push_back(G4TwoVector(-15.*cm, -30.*cm)); G4ExtrudedSolid t1("Concave_XTRU", polygon, 25.*cm, G4TwoVector(-20.*cm, 10.*cm), 1.5, G4TwoVector(), 0.5); G4Timer time; time.Start(); for(i=0; i