65 G4cout <<
"G4MolecularDissociationProcess constructor " <<
" Name:"
72 fDecayAtFixedTime =
true;
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);
168 auto it = fDisplacementMap.find(pMotherMoleculeDefinition);
170 if (it != fDisplacementMap.end())
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 + 1e-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;
258 else if (fVerbose && decayEnergy)
286 fDisplacementMap.emplace(pSpecies, std::unique_ptr<Displacer>(pDisplacer));
293 return fDisplacementMap[pSpecies].get();
327 if (fDecayAtFixedTime)
G4double condition(const G4ErrorSymMatrix &m)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4Molecule * GetMolecule(const G4Track &track)
G4GLOB_DLL std::ostream G4cout
void SetDisplacer(Species *, Displacer *)
G4bool IsApplicable(const G4ParticleDefinition &) override
G4double AtRestGetPhysicalInteractionLength(const G4Track &track, G4ForceCondition *condition) override
virtual G4VParticleChange * DecayIt(const G4Track &, const G4Step &)
G4DNAMolecularDissociation()=delete
G4double GetMeanFreePath(const G4Track &, G4double, G4ForceCondition *) override
G4VParticleChange * PostStepDoIt(const G4Track &track, const G4Step &step) override
Displacer * GetDisplacer(Species *)
G4VParticleChange * AtRestDoIt(const G4Track &track, const G4Step &step) override
G4double GetMeanLifeTime(const G4Track &, G4ForceCondition *) override
G4double PostStepGetPhysicalInteractionLength(const G4Track &track, G4double previousStepSize, G4ForceCondition *condition) override
~G4DNAMolecularDissociation() override
static G4ITTransportationManager * GetTransportationManager()
G4ITNavigator * GetNavigatorForTracking() const
Product * GetProduct(int) const
G4int GetNbProducts() const
const G4String & GetName() const
G4double GetProbability() const
G4double GetEnergy() const
G4double GetDecayTime() const
virtual void Initialize(const G4Track &)
const G4String & GetParticleType() const
const G4String & GetParticleName() const
const G4ThreeVector & GetPosition() const
G4double GetGlobalTime() const
G4double GetProperTime() const
const G4VTouchable * GetTouchable() const
virtual void ClearInteractionTimeLeft()
virtual void ClearNumberOfInteractionLengthLeft()
Identical to G4VRestDiscreteProcess with dependency from G4VITProcess.
G4double AtRestGetPhysicalInteractionLength(const G4Track &, G4ForceCondition *) override
void ProposeTrackStatus(G4TrackStatus status)
void ProposeLocalEnergyDeposit(G4double anEnergyPart)
void SetNumberOfSecondaries(G4int totSecondaries)
const G4String & GetName() const
G4ParticleChange aParticleChange
G4bool enableAlongStepDoIt
void SetProcessSubType(G4int)
G4bool enablePostStepDoIt
G4VParticleChange * pParticleChange
virtual EInside Inside(const G4ThreeVector &p) const =0
virtual G4VSolid * GetSolid(G4int depth=0) const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const