Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
processes
hadronic
models
chiral_inv_phase_space
body
include
G4QParticle.hh
Go to the documentation of this file.
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
// $Id$
28
//
29
// ---------------- G4QParticle ----------------
30
// by Mikhail Kossov, Sept 1999.
31
// class header for Particles in the CHIPS Model
32
// ---------------------------------------------------
33
// Short description: The G4QParticle is a part of the CHIPS World. It is
34
// characterized by the quark content, spin, mass, width and a vector of
35
// the decay channels (G4QDecayCannelVector).
36
// -----------------------------------------------------------------------
37
38
#ifndef G4QParticle_h
39
#define G4QParticle_h 1
40
41
#include <iostream>
42
#include "
globals.hh
"
43
#include "
G4QDecayChanVector.hh
"
44
45
class
G4QParticle
46
{
47
public
:
48
// Constructors
49
G4QParticle
();
// Default Constructor
50
G4QParticle
(
G4bool
f
,
G4int
theQCode);
// QCode Constructor, f-verbose
51
G4QParticle
(
G4int
thePDG);
// PDGCode Constructor
52
G4QParticle
(
const
G4QParticle
&
right
);
// Copy Constructor by value
53
G4QParticle
(
G4QParticle
* right);
// Copy Constructor by pointer
54
55
~G4QParticle
();
// Public Destructor
56
57
// Operators
58
const
G4QParticle
&
operator=
(
const
G4QParticle
& right);
59
G4bool
operator==
(
const
G4QParticle
& rhs)
const
;
60
G4bool
operator!=
(
const
G4QParticle
& rhs)
const
;
61
62
// Selectors
63
G4QPDGCode
GetQPDG
()
const
;
// Get a PDG-Particle of the Particle
64
G4int
GetPDGCode
()
const
;
// Get a PDG Code of the Particle
65
G4int
GetQCode
()
const
;
// Get a Q Code of the Particle
66
G4int
GetSpin
()
const
;
// Get 2s+1 of the Particle
67
G4int
GetCharge
()
const
;
// Get a Charge of the Particle
68
G4int
GetStrange
()
const
;
// Get a Strangeness of the Particle
69
G4int
GetBaryNum
()
const
;
// Get a Baryon Number of the Particle
70
G4QContent
GetQContent
();
// Get Quark Content of the Particle
71
G4QDecayChanVector
GetDecayVector
();
// Get a Decay Vector for the Particle
72
G4double
GetMass
();
// Get a mass value for the Particle
73
G4double
GetWidth
();
// Get a width value for the Particle
74
75
// Modifiers
76
G4QDecayChanVector
InitDecayVector
(
G4int
Q);
// Init DecayVector in theCHIPSWorld by QCode
77
void
InitPDGParticle
(
G4int
thePDGCode);
78
void
InitQParticle
(
G4int
theQCode);
79
80
// General
81
G4double
MinMassOfFragm
();
// Minimal mass of decaing fragments
82
83
private
:
84
// Encapsulated functions
85
86
private
:
87
// the Body
88
G4QPDGCode
aQPDG;
89
G4QDecayChanVector
aDecay;
90
G4QContent
aQuarkCont;
// @@ Secondary (added for acceleration - check)
91
};
92
93
// Not member operators
94
std::ostream&
operator<<
(std::ostream& lhs,
G4QParticle
& rhs);
95
// Not member functions
96
//----------------------------------------------------------------------------------------
97
98
inline
G4bool
G4QParticle::operator==
(
const
G4QParticle
& rhs)
const
{
return
this
==&rhs;}
99
inline
G4bool
G4QParticle::operator!=
(
const
G4QParticle
& rhs)
const
{
return
this
!=&rhs;}
100
101
inline
G4QPDGCode
G4QParticle::GetQPDG
()
const
{
return
aQPDG;}
102
inline
G4int
G4QParticle::GetQCode
()
const
{
return
aQPDG.
GetQCode
();}
103
inline
G4int
G4QParticle::GetPDGCode
()
const
{
return
aQPDG.
GetPDGCode
();}
104
inline
G4int
G4QParticle::GetSpin
()
const
{
return
aQPDG.
GetSpin
();}
105
inline
G4int
G4QParticle::GetCharge
()
const
{
return
aQuarkCont.
GetCharge
();}
106
inline
G4int
G4QParticle::GetStrange
()
const
{
return
aQuarkCont.
GetStrangeness
();}
107
inline
G4int
G4QParticle::GetBaryNum
()
const
{
return
aQuarkCont.
GetBaryonNumber
();}
108
inline
G4QContent
G4QParticle::GetQContent
() {
return
aQuarkCont;}
109
inline
G4QDecayChanVector
G4QParticle::GetDecayVector
() {
return
aDecay;}
110
inline
G4double
G4QParticle::GetMass
() {
return
aQPDG.
GetMass
();}
111
inline
G4double
G4QParticle::GetWidth
() {
return
aQPDG.
GetWidth
();}
112
113
inline
G4double
G4QParticle::MinMassOfFragm
()
114
{
115
G4int
nCh=aDecay.size();
116
G4double
mass=
GetMass
();
117
G4double
min=mass;
118
if
(nCh)
119
{
120
min=aDecay[0]->GetMinMass();
121
if
(nCh>1)
for
(
G4int
j=1; j<nCh; j++)
122
{
123
G4double
next=aDecay[j]->GetMinMass();
124
if
(next<min) min=next;
125
}
126
}
127
G4double
w=
GetWidth
();
128
G4double
lim=mass+.001;
129
if
(w) lim-=1.5*w;
130
if
(min<lim) min=lim;
131
return
min;
132
}
133
134
#endif
135
136
137
Generated on Sat May 25 2013 14:33:45 for Geant4 by
1.8.4