G4PenelopeOscillatorManager.hh

Go to the documentation of this file.
00001 //
00002 // ********************************************************************
00003 // * License and Disclaimer                                           *
00004 // *                                                                  *
00005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
00006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
00007 // * conditions of the Geant4 Software License,  included in the file *
00008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
00009 // * include a list of copyright holders.                             *
00010 // *                                                                  *
00011 // * Neither the authors of this software system, nor their employing *
00012 // * institutes,nor the agencies providing financial support for this *
00013 // * work  make  any representation or  warranty, express or implied, *
00014 // * regarding  this  software system or assume any liability for its *
00015 // * use.  Please see the license in the file  LICENSE  and URL above *
00016 // * for the full disclaimer and the limitation of liability.         *
00017 // *                                                                  *
00018 // * This  code  implementation is the result of  the  scientific and *
00019 // * technical work of the GEANT4 collaboration.                      *
00020 // * By using,  copying,  modifying or  distributing the software (or *
00021 // * any work based  on the software)  you  agree  to acknowledge its *
00022 // * use  in  resulting  scientific  publications,  and indicate your *
00023 // * acceptance of all terms of the Geant4 Software license.          *
00024 // ********************************************************************
00025 //
00026 //
00027 //
00028 // Authors: Luciano Pandola (luciano.pandola at lngs.infn.it)
00029 //
00030 // History:
00031 // -----------
00032 //  
00033 //  03 Dec 2009  First implementation, Luciano Pandola
00034 //  16 Feb 2010  Added methods to calculate and store also A and Z 
00035 //               for molecules. Luciano Pandola
00036 //  16 Mar 2010  Added methods to calculate and store mean exc energy
00037 //               and plasma energy (used for Ionisation). L Pandola
00038 //  18 Mar 2010  Added method to retrieve number of atoms per 
00039 //               molecule. L. Pandola
00040 //  15 Mar 2012  Added method to retrieve number of atom of given Z per 
00041 //               molecule, L. Pandola
00042 //
00043 // -------------------------------------------------------------------
00044 //
00051 //
00052 
00053 // -------------------------------------------------------------------
00054 
00055 #ifndef G4PenelopeOscillatorManager_h
00056 #define G4PenelopeOscillatorManager_h 1
00057 
00058 #include "globals.hh"
00059 #include "G4PenelopeOscillator.hh"
00060 #include <vector>
00061 #include <map>
00062 
00063 class G4Material;
00064 
00065 typedef std::vector<G4PenelopeOscillator*> G4PenelopeOscillatorTable ;
00066 
00067 // This class is a singleton
00068 class G4PenelopeOscillatorManager {
00069 
00070 public: 
00071 
00072   // The only way to get an instance of this class is to call the 
00073   // function GetOscillatorManager() 
00074   static G4PenelopeOscillatorManager* GetOscillatorManager();
00075  
00076   //Clear() is invoked by Initialise() of the processes, if required
00077   void Clear();
00078   void Dump(const G4Material*);
00079   
00080   //For ionisation
00081   G4PenelopeOscillatorTable* GetOscillatorTableIonisation(const G4Material*);  
00082   G4PenelopeOscillator* GetOscillatorIonisation(const G4Material*,G4int);
00083   
00084   //For Compton
00085   G4PenelopeOscillatorTable* GetOscillatorTableCompton(const G4Material*);  
00086   G4PenelopeOscillator* GetOscillatorCompton(const G4Material*,G4int);
00087 
00088   void SetVerbosityLevel(G4int vl){verbosityLevel = vl;};
00089   G4int GetVerbosityLevel(){return verbosityLevel;};
00090   
00093   G4double GetTotalZ(const G4Material*);
00095   G4double GetTotalA(const G4Material*);
00097   G4double GetMeanExcitationEnergy(const G4Material*);
00099   G4double GetPlasmaEnergySquared(const G4Material*);
00101   G4double GetAtomsPerMolecule(const G4Material*);
00102 
00103   //Components of each molecule
00104   G4double GetNumberOfZAtomsPerMolecule(const G4Material*,G4int Z);
00105   
00106 protected:
00107   G4PenelopeOscillatorManager();
00108   ~G4PenelopeOscillatorManager();
00109 
00110 private:
00111   // Hide copy constructor and assignment operator 
00112   G4PenelopeOscillatorManager& operator=(const 
00113                                          G4PenelopeOscillatorManager& right);
00114   G4PenelopeOscillatorManager(const G4PenelopeOscillatorManager&);
00115  
00116   static G4PenelopeOscillatorManager* instance;
00117   
00118   //In Penelope2008, the Ionisation and Compton oscillator tables are 
00119   //slightly different!
00120   std::map<const G4Material*,G4PenelopeOscillatorTable*> 
00121   *oscillatorStoreIonisation;
00122 
00123   std::map<const G4Material*,G4PenelopeOscillatorTable*> 
00124   *oscillatorStoreCompton;
00125 
00126   std::map<const G4Material*,G4double> *atomicNumber;
00127   std::map<const G4Material*,G4double> *atomicMass;
00128 
00129   std::map<const G4Material*,G4double> *excitationEnergy;
00130   std::map<const G4Material*,G4double> *plasmaSquared;
00131 
00132   std::map<const G4Material*,G4double> *atomsPerMolecule;
00133 
00134   std::map< std::pair<const G4Material*,G4int>, G4double> *atomTablePerMolecule;
00135 
00136   //create both tables simultaneously
00137   void CheckForTablesCreated();
00138 
00139   void ReadElementData();
00140   G4double elementData[5][2000];
00141   G4bool fReadElementData;
00142 
00143   void BuildOscillatorTable(const G4Material*);
00144 
00145   G4int verbosityLevel;
00146 
00147 };
00148 
00149 #endif

Generated on Mon May 27 17:49:18 2013 for Geant4 by  doxygen 1.4.7