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

#include <G4DNAUpdateSystemModel.hh>

Inheritance diagram for G4DNAUpdateSystemModel:

Public Types

using Index = G4VDNAMesh::Index
using MolType = const G4MolecularConfiguration*
using JumpingData = std::pair<MolType, Index>
using ReactionData = const G4DNAMolecularReactionData

Public Member Functions

 G4DNAUpdateSystemModel ()
 ~G4DNAUpdateSystemModel () override=default
void UpdateSystem (const Index &index, const ReactionData &data)
void UpdateSystem (const Index &index, const JumpingData &data)
void SetMesh (G4DNAMesh *)
void SetGlobalTime (const G4double &globalTime)
void SetVerbose (G4int verbose)
Public Member Functions inherited from G4VUpdateSystemModel
 G4VUpdateSystemModel ()=default
virtual ~G4VUpdateSystemModel ()=default

Detailed Description

Definition at line 36 of file G4DNAUpdateSystemModel.hh.

Member Typedef Documentation

◆ Index

◆ JumpingData

Definition at line 41 of file G4DNAUpdateSystemModel.hh.

◆ MolType

◆ ReactionData

Constructor & Destructor Documentation

◆ G4DNAUpdateSystemModel()

G4DNAUpdateSystemModel::G4DNAUpdateSystemModel ( )
default

◆ ~G4DNAUpdateSystemModel()

G4DNAUpdateSystemModel::~G4DNAUpdateSystemModel ( )
overridedefault

Member Function Documentation

◆ SetGlobalTime()

void G4DNAUpdateSystemModel::SetGlobalTime ( const G4double & globalTime)
inline

Definition at line 49 of file G4DNAUpdateSystemModel.hh.

49{ fGlobalTime = globalTime; }

◆ SetMesh()

void G4DNAUpdateSystemModel::SetMesh ( G4DNAMesh * pMesh)

Definition at line 39 of file G4DNAUpdateSystemModel.cc.

39{ fpMesh = pMesh; }

◆ SetVerbose()

void G4DNAUpdateSystemModel::SetVerbose ( G4int verbose)
inline

Definition at line 50 of file G4DNAUpdateSystemModel.hh.

50{ fVerbose = verbose; }

◆ UpdateSystem() [1/2]

void G4DNAUpdateSystemModel::UpdateSystem ( const Index & index,
const JumpingData & data )

Definition at line 207 of file G4DNAUpdateSystemModel.cc.

209{
210 auto reactant = std::get<0>(data);
211 auto JunpToIndex = std::get<1>(data);
212#ifdef G4VERBOSE
213 if(fVerbose > 1)
214 {
215 G4cout << "At time : " << std::setw(7) << G4BestUnit(fGlobalTime, "Time")
216 << " Jumping : " << reactant->GetName() << " from " << index
217 << " -> " << JunpToIndex << G4endl;
218 }
219#endif
220 JumpTo(index, reactant);
221 JumpIn(JunpToIndex, reactant);
222}
#define G4BestUnit(a, b)
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout

◆ UpdateSystem() [2/2]

void G4DNAUpdateSystemModel::UpdateSystem ( const Index & index,
const ReactionData & data )

Definition at line 157 of file G4DNAUpdateSystemModel.cc.

159{
160 auto reactant1 = data.GetReactant1();
161 auto reactant2 = data.GetReactant2();
162#ifdef G4VERBOSE
163 if(fVerbose != 0)
164 {
165 G4cout << "At time : " << std::setw(7) << G4BestUnit(fGlobalTime, "Time")
166 << " Reaction : " << reactant1->GetName() << " + "
167 << reactant2->GetName() << " -> ";
168 }
169#endif
170 const G4int nbProducts = data.GetNbProducts();
171 if(nbProducts != 0)
172 {
173 for(G4int j = 0; j < nbProducts; ++j)
174 {
175#ifdef G4VERBOSE
176 if((fVerbose != 0) && j != 0)
177 {
178 G4cout << " + ";
179 }
180 if(fVerbose != 0)
181 {
182 G4cout << data.GetProduct(j)->GetName();
183 }
184#endif
185 CreateMolecule(index, data.GetProduct(j));
186 }
187 }
188 else
189 {
190#ifdef G4VERBOSE
191 if(fVerbose != 0)
192 {
193 G4cout << "No product";
194 }
195#endif
196 }
197#ifdef G4VERBOSE
198 if(fVerbose != 0)
199 {
200 G4cout << G4endl;
201 }
202#endif
203 KillMolecule(index, reactant1);
204 KillMolecule(index, reactant2);
205}
int G4int
Definition G4Types.hh:85

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