35 #include "G4Material.hh" 37 #include "G4PEEffectFluoModel.hh" 38 #include "G4KleinNishinaCompton.hh" 39 #include "G4BetheHeitlerModel.hh" 41 #include "G4eeToTwoGammaModel.hh" 43 #include "G4MollerBhabhaModel.hh" 44 #include "G4SeltzerBergerModel.hh" 46 #include "G4BetheBlochModel.hh" 47 #include "G4BraggModel.hh" 49 #include "G4MuBetheBlochModel.hh" 50 #include "G4MuBremsstrahlungModel.hh" 51 #include "G4MuPairProductionModel.hh" 54 #include "G4UnitsTable.hh" 55 #include "G4SystemOfUnits.hh" 58 #include "G4Positron.hh" 59 #include "G4Electron.hh" 60 #include "G4Proton.hh" 61 #include "G4MuonPlus.hh" 63 #include "G4DataVector.hh" 64 #include "G4NistManager.hh" 65 #include "G4ParticleTable.hh" 69 G4UnitDefinition::BuildUnitsTable();
71 G4ParticleDefinition* gamma = G4Gamma::Gamma();
72 G4ParticleDefinition* posit = G4Positron::Positron();
73 G4ParticleDefinition* elec = G4Electron::Electron();
74 G4ParticleDefinition* prot = G4Proton::Proton();
75 G4ParticleDefinition* muon = G4MuonPlus::MuonPlus();
76 G4ParticleTable* partTable = G4ParticleTable::GetParticleTable();
77 partTable->SetReadiness();
80 cuts.push_back(1*keV);
84 G4Material* material =
85 G4NistManager::Instance()->FindOrBuildMaterial(
"G4_Fe");
87 G4cout << *(G4Material::GetMaterialTable()) << G4endl;
89 G4MaterialCutsCouple* couple =
new G4MaterialCutsCouple(material);
93 G4double
Z = material->GetZ();
94 G4double A = material->GetA();
98 G4VEmModel*
phot =
new G4PEEffectFluoModel();
99 G4VEmModel* comp =
new G4KleinNishinaCompton();
100 G4VEmModel* conv =
new G4BetheHeitlerModel();
101 phot->Initialise(gamma, cuts);
102 comp->Initialise(gamma, cuts);
103 conv->Initialise(gamma, cuts);
106 phot->SetCurrentCouple(couple);
110 G4double Emin = 1.01*MeV, Emax = 2.01*MeV, dE = 100*keV;
112 G4cout <<
"\n #### Gamma : CrossSectionPerAtom and MeanFreePath for " 113 << material->GetName() << G4endl;
114 G4cout <<
"\n Energy \t PhotoElec \t Compton \t Conversion \t";
115 G4cout <<
"\t PhotoElec \t Compton \t Conversion" << G4endl;
117 for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
118 G4cout <<
"\n " << G4BestUnit (Energy,
"Energy")
120 << G4BestUnit (phot->ComputeCrossSectionPerAtom(gamma,Energy,Z),
"Surface")
122 << G4BestUnit (comp->ComputeCrossSectionPerAtom(gamma,Energy,Z),
"Surface")
124 << G4BestUnit (conv->ComputeCrossSectionPerAtom(gamma,Energy,Z),
"Surface")
126 << G4BestUnit (phot->ComputeMeanFreePath(gamma,Energy,material),
"Length")
128 << G4BestUnit (comp->ComputeMeanFreePath(gamma,Energy,material),
"Length")
130 << G4BestUnit (conv->ComputeMeanFreePath(gamma,Energy,material),
"Length");
137 G4VEmModel* anni =
new G4eeToTwoGammaModel();
138 anni->Initialise(posit, cuts);
142 Emin = 1.01*MeV; Emax = 2.01*MeV; dE = 100*keV;
144 G4cout <<
"\n #### e+ annihilation : CrossSectionPerAtom and MeanFreePath" 145 <<
" for " << material->GetName() << G4endl;
146 G4cout <<
"\n Energy \t e+ annihil \t";
147 G4cout <<
"\t e+ annihil" << G4endl;
149 for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
150 G4cout <<
"\n " << G4BestUnit (Energy,
"Energy")
152 << G4BestUnit (anni->ComputeCrossSectionPerAtom(posit,Energy,Z),
"Surface")
154 << G4BestUnit (anni->ComputeMeanFreePath(posit,Energy,material),
"Length");
161 G4VEmModel* ioni =
new G4MollerBhabhaModel();
162 G4VEmModel* brem =
new G4SeltzerBergerModel();
163 ioni->Initialise(elec, cuts);
164 brem->Initialise(elec, cuts);
168 Emin = 1.01*MeV; Emax = 101.01*MeV; dE = 10*MeV;
169 G4double Ecut = 100*keV;
171 G4cout <<
"\n ####electron: CrossSection, MeanFreePath and StoppingPower" 172 <<
" for " << material->GetName()
173 <<
";\tEnergy cut = " << G4BestUnit (Ecut,
"Energy") << G4endl;
175 G4cout <<
"\n Energy \t ionization \t bremsstra \t";
176 G4cout <<
"\t ionization \t bremsstra \t";
177 G4cout <<
"\t ionization \t bremsstra" << G4endl;
179 for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
180 G4cout <<
"\n " << G4BestUnit (Energy,
"Energy")
182 << G4BestUnit (ioni->ComputeCrossSectionPerAtom(elec,Energy,Z,A,Ecut),
185 << G4BestUnit (brem->ComputeCrossSectionPerAtom(elec,Energy,Z,A,Ecut),
188 << G4BestUnit (ioni->ComputeMeanFreePath(elec,Energy,material,Ecut),
191 << G4BestUnit (brem->ComputeMeanFreePath(elec,Energy,material,Ecut),
194 << G4BestUnit (ioni->ComputeDEDXPerVolume(material,elec,Energy,Ecut),
197 << G4BestUnit (brem->ComputeDEDXPerVolume(material,elec,Energy,Ecut),
205 ioni =
new G4BetheBlochModel();
206 ioni->Initialise(prot, cuts);
210 Emin = 1.01*MeV; Emax = 102.01*MeV; dE = 10*MeV;
213 G4cout <<
"\n #### proton : CrossSection, MeanFreePath and StoppingPower" 214 <<
" for " << material->GetName()
215 <<
";\tEnergy cut = " << G4BestUnit (Ecut,
"Energy") << G4endl;
217 G4cout <<
"\n Energy \t ionization \t";
218 G4cout <<
"\t ionization \t";
219 G4cout <<
"\t ionization" << G4endl;
221 for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
222 G4cout <<
"\n " << G4BestUnit (Energy,
"Energy")
224 << G4BestUnit (ioni->ComputeCrossSectionPerAtom(prot,Energy,Z,A,Ecut),
227 << G4BestUnit (ioni->ComputeMeanFreePath(prot,Energy,material,Ecut),
230 << G4BestUnit (ioni->ComputeDEDXPerVolume(material,prot,Energy,Ecut),
237 ioni =
new G4BraggModel(prot);
238 ioni->Initialise(prot, cuts);
242 Emin = 1.1*keV; Emax = 2.01*MeV; dE = 300*keV;
245 G4cout <<
"\n #### proton : low energy model (Bragg) " 246 <<
";\tEnergy cut = " << G4BestUnit (Ecut,
"Energy") << G4endl;
248 G4cout <<
"\n Energy \t ionization \t";
249 G4cout <<
"\t ionization \t";
250 G4cout <<
"\t ionization" << G4endl;
252 for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
253 G4cout <<
"\n " << G4BestUnit (Energy,
"Energy")
255 << G4BestUnit (ioni->ComputeCrossSectionPerAtom(prot,Energy,Z,A,Ecut),
258 << G4BestUnit (ioni->ComputeMeanFreePath(prot,Energy,material,Ecut),
261 << G4BestUnit (ioni->ComputeDEDXPerVolume(material,prot,Energy,Ecut),
269 ioni =
new G4MuBetheBlochModel();
270 brem =
new G4MuBremsstrahlungModel();
271 G4VEmModel* pair =
new G4MuPairProductionModel();
272 ioni->Initialise(muon, cuts);
273 brem->Initialise(muon, cuts);
274 pair->Initialise(muon, cuts);
278 Emin = 1.01*GeV; Emax = 101.01*GeV; dE = 10*GeV;
281 G4cout <<
"\n ####muon: CrossSection and MeanFreePath for " 282 << material->GetName()
283 <<
";\tEnergy cut = " << G4BestUnit (Ecut,
"Energy") << G4endl;
285 G4cout <<
"\n Energy \t ionization \t bremsstra \t pair_prod \t";
286 G4cout <<
"\t ionization \t bremsstra \t pair_prod" << G4endl;
288 for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
289 G4cout <<
"\n " << G4BestUnit (Energy,
"Energy")
291 << G4BestUnit (ioni->ComputeCrossSectionPerAtom(muon,Energy,Z,A,Ecut),
294 << G4BestUnit (brem->ComputeCrossSectionPerAtom(muon,Energy,Z,A,Ecut),
297 << G4BestUnit (pair->ComputeCrossSectionPerAtom(muon,Energy,Z,A,Ecut),
300 << G4BestUnit (ioni->ComputeMeanFreePath(muon,Energy,material,Ecut),
303 << G4BestUnit (brem->ComputeMeanFreePath(muon,Energy,material,Ecut),
306 << G4BestUnit (pair->ComputeMeanFreePath(muon,Energy,material,Ecut),
312 G4cout <<
"\n ####muon: StoppingPower for " 313 << material->GetName()
314 <<
";\tEnergy cut = " << G4BestUnit (Ecut,
"Energy") << G4endl;
316 G4cout <<
"\n Energy \t ionization \t bremsstra \t pair_prod \t" << G4endl;
318 for (G4double Energy = Emin; Energy <= Emax; Energy += dE) {
319 G4cout <<
"\n " << G4BestUnit (Energy,
"Energy")
321 << G4BestUnit (ioni->ComputeDEDXPerVolume(material,muon,Energy,Ecut),
324 << G4BestUnit (brem->ComputeDEDXPerVolume(material,muon,Energy,Ecut),
327 << G4BestUnit (pair->ComputeDEDXPerVolume(material,muon,Energy,Ecut),
General LArSoft Utilities.