40void G4DNAUpdateSystemModel::KillMolecule(
const Index& index, MolType type)
44 auto iter = node.find(type);
45 if(iter != node.end())
51 <<
"G4DNAUpdateSystemModel::KillMolecule::molecule : "
52 << type->GetName() <<
" index : " << index
53 <<
" number : " << iter->second <<
G4endl;
54 G4Exception(
"G4DNAEventScheduler::Stepping",
"G4DNAEventScheduler002",
65 auto pScavengerMaterial =
dynamic_cast<G4DNAScavengerMaterial*
>(
67 if(pScavengerMaterial !=
nullptr)
69 pScavengerMaterial->ReduceNumberMoleculePerVolumeUnitForMaterialConf(
76 <<
"index : " << index <<
" " << type->GetName()
77 <<
" This molecule is not belong scavengers or particle-base"
79 G4Exception(
"G4DNAEventScheduler::Stepping",
"G4DNAEventScheduler002",
85void G4DNAUpdateSystemModel::JumpTo(
const Index& index, MolType type)
87 auto& node = fpMesh->GetVoxelMapList(index);
88 auto iter = node.find(type);
89 if(iter != node.end())
94 exceptionDescription <<
"G4DNAUpdateSystemModel::JumpTo::molecule : "
95 << type->GetName() <<
" index : " << index
96 <<
" number : " << iter->second;
97 G4Exception(
"G4DNAUpdateSystemModel::JumpTo",
"G4DNAUpdateSystemModel001",
104 fpMesh->PrintVoxel(index);
106 exceptionDescription <<
"index : " << index <<
" " << type->GetName()
107 <<
" There is no this type";
108 G4Exception(
"G4DNAUpdateSystemModel::JumpTo",
"G4DNAUpdateSystemModel002",
113void G4DNAUpdateSystemModel::CreateMolecule(
const Index& index, MolType type)
116 auto pScavengerMaterial =
dynamic_cast<G4DNAScavengerMaterial*
>(
118 if(pScavengerMaterial !=
nullptr && pScavengerMaterial->find(type))
120 pScavengerMaterial->AddNumberMoleculePerVolumeUnitForMaterialConf(
125 auto& node = fpMesh->GetVoxelMapList(index);
126 auto iter = node.find(type);
127 if(iter != node.end())
142void G4DNAUpdateSystemModel::JumpIn(
const Index& index, MolType type)
145 auto& node = fpMesh->GetVoxelMapList(index);
146 auto iter = node.find(type);
147 if(iter != node.end())
166 <<
" Reaction : " << reactant1->GetName() <<
" + "
167 << reactant2->GetName() <<
" -> ";
173 for(
G4int j = 0; j < nbProducts; ++j)
176 if((fVerbose != 0) && j != 0)
203 KillMolecule(index, reactant1);
204 KillMolecule(index, reactant2);
210 auto reactant = std::get<0>(data);
211 auto JunpToIndex = std::get<1>(data);
216 <<
" Jumping : " << reactant->GetName() <<
" from " << index
217 <<
" -> " << JunpToIndex <<
G4endl;
220 JumpTo(index, reactant);
221 JumpIn(JunpToIndex, reactant);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4GLOB_DLL std::ostream G4cout
Data & GetVoxelMapList(const Index &index)
Reactant * GetProduct(G4int i) const
Reactant * GetReactant1() const
Reactant * GetReactant2() const
G4int GetNbProducts() const
const G4DNAMolecularReactionData ReactionData
std::pair< MolType, Index > JumpingData
void SetMesh(G4DNAMesh *)
void UpdateSystem(const Index &index, const ReactionData &data)
const G4String & GetName() const
void AddMoleculeWithoutTrack(const G4MolecularConfiguration *, G4double, G4int=1)
void RemoveMoleculeWithoutTrack(const G4MolecularConfiguration *, G4double, G4int=1)
static G4MoleculeCounterManager * Instance()
static G4Scheduler * Instance()
G4VScavengerMaterial * GetScavengerMaterial() const