Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4ITReactionSet Class Reference

#include <G4ITReaction.hh>

Collaboration diagram for G4ITReactionSet:

Public Member Functions

virtual ~G4ITReactionSet ()
 
void AddReaction (double time, G4Track *trackA, G4Track *trackB)
 
void AddReactions (double time, G4Track *trackA, G4TrackVectorHandle reactants)
 
void RemoveReactionSet (G4Track *track)
 
void SelectThisReaction (G4ITReactionPtr reaction)
 
G4ITReactionPerTrackMapGetReactionMap ()
 
void RemoveReactionPerTrack (G4ITReactionPerTrackPtr reactionPerTrack)
 
void CleanAllReaction ()
 
bool Empty ()
 
G4ITReactionPerTimeGetReactionsPerTime ()
 

Static Public Member Functions

static G4ITReactionSetInstance ()
 

Protected Member Functions

void AddReaction (G4Track *track, G4ITReactionPtr reaction)
 

Protected Attributes

G4ITReactionPerTrackMap fReactionPerTrack
 
G4ITReactionPerTime fReactionPerTime
 
bool fSortByTime
 

Static Protected Attributes

static G4ThreadLocal
G4ITReactionSet
fpInstance
 

Detailed Description

Definition at line 178 of file G4ITReaction.hh.

Constructor & Destructor Documentation

virtual G4ITReactionSet::~G4ITReactionSet ( )
inlinevirtual

Definition at line 186 of file G4ITReaction.hh.

187  {
188  fReactionPerTrack.clear();
189  fReactionPerTime.clear();
190  }
G4ITReactionPerTrackMap fReactionPerTrack
G4ITReactionPerTime fReactionPerTime

Member Function Documentation

void G4ITReactionSet::AddReaction ( double  time,
G4Track trackA,
G4Track trackB 
)
inline

Definition at line 201 of file G4ITReaction.hh.

202  {
203  G4ITReactionPtr reaction(G4ITReaction::New(time, trackA, trackB));
204  AddReaction(trackA, reaction);
205  AddReaction(trackB, reaction);
206 
207  if(fSortByTime)
208  {
209  G4ITReactionPerTime::iterator it = fReactionPerTime.insert(reaction);
210  reaction->AddIterator(it);
211  }
212  }
G4shared_ptr< G4ITReaction > G4ITReactionPtr
Definition: G4ITReaction.hh:59
void AddReaction(double time, G4Track *trackA, G4Track *trackB)
G4ITReactionPerTime fReactionPerTime
static G4ITReactionPtr New(double time, G4Track *trackA, G4Track *trackB)
Definition: G4ITReaction.hh:83

Here is the call graph for this function:

Here is the caller graph for this function:

void G4ITReactionSet::AddReaction ( G4Track track,
G4ITReactionPtr  reaction 
)
inlineprotected

Definition at line 287 of file G4ITReaction.hh.

288  {
289  G4ITReactionPerTrackMap::iterator it = fReactionPerTrack.find(track);
290 
291  G4ITReactionPerTrackPtr reactionPerTrack;
292 
293  if(it == fReactionPerTrack.end())
294  {
295  reactionPerTrack = G4ITReactionPerTrack::New();
296  std::pair< G4ITReactionPerTrackMap::iterator,bool> pos =
297  fReactionPerTrack.insert(std::make_pair(track, reactionPerTrack));
298  reactionPerTrack->AddIterator(pos.first);
299  }
300  else
301  {
302  reactionPerTrack = it->second;
303  }
304 
305  reactionPerTrack->AddReaction(reaction);
306  }
G4ITReactionPerTrackMap fReactionPerTrack
static G4ITReactionPerTrackPtr New()
G4shared_ptr< G4ITReactionPerTrack > G4ITReactionPerTrackPtr
Definition: G4ITReaction.hh:61
static const G4double pos

Here is the call graph for this function:

void G4ITReactionSet::AddReactions ( double  time,
G4Track trackA,
G4TrackVectorHandle  reactants 
)
inline

Definition at line 214 of file G4ITReaction.hh.

215  {
216  std::vector<G4Track*>::iterator it = reactants->begin();
217  for(;it != reactants->end() ; ++it)
218  {
219  AddReaction(time, trackA, *it);
220  }
221  }
void AddReaction(double time, G4Track *trackA, G4Track *trackB)

Here is the call graph for this function:

void G4ITReactionSet::CleanAllReaction ( )
inline

Definition at line 264 of file G4ITReaction.hh.

265  {
266  for(G4ITReactionPerTrackMap::iterator it = fReactionPerTrack.begin();
267  it != fReactionPerTrack.end() ;
268  it = fReactionPerTrack.begin())
269  {
270  it->second->RemoveMe();
271  }
272  fReactionPerTrack.clear();
273  fReactionPerTime.clear();
274  }
G4ITReactionPerTrackMap fReactionPerTrack
G4ITReactionPerTime fReactionPerTime

Here is the caller graph for this function:

bool G4ITReactionSet::Empty ( )
inline

Definition at line 276 of file G4ITReaction.hh.

277  {
278  return fReactionPerTrack.empty();
279  }
G4ITReactionPerTrackMap fReactionPerTrack
G4ITReactionPerTrackMap& G4ITReactionSet::GetReactionMap ( )
inline

Definition at line 246 of file G4ITReaction.hh.

247  {
248  return fReactionPerTrack;
249  }
G4ITReactionPerTrackMap fReactionPerTrack

Here is the caller graph for this function:

G4ITReactionPerTime& G4ITReactionSet::GetReactionsPerTime ( )
inline

Definition at line 281 of file G4ITReaction.hh.

282  {
283  return fReactionPerTime;
284  }
G4ITReactionPerTime fReactionPerTime

Here is the caller graph for this function:

static G4ITReactionSet* G4ITReactionSet::Instance ( void  )
inlinestatic

Definition at line 192 of file G4ITReaction.hh.

193  {
194  if(fpInstance == 0) new G4ITReactionSet();
195 
196  return fpInstance;
197  }
static G4ThreadLocal G4ITReactionSet * fpInstance

Here is the caller graph for this function:

void G4ITReactionSet::RemoveReactionPerTrack ( G4ITReactionPerTrackPtr  reactionPerTrack)
inline

Definition at line 251 of file G4ITReaction.hh.

252  {
253  for(std::list<G4ITReactionPerTrackMap::iterator>::iterator it =
254  reactionPerTrack->GetListOfIterators().begin() ;
255  it != reactionPerTrack->GetListOfIterators().end() ;
256  ++it)
257  {
258  fReactionPerTrack.erase(*it);
259  }
260  reactionPerTrack->GetListOfIterators().clear();
261  reactionPerTrack->GetReactionList().clear();
262  }
G4ITReactionPerTrackMap fReactionPerTrack

Here is the caller graph for this function:

void G4ITReactionSet::RemoveReactionSet ( G4Track track)
inline

Definition at line 223 of file G4ITReaction.hh.

224  {
225  G4ITReactionPerTrackMap::iterator it = fReactionPerTrack.find(track);
226  if(it != fReactionPerTrack.end())
227  {
228  G4ITReactionPerTrackPtr backItUp = it->second->shared_from_this();
229  backItUp->RemoveMe();
230  //fReactionPerTrack.erase(it); // not needed : once empty ==> auto-erase
231  it = fReactionPerTrack.find(track);
232  if(it != fReactionPerTrack.end())
233  {
234  fReactionPerTrack.erase(it);
235  }
236  }
237  }
G4ITReactionPerTrackMap fReactionPerTrack
G4shared_ptr< G4ITReactionPerTrack > G4ITReactionPerTrackPtr
Definition: G4ITReaction.hh:61

Here is the caller graph for this function:

void G4ITReactionSet::SelectThisReaction ( G4ITReactionPtr  reaction)
inline

Definition at line 239 of file G4ITReaction.hh.

240  {
241  reaction->RemoveMe();
242  RemoveReactionSet(reaction->GetReactants().first);
243  RemoveReactionSet(reaction->GetReactants().second);
244  }
void RemoveReactionSet(G4Track *track)

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

G4ThreadLocal G4ITReactionSet * G4ITReactionSet::fpInstance
staticprotected

Definition at line 311 of file G4ITReaction.hh.

G4ITReactionPerTime G4ITReactionSet::fReactionPerTime
protected

Definition at line 308 of file G4ITReaction.hh.

G4ITReactionPerTrackMap G4ITReactionSet::fReactionPerTrack
protected

Definition at line 307 of file G4ITReaction.hh.

bool G4ITReactionSet::fSortByTime
protected

Definition at line 310 of file G4ITReaction.hh.


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