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

#include <G4ITLeadingTracks.hh>

Public Member Functions

 G4ITLeadingTracks ()
 
virtual ~G4ITLeadingTracks ()
 
void Reset ()
 
void Push (G4Track *)
 
void PrepareLeadingTracks ()
 

Protected Attributes

std::vector< G4Track * > fLeadingTracks
 

Detailed Description

Definition at line 40 of file G4ITLeadingTracks.hh.

Constructor & Destructor Documentation

◆ G4ITLeadingTracks()

G4ITLeadingTracks::G4ITLeadingTracks ( )
default

◆ ~G4ITLeadingTracks()

G4ITLeadingTracks::~G4ITLeadingTracks ( )
virtualdefault

Member Function Documentation

◆ PrepareLeadingTracks()

void G4ITLeadingTracks::PrepareLeadingTracks ( )

Definition at line 75 of file G4ITLeadingTracks.cc.

76{
77 for(auto track : fLeadingTracks)
78 {
79 G4IT* ITrack = GetIT(track);
80 ITrack->GetTrackingInfo()->SetLeadingStep(true);
81 }
82}
G4IT * GetIT(const G4Track *track)
Definition G4IT.cc:48
std::vector< G4Track * > fLeadingTracks
Definition G4IT.hh:88
G4TrackingInformation * GetTrackingInfo()
Definition G4IT.hh:143

Referenced by G4ITStepProcessor::PrepareLeadingTracks().

◆ Push()

void G4ITLeadingTracks::Push ( G4Track * track)

Definition at line 70 of file G4ITLeadingTracks.cc.

71{
72 fLeadingTracks.push_back(track);
73}

Referenced by G4ITStepProcessor::ExtractILData().

◆ Reset()

void G4ITLeadingTracks::Reset ( )

Definition at line 44 of file G4ITLeadingTracks.cc.

45{
46 if (!fLeadingTracks.empty())
47 {
48 auto fLeadingTracks_i = fLeadingTracks.begin();
49
50 while (fLeadingTracks_i != fLeadingTracks.end())
51 {
52 G4Track* track = *fLeadingTracks_i;
53 if (track != nullptr)
54 {
55 G4IT* ITrack = GetIT(track);
56 if (ITrack != nullptr)
57 {
58 ITrack->GetTrackingInfo()->SetLeadingStep(false);
59 }
60 }
61
62 ++fLeadingTracks_i;
63 continue;
64 }
65
66 fLeadingTracks.clear();
67 }
68}

Referenced by G4ITStepProcessor::DoIt(), G4ITStepProcessor::ExtractILData(), and G4ITStepProcessor::ResetLeadingTracks().

Member Data Documentation

◆ fLeadingTracks

std::vector<G4Track*> G4ITLeadingTracks::fLeadingTracks
protected

Definition at line 52 of file G4ITLeadingTracks.hh.

Referenced by PrepareLeadingTracks(), Push(), and Reset().


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