Geant4 Cross Reference |
1 // 1 // 2 // ******************************************* 2 // ******************************************************************** 3 // * License and Disclaimer << 3 // * DISCLAIMER * 4 // * 4 // * * 5 // * The Geant4 software is copyright of th << 5 // * The following disclaimer summarizes all the specific disclaimers * 6 // * the Geant4 Collaboration. It is provided << 6 // * of contributors to this software. The specific disclaimers,which * 7 // * conditions of the Geant4 Software License << 7 // * govern, are listed with their locations in: * 8 // * LICENSE and available at http://cern.ch/ << 8 // * http://cern.ch/geant4/license * 9 // * include a list of copyright holders. << 10 // * 9 // * * 11 // * Neither the authors of this software syst 10 // * Neither the authors of this software system, nor their employing * 12 // * institutes,nor the agencies providing fin 11 // * institutes,nor the agencies providing financial support for this * 13 // * work make any representation or warran 12 // * work make any representation or warranty, express or implied, * 14 // * regarding this software system or assum 13 // * regarding this software system or assume any liability for its * 15 // * use. Please see the license in the file << 14 // * use. * 16 // * for the full disclaimer and the limitatio << 17 // * 15 // * * 18 // * This code implementation is the result << 16 // * This code implementation is the intellectual property of the * 19 // * technical work of the GEANT4 collaboratio << 17 // * GEANT4 collaboration. * 20 // * By using, copying, modifying or distri << 18 // * By copying, distributing or modifying the Program (or any work * 21 // * any work based on the software) you ag << 19 // * based on the Program) you indicate your acceptance of this * 22 // * use in resulting scientific publicati << 20 // * statement, and all its terms. * 23 // * acceptance of all terms of the Geant4 Sof << 24 // ******************************************* 21 // ******************************************************************** 25 // 22 // 26 // G4PhysicsTableHelper << 27 // 23 // 28 // Class description: << 24 // $Id: G4PhysicsTableHelper.hh,v 1.2 2004/11/07 01:38:17 kurasige Exp $ >> 25 // GEANT4 tag $Name: geant4-07-00-cand-01 $ 29 // 26 // 30 // G4PhysicsTableHelper is a static utility cl << 27 // 31 // to build their physics table. << 28 // ------------------------------------------------------------ >> 29 // GEANT 4 class header file >> 30 // >> 31 // Class Description >> 32 // G4PhysicsTableHelper is a static utility class >> 33 // for helping proceeses to build their physics table >> 34 // >> 35 // ------------------------------------------------------------ >> 36 // First Implementation 20 Aug. 2004 H.Kurashige >> 37 // >> 38 // ------------------------------------------------------------ 32 39 33 // Author: H.Kurashige, 20 August 2004 - First << 40 #ifndef G4PhysicsTableHelper_h 34 // ------------------------------------------- << 41 #define G4PhysicsTableHelper_h 1 35 #ifndef G4PhysicsTableHelper_hh << 36 #define G4PhysicsTableHelper_hh 1 << 37 42 38 #include "globals.hh" 43 #include "globals.hh" 39 #include "G4PhysicsVector.hh" << 44 #include "G4ios.hh" >> 45 #include <vector> 40 #include "G4PhysicsTable.hh" 46 #include "G4PhysicsTable.hh" >> 47 #include "G4MaterialCutsCouple.hh" >> 48 #include "G4Region.hh" 41 49 42 class G4PhysicsTableHelper 50 class G4PhysicsTableHelper 43 { 51 { 44 public: << 52 protected: 45 << 53 G4PhysicsTableHelper(); >> 54 ~G4PhysicsTableHelper(); >> 55 G4PhysicsTableHelper(const G4PhysicsTableHelper& right); >> 56 G4PhysicsTableHelper& operator=(const G4PhysicsTableHelper&); >> 57 >> 58 public: // with description 46 static G4PhysicsTable* PreparePhysicsTable 59 static G4PhysicsTable* PreparePhysicsTable(G4PhysicsTable* physTable); 47 // Prepare the given physics table. Befo << 60 // Prepare the given physics table before building the physics table 48 // resize the given physics table to mat << 61 // resize the given physics table to match with the current 49 // production cut table << 62 // production cut table. 50 63 51 static G4bool RetrievePhysicsTable(G4Physi 64 static G4bool RetrievePhysicsTable(G4PhysicsTable* physTable, 52 const G << 65 const G4String& fileName, 53 G4bool << 66 G4bool ascii ); 54 // Retrieve the physics table from the g << 67 // Retrieve physics table from the given file and 55 // fill the given physics table with ret << 68 // fill the given physics table with retrievd physics vectors 56 69 57 static void SetPhysicsVector(G4PhysicsTabl 70 static void SetPhysicsVector(G4PhysicsTable* physTable, 58 std::size_t i << 71 size_t idx, 59 G4PhysicsVect << 72 G4PhysicsVector* vec); 60 // Set a physics vector at given positio << 73 // Set a physics vector at given position 61 << 74 62 static void SetVerboseLevel(G4int value); << 75 public: // with description 63 static G4int GetVerboseLevel(); << 76 static void SetVerboseLevel(G4int value); 64 // Set/get control flag for output messa << 77 static G4int GetVerboseLevel(); 65 // 0: Silent << 78 // set/get controle flag for output message 66 // 1: Warning message << 79 // 0: Silent 67 // 2: More << 80 // 1: Warning message 68 << 81 // 2: More 69 G4PhysicsTableHelper(const G4PhysicsTableH << 82 70 G4PhysicsTableHelper& operator=(const G4Ph << 83 71 << 84 protected: 72 protected: << 85 static G4int verboseLevel; 73 << 86 // controle flag for output message 74 G4PhysicsTableHelper(); << 75 ~G4PhysicsTableHelper(); << 76 << 77 static G4int verboseLevel; << 78 // Control flag for output message << 79 }; 87 }; >> 88 >> 89 inline >> 90 void G4PhysicsTableHelper::SetVerboseLevel(G4int value) >> 91 { >> 92 verboseLevel = value; >> 93 } >> 94 >> 95 inline >> 96 G4int G4PhysicsTableHelper::GetVerboseLevel() >> 97 { >> 98 return verboseLevel; >> 99 } 80 100 81 #endif 101 #endif 82 102