Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions
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 ( )

Definition at line 30 of file G4HadronicWhiteBoard.cc.

Referenced by Instance().

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 {}

Member Function Documentation

void G4HadronicWhiteBoard::Dump ( )

Definition at line 94 of file G4HadronicWhiteBoard.cc.

References FatalException, and G4Exception().

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 }
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4int G4HadronicWhiteBoard::GetA ( void  )

Definition at line 58 of file G4HadronicWhiteBoard.cc.

58 {return theA;}
G4double G4HadronicWhiteBoard::GetEnergy ( )

Definition at line 54 of file G4HadronicWhiteBoard.cc.

54 {return theE;}
G4String G4HadronicWhiteBoard::GetParticleName ( )

Definition at line 53 of file G4HadronicWhiteBoard.cc.

53 {return theName;}
G4ParticleDefinition * G4HadronicWhiteBoard::GetPDef ( )

Definition at line 52 of file G4HadronicWhiteBoard.cc.

52 {return theDef;}
const G4HadProjectile * G4HadronicWhiteBoard::GetProjectile ( )

Definition at line 42 of file G4HadronicWhiteBoard.cc.

43 {
44  return theProjectile;
45 }
G4double G4HadronicWhiteBoard::GetPx ( )

Definition at line 55 of file G4HadronicWhiteBoard.cc.

55 {return thePx;}
G4double G4HadronicWhiteBoard::GetPy ( )

Definition at line 56 of file G4HadronicWhiteBoard.cc.

56 {return thePy;}
G4double G4HadronicWhiteBoard::GetPz ( )

Definition at line 57 of file G4HadronicWhiteBoard.cc.

57 {return thePz;}
const G4Nucleus & G4HadronicWhiteBoard::GetTargetNucleus ( )

Definition at line 47 of file G4HadronicWhiteBoard.cc.

48 {
49  return theTarget;
50 }
G4int G4HadronicWhiteBoard::GetZ ( void  )

Definition at line 59 of file G4HadronicWhiteBoard.cc.

59 {return theZ;}
G4HadronicWhiteBoard & G4HadronicWhiteBoard::Instance ( void  )
static

Definition at line 36 of file G4HadronicWhiteBoard.cc.

References G4HadronicWhiteBoard().

Referenced by G4HadronicInteractionWrapper::ApplyInteraction().

37 {
38  if (!theInstance) theInstance = new G4HadronicWhiteBoard;
39  return *theInstance;
40 }
void G4HadronicWhiteBoard::SetModelName ( const G4String aModelName)

Definition at line 88 of file G4HadronicWhiteBoard.cc.

Referenced by G4HadronicInteractionWrapper::ApplyInteraction().

89 {
90  theModelName = aModelName;
91 }
void G4HadronicWhiteBoard::SetProcessName ( const G4String aProcessName)

Definition at line 82 of file G4HadronicWhiteBoard.cc.

Referenced by G4HadronicInteractionWrapper::ApplyInteraction().

83 {
84  theProcessName = aProcessName;
85 }
void G4HadronicWhiteBoard::SetProjectile ( const G4HadProjectile aProjectile)

Definition at line 62 of file G4HadronicWhiteBoard.cc.

References G4HadProjectile::Get4Momentum(), G4HadProjectile::GetDefinition(), G4ParticleDefinition::GetParticleName(), CLHEP::HepLorentzVector::t(), CLHEP::HepLorentzVector::vect(), CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), and CLHEP::Hep3Vector::z().

Referenced by G4HadronicInteractionWrapper::ApplyInteraction().

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

Definition at line 74 of file G4HadronicWhiteBoard.cc.

References G4Nucleus::GetA_asInt(), and G4Nucleus::GetZ_asInt().

Referenced by G4HadronicInteractionWrapper::ApplyInteraction().

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

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