Geant4
10.02.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ExUCNExtraPhysics.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: ExUCNExtraPhysics.cc 69762 2013-05-14 08:08:54Z gcosmo $
27
//
30
//
31
//
32
#include "
G4ParticleDefinition.hh
"
33
#include "
G4ProcessManager.hh
"
34
35
#include "
G4Transportation.hh
"
36
37
#include "
G4Decay.hh
"
38
#include "
G4DecayTable.hh
"
39
#include "
G4NeutronBetaDecayChannel.hh
"
40
41
#include "
G4UserSpecialCuts.hh
"
42
#include "
G4StepLimiter.hh
"
43
#include "
G4SystemOfUnits.hh
"
44
45
#include "
G4UCNLoss.hh
"
46
#include "
G4UCNAbsorption.hh
"
47
#include "
G4UCNMultiScattering.hh
"
48
#include "
G4UCNBoundaryProcess.hh
"
49
50
#include "
ExUCNExtraPhysics.hh
"
51
52
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
53
54
ExUCNExtraPhysics::ExUCNExtraPhysics
()
55
:
G4VPhysicsConstructor
(
"Extra"
) {;}
56
57
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
58
59
ExUCNExtraPhysics::~ExUCNExtraPhysics
() {;}
60
61
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
62
63
void
ExUCNExtraPhysics::ConstructParticle
() {;}
64
65
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
66
67
void
ExUCNExtraPhysics::ConstructProcess
()
68
{
69
aParticleIterator
->reset();
70
71
while
((*
aParticleIterator
)()) {
72
G4ParticleDefinition
* particle =
aParticleIterator
->value();
73
G4ProcessManager
* pmanager = particle->
GetProcessManager
();
74
G4String
particleName = particle->
GetParticleName
();
75
76
if
(!pmanager) {
77
std::ostringstream o;
78
o <<
"Particle "
<< particleName <<
"without a Process Manager"
;
79
G4Exception
(
"ExUCNExtraPhysics::ConstructProcess()"
,
""
,
80
FatalException
,o.str().c_str());
81
}
82
83
pmanager->
AddDiscreteProcess
(
new
G4StepLimiter
());
84
pmanager->
AddDiscreteProcess
(
new
G4UserSpecialCuts
());
85
}
86
87
ConstructUCN
();
88
89
// G4Transportation::EnableUseMagneticMoment();
90
91
}
92
93
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
94
95
void
ExUCNExtraPhysics::ConstructUCN
()
96
{
97
aParticleIterator
->reset();
98
G4ProcessManager
* pmanager = NULL;
99
100
while
((*
aParticleIterator
)()) {
101
G4ParticleDefinition
* particle =
aParticleIterator
->value();
102
pmanager = particle->
GetProcessManager
();
103
G4String
particleName = particle->
GetParticleName
();
104
105
if
(!pmanager) {
106
std::ostringstream o;
107
o <<
"Particle "
<< particleName <<
"without a Process Manager"
;
108
G4Exception
(
"ExUCNExtraPhysics::ConstructProcess()"
,
""
,
109
FatalException
,o.str().c_str());
110
}
111
112
if
(particleName ==
"neutron"
) {
113
pmanager->
AddDiscreteProcess
(
new
G4UCNLoss
());
114
pmanager->
AddDiscreteProcess
(
new
G4UCNAbsorption
());
115
pmanager->
AddDiscreteProcess
(
new
G4UCNMultiScattering
());
116
117
G4UCNBoundaryProcess
* ucnBoundaryProcess =
118
new
G4UCNBoundaryProcess
();
119
ucnBoundaryProcess->
SetMicroRoughness
(
true
);
120
ucnBoundaryProcess->
SetVerboseLevel
(0);
121
122
pmanager->
AddDiscreteProcess
(ucnBoundaryProcess);
123
}
124
}
125
}
126
127
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
ExUCNExtraPhysics::ExUCNExtraPhysics
ExUCNExtraPhysics()
Definition:
ExUCNExtraPhysics.cc:54
ExUCNExtraPhysics.hh
Definition of the ExUCNExtraPhysics class.
G4UserSpecialCuts.hh
G4UCNAbsorption.hh
G4UserSpecialCuts
Definition:
G4UserSpecialCuts.hh:47
ExUCNExtraPhysics::ConstructProcess
virtual void ConstructProcess()
Definition:
ExUCNExtraPhysics.cc:67
G4ProcessManager::AddDiscreteProcess
G4int AddDiscreteProcess(G4VProcess *aProcess, G4int ord=ordDefault)
G4UCNLoss
Definition:
G4UCNLoss.hh:66
G4Transportation.hh
G4ParticleDefinition
Definition:
G4ParticleDefinition.hh:111
G4ParticleDefinition::GetProcessManager
G4ProcessManager * GetProcessManager() const
G4UCNBoundaryProcess.hh
G4ParticleDefinition::GetParticleName
const G4String & GetParticleName() const
Definition:
G4ParticleDefinition.hh:159
ExUCNExtraPhysics::ConstructParticle
virtual void ConstructParticle()
Definition:
ExUCNExtraPhysics.cc:63
G4UCNMultiScattering
Definition:
G4UCNMultiScattering.hh:66
G4UCNBoundaryProcess
Definition:
G4UCNBoundaryProcess.hh:83
aParticleIterator
#define aParticleIterator
Definition:
G4VPhysicsConstructor.hh:119
G4UCNBoundaryProcess::SetMicroRoughness
void SetMicroRoughness(G4bool)
Definition:
G4UCNBoundaryProcess.hh:242
G4Decay.hh
G4ProcessManager.hh
G4ParticleDefinition.hh
G4UCNAbsorption
Definition:
G4UCNAbsorption.hh:66
G4StepLimiter.hh
G4StepLimiter
Definition:
G4StepLimiter.hh:45
G4Exception
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition:
G4Exception.cc:41
FatalException
Definition:
G4ExceptionSeverity.hh:60
G4UCNLoss.hh
G4ProcessManager
Definition:
G4ProcessManager.hh:106
ExUCNExtraPhysics::~ExUCNExtraPhysics
virtual ~ExUCNExtraPhysics()
Definition:
ExUCNExtraPhysics.cc:59
ExUCNExtraPhysics::ConstructUCN
void ConstructUCN()
Definition:
ExUCNExtraPhysics.cc:95
G4SystemOfUnits.hh
G4UCNMultiScattering.hh
G4DecayTable.hh
G4VPhysicsConstructor
Definition:
G4VPhysicsConstructor.hh:121
G4VProcess::SetVerboseLevel
void SetVerboseLevel(G4int value)
Definition:
G4VProcess.hh:437
G4NeutronBetaDecayChannel.hh
G4String
Definition:
G4String.hh:45
geant4.10.02.p02
examples
extended
exoticphysics
ucn
src
ExUCNExtraPhysics.cc
Generated on Fri Jul 1 2016 14:10:49 for Geant4 by
1.8.8