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

Last change on this file since 962 was 962, checked in by garnier, 15 years ago

update processes

File size: 3.9 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.25 2006/06/29 20:05:57 gunter Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
29//
30//      ---------------- G4QCHIPSWorld ----------------
31//             by Mikhail Kossov, Sept 1999.
32//  class header for CHIPS World of particles in CHIPS Model
33// ------------------------------------------------------------
34
35#ifndef G4QCHIPSWorld_h
36#define G4QCHIPSWorld_h 1
37
38#include <iostream>
39#include "globals.hh"
40#include "G4QParticleVector.hh"
41
42class G4QCHIPSWorld
43{
44  // Constructor/Destructor
45protected:
46  G4QCHIPSWorld();             // the Default Construction is protected - Singelton
47public:
48  ~G4QCHIPSWorld();            // Destructor is public because of Windows compilation error
49
50  // Member Functions
51private:
52  G4QCHIPSWorld(const G4QCHIPSWorld& right);       // copy QCHIPSWorld by value
53  G4QCHIPSWorld(G4QCHIPSWorld* right);             // copy QCHIPSWorld by pointer
54  const G4QCHIPSWorld& operator=(const G4QCHIPSWorld& right);//copy QCHIPSWorld by Operator
55  G4bool operator==(const G4QCHIPSWorld &right) const;
56  G4bool operator!=(const G4QCHIPSWorld &right) const;
57
58public:
59  // Pointers to Particles of the Singeltone of the CHIPS World
60  static G4QCHIPSWorld* Get();
61  G4QParticleVector* GetParticles(G4int nOfParts=0);
62  // Selectors
63  G4QParticle* GetQParticle(G4int PDG)       const;// Get pointer to particle in CHIPSWorld
64  G4QParticle* GetQParticle(G4QPDGCode QPDG) const;// Get pointer to particle in CHIPSWorld
65  G4QParticle* GetQParticle(G4QPDGCode* pQP) const;// Get pointer to particle in CHIPSWorld
66  G4int        GetQPEntries()                const;// Get a#of particles in CHIPS World
67
68// Body
69private:
70  //static G4QCHIPSWorld* aWorld;             // Pointer to the CHIPS World
71  static G4QParticleVector& GetQWorld();
72};
73
74 
75inline G4QParticle* G4QCHIPSWorld::GetQParticle(G4int       PDG) const
76{
77  G4int qCode=G4QPDGCode(PDG).GetQCode();
78  //G4cout<<"G4QCHIPSWorld::GetQPart:Q="<<qCode<<",Max="<<qWorld.size()<<G4endl;
79  return GetQWorld()[qCode];
80}
81
82inline G4QParticle* G4QCHIPSWorld::GetQParticle(G4QPDGCode QPDG) const
83{
84  return GetQWorld()[QPDG.GetQCode()];
85}
86
87inline G4QParticle* G4QCHIPSWorld::GetQParticle(G4QPDGCode* pQP) const
88{
89  return GetQWorld()[pQP->GetQCode()];
90}
91
92inline G4int        G4QCHIPSWorld::GetQPEntries() const {return GetQWorld().size();}
93
94#endif
95
96
97
Note: See TracBrowser for help on using the repository browser.