Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4QInelasticCHIPS_HPBuilder Class Reference

#include <G4QInelasticCHIPS_HPBuilder.hh>

Public Member Functions

 G4QInelasticCHIPS_HPBuilder (G4int verbose)
 
virtual ~G4QInelasticCHIPS_HPBuilder ()
 
void Build ()
 

Protected Attributes

G4ParticleTabletheParticleTable
 
G4ParticleTable::G4PTblDicIteratortheParticleIterator
 

Detailed Description

Definition at line 72 of file G4QInelasticCHIPS_HPBuilder.hh.

Constructor & Destructor Documentation

◆ G4QInelasticCHIPS_HPBuilder()

G4QInelasticCHIPS_HPBuilder::G4QInelasticCHIPS_HPBuilder ( G4int  verbose)

Definition at line 51 of file G4QInelasticCHIPS_HPBuilder.cc.

51 :
52 verbose(ver)
53 , wasActivated(false)
54 , inelastic(0)
55 , theInProcessMixer(0)
56 , theNgProcessMixer(0)
57 , theFiProcessMixer(0)
58 , theNeutronInelastic(0)
59 , theNeutronFission(0)
60 , theNeutronCapture(0)
61 , theCHIPSInelastic(0)
62 , theCHIPSNGamma(0)
63 , theHPNeutron(0)
64{
65 // pointer to the particle table
68}
G4PTblDicIterator * GetIterator()
static G4ParticleTable * GetParticleTable()
G4ParticleTable::G4PTblDicIterator * theParticleIterator

◆ ~G4QInelasticCHIPS_HPBuilder()

G4QInelasticCHIPS_HPBuilder::~G4QInelasticCHIPS_HPBuilder ( )
virtual

Definition at line 70 of file G4QInelasticCHIPS_HPBuilder.cc.

71{
72 if(wasActivated)
73 {
74 delete inelastic;
75 delete theCHIPSInelastic;
76 delete theCHIPSNGamma;
77 //delete theCHIPSFission;
78 delete theNeutronInelastic;
79 delete theNeutronCapture;
80 delete theNeutronFission;
81 delete theHPNeutron;
82 delete theInProcessMixer;
83 delete theNgProcessMixer;
84 delete theFiProcessMixer;
85 }
86}

Member Function Documentation

◆ Build()

void G4QInelasticCHIPS_HPBuilder::Build ( )

Definition at line 88 of file G4QInelasticCHIPS_HPBuilder.cc.

89{
90 if(wasActivated) return;
91 wasActivated = true;
93 inelastic = new G4QInelastic();
94 while( (*theParticleIterator)() )
95 {
97 G4String pname = particle->GetParticleName();
98 if(pname == "kaon-" || pname == "kaon+" || pname == "kaon0S" || pname == "kaon0L" ||
99 //pname == "pi-" || pname == "pi+" || pname == "neutron" || pname == "proton" ||
100 pname == "pi-" || pname == "pi+" || pname == "proton" ||
101 pname == "lambda" || pname == "sigma+" || pname == "sigma0" ||
102 pname == "sigma-" || pname == "xi0" || pname == "xi-" || pname == "omega-" ||
103 pname == "anti_proton" || pname == "anti_neutron" || pname == "anti_lambda" ||
104 pname == "anti_sigma+" || pname == "anti_sigma0" || pname == "anti_sigma-" ||
105 pname == "anti_xi0" || pname == "anti_xi-" || pname == "anti_omega-" )
106 {
107 if(verbose>1)
108 G4cout<< "__G4QInelCHIPS_HPBuilder: "<< pname <<" is defined here"<<G4endl;
109 G4ProcessManager* pmanager = particle->GetProcessManager();
110 pmanager->AddDiscreteProcess(inelastic);
111 if(verbose>1)G4cout<<"###>G4QInelasticCHIPS_HPBuilder: "<<inelastic->GetProcessName()
112 <<" is added for "<<pname<<G4endl;
113 }
114 else if(pname == "neutron")
115 {
116 if(verbose>1)
117 G4cout<< "__G4QInelCHIPS_HPBuilder: "<< pname <<" is defined here"<<G4endl;
118 G4ProcessManager* pmanager = particle->GetProcessManager();
119 // The model definition for neutrons (needed for HP implementation)
120#ifdef debug
121 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: before NeutronBuild"<<G4endl;
122#endif
123 theCHIPSInelastic = new G4QInelastic();
124 theCHIPSNGamma = new G4QNGamma();
125 //theCHIPSFission = new G4QFission();
126 theNeutronInelastic = new G4NeutronInelasticProcess();
127 theNeutronCapture = new G4HadronCaptureProcess();
128 theNeutronFission = new G4HadronFissionProcess();
129 theInProcessMixer = new G4QDiscProcessMixer("Mixed NeutronInelastic", particle);
130 theNgProcessMixer = new G4QDiscProcessMixer("Mixed NGamma", particle);
131 theFiProcessMixer = new G4QDiscProcessMixer("Mixed NFission", particle);
132#ifdef debug
133 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: before Build HP processes"<<G4endl;
134#endif
135 theHPNeutron = new G4NeutronHPBuilder;
136 theHPNeutron->Build(theNeutronInelastic);
137 theHPNeutron->Build(theNeutronCapture);
138 theHPNeutron->Build(theNeutronFission);
139#ifdef debug
140 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: before QIn="<<theCHIPSInelastic<<G4endl;
141#endif
142 theInProcessMixer->AddDiscreteProcess(theCHIPSInelastic, 1.E8*megaelectronvolt);
143#ifdef debug
144 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: befr HPI="<<theNeutronInelastic<<G4endl;
145#endif
146 theInProcessMixer->AddDiscreteProcess(theNeutronInelastic, 19.9*megaelectronvolt);
147
148#ifdef debug
149 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: before QNG="<<theCHIPSNGamma<<G4endl;
150#endif
151 theNgProcessMixer->AddDiscreteProcess(theCHIPSNGamma, 1.E8*megaelectronvolt);
152#ifdef debug
153 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: before HPC="<<theNeutronCapture<<G4endl;
154#endif
155 theNgProcessMixer->AddDiscreteProcess(theNeutronCapture, 19.9*megaelectronvolt);
156
157 //theFiProcessMixer->AddDiscreteProcess(theCHIPSFission, 1.E8*megaelectronvolt);
158 //theFiProcessMixer->AddDiscreteProcess(theNeutronFission, 19.9*megaelectronvolt);
159
160#ifdef debug
161 G4cout<<"G4QInelasticCHIPS_HPBuilder::Build: before ProcessAdd"<<G4endl;
162#endif
163 pmanager->AddDiscreteProcess(theInProcessMixer); // Mix CHIPS+HP for neutronInelastic
164 if(verbose>1)
165 G4cout<<"###>G4QInelasticCHIPS_HPBuilder: "<<theCHIPSInelastic->GetProcessName()
166 <<" is added for "<<pname<<G4endl;
167 pmanager->AddDiscreteProcess(theNgProcessMixer); // Mix CHIPS+HP for (n,gamma)
168 if(verbose>1)
169 G4cout<<"###>G4QInelasticCHIPS_HPBuilder: "<<theCHIPSNGamma->GetProcessName()
170 <<" is added for "<<pname<<G4endl;
171 pmanager->AddDiscreteProcess(theNeutronFission); // Only HP for fission
172 //pmanager->AddDiscreteProcess(theFiProcessMixer); // Mix CHIPS+HP for fission
173 if(verbose>1)
174 G4cout<<"###>G4QInelasticCHIPS_HPBuilder: "<<theNeutronFission->GetProcessName()
175 <<" is added for "<<pname<<G4endl;
176 }
177 }
178}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
virtual void Build(G4HadronElasticProcess *aP)
G4ProcessManager * GetProcessManager() const
const G4String & GetParticleName() const
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
void AddDiscreteProcess(G4VDiscreteProcess *DP, G4double MaxE)
const G4String & GetProcessName() const
Definition: G4VProcess.hh:379

Referenced by HadronPhysicsCHIPS_HP::ConstructProcess().

Member Data Documentation

◆ theParticleIterator

G4ParticleTable::G4PTblDicIterator* G4QInelasticCHIPS_HPBuilder::theParticleIterator
protected

Definition at line 84 of file G4QInelasticCHIPS_HPBuilder.hh.

Referenced by Build(), and G4QInelasticCHIPS_HPBuilder().

◆ theParticleTable

G4ParticleTable* G4QInelasticCHIPS_HPBuilder::theParticleTable
protected

Definition at line 83 of file G4QInelasticCHIPS_HPBuilder.hh.

Referenced by G4QInelasticCHIPS_HPBuilder().


The documentation for this class was generated from the following files: