Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4HadronicWhiteBoard Class Reference

#include <G4HadronicWhiteBoard.hh>

Public Member Functions

 G4HadronicWhiteBoard ()
 
void SetProjectile (const G4HadProjectile &aProjectile)
 
void SetTargetNucleus (const G4Nucleus &aTarget)
 
void SetProcessName (const G4String &aProcessName)
 
void SetModelName (const G4String &aModelName)
 
const G4HadProjectileGetProjectile ()
 
const G4NucleusGetTargetNucleus ()
 
G4ParticleDefinitionGetPDef ()
 
G4String GetParticleName ()
 
G4double GetEnergy ()
 
G4double GetPx ()
 
G4double GetPy ()
 
G4double GetPz ()
 
G4int GetA ()
 
G4int GetZ ()
 
void Dump ()
 

Static Public Member Functions

static G4HadronicWhiteBoardInstance ()
 

Detailed Description

Definition at line 34 of file G4HadronicWhiteBoard.hh.

Constructor & Destructor Documentation

◆ G4HadronicWhiteBoard()

G4HadronicWhiteBoard::G4HadronicWhiteBoard ( )

Definition at line 29 of file G4HadronicWhiteBoard.cc.

30 : theProjectile(0), theDef(0), theName(0), theE(0.0), thePx(0.0),
31 thePy(0.0), thePz(0.0), theA(0), theZ(0)
32{}

Member Function Documentation

◆ Dump()

void G4HadronicWhiteBoard::Dump ( )

Definition at line 93 of file G4HadronicWhiteBoard.cc.

94{
95 std::cerr << std::endl;
96 std::cerr << "*** Geant4 Hadronic Reaction Information ***"
97 << std::endl;
98 std::cerr << " Process: " << theProcessName << " , Model: "
99 << theModelName << std::endl;
100 std::cerr << " Nucleus A, Z = " << theA << " " << theZ
101 << std::endl;
102 std::cerr << " Projectile was a " << theName
103 << std::endl;
104 std::cerr << " projectile momentum (px, py, pz) = (" << thePx << ", "
105 << thePy << ", " << thePz << ")" << std::endl;
106 std::cerr << " Projectile energy = "<< theE
107 << std::endl;
108 std::cerr << "*** End of Geant4 Hadronic Reaction Information ***"
109 << std::endl;
110 G4Exception(theModelName, "001", FatalException, "segmentation fault");
111}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

◆ GetA()

G4int G4HadronicWhiteBoard::GetA ( )

Definition at line 57 of file G4HadronicWhiteBoard.cc.

57{return theA;}

◆ GetEnergy()

G4double G4HadronicWhiteBoard::GetEnergy ( )

Definition at line 53 of file G4HadronicWhiteBoard.cc.

53{return theE;}

◆ GetParticleName()

G4String G4HadronicWhiteBoard::GetParticleName ( )

Definition at line 52 of file G4HadronicWhiteBoard.cc.

52{return theName;}

◆ GetPDef()

G4ParticleDefinition * G4HadronicWhiteBoard::GetPDef ( )

Definition at line 51 of file G4HadronicWhiteBoard.cc.

51{return theDef;}

◆ GetProjectile()

const G4HadProjectile * G4HadronicWhiteBoard::GetProjectile ( )

Definition at line 41 of file G4HadronicWhiteBoard.cc.

42{
43 return theProjectile;
44}

◆ GetPx()

G4double G4HadronicWhiteBoard::GetPx ( )

Definition at line 54 of file G4HadronicWhiteBoard.cc.

54{return thePx;}

◆ GetPy()

G4double G4HadronicWhiteBoard::GetPy ( )

Definition at line 55 of file G4HadronicWhiteBoard.cc.

55{return thePy;}

◆ GetPz()

G4double G4HadronicWhiteBoard::GetPz ( )

Definition at line 56 of file G4HadronicWhiteBoard.cc.

56{return thePz;}

◆ GetTargetNucleus()

const G4Nucleus & G4HadronicWhiteBoard::GetTargetNucleus ( )

Definition at line 46 of file G4HadronicWhiteBoard.cc.

47{
48 return theTarget;
49}

◆ GetZ()

G4int G4HadronicWhiteBoard::GetZ ( )

Definition at line 58 of file G4HadronicWhiteBoard.cc.

58{return theZ;}

◆ Instance()

G4HadronicWhiteBoard & G4HadronicWhiteBoard::Instance ( )
static

Definition at line 35 of file G4HadronicWhiteBoard.cc.

36{
37 static G4HadronicWhiteBoard theInstance;
38 return theInstance;
39}

Referenced by G4HadronicInteractionWrapper::ApplyInteraction().

◆ SetModelName()

void G4HadronicWhiteBoard::SetModelName ( const G4String aModelName)

Definition at line 87 of file G4HadronicWhiteBoard.cc.

88{
89 theModelName = aModelName;
90}

Referenced by G4HadronicInteractionWrapper::ApplyInteraction().

◆ SetProcessName()

void G4HadronicWhiteBoard::SetProcessName ( const G4String aProcessName)

Definition at line 81 of file G4HadronicWhiteBoard.cc.

82{
83 theProcessName = aProcessName;
84}

Referenced by G4HadronicInteractionWrapper::ApplyInteraction().

◆ SetProjectile()

void G4HadronicWhiteBoard::SetProjectile ( const G4HadProjectile aProjectile)

Definition at line 61 of file G4HadronicWhiteBoard.cc.

62{
63 theProjectile = const_cast<G4HadProjectile*>(& aProjectile);
64 theDef = const_cast<G4ParticleDefinition*>(theProjectile->GetDefinition());
65 theName = const_cast<char *>(theDef->GetParticleName().c_str() );
66 theE = theProjectile->Get4Momentum().t();
67 thePx = theProjectile->Get4Momentum().vect().x();
68 thePy = theProjectile->Get4Momentum().vect().y();
69 thePz = theProjectile->Get4Momentum().vect().z();
70}
double z() const
double x() const
double y() const
Hep3Vector vect() const
const G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const
const G4String & GetParticleName() const

Referenced by G4HadronicInteractionWrapper::ApplyInteraction().

◆ SetTargetNucleus()

void G4HadronicWhiteBoard::SetTargetNucleus ( const G4Nucleus aTarget)

Definition at line 73 of file G4HadronicWhiteBoard.cc.

74{
75 theTarget = aTarget;
76 theA = theTarget.GetA_asInt();
77 theZ = theTarget.GetZ_asInt();
78}
G4int GetA_asInt() const
Definition: G4Nucleus.hh:109
G4int GetZ_asInt() const
Definition: G4Nucleus.hh:115

Referenced by G4HadronicInteractionWrapper::ApplyInteraction().


The documentation for this class was generated from the following files: