Geant4-11
Public Member Functions | Static Public Member Functions | Data Fields | Private Member Functions
G4ITReaction Class Reference

#include <G4ITReaction.hh>

Inheritance diagram for G4ITReaction:

Public Member Functions

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

Static Public Member Functions

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

Data Fields

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

Private Member Functions

 G4ITReaction (G4double time, G4Track *, G4Track *)
 

Detailed Description

Definition at line 80 of file G4ITReaction.hh.

Constructor & Destructor Documentation

◆ G4ITReaction()

G4ITReaction::G4ITReaction ( G4double  time,
G4Track trackA,
G4Track trackB 
)
private

Definition at line 69 of file G4ITReaction.cc.

69 :
70 G4enable_shared_from_this<G4ITReaction>(),
71 fTime(time),
72 fReactants(trackA,trackB)
73{
74 //if(gAll == 0) gAll = new std::set<G4ITReaction*>();
75 //gAll->insert(this);
77}
std::pair< G4Track *, G4Track * > fReactants
G4ITReactionPerTimeIt * fReactionPerTimeIt
G4double fTime

References fReactionPerTimeIt.

Referenced by New().

◆ ~G4ITReaction()

G4ITReaction::~G4ITReaction ( )
virtual

Definition at line 79 of file G4ITReaction.cc.

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

References 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

References fReactionPerTimeIt.

◆ 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

References 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
static unsigned long FASTCALL hash(XML_Parser parser, KEY s)
Definition: xmlparse.cc:5967

References fReactants, hash(), and hash_combine().

◆ 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 }

References fReactants.

◆ GetReactants()

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

Definition at line 96 of file G4ITReaction.hh.

96{return fReactants;}

References fReactants.

◆ GetTime()

G4double G4ITReaction::GetTime ( ) const
inline

Definition at line 98 of file G4ITReaction.hh.

99 {
100 return fTime;
101 }

References 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:60
G4ITReaction(G4double time, G4Track *, G4Track *)
Definition: G4ITReaction.cc:69

References G4ITReaction().

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

References fReactionPerTimeIt, fReactionPerTrack, G4ITReactionSet::GetReactionsPerTime(), and G4ITReactionSet::Instance().

Field 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(), G4ITReaction(), 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: