Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4HadronicWhiteBoard.cc
이 파일의 문서화 페이지로 가기
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 #include "G4HadronicWhiteBoard.hh"
27 
29 
31  : theProjectile(0), theDef(0), theName(0), theE(0.0), thePx(0.0),
32  thePy(0.0), thePz(0.0), theA(0), theZ(0)
33 {}
34 
35 
37 {
39  return *theInstance;
40 }
41 
43 {
44  return theProjectile;
45 }
46 
48 {
49  return theTarget;
50 }
51 
60 
61 
63 {
64  theProjectile = & aProjectile;
66  theName = theDef->GetParticleName().c_str();
71 }
72 
73 
75 {
76  theTarget = aTarget;
79 }
80 
81 
83 {
84  theProcessName = aProcessName;
85 }
86 
87 
89 {
90  theModelName = aModelName;
91 }
92 
93 
95 {
96  std::cerr << std::endl;
97  std::cerr << "*** Geant4 Hadronic Reaction Information ***"
98  << std::endl;
99  std::cerr << " Process: " << theProcessName << " , Model: "
100  << theModelName << std::endl;
101  std::cerr << " Nucleus A, Z = " << theA << " " << theZ
102  << std::endl;
103  std::cerr << " Projectile was a " << theName
104  << std::endl;
105  std::cerr << " projectile momentum (px, py, pz) = (" << thePx << ", "
106  << thePy << ", " << thePz << ")" << std::endl;
107  std::cerr << " Projectile energy = "<< theE
108  << std::endl;
109  std::cerr << "*** End of Geant4 Hadronic Reaction Information ***"
110  << std::endl;
111  G4Exception(theModelName, "001", FatalException, "segmentation fault");
112 }
static G4ThreadLocal G4HadronicWhiteBoard * theInstance
const G4HadProjectile * theProjectile
const G4Nucleus & GetTargetNucleus()
const G4String & GetParticleName() const
double z() const
void SetTargetNucleus(const G4Nucleus &aTarget)
#define G4ThreadLocal
Definition: tls.hh:69
double G4double
Definition: G4Types.hh:76
const G4ParticleDefinition * theDef
const G4HadProjectile * GetProjectile()
static G4HadronicWhiteBoard & Instance()
const G4LorentzVector & Get4Momentum() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.hh:65
const G4ParticleDefinition * GetDefinition() const
int G4int
Definition: G4Types.hh:78
G4int GetA_asInt() const
Definition: G4Nucleus.hh:109
void SetProjectile(const G4HadProjectile &aProjectile)
double x() const
void SetModelName(const G4String &aModelName)
Hep3Vector vect() const
double y() const
void SetProcessName(const G4String &aProcessName)
const G4ParticleDefinition * GetPDef()
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:115