Geant4
9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4QInelasticCHIPSBuilder.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
// GEANT4 tag $Name: not supported by cvs2svn $
27
//
28
//---------------------------------------------------------------------------
29
//
30
// ClassName: G4QInelasticCHIPSBuilder
31
//
32
// Author: 2009 M. Kosov
33
//
34
//----------------------------------------------------------------------------
35
//
36
// Short comment: This is a physics list of only one model G4QInelastic for
37
// all hadron-nuclear interactions at all energies. There is no model- or
38
// process-mixing, while it is possible to merge (G4QProcessMixer) the G4_HP
39
// processes at low energies if the G4QInelastic, which includes all necessary
40
// nA inelastic processes, is found to be not saficient for some applications.
41
// In this particular builder the G4QInelastic process is attached to all
42
// hadrons other than nucleons or pi and K-mesons. Previously it could be done
43
// only using the LHEP parameterized package or in a temporary form by the
44
// QGSC model conditionally extended (just not crashing) to low energies.
45
// *** Important *** As the CHIPS treatment of all hadrons is the same, and
46
// very simple, this builder with time can be not used in the CHIPS physics list
47
//
48
// -----------------------------------------------------------------------------
49
#include "
G4QInelasticCHIPSBuilder.hh
"
50
51
G4QInelasticCHIPSBuilder::G4QInelasticCHIPSBuilder
(
G4int
ver):
52
verbose(ver), wasActivated(false), inelastic(0), nGamma(0)
53
{
54
// pointer to the particle table
55
theParticleTable
=
G4ParticleTable::GetParticleTable
();
56
theParticleIterator
=
theParticleTable
->
GetIterator
();
57
}
58
59
G4QInelasticCHIPSBuilder::~G4QInelasticCHIPSBuilder
()
60
{
61
if
(wasActivated)
delete
inelastic;
62
}
63
64
void
G4QInelasticCHIPSBuilder::Build
()
65
{
66
if
(wasActivated)
return
;
67
wasActivated =
true
;
68
theParticleIterator
->
reset
();
69
inelastic =
new
G4QInelastic
();
70
while
( (*
theParticleIterator
)() )
71
{
72
G4ParticleDefinition
* particle =
theParticleIterator
->
value
();
73
G4String
pname = particle->
GetParticleName
();
74
if
(pname ==
"kaon-"
|| pname ==
"kaon+"
|| pname ==
"kaon0S"
|| pname ==
"kaon0L"
||
75
pname ==
"pi-"
|| pname ==
"pi+"
|| pname ==
"neutron"
|| pname ==
"proton"
||
76
pname ==
"lambda"
|| pname ==
"sigma+"
|| pname ==
"sigma0"
||
77
pname ==
"sigma-"
|| pname ==
"xi0"
|| pname ==
"xi-"
|| pname ==
"omega-"
||
78
pname ==
"anti_proton"
|| pname ==
"anti_neutron"
|| pname ==
"anti_lambda"
||
79
pname ==
"anti_sigma+"
|| pname ==
"anti_sigma0"
|| pname ==
"anti_sigma-"
||
80
pname ==
"anti_xi0"
|| pname ==
"anti_xi-"
|| pname ==
"anti_omega-"
)
81
{
82
if
(verbose>1)
G4cout
<<
"__G4QInelCHIPSBuilder: "
<< pname <<
" is defined here"
<<
G4endl
;
83
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
84
pmanager->
AddDiscreteProcess
(inelastic);
85
if
(verbose>1)
G4cout
<<
"###> G4QInelasticCHIPSBuilder: "
<<inelastic->
GetProcessName
()
86
<<
" is added for "
<<pname<<
G4endl
;
87
}
88
}
89
}
90
91
// 2009 by M. Kosov
G4QInelasticCHIPSBuilder.hh
G4int
int G4int
Definition:
G4Types.hh:66
G4endl
#define G4endl
Definition:
G4ios.hh:52
G4cout
G4DLLIMPORT std::ostream G4cout
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:68
G4ParticleDefinition::GetProcessManager
G4ProcessManager * GetProcessManager() const
G4ParticleDefinition::GetParticleName
const G4String & GetParticleName() const
Definition:
G4ParticleDefinition.hh:115
G4ParticleTableIterator::reset
void reset()
Definition:
G4ParticleTableIterator.hh:70
G4ParticleTableIterator::value
V value() const
Definition:
G4ParticleTableIterator.hh:72
G4ParticleTable::GetIterator
G4PTblDicIterator * GetIterator()
G4ParticleTable::GetParticleTable
static G4ParticleTable * GetParticleTable()
Definition:
G4ParticleTable.cc:63
G4ProcessManager
Definition:
G4ProcessManager.hh:107
G4ProcessManager::AddDiscreteProcess
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4QInelasticCHIPSBuilder::Build
void Build()
Definition:
G4QInelasticCHIPSBuilder.cc:64
G4QInelasticCHIPSBuilder::theParticleTable
G4ParticleTable * theParticleTable
Definition:
G4QInelasticCHIPSBuilder.hh:74
G4QInelasticCHIPSBuilder::~G4QInelasticCHIPSBuilder
virtual ~G4QInelasticCHIPSBuilder()
Definition:
G4QInelasticCHIPSBuilder.cc:59
G4QInelasticCHIPSBuilder::G4QInelasticCHIPSBuilder
G4QInelasticCHIPSBuilder(G4int verbose)
Definition:
G4QInelasticCHIPSBuilder.cc:51
G4QInelasticCHIPSBuilder::theParticleIterator
G4ParticleTable::G4PTblDicIterator * theParticleIterator
Definition:
G4QInelasticCHIPSBuilder.hh:75
G4QInelastic
Definition:
G4QInelastic.hh:123
G4String
Definition:
G4String.hh:105
G4VProcess::GetProcessName
const G4String & GetProcessName() const
Definition:
G4VProcess.hh:379
geant4-v9.6.0
source
physics_lists
builders
src
G4QInelasticCHIPSBuilder.cc
Generated by
1.9.6