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

Definition at line 34 of file G4DNAUpdateSystemModel.cc.

36{}
G4VUpdateSystemModel()=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 38 of file G4DNAUpdateSystemModel.cc.

38{ 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 206 of file G4DNAUpdateSystemModel.cc.

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

◆ UpdateSystem() [2/2]

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

Definition at line 156 of file G4DNAUpdateSystemModel.cc.

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

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