55 double Y(
double density)
57 return 1. / (1. + 0.0012 / (density * density));
60 double A(
double temperature)
62 double temp_inverse = 1 / temperature;
64 + 642.0 * temp_inverse
65 - 1.167e5 * temp_inverse * temp_inverse
66 + 9.190e6 * temp_inverse * temp_inverse * temp_inverse;
69 double B(
double temperature)
71 double temp_inverse = 1 / temperature;
73 + 275.4 * temp_inverse
74 + 0.3245e5 * temp_inverse * temp_inverse;
79 double temp_inverse = 1 / temp;
82 - 11.41 * temp_inverse
83 - 35260.0 * temp_inverse * temp_inverse;
88 return A(temp) -
B(temp) - 3;
96 double epsilon(
double density,
double temperature)
98 return 1 +
G4Exp(std::log(10.) *
100 (
C(temperature) + (
S(temperature) - 1) * std::log(density) / std::log(10.))
101 +
D(temperature) + std::log(density) / std::log(10.)));
164 std::vector<ReactantInfo>& reactants = pState->fReactants;
166 G4Track* pSelectedReactant =
nullptr;
168 for (
const auto& reactantInfo : reactants)
170 if (reactantInfo.fElectron->GetTrackStatus() !=
fAlive)
174 if (reactantInfo.fProbability > random)
176 pSelectedReactant = reactantInfo.fElectron;
181 if (pSelectedReactant)
186 RemoveAMoleculeAtTime(
GetMolecule(track)->GetMolecularConfiguration(),
195 AddAMoleculeAtTime(
GetMolecule(track)->GetMolecularConfiguration(),
223 const auto pDensityTable =
237 10. * onsagerRadius);
239 if (results == 0 || results->GetSize() == 0)
247 std::vector<ReactantInfo>& reactants = pState->
fReactants;
250 reactants.resize(results->GetSize());
252 for (
size_t i = 0; !results->End(); results->Next(), ++i)
254 reactants[i].fElectron = results->GetItem<
G4IT>()->GetTrack();
255 reactants[i].fDistance = std::sqrt(results->GetDistanceSqr());
257 if (reactants[i].fDistance != 0)
259 reactants[i].fProbability = 1. -
G4Exp(-onsagerRadius / reactants[i].fDistance);
263 reactants[i].fProbability = 1.;
267 return reactants.empty() ?
false : reactants[0].fProbability > pState->fSampleProba;
276 auto pH2ODef = pMoleculeTable->GetMoleculeDefinition(
"H2O",
false);
278 if (pH2ODef ==
nullptr)
285 assert(pH2Ovib !=
nullptr);
287 const auto pH2 = pMoleculeTable->GetConfiguration(
"H2",
false);
288 const auto pOH = pMoleculeTable->GetConfiguration(
"OH",
false);
289 const auto pH = pMoleculeTable->GetConfiguration(
"H",
false);
291 double probaRemaining = 1.;
295 auto pDissocationChannel2 =
299 pDissocationChannel2->AddProduct(pH2);
303 pDissocationChannel2->AddProduct(pOH);
304 pDissocationChannel2->AddProduct(pOH);
307 double channelProbability = 0.15;
308 pDissocationChannel2->SetProbability(channelProbability);
309 probaRemaining -= channelProbability;
311 B1A1_DissociationDecay);
312 pH2ODef->AddDecayChannel(pH2Ovib, pDissocationChannel2);
317 auto pDissociationChannel3 =
321 pDissociationChannel3->AddProduct(pOH);
325 pDissociationChannel3->AddProduct(pH);
327 double channelProbability = 0.55;
328 pDissociationChannel3->SetProbability(channelProbability);
329 probaRemaining -= channelProbability;
331 A1B1_DissociationDecay);
332 pH2ODef->AddDecayChannel(pH2Ovib, pDissociationChannel3);
335 auto pDissociationChannel1 =
337 pDissociationChannel1->SetProbability(probaRemaining);
338 pH2ODef->AddDecayChannel(pH2Ovib, pDissociationChannel1);