Geant4 11.1.1
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 ( )

Definition at line 37 of file G4ITLeadingTracks.cc.

38{
39 // TODO Auto-generated constructor stub
40
41}

◆ ~G4ITLeadingTracks()

G4ITLeadingTracks::~G4ITLeadingTracks ( )
virtual

Definition at line 43 of file G4ITLeadingTracks.cc.

44{
45 // TODO Auto-generated destructor stub
46}

Member Function Documentation

◆ PrepareLeadingTracks()

void G4ITLeadingTracks::PrepareLeadingTracks ( )

Definition at line 80 of file G4ITLeadingTracks.cc.

81{
82 for(size_t i = 0 ; i < fLeadingTracks.size() ; ++i)
83 {
84 G4Track* track = fLeadingTracks[i];
85 G4IT* ITrack = GetIT(track);
86 ITrack->GetTrackingInfo()->SetLeadingStep(true);
87// ITrack->GetTrackingInfo()->SetLeadingStep(false);
88 }
89}
G4IT * GetIT(const G4Track *track)
Definition: G4IT.cc:48
std::vector< G4Track * > fLeadingTracks
Definition: G4IT.hh:88
G4TrackingInformation * GetTrackingInfo()
Definition: G4IT.hh:143
void SetLeadingStep(bool value)

Referenced by G4ITStepProcessor::PrepareLeadingTracks().

◆ Push()

void G4ITLeadingTracks::Push ( G4Track track)

Definition at line 75 of file G4ITLeadingTracks.cc.

76{
77 fLeadingTracks.push_back(track);
78}

Referenced by G4ITStepProcessor::ExtractILData().

◆ Reset()

void G4ITLeadingTracks::Reset ( )

Definition at line 49 of file G4ITLeadingTracks.cc.

50{
51 if (fLeadingTracks.empty() == false)
52 {
53 std::vector<G4Track*>::iterator fLeadingTracks_i = fLeadingTracks.begin();
54
55 while (fLeadingTracks_i != fLeadingTracks.end())
56 {
57 G4Track* track = *fLeadingTracks_i;
58 if (track)
59 {
60 G4IT* ITrack = GetIT(track);
61 if (ITrack)
62 {
63 ITrack->GetTrackingInfo()->SetLeadingStep(false);
64 }
65 }
66
67 ++fLeadingTracks_i;
68 continue;
69 }
70
71 fLeadingTracks.clear();
72 }
73}

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: