source: trunk/source/processes/hadronic/models/chiral_inv_phase_space/body/include/G4QCHIPSWorld.hh @ 1340

Last change on this file since 1340 was 1340, checked in by garnier, 14 years ago

update ti head

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