Geant4
9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4QCHIPSWorld.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
// ---------------- G4QCHIPSWorld ----------------
30
// by Mikhail Kossov, Sept 1999.
31
// class header for CHIPS World of particles in CHIPS Model
32
// ------------------------------------------------------------
33
// Short description: The CHIPS World is a world of elementary particles
34
// and nuclear fragments. This class is a singletone, but without fixed
35
// limits. E.g. the nuclear fragments as possible G4Candidates can be
36
// initialized in the CHIPS World only up to Be8 od C12 or other bigger
37
// nuclear fragment. If one need the heavy fragment production then the
38
// the CHIPS World must be initialized up to these fragments (see the
39
// CHIPS Manual), but the price in performans will be big, because in
40
// each act of the fragmentation competition these numerous candidates
41
// take place in the competition and the hadronization probability is
42
// calculated each time for each of them, so the Be8 limit (Be8->alpha+
43
// alpha decays very fast and contribute to the alpha-spectrum) is the
44
// most optimal.
45
// -------------------------------------------------------------------
46
47
#ifndef G4QCHIPSWorld_h
48
#define G4QCHIPSWorld_h 1
49
50
#include <iostream>
51
#include "
globals.hh
"
52
#include "
G4QParticleVector.hh
"
53
54
class
G4QCHIPSWorld
55
{
56
// Constructor/Destructor
57
protected
:
58
G4QCHIPSWorld
();
// the Default Construction is protected - Singelton
59
public
:
60
~G4QCHIPSWorld
();
// Destructor is public because of Windows compilation error
61
62
// Member Functions
63
private
:
64
G4QCHIPSWorld
(
const
G4QCHIPSWorld
& right);
// copy QCHIPSWorld by value
65
G4QCHIPSWorld
(
G4QCHIPSWorld
* right);
// copy QCHIPSWorld by pointer
66
const
G4QCHIPSWorld
& operator=(
const
G4QCHIPSWorld
& right);
//copy QCHIPSWorld by Operator
67
G4bool
operator==(
const
G4QCHIPSWorld
&right)
const
;
68
G4bool
operator!=(
const
G4QCHIPSWorld
&right)
const
;
69
70
public
:
71
// Pointers to Particles of the Singeltone of the CHIPS World
72
static
G4QCHIPSWorld
*
Get
();
73
G4QParticleVector
*
GetParticles
(
G4int
nOfParts=0);
74
// Selectors
75
G4QParticle
*
GetQParticle
(
G4int
PDG)
const
;
// Get pointer to particle in CHIPSWorld
76
G4QParticle
*
GetQParticle
(
G4QPDGCode
QPDG)
const
;
// Get pointer to particle in CHIPSWorld
77
G4QParticle
*
GetQParticle
(
G4QPDGCode
* pQP)
const
;
// Get pointer to particle in CHIPSWorld
78
G4int
GetQPEntries
()
const
;
// Get a#of particles in CHIPS World
79
80
// Body
81
private
:
82
//static G4QCHIPSWorld* aWorld; // Pointer to the CHIPS World
83
static
G4QParticleVector
& GetQWorld();
84
};
85
86
87
inline
G4QParticle
*
G4QCHIPSWorld::GetQParticle
(
G4int
PDG)
const
88
{
89
G4int
qCode=
G4QPDGCode
(PDG).
GetQCode
();
90
//G4cout<<"G4QCHIPSWorld::GetQPart:Q="<<qCode<<",Max="<<qWorld.size()<<G4endl;
91
return
GetQWorld()[qCode];
92
}
93
94
inline
G4QParticle
*
G4QCHIPSWorld::GetQParticle
(
G4QPDGCode
QPDG)
const
95
{
96
return
GetQWorld()[QPDG.
GetQCode
()];
97
}
98
99
inline
G4QParticle
*
G4QCHIPSWorld::GetQParticle
(
G4QPDGCode
* pQP)
const
100
{
101
return
GetQWorld()[pQP->
GetQCode
()];
102
}
103
104
inline
G4int
G4QCHIPSWorld::GetQPEntries
()
const
{
return
GetQWorld().size();}
105
106
#endif
107
108
109
G4QParticleVector.hh
G4int
int G4int
Definition:
G4Types.hh:66
G4bool
bool G4bool
Definition:
G4Types.hh:67
G4QCHIPSWorld
Definition:
G4QCHIPSWorld.hh:55
G4QCHIPSWorld::G4QCHIPSWorld
G4QCHIPSWorld()
Definition:
G4QCHIPSWorld.cc:57
G4QCHIPSWorld::GetQParticle
G4QParticle * GetQParticle(G4int PDG) const
Definition:
G4QCHIPSWorld.hh:87
G4QCHIPSWorld::~G4QCHIPSWorld
~G4QCHIPSWorld()
Definition:
G4QCHIPSWorld.cc:61
G4QCHIPSWorld::Get
static G4QCHIPSWorld * Get()
Definition:
G4QCHIPSWorld.cc:79
G4QCHIPSWorld::GetQPEntries
G4int GetQPEntries() const
Definition:
G4QCHIPSWorld.hh:104
G4QCHIPSWorld::GetParticles
G4QParticleVector * GetParticles(G4int nOfParts=0)
Definition:
G4QCHIPSWorld.cc:95
G4QPDGCode
Definition:
G4QPDGCode.hh:142
G4QPDGCode::GetQCode
G4int GetQCode() const
Definition:
G4QPDGCode.hh:327
G4QParticleVector
Definition:
G4QParticleVector.hh:61
G4QParticle
Definition:
G4QParticle.hh:46
globals.hh
geant4-v9.6.0
source
processes
hadronic
models
chiral_inv_phase_space
body
include
G4QCHIPSWorld.hh
Generated by
1.9.6