66 G4cout <<
"G4MolecularDissociationProcess constructor " <<
" Name:"
73 fDecayAtFixedTime =
true;
81 delete fpBrownianAction;
95 G4cout <<
"G4MolecularDissociation::IsApplicable(";
114 return output > 0. ? output : 0.;
124 auto pMotherMoleculeDefinition = pMotherMolecule->GetDefinition();
126 if (pMotherMoleculeDefinition->GetDecayTable())
128 const auto pDissociationChannels = pMotherMolecule->GetDissociationChannels();
130 if (pDissociationChannels ==
nullptr)
133 pMotherMolecule->PrintState();
134 exceptionDescription <<
"No decay channel was found for the molecule : "
135 << pMotherMolecule->GetName() <<
G4endl;
137 "G4DNAMolecularDissociation::NoDecayChannel",
139 exceptionDescription);
143 auto decayVectorSize = pDissociationChannels->size();
150 pDecayChannel = (*pDissociationChannels)[i];
151 if (RdmValue < pDecayChannel->GetProbability())
157 }
while (i < decayVectorSize);
162 if (decayEnergy > 0.)
169 std::vector<G4ThreeVector> productsDisplacement(nbProducts);
172 auto it = fDisplacementMap.find(pMotherMoleculeDefinition);
174 if (it != fDisplacementMap.end())
176 auto pDisplacer = it->second.get();
177 productsDisplacement = pDisplacer->GetProductsDisplacement(pDecayChannel);
178 motherMoleculeDisplacement =
179 pDisplacer->GetMotherMoleculeDisplacement(pDecayChannel);
184 errMsg <<
"No G4MolecularDecayProcess::theDecayDisplacementMap["
185 << pMotherMolecule->GetName() +
"]";
187 "DNAMolecularDecay001",
197 G4cout <<
"Decay Process : " << pMotherMolecule->GetName()
198 <<
" (trackID :" << track.
GetTrackID() <<
") "
205 for (
G4int j = 0; j < nbProducts; j++)
209 G4ThreeVector displacement = motherMoleculeDisplacement + productsDisplacement[j];
210 double mag_displacement = displacement.
mag();
211 G4ThreeVector displacement_direction = displacement / (mag_displacement + 1e-30);
217 displacement_direction,
222 mag_displacement = std::min(prNewSafety * 0.8, mag_displacement);
225 + displacement_direction * mag_displacement;
228 if(fpBrownianAction !=
nullptr)
230 fpBrownianAction->
Transport(product_pos);
246 if (Motherlogic !=
nullptr
247 && Motherlogic->GetMaterial() != WaterMaterial)
250 ED <<
"The decayed product is outside of the volume : "
252 <<
" with material : "<< Motherlogic->GetMaterial()
254 G4Exception(
"G4DNAMolecularDissociation::DecayIt()",
255 "OUTSIDE_OF_MOTHER_VOLUME",
260 auto pSecondary = pProduct->BuildTrack(track.
GetGlobalTime(), product_pos);
262 pSecondary->SetTrackStatus(
fAlive);
266 G4cout <<
"Product : " << pProduct->GetName() <<
G4endl;
280 else if (fVerbose && decayEnergy)
308 fDisplacementMap.emplace(pSpecies, std::unique_ptr<Displacer>(pDisplacer));
315 return fDisplacementMap[pSpecies].get();
349 if (fDecayAtFixedTime)
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 *)
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
static G4Material * GetMaterial(const G4String &name, G4bool warning=true)
Product * GetProduct(int) const
G4int GetNbProducts() const
const G4String & GetName() const
G4double GetProbability() const
G4double GetEnergy() const
G4double GetDecayTime() const
void Initialize(const G4Track &) override
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
virtual void Transport(G4ThreeVector &, G4Track *pTrack=nullptr)=0