Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4IonLHEPPhysics.cc
Go to the documentation of this file.
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$
27//
28//---------------------------------------------------------------------------
29//
30// ClassName: G4IonLHEPPhysics
31//
32// Author: A.Ribon 16-Oct-2012
33// Copied from the original G4IonPhysics and renamed.
34//
35// Modified:
36//
37//----------------------------------------------------------------------------
38//
39
40#include "G4IonLHEPPhysics.hh"
41
44
47
49#include "G4LEAlphaInelastic.hh"
50
52#include "G4ParticleTable.hh"
53#include "G4ProcessManager.hh"
54
55// Nuclei
56#include "G4IonConstructor.hh"
57#include "G4BuilderType.hh"
58
60
61// factory
63//
65
67 : G4VPhysicsConstructor("IonPhysics")
68 , wasActivated(false)
69{
70 G4HadronicDeprecate("G4IonLHEPPhysics");
72 fDeuteronProcess = 0;
73 fDeuteronModel = 0;
74 fTritonProcess = 0;
75 fTritonModel = 0;
76 fAlphaProcess = 0;
77 fAlphaModel = 0;
78}
79
81 : G4VPhysicsConstructor(name), wasActivated(false)
82{
83 G4HadronicDeprecate("G4IonLHEPPhysics");
85 fDeuteronProcess = 0;
86 fDeuteronModel = 0;
87 fTritonProcess = 0;
88 fTritonModel = 0;
89 fAlphaProcess = 0;
90 fAlphaModel = 0;
91}
92
94{
95 if(wasActivated) {
96
97 delete fDeuteronProcess;
98 delete fDeuteronModel;
99 delete fTritonProcess;
100 delete fTritonModel;
101 delete fAlphaProcess;
102 delete fAlphaModel;
103
104 }
105 }
106
108{
109 G4ProcessManager * pManager = 0;
110
111 // Deuteron
113 // add process
114 fDeuteronModel = new G4LEDeuteronInelastic();
115 fDeuteronProcess = new G4DeuteronInelasticProcess();
116 fDeuteronProcess->RegisterMe(fDeuteronModel);
117 pManager->AddDiscreteProcess(fDeuteronProcess);
118
119 // Triton
120 pManager = G4Triton::Triton()->GetProcessManager();
121 // add process
122 fTritonModel = new G4LETritonInelastic();
123 fTritonProcess = new G4TritonInelasticProcess();
124 fTritonProcess->RegisterMe(fTritonModel);
125 pManager->AddDiscreteProcess(fTritonProcess);
126
127 // Alpha
128 pManager = G4Alpha::Alpha()->GetProcessManager();
129 // add process
130 fAlphaModel = new G4LEAlphaInelastic();
131 fAlphaProcess = new G4AlphaInelasticProcess();
132 fAlphaProcess->RegisterMe(fAlphaModel);
133 pManager->AddDiscreteProcess(fAlphaProcess);
134
135 wasActivated = true;
136}
137
139 {
140 // Construct light ions
141 G4IonConstructor pConstructor;
142 pConstructor.ConstructParticle();
143 }
@ bIons
#define G4HadronicDeprecate(name)
#define G4_DECLARE_PHYSCONSTR_FACTORY(physics_constructor)
int G4int
Definition: G4Types.hh:66
static G4Alpha * Alpha()
Definition: G4Alpha.cc:89
static G4Deuteron * Deuteron()
Definition: G4Deuteron.cc:94
void RegisterMe(G4HadronicInteraction *a)
static void ConstructParticle()
G4IonLHEPPhysics(G4int verbose=1)
virtual ~G4IonLHEPPhysics()
virtual void ConstructProcess()
virtual void ConstructParticle()
G4ProcessManager * GetProcessManager() const
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
static G4Triton * Triton()
Definition: G4Triton.cc:95