ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4CascadeRecoilMaker.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4CascadeRecoilMaker.hh
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
//
29
// Collects generated cascade data (using Collider::collide() interface)
30
// and computes the nuclear recoil kinematics needed to balance the event.
31
//
32
// 20100909 M. Kelsey -- Inspired by G4CascadeCheckBalance
33
// 20100909 M. Kelsey -- Move G4IntraNucleiCascader::goodCase() here, add
34
// tolerance for "almost zero" excitation energy, add function
35
// to manually override excitation energy
36
// 20100910 M. Kelsey -- Drop getRecoilFragment() in favor of user calling
37
// makeRecoilFragment() with returned non-const pointer. Drop
38
// handling of excitons.
39
// 20100914 M. Kelsey -- Migrate to integer A and Z
40
// 20100921 M. Kelsey -- Return G4InuclNuclei using "makeRecoilNuclei()".
41
// Repurpose "makeRecoilFragment()" to return G4Fragment.
42
// 20100924 M. Kelsey -- Add raw excitation energy (mass difference) function
43
// 20110214 M. Kelsey -- Replace "model" with G4InuclParticle::Model enum
44
// 20110722 M. Kelsey -- For IntraNucleiCascader, take G4CollOut as argument
45
// 20130620 Address Coverity complaint about missing copy actions
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
private
:
128
// Copying of modules is forbidden
129
G4CascadeRecoilMaker
(
const
G4CascadeRecoilMaker
&);
130
G4CascadeRecoilMaker
&
operator=
(
const
G4CascadeRecoilMaker
&);
131
};
132
133
#endif
/* G4CASCADE_RECOIL_MAKER_HH */
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
cascade
cascade
include
G4CascadeRecoilMaker.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:39
using
1.8.2 with
ECCE GitHub integration