[1197] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | //$Id: G4teoCrossSection.cc,v 1.5 2009/11/11 09:14:53 mantero Exp $ |
---|
| 27 | // GEANT4 tag $Name: geant4-09-03-cand-01 $ |
---|
| 28 | // |
---|
| 29 | // |
---|
| 30 | // |
---|
| 31 | // History: |
---|
| 32 | // ----------- |
---|
| 33 | // 21 Apr 2009 ALF 1st implementation |
---|
| 34 | // 29 Apr 2009 ALF Updated Desing for Integration |
---|
| 35 | // 11 Nov 2009 ALF update and code cleaning for the Dec Release |
---|
| 36 | // |
---|
| 37 | // ------------------------------------------------------------------- |
---|
| 38 | // Class description: |
---|
| 39 | // Low Energy Electromagnetic Physics, Cross section, p ionisation, K shell |
---|
| 40 | // Further documentation available from http://www.ge.infn.it/geant4/lowE |
---|
| 41 | // ------------------------------------------------------------------- |
---|
| 42 | |
---|
| 43 | |
---|
| 44 | #include "globals.hh" |
---|
| 45 | #include "G4teoCrossSection.hh" |
---|
| 46 | //#include "G4AtomicTransitionManager.hh" |
---|
| 47 | //#include "G4NistManager.hh" |
---|
| 48 | #include "G4Proton.hh" |
---|
| 49 | //#include "G4Alpha.hh" |
---|
| 50 | //#include <math.h> |
---|
| 51 | |
---|
| 52 | G4teoCrossSection::G4teoCrossSection(G4String shellModel = "ecpssr") |
---|
| 53 | :totalCS(0) |
---|
| 54 | { |
---|
| 55 | |
---|
| 56 | if (shellModel == "ecpssr") { |
---|
| 57 | |
---|
| 58 | ecpssrShellK = new G4ecpssrKCrossSection(); |
---|
| 59 | |
---|
| 60 | ecpssrShellLi = new G4ecpssrLiCrossSection(); |
---|
| 61 | } |
---|
| 62 | else { |
---|
| 63 | |
---|
| 64 | G4cout << "G4teoCrossSection: sorry, only ECPSSR model available at the moment" << G4endl; |
---|
| 65 | |
---|
| 66 | ecpssrShellK = new G4ecpssrKCrossSection(); |
---|
| 67 | |
---|
| 68 | ecpssrShellLi = new G4ecpssrLiCrossSection(); |
---|
| 69 | |
---|
| 70 | } |
---|
| 71 | |
---|
| 72 | |
---|
| 73 | } |
---|
| 74 | |
---|
| 75 | G4teoCrossSection::~G4teoCrossSection() |
---|
| 76 | { |
---|
| 77 | |
---|
| 78 | delete ecpssrShellK; |
---|
| 79 | delete ecpssrShellLi; |
---|
| 80 | |
---|
| 81 | } |
---|
| 82 | |
---|
| 83 | std::vector<G4double> G4teoCrossSection::GetCrossSection(G4int Z, |
---|
| 84 | G4double incidentEnergy, |
---|
| 85 | G4double mass, |
---|
| 86 | G4double deltaEnergy, |
---|
| 87 | G4bool testFlag) const |
---|
| 88 | { |
---|
| 89 | |
---|
| 90 | deltaEnergy = 0; |
---|
| 91 | testFlag = 0; |
---|
| 92 | |
---|
| 93 | |
---|
| 94 | std::vector<G4double> crossSections; |
---|
| 95 | |
---|
| 96 | crossSections.push_back( ecpssrShellK->CalculateCrossSection(Z, mass, incidentEnergy) ); |
---|
| 97 | |
---|
| 98 | // G4Proton* aProtone = G4Proton::Proton(); |
---|
| 99 | |
---|
| 100 | // if (mass == aProtone->GetPDGMass() ) { |
---|
| 101 | |
---|
| 102 | |
---|
| 103 | // } |
---|
| 104 | |
---|
| 105 | crossSections.push_back( ecpssrShellLi->CalculateL1CrossSection(Z, mass, incidentEnergy) ); |
---|
| 106 | crossSections.push_back( ecpssrShellLi->CalculateL2CrossSection(Z, mass, incidentEnergy) ); |
---|
| 107 | crossSections.push_back( ecpssrShellLi->CalculateL3CrossSection(Z, mass, incidentEnergy) ); |
---|
| 108 | |
---|
| 109 | |
---|
| 110 | return crossSections; |
---|
| 111 | |
---|
| 112 | } |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | |
---|
| 117 | std::vector<G4double> G4teoCrossSection::Probabilities(G4int Z, |
---|
| 118 | G4double incidentEnergy, |
---|
| 119 | G4double mass, |
---|
| 120 | G4double deltaEnergy) const |
---|
| 121 | { |
---|
| 122 | |
---|
| 123 | std::vector<G4double> crossSections = GetCrossSection(Z, incidentEnergy, mass, deltaEnergy); |
---|
| 124 | |
---|
| 125 | for (size_t i=0; i<crossSections.size(); i++ ) { |
---|
| 126 | |
---|
| 127 | if (totalCS) { |
---|
| 128 | crossSections[i] = crossSections[i]/totalCS; |
---|
| 129 | } |
---|
| 130 | |
---|
| 131 | } |
---|
| 132 | |
---|
| 133 | return crossSections; |
---|
| 134 | |
---|
| 135 | } |
---|
| 136 | |
---|
| 137 | |
---|
| 138 | void G4teoCrossSection::SetTotalCS(G4double val){ |
---|
| 139 | |
---|
| 140 | totalCS = val; |
---|
| 141 | |
---|
| 142 | } |
---|
| 143 | |
---|
| 144 | |
---|
| 145 | |
---|