38void G4DNAUpdateSystemModel::KillMolecule(
const Index& index, MolType type)
42 auto iter = node.find(type);
43 if(iter != node.end())
49 <<
"G4DNAUpdateSystemModel::KillMolecule::molecule : "
50 << type->GetName() <<
" index : " << index
51 <<
" number : " << iter->second <<
G4endl;
52 G4Exception(
"G4DNAEventScheduler::Stepping",
"G4DNAEventScheduler002",
65 if(pScavengerMaterial !=
nullptr)
67 pScavengerMaterial->ReduceNumberMoleculePerVolumeUnitForMaterialConf(
74 <<
"index : " << index <<
" " << type->GetName()
75 <<
" This molecule is not belong scavengers or particle-base"
77 G4Exception(
"G4DNAEventScheduler::Stepping",
"G4DNAEventScheduler002",
83void G4DNAUpdateSystemModel::JumpTo(
const Index& index, MolType type)
86 auto iter = node.find(type);
87 if(iter != node.end())
92 exceptionDescription <<
"G4DNAUpdateSystemModel::JumpTo::molecule : "
93 << type->GetName() <<
" index : " << index
94 <<
" number : " << iter->second;
95 G4Exception(
"G4DNAUpdateSystemModel::JumpTo",
"G4DNAUpdateSystemModel001",
104 exceptionDescription <<
"index : " << index <<
" " << type->GetName()
105 <<
" There is no this type";
106 G4Exception(
"G4DNAUpdateSystemModel::JumpTo",
"G4DNAUpdateSystemModel002",
111void G4DNAUpdateSystemModel::CreateMolecule(
const Index& index, MolType type)
116 if(pScavengerMaterial !=
nullptr && pScavengerMaterial->find(type))
118 pScavengerMaterial->AddNumberMoleculePerVolumeUnitForMaterialConf(
124 auto iter = node.find(type);
125 if(iter != node.end())
140void G4DNAUpdateSystemModel::JumpIn(
const Index& index, MolType type)
144 auto iter = node.find(type);
145 if(iter != node.end())
164 <<
" Reaction : " << reactant1->GetName() <<
" + "
165 << reactant2->GetName() <<
" -> ";
171 for(
G4int j = 0; j < nbProducts; ++j)
174 if((fVerbose != 0) && j != 0)
201 KillMolecule(index, reactant1);
202 KillMolecule(index, reactant2);
208 auto reactant = std::get<0>(data);
209 auto JunpToIndex = std::get<1>(data);
214 <<
" Jumping : " << reactant->GetName() <<
" from " << index
215 <<
" -> " << JunpToIndex <<
G4endl;
218 JumpTo(index, reactant);
219 JumpIn(JunpToIndex, reactant);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
void PrintVoxel(const Index &index)
Data & GetVoxelMapList(const Index &index)
Reactant * GetProduct(G4int i) const
Reactant * GetReactant1() const
Reactant * GetReactant2() const
G4int GetNbProducts() const
std::pair< MolType, Index > JumpingData
void SetMesh(G4DNAMesh *)
void UpdateSystem(const Index &index, const ReactionData &data)
const G4String & GetName() const
static G4Scheduler * Instance()
G4VScavengerMaterial * GetScavengerMaterial() const
virtual void RemoveAMoleculeAtTime(Reactant *, G4double time, const G4ThreeVector *position=nullptr, int number=1)=0
static G4VMoleculeCounter * Instance()
virtual void AddAMoleculeAtTime(Reactant *, G4double time, const G4ThreeVector *position=nullptr, int number=1)=0