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
G4CascadeRecoilMaker.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
#ifndef G4CASCADE_RECOIL_MAKER_HH
27
#define G4CASCADE_RECOIL_MAKER_HH
28
// $Id$
29
//
30
// Collects generated cascade data (using Collider::collide() interface)
31
// and computes the nuclear recoil kinematics needed to balance the event.
32
//
33
// 20100909 M. Kelsey -- Inspired by G4CascadeCheckBalance
34
// 20100909 M. Kelsey -- Move G4IntraNucleiCascader::goodCase() here, add
35
// tolerance for "almost zero" excitation energy, add function
36
// to manually override excitation energy
37
// 20100910 M. Kelsey -- Drop getRecoilFragment() in favor of user calling
38
// makeRecoilFragment() with returned non-const pointer. Drop
39
// handling of excitons.
40
// 20100914 M. Kelsey -- Migrate to integer A and Z
41
// 20100921 M. Kelsey -- Return G4InuclNuclei using "makeRecoilNuclei()".
42
// Repurpose "makeRecoilFragment()" to return G4Fragment.
43
// 20100924 M. Kelsey -- Add raw excitation energy (mass difference) function
44
// 20110214 M. Kelsey -- Replace "model" with G4InuclParticle::Model enum
45
// 20110722 M. Kelsey -- For IntraNucleiCascader, take G4CollOut as argument
46
47
#include <cmath>
48
#include <vector>
49
#include <
CLHEP/Units/SystemOfUnits.h
>
50
51
#include "
G4VCascadeCollider.hh
"
52
#include "
globals.hh
"
53
#include "
G4CollisionOutput.hh
"
54
#include "
G4InuclNuclei.hh
"
55
#include "
G4Fragment.hh
"
56
#include "
G4LorentzVector.hh
"
57
58
class
G4CascadParticle
;
59
class
G4CascadeCheckBalance
;
60
class
G4InuclElementaryParticle
;
61
class
G4InuclParticle
;
62
63
64
class
G4CascadeRecoilMaker
:
public
G4VCascadeCollider
{
65
public
:
66
explicit
G4CascadeRecoilMaker
(
G4double
tolerance=0.001*CLHEP::MeV);
67
virtual
~G4CascadeRecoilMaker
();
68
69
// Standard Collider interface (non-const output "buffer")
70
void
collide
(
G4InuclParticle
* bullet,
G4InuclParticle
*
target
,
71
G4CollisionOutput
& output);
72
73
// This is for use with G4IntraNucleiCascader
74
void
collide
(
G4InuclParticle
* bullet,
G4InuclParticle
* target,
75
G4CollisionOutput
& output,
76
const
std::vector<G4CascadParticle>& cparticles);
77
78
// Modifiable parameters
79
void
setTolerance
(
G4double
tolerance) { excTolerance = tolerance; }
80
81
void
setRecoilExcitation
(
G4double
Eexc) { excitationEnergy = Eexc; }
82
83
// Build nucleus from current parameters, if physically reasonable
84
G4InuclNuclei
*
makeRecoilNuclei
(
G4InuclParticle::Model
model
=
G4InuclParticle::DefaultModel
);
85
G4Fragment
*
makeRecoilFragment
();
// For use with PreCompound
86
87
// Attach exciton configuration for use by "nucleus makers"
88
void
addExcitonConfiguration
(
const
G4ExitonConfiguration
exciton) {
89
theExcitons = exciton;
90
}
91
92
// Access nuclear configuration parameters
93
G4int
getRecoilA
()
const
{
return
recoilA; }
94
G4int
getRecoilZ
()
const
{
return
recoilZ; }
95
G4double
getRecoilExcitation
()
const
{
return
excitationEnergy; }
96
const
G4LorentzVector
&
getRecoilMomentum
()
const
{
return
recoilMomentum; }
97
98
// Data quality checks
99
G4bool
goodFragment
()
const
;
// Verify A, Z both meaningful
100
G4bool
goodRecoil
()
const
;
// And sensible four-vector
101
G4bool
wholeEvent
()
const
;
// Zero recoil
102
G4bool
unphysicalRecoil
()
const
{
return
!
wholeEvent
() && !
goodRecoil
(); }
103
104
G4bool
goodNucleus
()
const
;
// Ensure that fragment is energetically okay
105
106
protected
:
107
void
fillRecoil
();
// Set recoil parameters from CheckBalance
108
G4double
deltaM
()
const
;
// Mass difference from current parameters
109
110
private
:
111
G4CascadeCheckBalance
* balance;
// Used to do kinematics calculations
112
113
G4double
excTolerance;
// Minimum excitation energy, rounds to zero
114
115
G4double
inputEkin;
// Available initial kinetic energy
116
117
G4int
recoilA;
// Nuclear parameters of recoil
118
G4int
recoilZ;
119
G4LorentzVector
recoilMomentum;
120
G4double
excitationEnergy;
121
122
G4ExitonConfiguration
theExcitons;
// Used by G4InuclNuclei and G4Fragment
123
124
G4InuclNuclei
theRecoilNuclei;
// Reusable buffers for recoil
125
G4Fragment
theRecoilFragment;
126
};
127
128
#endif
/* G4CASCADE_RECOIL_MAKER_HH */
Generated on Sat May 25 2013 14:33:43 for Geant4 by
1.8.4