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
G4DecayTable.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4DecayTable.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
//
28
//
29
// ------------------------------------------------------------
30
// GEANT 4 class header file
31
//
32
// History: first implementation, based on object model of
33
// 7 July 1996 H.Kurashige
34
//
35
// ----------------------------------------
36
// implementation for STL 14 Feb. 2000 H.Kurashige
37
//
38
// ------------------------------------------------------------
39
40
#ifndef G4DecayTable_h
41
#define G4DecayTable_h 1
42
43
#include "
G4ios.hh
"
44
#include <vector>
45
#include "
globals.hh
"
46
#include "
G4ParticleDefinition.hh
"
47
#include "
G4VDecayChannel.hh
"
48
49
class
G4DecayTable
50
{
51
// Class Description
52
// G4DecayTable is the table of pointer to G4VDecayChannel.
53
// Decay channels inside is sorted by using decay branching ratio
54
//
55
56
public
:
57
typedef
std::vector<G4VDecayChannel*>
G4VDecayChannelVector
;
58
59
//constructors
60
public
:
61
G4DecayTable
();
62
~G4DecayTable
();
63
64
private
:
65
// hide copy constructor and assignment operator by declaring "private"
66
// (Implementation does not make sense )
67
G4DecayTable
(
const
G4DecayTable
&){};
68
G4DecayTable
&
operator=
(
const
G4DecayTable
&){
return
*
this
;};
69
70
public
:
71
// equality operators
72
G4bool
operator==
(
const
G4DecayTable
&
right
)
const
{
return
(
this
== &right);};
73
G4bool
operator!=
(
const
G4DecayTable
&
right
)
const
{
return
(
this
!= &right);};
74
75
public
:
// With Description
76
void
Insert
(
G4VDecayChannel
* aChannel);
77
// Insert a decay channel at proper position
78
// (i.e. sorted by using branching ratio )
79
80
G4int
entries
()
const
;
81
// Returns number of decay channels inside
82
83
public
:
// With Description
84
G4VDecayChannel
*
SelectADecayChannel
(
G4double
parentMass= -1.);
85
// A decay channel is selected at random according to the branching ratio
86
87
G4VDecayChannel
*
GetDecayChannel
(
G4int
index)
const
;
88
G4VDecayChannel
*
operator[]
(
G4int
index);
89
// Get index-th Decay channel
90
91
void
DumpInfo
()
const
;
92
93
private
:
94
G4ParticleDefinition
*
parent
;
95
G4VDecayChannelVector
*
channels
;
96
};
97
98
inline
99
G4int
G4DecayTable::entries
()
const
100
{
101
return
G4int
(
channels
->size());
102
}
103
104
inline
105
G4VDecayChannel
*
G4DecayTable::operator[]
(
G4int
index)
106
{
107
return
(*
channels
)[index];
108
}
109
110
111
inline
112
G4VDecayChannel
*
G4DecayTable::GetDecayChannel
(
G4int
index)
const
113
{
114
G4VDecayChannel
* selectedChannel =
nullptr
;
115
if
( (index>=0) && (index<
G4int
(
channels
->size())) ){
116
selectedChannel = (*channels)[index];
117
}
118
return
selectedChannel;
119
}
120
121
122
#endif
geant4
tree
geant4-10.6-release
source
particles
management
include
G4DecayTable.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:24
using
1.8.2 with
ECCE GitHub integration