44 , fpReactionModel(nullptr)
45 , fpTimeStepper(nullptr)
70std::unique_ptr<G4ITReactionChange>
79 pChanges->Initialize(trackA, trackB);
88 const G4double D1 = pMoleculeA->GetDiffusionCoefficient();
89 const G4double D2 = pMoleculeB->GetDiffusionCoefficient();
90 const G4double sqrD1 = D1 == 0. ? 0. : std::sqrt(D1);
91 const G4double sqrD2 = D2 == 0. ? 0. : std::sqrt(D2);
92 const G4double inv_numerator = 1./(sqrD1 + sqrD2);
99 for (
G4int j = 0; j < nbProducts; ++j)
101 auto pProduct =
new G4Molecule(pReactionData->GetProduct(j));
102 auto pProductTrack = pProduct->BuildTrack(trackA.
GetGlobalTime(), (reactionSite + randP)/2);
103 pProductTrack->SetTrackStatus(
fAlive);
105 pChanges->AddSecondary(pProductTrack);
108 pChanges->KillParents(
true);
123 G4double D2 = pMoleculeB->GetDiffusionCoefficient();
146 exceptionDescription <<
"Two particles are overlap: "
150 G4Exception(
"G4DNAMakeReaction::PrepareForReaction()",
151 "G4DNAMakeReaction003",
154 S1.
setMag(reactionRadius);
162 G4double sigma = s12 + ( s12 * s12 ) / s22;
163 G4double alpha = reactionRadius * distance / (2 * (D1 + D2) * dt );
167 G4RandGauss::shoot(0.0, sigma),
168 G4RandGauss::shoot(0.0, sigma));
172 S1.
setTheta(rad * std::acos( 1.0 + (1. / alpha) *
174 (1.-std::exp(-2.0 * alpha)))));
184std::vector<std::unique_ptr<G4ITReactionChange>>
190 std::vector<std::unique_ptr<G4ITReactionChange>> ReactionInfo;
191 ReactionInfo.clear();
193 if(stepper !=
nullptr){
194 auto pReactionChange = stepper->
196 if (pReactionChange !=
nullptr)
198 ReactionInfo.push_back(std::move(pReactionChange));
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
G4Molecule * GetMolecule(const G4Track &track)
ReturnType & reference_cast(OriginalType &source)
CLHEP::Hep3Vector G4ThreeVector
std::unique_ptr< G4ITReactionChange > MakeReaction(const G4Track &, const G4Track &) override
G4VITTimeStepComputer * fpTimeStepper
std::vector< std::unique_ptr< G4ITReactionChange > > FindReaction(G4ITReactionSet *, const G4double, const G4double, const G4bool) override
G4VDNAReactionModel * fpReactionModel
void SetReactionModel(G4VDNAReactionModel *)
void SetTimeStepComputer(G4VITTimeStepComputer *)
void UpdatePositionForReaction(G4Track &, G4Track &)
G4bool TestReactibility(const G4Track &, const G4Track &, G4double currentStepTime, G4bool userStepTimeLimit) override
const G4DNAMolecularReactionTable *& fMolReactionTable
G4int GetNbProducts() const
Data * GetReactionData(Reactant *, Reactant *) const
virtual void Push(G4Track *)
static G4ITTrackHolder * Instance()
G4double GetDiffusionCoefficient() const
const G4MolecularConfiguration * GetMolecularConfiguration() const
const G4String & GetName() const
void SetPosition(const G4ThreeVector &aValue)
const G4ThreeVector & GetPosition() const
G4double GetGlobalTime() const
virtual G4double GetReactionRadius(const G4MolecularConfiguration *, const G4MolecularConfiguration *)=0