66 G4cout <<
"G4MolecularDissociationProcess constructor " <<
" Name:"
73 fDecayAtFixedTime =
true;
81 delete fpBrownianAction;
95 G4cout <<
"G4MolecularDissociation::IsApplicable(";
112 return output > 0. ? output : 0.;
122 auto pMotherMoleculeDefinition = pMotherMolecule->GetDefinition();
124 if (pMotherMoleculeDefinition->GetDecayTable() !=
nullptr)
126 const auto pDissociationChannels = pMotherMolecule->GetDissociationChannels();
128 if (pDissociationChannels ==
nullptr)
131 pMotherMolecule->PrintState();
132 exceptionDescription <<
"No decay channel was found for the molecule : "
133 << pMotherMolecule->GetName() <<
G4endl;
135 "G4DNAMolecularDissociation::NoDecayChannel",
137 exceptionDescription);
141 auto decayVectorSize = pDissociationChannels->size();
148 pDecayChannel = (*pDissociationChannels)[i];
149 if (RdmValue < pDecayChannel->GetProbability())
155 }
while (i < decayVectorSize);
160 if (decayEnergy > 0.)
167 std::vector<G4ThreeVector> productsDisplacement(nbProducts);
170 auto it = fDisplacementMap.find(pMotherMoleculeDefinition);
172 if (it != fDisplacementMap.end())
174 auto pDisplacer = it->second.get();
175 productsDisplacement = pDisplacer->GetProductsDisplacement(pDecayChannel);
176 motherMoleculeDisplacement =
177 pDisplacer->GetMotherMoleculeDisplacement(pDecayChannel);
182 errMsg <<
"No G4MolecularDecayProcess::theDecayDisplacementMap["
183 << pMotherMolecule->GetName() +
"]";
185 "DNAMolecularDecay001",
195 G4cout <<
"Decay Process : " << pMotherMolecule->GetName()
196 <<
" (trackID :" << track.
GetTrackID() <<
") "
203 for (
G4int j = 0; j < nbProducts; j++)
207 G4ThreeVector displacement = motherMoleculeDisplacement + productsDisplacement[j];
208 double mag_displacement = displacement.
mag();
209 G4ThreeVector displacement_direction = displacement / (mag_displacement + 1e-30);
215 displacement_direction,
220 mag_displacement = std::min(prNewSafety * 0.8, mag_displacement);
223 + displacement_direction * mag_displacement;
226 if(fpBrownianAction !=
nullptr)
228 fpBrownianAction->
Transport(product_pos);
244 if (Motherlogic !=
nullptr
245 && Motherlogic->GetMaterial() != WaterMaterial)
248 ED <<
"The decayed product is outside of the volume : "
250 <<
" with material : "<< Motherlogic->GetMaterial()
252 G4Exception(
"G4DNAMolecularDissociation::DecayIt()",
253 "OUTSIDE_OF_MOTHER_VOLUME",
258 auto pSecondary = pProduct->BuildTrack(track.
GetGlobalTime(), product_pos);
260 pSecondary->SetTrackStatus(
fAlive);
264 G4cout <<
"Product : " << pProduct->GetName() <<
G4endl;
278 else if ((fVerbose != 0) && (decayEnergy != 0.0))
306 fDisplacementMap.emplace(pSpecies, std::unique_ptr<Displacer>(pDisplacer));
313 return fDisplacementMap[pSpecies].get();
347 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
virtual G4VSolid * GetSolid(G4int depth=0) const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) 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 void Transport(G4ThreeVector &, G4Track *pTrack=nullptr)=0