|
|
|||
File indexing completed on 2026-07-29 09:08:46
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // G4GeomTestVolume 0027 // 0028 // Class description: 0029 // 0030 // Checks for inconsistencies in the geometric boundaries of a physical 0031 // volume and the boundaries of all its immediate daughters. 0032 0033 // Author: Gabriele Cosmo (CERN), 22 August 2013 0034 // -------------------------------------------------------------------- 0035 #ifndef G4GeomTestVolume_hh 0036 #define G4GeomTestVolume_hh 1 0037 0038 #include "G4ThreeVector.hh" 0039 0040 class G4VPhysicalVolume; 0041 class G4GeomTestLogger; 0042 0043 /** 0044 * @brief G4GeomTestVolume allows to check for inconsistencies in the 0045 * geometric boundaries of a physical volume and the boundaries of all 0046 * its immediate daughters. 0047 */ 0048 0049 class G4GeomTestVolume 0050 { 0051 public: 0052 0053 /** 0054 * Constructor and Destructor. 0055 */ 0056 G4GeomTestVolume( G4VPhysicalVolume *theTarget, 0057 G4double theTolerance = 0.0, // mm 0058 G4int numberOfPoints = 10000, 0059 G4bool theVerbosity = true); 0060 ~G4GeomTestVolume(); 0061 0062 /** 0063 * Gets/Sets error tolerance (default set to 0*mm). 0064 */ 0065 G4double GetTolerance() const; 0066 void SetTolerance(G4double tolerance); 0067 0068 /** 0069 * Gets/Sets number of points to check (default set to 10000). 0070 */ 0071 G4int GetResolution() const; 0072 void SetResolution(G4int points); 0073 0074 /** 0075 * Gets/Sets verbosity mode (default set to true). 0076 */ 0077 G4bool GetVerbosity() const; 0078 void SetVerbosity(G4bool verbosity); 0079 0080 /** 0081 * Get/Set maximum number of errors to report (default set to 1). 0082 */ 0083 G4int GetErrorsThreshold() const; 0084 void SetErrorsThreshold(G4int max); 0085 0086 /** 0087 * Checks for overlaps in the volume tree without duplication in 0088 * identical logical volumes. 0089 */ 0090 void TestOverlapInTree() const; 0091 0092 /** 0093 * Activates overlaps check, propagating recursively to the daughters, 0094 * with possibility of specifying the initial level in the volume tree 0095 * and the depth (default is the whole tree). 0096 * @note Depending on the complexity of the geometry, this may require 0097 * long computational time. 0098 */ 0099 void TestRecursiveOverlap( G4int sLevel=0, G4int depth=-1 ); 0100 0101 private: 0102 0103 G4VPhysicalVolume *target; // Target volume 0104 G4double tolerance; // Error tolerance 0105 G4int resolution; // Number of points to test 0106 G4int maxErr = 1; // Maximum number of errors to report 0107 G4bool verbosity; // Verbosity level for overlaps check 0108 }; 0109 0110 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|