Geant4 11.2.2
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 37 of file G4DNAUpdateSystemModel.cc.

37{ 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 205 of file G4DNAUpdateSystemModel.cc.

207{
208 auto reactant = std::get<0>(data);
209 auto JunpToIndex = std::get<1>(data);
210#ifdef G4VERBOSE
211 if(fVerbose > 1)
212 {
213 G4cout << "At time : " << std::setw(7) << G4BestUnit(fGlobalTime, "Time")
214 << " Jumping : " << reactant->GetName() << " from " << index
215 << " -> " << JunpToIndex << G4endl;
216 }
217#endif
218 JumpTo(index, reactant);
219 JumpIn(JunpToIndex, reactant);
220}
#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 155 of file G4DNAUpdateSystemModel.cc.

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

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