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

#include <G4ITReaction.hh>

+ Inheritance diagram for G4ITReaction:

Public Member Functions

virtual ~G4ITReaction ()
 
G4TrackGetReactant (G4Track *trackA) const
 
std::pair< G4Track *, G4Track * > GetReactants () const
 
std::size_t GetHash () const
 
G4double GetTime () const
 
void RemoveMe ()
 
void AddIterator (G4ITReactionPerTrackPtr reactionPerTrack, G4ITReactionList::iterator it)
 
void AddIterator (G4ITReactionPerTimeIt it)
 

Static Public Member Functions

static G4ITReactionPtr New (G4double time, G4Track *trackA, G4Track *trackB)
 

Public Attributes

G4double fTime
 
std::pair< G4Track *, G4Track * > fReactants
 
G4ReactionPerTrackIt fReactionPerTrack
 
G4ITReactionPerTimeItfReactionPerTimeIt
 

Detailed Description

Definition at line 80 of file G4ITReaction.hh.

Constructor & Destructor Documentation

◆ ~G4ITReaction()

G4ITReaction::~G4ITReaction ( )
virtual

Definition at line 79 of file G4ITReaction.cc.

80{
81 //gAll->erase(this);
83}
G4ITReactionPerTimeIt * fReactionPerTimeIt

Member Function Documentation

◆ AddIterator() [1/2]

void G4ITReaction::AddIterator ( G4ITReactionPerTimeIt  it)
inline

Definition at line 111 of file G4ITReaction.hh.

112 {
114 }
std::multiset< G4ITReactionPtr, compReactionPerTime >::iterator G4ITReactionPerTimeIt
Definition: G4ITReaction.hh:78

◆ AddIterator() [2/2]

void G4ITReaction::AddIterator ( G4ITReactionPerTrackPtr  reactionPerTrack,
G4ITReactionList::iterator  it 
)
inline

Definition at line 105 of file G4ITReaction.hh.

107 {
108 fReactionPerTrack.push_back(std::make_pair(reactionPerTrack, it));
109 }
G4ReactionPerTrackIt fReactionPerTrack

◆ GetHash()

std::size_t G4ITReaction::GetHash ( ) const

Definition at line 61 of file G4ITReaction.cc.

62{
63 std::size_t hash = 0;
64 hash_combine(hash, fReactants.first->GetTrackID());
65 hash_combine(hash, fReactants.first->GetTrackID());
66 return hash;
67}
void hash_combine(std::size_t &seed, const T &v)
Definition: G4ITReaction.cc:54
std::pair< G4Track *, G4Track * > fReactants

◆ GetReactant()

G4Track * G4ITReaction::GetReactant ( G4Track trackA) const
inline

Definition at line 90 of file G4ITReaction.hh.

91 {
92 if(fReactants.first != trackA) return fReactants.first;
93 return fReactants.second;
94 }

◆ GetReactants()

std::pair< G4Track *, G4Track * > G4ITReaction::GetReactants ( ) const
inline

Definition at line 96 of file G4ITReaction.hh.

96{return fReactants;}

◆ GetTime()

G4double G4ITReaction::GetTime ( ) const
inline

Definition at line 98 of file G4ITReaction.hh.

99 {
100 return fTime;
101 }
G4double fTime

◆ New()

static G4ITReactionPtr G4ITReaction::New ( G4double  time,
G4Track trackA,
G4Track trackB 
)
inlinestatic

Definition at line 84 of file G4ITReaction.hh.

85 {
86 return G4ITReactionPtr(new G4ITReaction(time, trackA, trackB));
87 }
G4shared_ptr< G4ITReaction > G4ITReactionPtr
Definition: G4ITReaction.hh:61

Referenced by G4ITReactionSet::AddReaction().

◆ RemoveMe()

void G4ITReaction::RemoveMe ( )

Definition at line 85 of file G4ITReaction.cc.

86{
87 G4ITReactionPtr backMeUp = this->shared_from_this();
88 for(auto it = fReactionPerTrack.begin() ;
89 it != fReactionPerTrack.end() ; ++it)
90 {
91 it->first->RemoveThisReaction(it->second);
92 }
93 fReactionPerTrack.clear();
94
96 {
98 delete fReactionPerTimeIt;
99 fReactionPerTimeIt = nullptr;
100 }
101}
static G4ITReactionSet * Instance()
G4ITReactionPerTime & GetReactionsPerTime()

Member Data Documentation

◆ fReactants

std::pair<G4Track*, G4Track*> G4ITReaction::fReactants

Definition at line 117 of file G4ITReaction.hh.

Referenced by GetHash(), GetReactant(), and GetReactants().

◆ fReactionPerTimeIt

G4ITReactionPerTimeIt* G4ITReaction::fReactionPerTimeIt

Definition at line 119 of file G4ITReaction.hh.

Referenced by AddIterator(), RemoveMe(), and ~G4ITReaction().

◆ fReactionPerTrack

G4ReactionPerTrackIt G4ITReaction::fReactionPerTrack

Definition at line 118 of file G4ITReaction.hh.

Referenced by AddIterator(), and RemoveMe().

◆ fTime

G4double G4ITReaction::fTime

Definition at line 116 of file G4ITReaction.hh.

Referenced by GetTime().


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