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
ECCE @ EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
analysis
coresoftware
Doxygen_Assist
ecce-detectors
fun4all_eicdetectors
geant4
tree
geant4-10.6-release
config
environments
examples
source
analysis
digits_hits
error_propagation
event
externals
g3tog4
geometry
global
graphics_reps
intercoms
interfaces
materials
parameterisations
particles
persistency
physics_lists
processes
biasing
cuts
decay
electromagnetic
hadronic
cross_sections
management
models
abla
abrasion
binary_cascade
cascade
cascade
include
src
bindingEnergy.cc
bindingEnergyAsymptotic.cc
G4Analyser.cc
G4BigBanger.cc
G4CascadeChannel.cc
G4CascadeChannelTables.cc
G4CascadeCheckBalance.cc
G4CascadeCoalescence.cc
G4CascadeColliderBase.cc
G4CascadeDeexcitation.cc
G4CascadeDeexciteBase.cc
G4CascadeFinalStateAlgorithm.cc
G4CascadeFinalStateGenerator.cc
G4CascadeHistory.cc
G4CascadeInterface.cc
G4CascadeKminusNChannel.cc
G4CascadeKminusPChannel.cc
G4CascadeKplusNChannel.cc
G4CascadeKplusPChannel.cc
G4CascadeKzeroBarNChannel.cc
G4CascadeKzeroBarPChannel.cc
G4CascadeKzeroNChannel.cc
G4CascadeKzeroPChannel.cc
G4CascadeLambdaNChannel.cc
G4CascadeLambdaPChannel.cc
G4CascadeMuMinusPChannel.cc
G4CascadeNNChannel.cc
G4CascadeNPChannel.cc
G4CascadeOmegaMinusNChannel.cc
G4CascadeOmegaMinusPChannel.cc
G4CascadeParameters.cc
G4CascadeParamMessenger.cc
G4CascadePPChannel.cc
G4CascadeRecoilMaker.cc
G4CascadeSigmaMinusNChannel.cc
G4CascadeSigmaMinusPChannel.cc
G4CascadeSigmaPlusNChannel.cc
G4CascadeSigmaPlusPChannel.cc
G4CascadeSigmaZeroNChannel.cc
G4CascadeSigmaZeroPChannel.cc
G4CascadeT11pizNChannel.cc
G4CascadeT1GamNChannel.cc
G4CascadeT31piNChannel.cc
G4CascadeT33piNChannel.cc
G4CascadeXiMinusNChannel.cc
G4CascadeXiMinusPChannel.cc
G4CascadeXiZeroNChannel.cc
G4CascadeXiZeroPChannel.cc
G4CascadParticle.cc
G4CollisionOutput.cc
G4Dineutron.cc
G4Diproton.cc
G4ElementaryParticleCollider.cc
G4EquilibriumEvaporator.cc
G4EvaporationInuclCollider.cc
G4ExitonConfiguration.cc
G4FissionConfiguration.cc
G4Fissioner.cc
G4FissionStore.cc
G4GammaNuclAngDst.cc
G4GamP2NPipAngDst.cc
G4GamP2PPi0AngDst.cc
G4GDecay3.cc
G4HadNElastic1AngDst.cc
G4HadNElastic2AngDst.cc
G4HadNucl3BodyAngDst.cc
G4HadNucl3BodyMomDst.cc
G4HadNucl4BodyMomDst.cc
G4HyperonSampler.cc
G4InteractionCase.cc
G4IntraNucleiCascader.cc
G4InuclCollider.cc
G4InuclElementaryParticle.cc
G4InuclEvaporation.cc
G4InuclNuclei.cc
G4InuclParamAngDst.cc
G4InuclParamMomDst.cc
G4InuclParticle.cc
G4InuclParticleNames.cc
G4InuclSpecialFunctions.cc
G4KaonHypSampler.cc
G4KaonSampler.cc
G4LightTargetCollider.cc
G4LorentzConvertor.cc
G4MultiBodyMomentumDist.cc
G4NonEquilibriumEvaporator.cc
G4NP2NPAngDst.cc
G4NucleiModel.cc
G4NuclNucl3BodyAngDst.cc
G4NuclNucl3BodyMomDst.cc
G4NuclNucl4BodyMomDst.cc
G4NuclNuclAngDst.cc
G4NuclWatcher.cc
G4Pi0P2Pi0PAngDst.cc
G4PimP2Pi0NAngDst.cc
G4PimP2PimPAngDst.cc
G4PiNInelasticAngDst.cc
G4PionNucSampler.cc
G4PipP2PipPAngDst.cc
G4PP2PPAngDst.cc
G4PreCompoundDeexcitation.cc
G4TwoBodyAngularDist.cc
G4UnboundPN.cc
G4VCascadeCollider.cc
G4VCascadeDeexcitation.cc
G4VMultiBodyMomDst.cc
G4VTwoBodyAngDst.cc
G4WatcherGun.cc
nucleiLevelDensity.cc
paraMaker.cc
coherent_elastic
de_excitation
em_dissociation
fission
gamma_nuclear
im_r_matrix
inclxx
lend
lepto_nuclear
management
particle_hp
parton_string
pre_equilibrium
qmd
quasi_elastic
radioactive_decay
rpg
theo_high_energy
util
processes
stopping
util
management
optical
parameterisation
scoring
solidstate
transportation
readout
run
track
tracking
visualization
macros
online_distribution
tutorials
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4MultiBodyMomentumDist.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4MultiBodyMomentumDist.cc
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
// Author: Michael Kelsey (SLAC)
27
// Date: 7 March 2013
28
//
29
// Description: Singleton class to evaluate multi-body momentum distribution
30
// functions based on intial state codes and multiplicity.
31
//
32
// 20130308 Use envvar to enable/disable use of 3-body generators.
33
// 20130619 Change singleton instance to be thread-local, to avoid collisions.
34
// 20141121 Use G4AutoDelete to avoid end-of-thread memory leaks
35
36
#include "
G4MultiBodyMomentumDist.hh
"
37
#include "
G4AutoDelete.hh
"
38
#include "
G4CascadeParameters.hh
"
39
#include "
G4NuclNucl3BodyMomDst.hh
"
40
#include "
G4NuclNucl4BodyMomDst.hh
"
41
#include "
G4HadNucl3BodyMomDst.hh
"
42
#include "
G4HadNucl4BodyMomDst.hh
"
43
#include "
G4InuclParticleNames.hh
"
44
using namespace
G4InuclParticleNames;
45
46
47
// Singleton is created at first invocation
48
49
G4ThreadLocal
G4MultiBodyMomentumDist
*
G4MultiBodyMomentumDist::theInstance
= 0;
50
51
const
G4MultiBodyMomentumDist
*
G4MultiBodyMomentumDist::GetInstance
() {
52
if
(!theInstance) {
53
theInstance =
new
G4MultiBodyMomentumDist
;
54
G4AutoDelete::Register
(theInstance);
55
}
56
57
return
theInstance;
58
}
59
60
// Constructor and destructor
61
62
G4MultiBodyMomentumDist::G4MultiBodyMomentumDist
()
63
: nn3BodyDst(new
G4NuclNucl3BodyMomDst
),
64
nn4BodyDst(new
G4NuclNucl4BodyMomDst
),
65
hn3BodyDst(new
G4HadNucl3BodyMomDst
),
66
hn4BodyDst(new
G4HadNucl4BodyMomDst
) {;}
67
68
G4MultiBodyMomentumDist::~G4MultiBodyMomentumDist
() {
69
delete
nn3BodyDst
;
70
delete
nn4BodyDst
;
71
delete
hn3BodyDst
;
72
delete
hn4BodyDst
;
73
}
74
75
76
// Set verbosity for all generators (const-cast required)
77
78
void
G4MultiBodyMomentumDist::setVerboseLevel
(
G4int
verbose) {
79
const_cast<
G4MultiBodyMomentumDist
*
>
(
GetInstance
())->
passVerbose
(verbose);
80
}
81
82
void
G4MultiBodyMomentumDist::passVerbose
(
G4int
verbose) {
83
if
(
nn3BodyDst
)
nn3BodyDst
->
setVerboseLevel
(verbose);
84
if
(
nn4BodyDst
)
nn4BodyDst
->
setVerboseLevel
(verbose);
85
if
(
hn3BodyDst
)
hn3BodyDst
->
setVerboseLevel
(verbose);
86
if
(
hn4BodyDst
)
hn4BodyDst
->
setVerboseLevel
(verbose);
87
}
88
89
90
// Return appropriate distribution generator for specified interaction
91
92
const
G4VMultiBodyMomDst
*
93
G4MultiBodyMomentumDist::ChooseDist
(
G4int
is,
G4int
mult)
const
{
94
if
(is ==
pro
*
pro
|| is ==
pro
*
neu
|| is ==
neu
*
neu
) {
95
//***** REMOVED BY VLADIMIR UZHINSKY 18 JULY 2011
96
if
(
G4CascadeParameters::use3BodyMom
() && mult==3)
return
nn3BodyDst
;
97
return
nn4BodyDst
;
98
}
99
100
else
{
// FIXME: All other initial states use pi-N scattering
101
//***** REMOVED BY VLADIMIR UZHINSKY 18 JULY 2011
102
if
(
G4CascadeParameters::use3BodyMom
() && mult==3)
return
hn3BodyDst
;
103
return
hn4BodyDst
;
104
}
105
106
// Invalid interaction
107
return
0;
108
}
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
cascade
cascade
src
G4MultiBodyMomentumDist.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:40
using
1.8.2 with
ECCE GitHub integration