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

#include <G4SubEvent.hh>

+ Inheritance diagram for G4SubEvent:

Public Member Functions

 G4SubEvent ()=default
 
 G4SubEvent (G4int ty, std::size_t maxEnt)
 
 ~G4SubEvent ()
 
G4SubEventoperator= (const G4SubEvent &)=delete
 
G4bool operator== (const G4SubEvent &) const =delete
 
G4bool operator!= (const G4SubEvent &) const =delete
 
void PushToStack (const G4StackedTrack &aStackedTrack)
 
G4StackedTrack PopFromStack ()
 
void clearAndDestroy ()
 
G4int GetSubEventType () const
 
std::size_t GetNTrack () const
 
std::size_t GetMaxNTrack () const
 
G4double getTotalEnergy () const
 
void SetEvent (G4Event *evt)
 
G4EventGetEvent () const
 

Detailed Description

Definition at line 42 of file G4SubEvent.hh.

Constructor & Destructor Documentation

◆ G4SubEvent() [1/2]

G4SubEvent::G4SubEvent ( )
default

◆ G4SubEvent() [2/2]

G4SubEvent::G4SubEvent ( G4int ty,
std::size_t maxEnt )
inlineexplicit

Definition at line 47 of file G4SubEvent.hh.

48 : fSubEventType(ty), fMaxEnt(maxEnt) {;}

◆ ~G4SubEvent()

G4SubEvent::~G4SubEvent ( )

Definition at line 35 of file G4SubEvent.cc.

36{
38}
void clearAndDestroy()
Definition G4SubEvent.cc:40

Member Function Documentation

◆ clearAndDestroy()

void G4SubEvent::clearAndDestroy ( )

Definition at line 40 of file G4SubEvent.cc.

41{
42 for(auto & i : *this)
43 {
44 delete i.GetTrack();
45 delete i.GetTrajectory();
46 }
47 clear();
48}

Referenced by G4SubEventTrackStack::clearAndDestroy(), G4Event::TerminateSubEvent(), and ~G4SubEvent().

◆ GetEvent()

G4Event * G4SubEvent::GetEvent ( ) const
inline

Definition at line 69 of file G4SubEvent.hh.

69{ return fpEvent; }

Referenced by G4EventManager::TerminateSubEvent().

◆ GetMaxNTrack()

std::size_t G4SubEvent::GetMaxNTrack ( ) const
inline

Definition at line 63 of file G4SubEvent.hh.

63{ return fMaxEnt; }

◆ GetNTrack()

std::size_t G4SubEvent::GetNTrack ( ) const
inline

Definition at line 62 of file G4SubEvent.hh.

62{ return size(); }

Referenced by G4Event::SpawnSubEvent(), and G4Event::TerminateSubEvent().

◆ GetSubEventType()

G4int G4SubEvent::GetSubEventType ( ) const
inline

Definition at line 61 of file G4SubEvent.hh.

61{ return fSubEventType; }

Referenced by G4Event::SpawnSubEvent(), G4Event::TerminateSubEvent(), and G4EventManager::TerminateSubEvent().

◆ getTotalEnergy()

G4double G4SubEvent::getTotalEnergy ( ) const

Definition at line 57 of file G4SubEvent.cc.

58{
59 G4double totalEnergy = 0.0;
60 for (const auto & i : *this)
61 {
62 totalEnergy += i.GetTrack()->GetDynamicParticle()->GetTotalEnergy();
63 }
64 return totalEnergy;
65}
double G4double
Definition G4Types.hh:83

◆ operator!=()

G4bool G4SubEvent::operator!= ( const G4SubEvent & ) const
delete

◆ operator=()

G4SubEvent & G4SubEvent::operator= ( const G4SubEvent & )
delete

◆ operator==()

G4bool G4SubEvent::operator== ( const G4SubEvent & ) const
delete

◆ PopFromStack()

G4StackedTrack G4SubEvent::PopFromStack ( )

Definition at line 50 of file G4SubEvent.cc.

51{
52 G4Exception("G4SubEvent::PopFromStack","EventStack0001",
53 FatalException,"This method must not be invoked.");
54 return G4StackedTrack(nullptr);
55}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)

◆ PushToStack()

void G4SubEvent::PushToStack ( const G4StackedTrack & aStackedTrack)
inline

Definition at line 55 of file G4SubEvent.hh.

56 { push_back(aStackedTrack); }

Referenced by G4SubEventTrackStack::PushToStack().

◆ SetEvent()

void G4SubEvent::SetEvent ( G4Event * evt)
inline

Definition at line 68 of file G4SubEvent.hh.

68{ fpEvent = evt; }

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