ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4alphaIonisation.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4alphaIonisation.cc
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 //
27 // -------------------------------------------------------------------
28 //
29 // GEANT4 Class file
30 //
31 //
32 // File name: G4alphaIonisation
33 //
34 // Author: Vladimir Ivanchenko
35 //
36 // Creation date: 28.10.2009 created from G4ionIonisation
37 //
38 // Modifications:
39 //
40 //
41 //
42 // -------------------------------------------------------------------
43 //
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
45 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
46 
47 #include "G4alphaIonisation.hh"
48 
49 #include "G4PhysicalConstants.hh"
50 #include "G4SystemOfUnits.hh"
51 #include "G4Electron.hh"
52 #include "G4Alpha.hh"
53 #include "G4BraggIonModel.hh"
54 #include "G4BetheBlochModel.hh"
55 #include "G4UnitsTable.hh"
56 #include "G4LossTableManager.hh"
57 #include "G4IonFluctuations.hh"
59 #include "G4EmParameters.hh"
60 
61 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
62 
63 using namespace std;
64 
66  : G4VEnergyLossProcess(name),
67  theParticle(nullptr),
68  isInitialised(false)
69 {
70  G4Exception("G4alphaIonisation::G4alphaIonisation","em0007",JustWarning,
71  " The process is not ready for use - incorrect results are expected");
72  SetLinearLossLimit(0.02);
74  mass = 0.0;
75  ratio = 0.0;
76  eth = 8*MeV;
77 }
78 
79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
80 
82 {}
83 
84 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
85 
87 {
88  return (!p.IsShortLived() &&
89  std::abs(p.GetPDGCharge()/CLHEP::eplus - 2) < 0.01);
90 }
91 
92 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
93 
95  const G4Material*,
96  G4double cut)
97 {
98  G4double x = 0.5*cut/electron_mass_c2;
99  G4double gam = x*ratio + std::sqrt((1. + x)*(1. + x*ratio*ratio));
100  return mass*(gam - 1.0);
101 }
102 
103 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
104 
106  const G4ParticleDefinition* part,
107  const G4ParticleDefinition* bpart)
108 {
109  if(!isInitialised) {
110 
111  theParticle = part;
112  G4String pname = part->GetParticleName();
113 
114  // define base particle
115  const G4ParticleDefinition* theBaseParticle = nullptr;
116  if(bpart == 0) {
117  if(pname != "alpha") { theBaseParticle = G4Alpha::Alpha(); }
118  } else { theBaseParticle = bpart; }
119 
120  mass = part->GetPDGMass();
122 
123  SetBaseParticle(theBaseParticle);
125 
126  if (!EmModel(0)) { SetEmModel(new G4BraggIonModel()); }
127 
129  G4double emin = param->MinKinEnergy();
130  EmModel(0)->SetLowEnergyLimit(emin);
131 
132  // model limit defined for alpha
133  eth = (EmModel(0)->HighEnergyLimit())*ratio;
135  AddEmModel(1, EmModel(0), new G4IonFluctuations());
136 
138 
139  if (!EmModel(1)) { SetEmModel(new G4BetheBlochModel()); }
142  AddEmModel(2, EmModel(1), FluctModel());
143 
144  isInitialised = true;
145  }
146 }
147 
148 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
149 
151 {}
152 
153 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
154 
155 void G4alphaIonisation::ProcessDescription(std::ostream& out) const
156 {
157  out << " Alpha ionisation";
159 }
160 
161 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....