65 G4cout <<
"G4MolecularDissociationProcess constructor " <<
" Name:"
91 G4cout <<
"G4MolecularDissociation::IsApplicable(";
110 return output > 0. ? output : 0.;
120 auto pMotherMoleculeDefinition = pMotherMolecule->GetDefinition();
122 if (pMotherMoleculeDefinition->GetDecayTable())
124 const auto pDissociationChannels = pMotherMolecule->GetDissociationChannels();
126 if (pDissociationChannels ==
nullptr)
129 pMotherMolecule->PrintState();
130 exceptionDescription <<
"No decay channel was found for the molecule : "
131 << pMotherMolecule->GetName() <<
G4endl;
133 "G4DNAMolecularDissociation::NoDecayChannel",
135 exceptionDescription);
139 auto decayVectorSize = pDissociationChannels->size();
146 pDecayChannel = (*pDissociationChannels)[i];
147 if (RdmValue < pDecayChannel->GetProbability())
153 }
while (i < decayVectorSize);
158 if (decayEnergy > 0.)
165 std::vector<G4ThreeVector> productsDisplacement(nbProducts);
172 auto pDisplacer =
it->second.get();
173 productsDisplacement = pDisplacer->GetProductsDisplacement(pDecayChannel);
174 motherMoleculeDisplacement =
175 pDisplacer->GetMotherMoleculeDisplacement(pDecayChannel);
180 errMsg <<
"No G4MolecularDecayProcess::theDecayDisplacementMap["
181 << pMotherMolecule->GetName() +
"]";
183 "DNAMolecularDecay001",
193 G4cout <<
"Decay Process : " << pMotherMolecule->GetName()
194 <<
" (trackID :" << track.
GetTrackID() <<
") "
201 for (
G4int j = 0; j < nbProducts; j++)
205 G4ThreeVector displacement = motherMoleculeDisplacement + productsDisplacement[j];
206 double mag_displacement = displacement.mag();
207 G4ThreeVector displacement_direction = displacement / (mag_displacement + 1
e-30);
213 displacement_direction,
218 mag_displacement =
std::min(prNewSafety * 0.8, mag_displacement);
221 + displacement_direction * mag_displacement;
231 ED <<
"The decayed product is outside of the volume : "
233 G4Exception(
"G4DNAMolecularDissociation::DecayIt()",
234 "OUTSIDE_OF_MOTHER_VOLUME",
238 auto pSecondary = pProduct->BuildTrack(track.
GetGlobalTime(), product_pos);
240 pSecondary->SetTrackStatus(
fAlive);
244 G4cout <<
"Product : " << pProduct->GetName() <<
G4endl;