// ------------------------------------------------------------------- // File name: G4PEEffectFluoModelTest // // Author: Maria Grazia Pia // // Creation date: 1 August 2013 // // Modifications: // // ------------------------------------------------------------------- #include "globals.hh" //#include "G4ios.hh" #include "G4PEEffectFluoModel.hh" #include "G4ParticleDefinition.hh" #include "G4Gamma.hh" #include "G4NistElementBuilder.hh" #include "G4SystemOfUnits.hh" int main() { std::cout << "This is a test of the photoelectric cross section of the Geant4 Standard photoelectric model" << std::endl; // Define a set of energies at which cross sections are calculated std::vector energyGrid; energyGrid.push_back(0.0001); energyGrid.push_back(0.001); energyGrid.push_back(0.01); energyGrid.push_back(0.1); energyGrid.push_back(1.); energyGrid.push_back(10.); energyGrid.push_back(100.); energyGrid.push_back(1000.); energyGrid.push_back(10000.); energyGrid.push_back(100000.); int nEnergies = energyGrid.size(); // Geant4 standard photoelectric model: its cross section is to be tested G4PEEffectFluoModel* model = new G4PEEffectFluoModel; // Instantiate a photon (as a ParticleDefinition) G4ParticleDefinition* photon = G4Gamma::GammaDefinition(); // Instantiate an element builder, which can instantiate any element of which we want to calculate // the photoelectric cross section(what is the argument of the constructor?) G4NistElementBuilder elementBuilder(1); // These are useless dummy variables needed by G4PEEffectFluoModel::ComputeCrossSectionPerAtom as arguments double a = 0.; double b = 0.; // Calculate cross sections at predefined energies for each element of the periodic table (Z from 1 to 100) for (int Z=1; Z<100; Z++) { for (int i=0; i