source: trunk/source/processes/electromagnetic/lowenergy/src/G4teoCrossSection.cc

Last change on this file was 1347, checked in by garnier, 15 years ago

geant4 tag 9.4

File size: 4.1 KB
Line 
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.8 2010/11/22 22:48:30 mantero Exp $
27// GEANT4 tag $Name: geant4-09-04-ref-00 $
28//
29//
30//
31// History:
32// -----------
33// 21 Apr 2009 ALF 1st implementation
34// 29 Apr 2009 ALF Updated Desing for Integration
35//
36// -------------------------------------------------------------------
37// Class description:
38// Low Energy Electromagnetic Physics, Cross section, p ionisation, K shell
39// Further documentation available from http://www.ge.infn.it/geant4/lowE
40// -------------------------------------------------------------------
41
42
43#include "globals.hh"
44#include "G4teoCrossSection.hh"
45//#include "G4AtomicTransitionManager.hh"
46//#include "G4NistManager.hh"
47#include "G4Proton.hh"
48//#include "G4Alpha.hh"
49//#include <math.h>
50
51G4teoCrossSection::G4teoCrossSection(G4String shellModel)
52 :totalCS(0)
53{
54
55 if (shellModel == "analytical") {
56
57
58 ecpssrShellK = new G4AnalyticalEcpssrKCrossSection();
59 ecpssrShellLi = new G4AnalyticalEcpssrLiCrossSection();
60
61 }
62}
63
64G4teoCrossSection::~G4teoCrossSection()
65{
66
67 delete ecpssrShellK;
68 delete ecpssrShellLi;
69
70}
71
72std::vector<G4double> G4teoCrossSection::GetCrossSection(G4int Z,
73 G4double incidentEnergy,
74 G4double mass,
75 G4double deltaEnergy,
76 G4bool testFlag) const
77{
78
79 deltaEnergy = 0;
80 testFlag = 0;
81
82
83 std::vector<G4double> crossSections;
84
85 crossSections.push_back( ecpssrShellK->CalculateCrossSection(Z, mass, incidentEnergy) );
86
87 // G4Proton* aProtone = G4Proton::Proton();
88
89 // if (mass == aProtone->GetPDGMass() ) {
90
91
92 // }
93
94 crossSections.push_back( ecpssrShellLi->CalculateL1CrossSection(Z, mass, incidentEnergy) );
95 crossSections.push_back( ecpssrShellLi->CalculateL2CrossSection(Z, mass, incidentEnergy) );
96 crossSections.push_back( ecpssrShellLi->CalculateL3CrossSection(Z, mass, incidentEnergy) );
97
98
99 return crossSections;
100
101}
102
103
104
105
106std::vector<G4double> G4teoCrossSection::Probabilities(G4int Z,
107 G4double incidentEnergy,
108 G4double mass,
109 G4double deltaEnergy) const
110{
111
112std::vector<G4double> crossSections = GetCrossSection(Z, incidentEnergy, mass, deltaEnergy);
113
114 for (size_t i=0; i<crossSections.size(); i++ ) {
115
116 if (totalCS) {
117 crossSections[i] = crossSections[i]/totalCS;
118 }
119
120 }
121
122 return crossSections;
123
124}
125
126
127void G4teoCrossSection::SetTotalCS(G4double val){
128
129 totalCS = val;
130 // G4cout << "totalXS set to: " << val / barn << " barns" << G4endl;
131}
132
133
134
Note: See TracBrowser for help on using the repository browser.