BOSS 7.0.3
BESIII Offline Software System
Loading...
Searching...
No Matches
ExthIonisation.cxx
Go to the documentation of this file.
1//
2// ********************************************************************
3// * DISCLAIMER *
4// * *
5// * The following disclaimer summarizes all the specific disclaimers *
6// * of contributors to this software. The specific disclaimers,which *
7// * govern, are listed with their locations in: *
8// * http://cern.ch/geant4/license *
9// * *
10// * Neither the authors of this software system, nor their employing *
11// * institutes,nor the agencies providing financial support for this *
12// * work make any representation or warranty, express or implied, *
13// * regarding this software system or assume any liability for its *
14// * use. *
15// * *
16// * This code implementation is the intellectual property of the *
17// * GEANT4 collaboration. *
18// * By copying, distributing or modifying the Program (or any work *
19// * based on the Program) you indicate your acceptance of this *
20// * statement, and all its terms. *
21// ********************************************************************
22//
23// $Id: ExthIonisation.cxx,v 1.8 2015/10/27 11:02:53 sunss Exp $
24// GEANT4 tag $Name: TrkExtAlg-00-00-64 $
25//
26// -------------------------------------------------------------------
27//
28// GEANT4 Class file
29//
30//
31// File name: G4hIonisation
32//
33// Author: Laszlo Urban
34//
35// Creation date: 30.05.1997
36//
37// Modifications:
38//
39// corrected by L.Urban on 24/09/97
40// several bugs corrected by L.Urban on 13/01/98
41// 07-04-98 remove 'tracking cut' of the ionizing particle, mma
42// 22-10-98 cleanup L.Urban
43// 02-02-99 bugs fixed , L.Urban
44// 29-07-99 correction in BuildLossTable for low energy, L.Urban
45// 10-02-00 modifications , new e.m. structure, L.Urban
46// 10-08-00 V.Ivanchenko change BuildLambdaTable, in order to
47// simulate energy losses of ions; correction to
48// cross section for particles with spin 1 is inserted as well
49// 28-05-01 V.Ivanchenko minor changes to provide ANSI -wall compilation
50// 10-08-01 new methods Store/Retrieve PhysicsTable (mma)
51// 14-08-01 new function ComputeRestrictedMeandEdx() + 'cleanup' (mma)
52// 29-08-01 PostStepDoIt: correction for spin 1/2 (instead of 1) (mma)
53// 17-09-01 migration of Materials to pure STL (mma)
54// 25-09-01 completion of RetrievePhysicsTable() (mma)
55// 29-10-01 all static functions no more inlined
56// 08-11-01 Charge renamed zparticle; added to the dedx
57// 27-03-02 Bug fix in scaling of lambda table (V.Ivanchenko)
58// 09-04-02 Update calculation of tables for GenericIons (V.Ivanchenko)
59// 30-04-02 V.Ivanchenko update to new design
60// 04-12-02 Add verbose level definition (VI)
61// 23-12-02 Change interface in order to move to cut per region (V.Ivanchenko)
62// 26-12-02 Secondary production moved to derived classes (V.Ivanchenko)
63// 13-02-03 SubCutoff regime is assigned to a region (V.Ivanchenko)
64// 23-05-03 Define default integral + BohrFluctuations (V.Ivanchenko)
65// 03-06-03 Fix initialisation problem for STD ionisation (V.Ivanchenko)
66// 04-08-03 Set integral=false to be default (V.Ivanchenko)
67// 08-08-03 STD substitute standard (V.Ivanchenko)
68// 12-11-03 G4EnergyLossSTD -> G4EnergyLossProcess (V.Ivanchenko)
69// 27-05-04 Set integral to be a default regime (V.Ivanchenko)
70// ------------------------------------------------------------------------------------
71// 15-04-05 Omit the correction of momentum direction due to production of secenderies.
72// This is needed for my Track Extrapotation. (L.L.Wang)
73//
74// -------------------------------------------------------------------
75// 08-11-04 Migration to new interface of Store/Retrieve tables (V.Ivantchenko)
76// 24-03-05 Optimize internal interfaces (V.Ivantchenko)
77//
78//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
79//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
80
81#include "TrkExtAlg/ExthIonisation.h"
82#include "G4Electron.hh"
83#include "G4Proton.hh"
84#include "G4AntiProton.hh"
85#include "G4BraggModel.hh"
86#include "G4BetheBlochModel.hh"
87#include "G4UniversalFluctuation.hh"
88#include "G4BohrFluctuations.hh"
89#include "G4UnitsTable.hh"
90
91//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
92
93ExthIonisation::ExthIonisation(const G4String& name)
94 : G4VEnergyLossProcess(name),
95 theParticle(0),
96 theBaseParticle(0),
97 isInitialised(false)
98{
99 SetDEDXBinning(120);
100 SetLambdaBinning(120);
101 SetMinKinEnergy(0.1*keV);
102 SetMaxKinEnergy(100.0*TeV);
103 SetVerboseLevel(0);
104 SetLossFluctuations(false);
105 mass = 0.0;
106 ratio = 0.0;
107}
108
109//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
110
112{}
113
114//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
115
116void ExthIonisation::InitialiseEnergyLossProcess(const G4ParticleDefinition* part,
117 const G4ParticleDefinition* bpart)
118{
119 if(isInitialised) return;
120
121 theParticle = part;
122
123 if(part == bpart || part == G4Proton::Proton()) theBaseParticle = 0;
124 else if(bpart == 0) theBaseParticle = G4Proton::Proton();
125 else theBaseParticle = bpart;
126
127 SetBaseParticle(theBaseParticle);
128 SetSecondaryParticle(G4Electron::Electron());
129 mass = theParticle->GetPDGMass();
130 ratio = electron_mass_c2/mass;
131
132 G4VEmModel* em = new G4BraggModel();
133 em->SetLowEnergyLimit(0.1*keV);
134 eth = 2.0*MeV*mass/proton_mass_c2;
135 em->SetHighEnergyLimit(eth);
136
137 flucModel = new G4UniversalFluctuation();
138
139 AddEmModel(1, em, flucModel);
140 G4VEmModel* em1 = new G4BetheBlochModel();
141 em1->SetLowEnergyLimit(eth);
142 em1->SetHighEnergyLimit(100.0*TeV);
143 AddEmModel(2, em1, flucModel);
144
145 SetStepFunction(0.2, 1.0*mm);
146
147 isInitialised = true;
148}
149
150//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
151
153{
154 G4cout << " Bether-Bloch model for Escaled > 2 MeV, "
155 << "parametrisation of Bragg peak below, "
156 << "Integral mode " << IsIntegral()
157 << G4endl;
158}
159
160//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
virtual void InitialiseEnergyLossProcess(const G4ParticleDefinition *, const G4ParticleDefinition *)
virtual void PrintInfo()
ExthIonisation(const G4String &name="ExthIoni")