|
||||
File indexing completed on 2025-01-18 09:58:54
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 // 0027 // 0028 // Authors: Luciano Pandola (luciano.pandola at lngs.infn.it) 0029 // 0030 // History: 0031 // ----------- 0032 // 0033 // 03 Dec 2009 First implementation, Luciano Pandola 0034 // 16 Feb 2010 Added methods to calculate and store also A and Z 0035 // for molecules. Luciano Pandola 0036 // 16 Mar 2010 Added methods to calculate and store mean exc energy 0037 // and plasma energy (used for Ionisation). L Pandola 0038 // 18 Mar 2010 Added method to retrieve number of atoms per 0039 // molecule. L. Pandola 0040 // 15 Mar 2012 Added method to retrieve number of atom of given Z per 0041 // molecule, L. Pandola 0042 // 0043 // ------------------------------------------------------------------- 0044 // 0045 //! Class description: 0046 //! Fills and manages G4PenelopeOscillator objects and takes care of 0047 //! building and managing the G4PenelopeOscillatorTables for the materials 0048 //! in the geometry. G4PenelopeOscillatorManager is a singleton. 0049 //! This is compliant with Penelope2008, so different tables (with different 0050 //! grouping factors) are created for Ionisation and Compton processes. 0051 // 0052 0053 // ------------------------------------------------------------------- 0054 0055 #ifndef G4PenelopeOscillatorManager_h 0056 #define G4PenelopeOscillatorManager_h 1 0057 0058 #include "globals.hh" 0059 #include "G4PenelopeOscillator.hh" 0060 #include <vector> 0061 #include <map> 0062 0063 class G4Material; 0064 0065 typedef std::vector<G4PenelopeOscillator*> G4PenelopeOscillatorTable ; 0066 0067 // This class is a singleton 0068 class G4PenelopeOscillatorManager { 0069 public: 0070 // The only way to get an instance of this class is to call the 0071 // function GetOscillatorManager() 0072 static G4PenelopeOscillatorManager* GetOscillatorManager(); 0073 0074 //Clear() is invoked by Initialise() of the processes, if required 0075 void Clear(); 0076 void Dump(const G4Material*); 0077 0078 //For ionisation 0079 G4PenelopeOscillatorTable* GetOscillatorTableIonisation(const G4Material*); 0080 G4PenelopeOscillator* GetOscillatorIonisation(const G4Material*,G4int); 0081 0082 //For Compton 0083 G4PenelopeOscillatorTable* GetOscillatorTableCompton(const G4Material*); 0084 G4PenelopeOscillator* GetOscillatorCompton(const G4Material*,G4int); 0085 0086 void SetVerbosityLevel(G4int vl){fVerbosityLevel = vl;}; 0087 G4int GetVerbosityLevel(){return fVerbosityLevel;}; 0088 0089 //!These are cumulative for the molecule 0090 //! Returns the total Z for the molecule 0091 G4double GetTotalZ(const G4Material*); 0092 //!Returns the total A for the molecule 0093 G4double GetTotalA(const G4Material*); 0094 //! Returns the mean excitation energy 0095 G4double GetMeanExcitationEnergy(const G4Material*); 0096 //! Returns the squared plasma energy 0097 G4double GetPlasmaEnergySquared(const G4Material*); 0098 //! Returns the total number of atoms per molecule 0099 G4double GetAtomsPerMolecule(const G4Material*); 0100 0101 //Components of each molecule 0102 G4double GetNumberOfZAtomsPerMolecule(const G4Material*,G4int Z); 0103 0104 G4PenelopeOscillatorManager& operator=(const 0105 G4PenelopeOscillatorManager& right) = delete; 0106 G4PenelopeOscillatorManager(const G4PenelopeOscillatorManager&) = delete; 0107 ~G4PenelopeOscillatorManager(); 0108 0109 protected: 0110 explicit G4PenelopeOscillatorManager(); 0111 0112 private: 0113 //create both tables simultaneously 0114 void CheckForTablesCreated(); 0115 void ReadElementData(); 0116 void BuildOscillatorTable(const G4Material*); 0117 0118 static G4ThreadLocal G4PenelopeOscillatorManager* instance; 0119 0120 //In Penelope2008, the Ionisation and Compton oscillator tables are 0121 //slightly different! 0122 std::map<const G4Material*,G4PenelopeOscillatorTable*> 0123 *fOscillatorStoreIonisation; 0124 0125 std::map<const G4Material*,G4PenelopeOscillatorTable*> 0126 *fOscillatorStoreCompton; 0127 0128 std::map<const G4Material*,G4double> *fAtomicNumber; 0129 std::map<const G4Material*,G4double> *fAtomicMass; 0130 std::map<const G4Material*,G4double> *fExcitationEnergy; 0131 std::map<const G4Material*,G4double> *fPlasmaSquared; 0132 std::map<const G4Material*,G4double> *fAtomsPerMolecule; 0133 std::map< std::pair<const G4Material*,G4int>, G4double> *fAtomTablePerMolecule; 0134 0135 G4double fElementData[5][2000]; 0136 G4int fVerbosityLevel; 0137 G4bool fReadElementData; 0138 }; 0139 0140 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |