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
G4ExitonConfiguration.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4ExitonConfiguration.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
//
27
// 20100909 Add function to reset values to zero
28
// 20100924 Migrate to integer A and Z
29
// 20110225 M. Kelsey -- Add equality operator (NOT sorting!)
30
// 20110922 M. Kelsey -- Replace print() with stream operator<<(), put
31
// implementation into new .cc file.
32
// 20121009 M. Kelsey -- Add empty() test for no excitons, fix constness
33
// 20130622 M. Kelsey -- Add interface to copy data from G4Fragment
34
35
#ifndef G4EXITON_CONFIGURATION_HH
36
#define G4EXITON_CONFIGURATION_HH
37
38
#include "
globals.hh
"
39
#include <iosfwd>
40
41
class
G4Fragment
;
42
43
class
G4ExitonConfiguration
{
44
public
:
45
G4ExitonConfiguration
()
46
:
protonQuasiParticles
(0),
neutronQuasiParticles
(0),
47
protonHoles
(0),
neutronHoles
(0) {}
48
49
G4ExitonConfiguration
(
G4int
qpp,
G4int
qnp,
G4int
qph,
G4int
qnh)
50
:
protonQuasiParticles
(qpp),
neutronQuasiParticles
(qnp),
51
protonHoles
(qph),
neutronHoles
(qnh) {}
52
53
explicit
G4ExitonConfiguration
(
const
G4Fragment
& frag)
54
:
protonQuasiParticles
(0),
neutronQuasiParticles
(0),
55
protonHoles
(0),
neutronHoles
(0) {
fill
(frag); }
56
57
58
void
clear
() {
59
protonQuasiParticles
=
neutronQuasiParticles
= 0;
60
protonHoles
=
neutronHoles
= 0;
61
}
62
63
bool
empty
()
const
{
64
return
(
protonQuasiParticles
==0 &&
neutronQuasiParticles
==0 &&
65
protonHoles
==0 &&
neutronHoles
==0);
66
}
67
68
void
fill
(
const
G4Fragment
& frag);
// Initialize from G4Fragment data
69
70
G4bool
operator==
(
const
G4ExitonConfiguration
&
right
)
const
{
71
return
( (&right ==
this
) ||
72
(
protonQuasiParticles
== right.
protonQuasiParticles
&&
73
neutronQuasiParticles
== right.
neutronQuasiParticles
&&
74
protonHoles
== right.
protonHoles
&&
75
neutronHoles
== right.
neutronHoles
) );
76
}
77
78
G4bool
operator!=
(
const
G4ExitonConfiguration
&
right
)
const
{
79
return
!
operator==
(right);
80
}
81
82
83
// Modify configuration
84
85
void
incrementQP
(
G4int
ip) {
86
if
(ip == 1)
protonQuasiParticles
++;
87
else
if
(ip == 2)
neutronQuasiParticles
++;
88
}
89
90
void
incrementHoles
(
G4int
ip) {
91
if
(ip == 1)
protonHoles
++;
92
else
if
(ip == 2)
neutronHoles
++;
93
}
94
95
G4int
protonQuasiParticles
;
96
G4int
neutronQuasiParticles
;
97
G4int
protonHoles
;
98
G4int
neutronHoles
;
99
};
100
101
// Dump information to output
102
103
std::ostream&
operator<<
(std::ostream& os,
const
G4ExitonConfiguration
& ex);
104
105
#endif // G4EXITON_CONFIGURATION_HH
geant4
tree
geant4-10.6-release
source
processes
hadronic
models
cascade
cascade
include
G4ExitonConfiguration.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:39
using
1.8.2 with
ECCE GitHub integration