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
G4GeneralNNCollision.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4GeneralNNCollision.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 G4GeneralNNCollision_h
27
#define G4GeneralNNCollision_h
28
29
#include "
G4CollisionComposite.hh
"
30
#include "
G4Proton.hh
"
31
#include "
G4Neutron.hh
"
32
#include "
G4HadParticleCodes.hh
"
33
#include "
G4Pair.hh
"
34
35
class
G4GeneralNNCollision
:
public
G4CollisionComposite
36
{
37
public
:
38
39
G4bool
40
IsInCharge
(
const
G4KineticTrack
& trk1,
const
G4KineticTrack
& trk2)
const
41
{
42
G4bool
result =
false
;
43
const
G4ParticleDefinition
* aD = trk1.
GetDefinition
();
44
const
G4ParticleDefinition
* bD = trk2.
GetDefinition
();
45
if
( (aD==
G4Proton::Proton
() || aD ==
G4Neutron::Neutron
())
46
&&(bD==
G4Proton::Proton
() || bD ==
G4Neutron::Neutron
()) ) result =
true
;
47
return
result;
48
}
49
50
protected
:
51
52
template
<
int
dm,
int
d0,
int
dp,
int
dpp,
class
channelType>
53
struct
MakeNNToNDelta
{
54
static
void
Make
(
G4CollisionComposite
* aC)
55
{
56
typedef
INT4<channelType, NeutronPC, NeutronPC, NeutronPC, d0>
theC1
;
57
typedef
INT4<channelType, NeutronPC, NeutronPC, ProtonPC, dm>
theC2
;
58
typedef
INT4<channelType, NeutronPC, ProtonPC, ProtonPC, d0>
theC3
;
59
typedef
INT4<channelType, NeutronPC, ProtonPC, NeutronPC, dp>
theC4
;
60
typedef
INT4<channelType, ProtonPC, ProtonPC, NeutronPC, dpp>
theC5
;
61
typedef
INT4<channelType, ProtonPC, ProtonPC, ProtonPC, dp>
theC6
;
62
typedef
GROUP6
(theC1, theC2, theC3, theC4, theC5, theC6) theChannels;
63
G4CollisionComposite::Resolve
aR;
64
G4ForEach<theChannels>::Apply
(&aR, aC);
65
}};
66
67
template
<
int
Np,
int
Nn,
class
channelType>
68
struct
MakeNNToNNStar
{
69
static
void
Make
(
G4CollisionComposite
* aC)
70
{
71
typedef
INT4<channelType, NeutronPC, NeutronPC, NeutronPC, Nn>
theC1
;
72
typedef
INT4<channelType, ProtonPC, ProtonPC, ProtonPC, Np>
theC2
;
73
typedef
INT4<channelType, NeutronPC, ProtonPC, NeutronPC, Np>
theC3
;
74
typedef
INT4<channelType, NeutronPC, ProtonPC, ProtonPC, Nn>
theC4
;
75
typedef
GROUP4
(theC1, theC2, theC3, theC4) theChannels;
76
G4CollisionComposite::Resolve
aR;
77
G4ForEach<theChannels>::Apply
(&aR, aC);
78
}};
79
80
template
<
class
channelType,
int
Np,
int
Nn>
81
struct
MakeNNStarToNN
{
82
static
void
Make
(
G4CollisionComposite
* aC)
83
{
84
typedef
INT4<channelType, Nn, NeutronPC, NeutronPC, NeutronPC>
theC1
;
85
typedef
INT4<channelType, Np, ProtonPC, ProtonPC, ProtonPC>
theC2
;
86
typedef
INT4<channelType, Np, NeutronPC, NeutronPC, ProtonPC>
theC3
;
87
typedef
INT4<channelType, Nn, ProtonPC, NeutronPC, ProtonPC>
theC4
;
88
typedef
GROUP4
(theC1, theC2, theC3, theC4) theChannels;
89
G4CollisionComposite::Resolve
aR;
90
G4ForEach<theChannels>::Apply
(&aR, aC);
91
}};
92
93
template
<
int
Np,
class
channelType,
int
Nn>
94
struct
MakeNNToDeltaNstar
{
95
static
void
Make
(
G4CollisionComposite
* aC)
96
{
97
typedef
INT4<channelType, NeutronPC, NeutronPC, D1232::D0, Nn>
theC1
;
98
typedef
INT4<channelType, NeutronPC, NeutronPC, D1232::Dm, Np>
theC2
;
99
typedef
INT4<channelType, ProtonPC, ProtonPC, D1232::Dp, Np>
theC3
;
100
typedef
INT4<channelType, ProtonPC, ProtonPC, D1232::Dpp, Nn>
theC4
;
101
typedef
INT4<channelType, NeutronPC, ProtonPC, D1232::D0, Np>
theC5
;
102
typedef
INT4<channelType, NeutronPC, ProtonPC, D1232::Dp, Nn>
theC6
;
103
typedef
GROUP6
(theC1, theC2, theC3, theC4, theC5, theC6) theChannels;
104
G4CollisionComposite::Resolve
aR;
105
G4ForEach<theChannels>::Apply
(&aR, aC);
106
}};
107
108
template
<
int
dm,
int
d0,
int
dp,
int
dpp,
class
channelType>
109
struct
MakeNNToDeltaDelta
{
110
static
void
Make
(
G4CollisionComposite
* aC)
111
{
112
typedef
INT4<channelType, NeutronPC, NeutronPC, DeltamPC, dp>
theC1
;
113
typedef
INT4<channelType, NeutronPC, NeutronPC, Delta0PC, d0>
theC2
;
114
typedef
INT4<channelType, NeutronPC, NeutronPC, DeltapPC, dm>
theC3
;
115
typedef
INT4<channelType, NeutronPC, ProtonPC, DeltapPC, d0>
theC4
;
116
typedef
INT4<channelType, NeutronPC, ProtonPC, Delta0PC, dp>
theC5
;
117
typedef
INT4<channelType, NeutronPC, ProtonPC, DeltamPC, dpp>
theC6
;
118
typedef
INT4<channelType, NeutronPC, ProtonPC, DeltappPC, dm>
theC7;
119
typedef
INT4<channelType, ProtonPC, ProtonPC, Delta0PC, dpp>
theC8;
120
typedef
INT4<channelType, ProtonPC, ProtonPC, DeltapPC, dp>
theC9;
121
typedef
INT4<channelType, ProtonPC, ProtonPC, DeltappPC, d0>
theC10;
122
typedef
GROUP10
(theC1, theC2, theC3, theC4, theC5, theC6, theC7, theC8, theC9, theC10) theChannels;
123
G4CollisionComposite::Resolve
aR;
124
G4ForEach<theChannels>::Apply
(&aR, aC);
125
}};
126
};
127
128
#endif
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
im_r_matrix
include
G4GeneralNNCollision.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:43
using
1.8.2 with
ECCE GitHub integration