Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
processes
hadronic
models
cascade
cascade
include
G4CascadeInterface.hh
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
// Defines an interface to Bertini (BERT) cascade
28
// based on INUCL intra-nuclear transport.models
29
// with bullet hadron energy ~< 10 GeV
30
//
31
// 20100405 M. Kelsey -- Fix constness of op== and op!=
32
// 20100519 M. Kelsey -- Remove Collider data members
33
// 20100617 M. Kelsey -- Make G4InuclCollider a local data member
34
// 20100723 M. Kelsey -- Move G4CollisionOutput here for reuse
35
// 20100916 M. Kelsey -- Add functions to encapsulate ApplyYourself() actions,
36
// make colliders pointers (don't expose dependencies)
37
// 20100922 M. Kelsey -- Add functions to select de-excitation method
38
// 20110224 M. Kelsey -- Add createTarget() for use with Propagate(); split
39
// conservation law messages to separate function. Move verbose
40
// setting to .cc file, and apply to all member objects.
41
// 20110301 M. Kelsey -- Add copyPreviousCascade() for use with Propagate()
42
// along with new buffers and related particle-conversion
43
// functions. Encapulate buffer deletion in clear()
44
// 20110303 M. Kelsey -- Change "bulletList" name to "inputFragments"
45
// 20110304 M. Kelsey -- Drop conversion of Propagate() arguments; pass
46
// directly to collider for processing. Rename makeReactionProduct
47
// to makeDynamicParticle.
48
// 20110502 M. Kelsey -- Add filename string to capture random seeds.
49
// 20110720 M. Kelsey -- Discard elastic-cut array (no longer needed),
50
// discard local "theFinalState" (avail in base class).
51
// 20110801 M. Kelsey -- Make bullet and target buffers local objects (with
52
// hadron and nucleus versions) to reduce memory churn
53
// 20120522 M. Kelsey -- Implement base class IsApplicable, and add overloaded
54
// version which takes G4ParticleDefintion, a la G4VProcess.
55
// 20120822 M. Kelsey -- Add function to dump user configuration settings.
56
// Remove local verboseLevel; shadows base class data member.
57
58
#ifndef G4CASCADEINTERFACE_H
59
#define G4CASCADEINTERFACE_H 1
60
61
#include "
G4VIntraNuclearTransportModel.hh
"
62
#include "
G4FragmentVector.hh
"
63
#include "
G4InuclElementaryParticle.hh
"
64
#include "
G4InuclNuclei.hh
"
65
#include "
G4LorentzRotation.hh
"
66
#include "
G4Nucleon.hh
"
67
#include "
G4Nucleus.hh
"
68
#include "
G4ParticleChange.hh
"
69
#include "
G4ReactionProduct.hh
"
70
#include "
G4ReactionProductVector.hh
"
71
#include <vector>
72
73
class
G4CascadParticle
;
74
class
G4CascadeCheckBalance
;
75
class
G4CollisionOutput
;
76
class
G4DynamicParticle
;
77
class
G4HadFinalState
;
78
class
G4InuclCollider
;
79
class
G4InuclParticle
;
80
class
G4ParticleDefinition
;
81
class
G4V3DNucleus
;
82
83
84
class
G4CascadeInterface
:
public
G4VIntraNuclearTransportModel
{
85
86
public
:
87
G4CascadeInterface
(
const
G4String
&
name
=
"BertiniCascade"
);
88
89
virtual
~G4CascadeInterface
();
90
91
G4ReactionProductVector
*
Propagate
(
G4KineticTrackVector
* theSecondaries,
92
G4V3DNucleus
* theNucleus);
93
94
G4HadFinalState
*
ApplyYourself
(
const
G4HadProjectile
& aTrack,
95
G4Nucleus
& theNucleus);
96
97
void
SetVerboseLevel
(
G4int
verbose);
// Overrides base class
98
99
G4bool
IsApplicable
(
const
G4HadProjectile
& aTrack,
100
G4Nucleus
& theNucleus);
101
102
G4bool
IsApplicable
(
const
G4ParticleDefinition
* aPD)
const
;
103
104
// Select betweeen different post-cascade de-excitation models
105
void
useCascadeDeexcitation
();
106
void
usePreCompoundDeexcitation
();
107
108
virtual
void
ModelDescription
(std::ostream&
outFile
)
const
;
109
virtual
void
DumpConfiguration
(std::ostream& outFile)
const
;
110
111
protected
:
112
void
clear
();
// Delete previously created particles
113
114
// Convert input projectile and target to Bertini internal types
115
G4bool
createBullet
(
const
G4HadProjectile
& aTrack);
116
G4bool
createTarget
(
G4Nucleus
& theNucleus);
117
G4bool
createTarget
(
G4V3DNucleus
* theNucleus);
118
G4bool
createTarget
(
G4int
A,
G4int
Z
);
119
120
// Evaluate whether any outgoing particles penetrated Coulomb barrier
121
G4bool
coulombBarrierViolation
()
const
;
122
123
// Conditions for rejecting cascade attempt
124
G4bool
retryInelasticProton
()
const
;
125
G4bool
retryInelasticNucleus
()
const
;
126
127
// Transfer Bertini internal final state to hadronics interface
128
void
copyOutputToHadronicResult
();
129
G4ReactionProductVector
*
copyOutputToReactionProducts
();
130
131
// Replicate input particles onto output
132
G4HadFinalState
*
NoInteraction
(
const
G4HadProjectile
& aTrack,
133
G4Nucleus
& theNucleus);
134
135
// Report violations of conservation laws in original frame
136
void
checkFinalResult
();
137
138
// Terminate job because of energy/momentum/etc. violations
139
void
throwNonConservationFailure
();
140
141
// Convert between Bertini and external particle types
142
G4DynamicParticle
*
makeDynamicParticle
(
const
G4InuclElementaryParticle
& iep)
const
;
143
G4DynamicParticle
*
makeDynamicParticle
(
const
G4InuclNuclei
& inuc)
const
;
144
145
146
private
:
147
G4int
operator==(
const
G4CascadeInterface
&
right
)
const
{
148
return
(
this
== &right);
149
}
150
151
G4int
operator!=(
const
G4CascadeInterface
& right)
const
{
152
return
(
this
!= &right);
153
}
154
155
static
const
G4String
randomFile;
// Filename to capture random seeds
156
static
const
G4int
maximumTries;
// Number of iterations for inelastic
157
158
G4int
numberOfTries;
159
160
G4InuclCollider
* collider;
161
G4CascadeCheckBalance
* balance;
162
163
G4InuclParticle
* bullet;
// Pointers to last filled versions
164
G4InuclParticle
*
target
;
165
166
G4CollisionOutput
* output;
167
168
G4InuclElementaryParticle
hadronBullet;
// Buffers for bullet, target
169
G4InuclNuclei
nucleusBullet;
170
171
G4InuclElementaryParticle
hadronTarget;
172
G4InuclNuclei
nucleusTarget;
173
174
G4LorentzRotation
bulletInLabFrame;
175
};
176
177
#endif // G4CASCADEINTERFACE_H
Generated on Sat May 25 2013 14:33:43 for Geant4 by
1.8.4