66 G4cout <<
"G4MolecularDissociationProcess constructor " <<
" Name:"
92 G4cout <<
"G4MolecularDissociation::IsApplicable(";
111 return output > 0. ? output : 0.;
121 auto pMotherMoleculeDefinition = pMotherMolecule->GetDefinition();
123 if (pMotherMoleculeDefinition->GetDecayTable())
125 const auto pDissociationChannels = pMotherMolecule->GetDissociationChannels();
127 if (pDissociationChannels ==
nullptr)
130 pMotherMolecule->PrintState();
131 exceptionDescription <<
"No decay channel was found for the molecule : "
132 << pMotherMolecule->GetName() <<
G4endl;
134 "G4DNAMolecularDissociation::NoDecayChannel",
136 exceptionDescription);
140 auto decayVectorSize = pDissociationChannels->size();
147 pDecayChannel = (*pDissociationChannels)[i];
148 if (RdmValue < pDecayChannel->GetProbability())
154 }
while (i < decayVectorSize);
159 if (decayEnergy > 0.)
166 std::vector<G4ThreeVector> productsDisplacement(nbProducts);
173 auto pDisplacer = it->second.get();
174 productsDisplacement = pDisplacer->GetProductsDisplacement(pDecayChannel);
175 motherMoleculeDisplacement =
176 pDisplacer->GetMotherMoleculeDisplacement(pDecayChannel);
181 errMsg <<
"No G4MolecularDecayProcess::theDecayDisplacementMap["
182 << pMotherMolecule->GetName() +
"]";
184 "DNAMolecularDecay001",
194 G4cout <<
"Decay Process : " << pMotherMolecule->GetName()
195 <<
" (trackID :" << track.
GetTrackID() <<
") "
202 for (
G4int j = 0; j < nbProducts; j++)
206 G4ThreeVector displacement = motherMoleculeDisplacement + productsDisplacement[j];
207 double mag_displacement = displacement.
mag();
208 G4ThreeVector displacement_direction = displacement / (mag_displacement + 1e-30);
214 displacement_direction,
219 mag_displacement =
std::min(prNewSafety * 0.8, mag_displacement);
222 + displacement_direction * mag_displacement;
232 ED <<
"The decayed product is outside of the volume : "
234 G4Exception(
"G4DNAMolecularDissociation::DecayIt()",
235 "OUTSIDE_OF_MOTHER_VOLUME",
239 auto pSecondary = pProduct->BuildTrack(track.
GetGlobalTime(), product_pos);
241 pSecondary->SetTrackStatus(
fAlive);
245 G4cout <<
"Product : " << pProduct->GetName() <<
G4endl;
G4double condition(const G4ErrorSymMatrix &m)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
@ fLowEnergyMolecularDecay
G4Molecule * GetMolecule(const G4Track &track)
G4GLOB_DLL std::ostream G4cout
void SetDisplacer(Species *, Displacer *)
DisplacementMap fDisplacementMap
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
T min(const T t1, const T t2)
brief Return the smallest of the two arguments