Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
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
55{
56 // Constructor/Destructor
57protected:
58 G4QCHIPSWorld(); // the Default Construction is protected - Singelton
59public:
60 ~G4QCHIPSWorld(); // Destructor is public because of Windows compilation error
61
62 // Member Functions
63private:
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
70public:
71 // Pointers to Particles of the Singeltone of the CHIPS World
72 static G4QCHIPSWorld* Get();
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
81private:
82 //static G4QCHIPSWorld* aWorld; // Pointer to the CHIPS World
83 static G4QParticleVector& GetQWorld();
84};
85
86
88{
89 G4int qCode=G4QPDGCode(PDG).GetQCode();
90 //G4cout<<"G4QCHIPSWorld::GetQPart:Q="<<qCode<<",Max="<<qWorld.size()<<G4endl;
91 return GetQWorld()[qCode];
92}
93
95{
96 return GetQWorld()[QPDG.GetQCode()];
97}
98
100{
101 return GetQWorld()[pQP->GetQCode()];
102}
103
104inline G4int G4QCHIPSWorld::GetQPEntries() const {return GetQWorld().size();}
105
106#endif
107
108
109
int G4int
Definition: G4Types.hh:66
bool G4bool
Definition: G4Types.hh:67
G4QParticle * GetQParticle(G4int PDG) const
static G4QCHIPSWorld * Get()
G4int GetQPEntries() const
G4QParticleVector * GetParticles(G4int nOfParts=0)
G4int GetQCode() const
Definition: G4QPDGCode.hh:327