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

#include <G4BOptrForceCollisionTrackData.hh>

+ Inheritance diagram for G4BOptrForceCollisionTrackData:

Public Member Functions

 G4BOptrForceCollisionTrackData (const G4BOptrForceCollision *)
 
 ~G4BOptrForceCollisionTrackData ()
 
void Print () const
 
G4bool IsFreeFromBiasing () const
 
- Public Member Functions inherited from G4VAuxiliaryTrackInformation
 G4VAuxiliaryTrackInformation ()
 
virtual ~G4VAuxiliaryTrackInformation ()
 
virtual void Print () const
 

Friends

class G4BOptrForceCollision
 

Detailed Description

Definition at line 52 of file G4BOptrForceCollisionTrackData.hh.

Constructor & Destructor Documentation

◆ G4BOptrForceCollisionTrackData()

G4BOptrForceCollisionTrackData::G4BOptrForceCollisionTrackData ( const G4BOptrForceCollision optr)

Definition at line 29 of file G4BOptrForceCollisionTrackData.cc.

31 fForceCollisionOperator( optr )
32{
33 fForceCollisionState = ForceCollisionState::free;
34}

◆ ~G4BOptrForceCollisionTrackData()

G4BOptrForceCollisionTrackData::~G4BOptrForceCollisionTrackData ( )

Definition at line 36 of file G4BOptrForceCollisionTrackData.cc.

37{
38 if ( fForceCollisionState != ForceCollisionState::free )
39 {
41 ed << "Track deleted while under G4BOptrForceCollision biasing scheme of operator `";
42 if ( fForceCollisionOperator == nullptr ) ed << "(none)"; else ed << fForceCollisionOperator->GetName();
43 ed <<"'. Will result in inconsistencies.";
44 G4Exception(" G4BOptrForceCollisionTrackData::~G4BOptrForceCollisionTrackData()",
45 "BIAS.GEN.19",
47 ed);
48 }
49}
@ JustWarning
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
const G4String GetName() const

Member Function Documentation

◆ IsFreeFromBiasing()

G4bool G4BOptrForceCollisionTrackData::IsFreeFromBiasing ( ) const
inline

Definition at line 64 of file G4BOptrForceCollisionTrackData.hh.

65 { return ( fForceCollisionState == ForceCollisionState::free);}

Referenced by G4BOptrForceCollision::EndTracking().

◆ Print()

void G4BOptrForceCollisionTrackData::Print ( ) const
virtual

Reimplemented from G4VAuxiliaryTrackInformation.

Definition at line 51 of file G4BOptrForceCollisionTrackData.cc.

52{
53 G4cout << " G4BOptrForceCollisionTrackData object : " << this << G4endl;
54 G4cout << " Force collision operator : "; if ( fForceCollisionOperator == nullptr ) G4cout << "(none)"; else G4cout << fForceCollisionOperator->GetName(); G4cout << G4endl;
55 G4cout << " Force collision state : ";
56 switch ( fForceCollisionState )
57 {
58 case ForceCollisionState::free :
59 G4cout << "free from biasing ";
60 break;
61 case ForceCollisionState::toBeCloned :
62 G4cout << "to be cloned ";
63 break;
64 case ForceCollisionState::toBeForced :
65 G4cout << "to be interaction forced ";
66 break;
67 case ForceCollisionState::toBeFreeFlight :
68 G4cout << "to be free flight forced (under weight = 0) ";
69 break;
70 default:
71 break;
72 }
73 G4cout << G4endl;
74}
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout

Friends And Related Function Documentation

◆ G4BOptrForceCollision

friend class G4BOptrForceCollision
friend

Definition at line 54 of file G4BOptrForceCollisionTrackData.hh.


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