Geant4-11
G4DNAIRT_geometries.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26/*
27 * G4DNAIRT_geometries.cc
28 *
29 * Created on: Jul 23, 2019
30 * Author: W. G. Shin
31 * J. Ramos-Mendez and B. Faddegon
32*/
33
34
36#include "G4ErrorFunction.hh"
37#include "G4SystemOfUnits.hh"
39#include "Randomize.hh"
42#include "G4Molecule.hh"
43#include "G4ITReactionChange.hh"
44#include "G4ITTrackHolder.hh"
45#include "G4ITReaction.hh"
46#include "G4Scheduler.hh"
47#include "G4MoleculeTable.hh"
51
52using namespace std;
53
56fMolReactionTable(reference_cast<const G4DNAMolecularReactionTable*>(fpReactionTable)),
57fpReactionModel(nullptr),
58fTrackHolder(G4ITTrackHolder::Instance()),
59fReactionSet(nullptr),
60fGeometry(nullptr)
61{
64
65 fXMin = 1e9*nm;
66 fYMin = 1e9*nm;
67 fZMin = 1e9*nm;
68
69 fXMax = 0e0*nm;
70 fYMax = 0e0*nm;
71 fZMax = 0e0*nm;
72
73 fNx = 0;
74 fNy = 0;
75 fNz = 0;
76
77 xiniIndex = 0, yiniIndex = 0, ziniIndex = 0;
78 xendIndex = 0, yendIndex = 0, zendIndex = 0;
79
80 fRCutOff =
81 1.45 * nm + 2 * std::sqrt(8*9.46e9*nm*nm/s * timeMax); // 95% confidence level
82
83 erfc = new G4ErrorFunction();
84}
85
86
89{
90 fpReactionModel = pReactionModel;
91}
92
94{
95 delete erfc;
96}
97
99
101 timeMax = std::min(timeMin + G4Scheduler::Instance()->GetLimitingTimeStep(),
102 G4Scheduler::Instance()->GetEndTime());
103 if(timeMin == 0) return;
104
106 if(fTrackHolder->GetMainList()->size() == 0) return;
107
111
112 spaceBinned.clear();
113 positionMap.clear();
114
115 fRCutOff =
116 1.45 * nm + 2 * std::sqrt(8*9.46e9*nm*nm/s * (timeMax - timeMin));
117
118 xiniIndex = 0;
119 yiniIndex = 0;
120 ziniIndex = 0;
121 xendIndex = 0;
122 yendIndex = 0;
123 zendIndex = 0;
124
125 fXMin = 1e9*nm;
126 fYMin = 1e9*nm;
127 fZMin = 1e9*nm;
128
129 fXMax = 0e0*nm;
130 fYMax = 0e0*nm;
131 fZMax = 0e0*nm;
132
133 fNx = 0;
134 fNy = 0;
135 fNz = 0;
136
138
139 SpaceBinning(); // 1. binning the space
140 IRTSampling(); // 2. Sampling of the IRT
141
142}
143
146
147 auto it_begin = fTrackHolder->GetMainList()->begin();
148 while(it_begin != fTrackHolder->GetMainList()->end()){
149
150 // for diffusion
152 G4double sqrt_2Dt = sqrt(2 * D * time_step);
153
154 G4double x = G4RandGauss::shoot(0,sqrt_2Dt);
155 G4double y = G4RandGauss::shoot(0,sqrt_2Dt);
156 G4double z = G4RandGauss::shoot(0,sqrt_2Dt);
157
158 G4ThreeVector position_ori = it_begin->GetPosition();
159 G4ThreeVector position = position_ori + G4ThreeVector(x,y,z);
160 it_begin->SetPosition(position);
161 it_begin->SetGlobalTime(timeMax);
162
163 if ( fXMin > position.x() ) fXMin = position.x();
164 if ( fYMin > position.y() ) fYMin = position.y();
165 if ( fZMin > position.z() ) fZMin = position.z();
166
167 if ( fXMax < position.x() ) fXMax = position.x();
168 if ( fYMax < position.y() ) fYMax = position.y();
169 if ( fZMax < position.z() ) fZMax = position.z();
170
171 ++it_begin;
172 }
173
174 fNx = G4int((fXMax-fXMin)/fRCutOff) == 0 ? 1 : G4int((fXMax-fXMin)/fRCutOff);
175 fNy = G4int((fYMax-fYMin)/fRCutOff) == 0 ? 1 : G4int((fYMax-fYMin)/fRCutOff);
176 fNz = G4int((fZMax-fZMin)/fRCutOff) == 0 ? 1 : G4int((fZMax-fZMin)/fRCutOff);
177
178}
179
181
182 auto it_begin = fTrackHolder->GetMainList()->begin();
183 while(it_begin != fTrackHolder->GetMainList()->end()){
184 G4int I = FindBin(fNx, fXMin, fXMax, it_begin->GetPosition().x());
185 G4int J = FindBin(fNy, fYMin, fYMax, it_begin->GetPosition().y());
186 G4int K = FindBin(fNz, fZMin, fZMax, it_begin->GetPosition().z());
187
188 spaceBinned[I][J][K].push_back(*it_begin);
189
190 Sampling(*it_begin);
191 ++it_begin;
192 }
193}
194
196 G4Molecule* molA = G4Molecule::GetMolecule(track);
197 const G4MolecularConfiguration* molConfA = molA->GetMolecularConfiguration();
198 if(molConfA->GetDiffusionCoefficient() == 0) return;
199
200 const vector<const G4MolecularConfiguration*>* reactivesVector =
202
203 if(reactivesVector == nullptr) return;
204
206 G4double minTime = timeMax;
207
214
215 for ( G4int ii = xiniIndex; ii <= xendIndex; ++ii ) {
216 for ( G4int jj = yiniIndex; jj <= yendIndex; ++jj ) {
217 for ( G4int kk = ziniIndex; kk <= zendIndex; ++kk ) {
218
219 std::vector<G4Track*> spaceBin = spaceBinned[ii][jj][kk];
220 for ( G4int n = 0; n < (G4int)spaceBinned[ii][jj][kk].size(); ++n ) {
221 if(!spaceBin[n] || track == spaceBin[n]) continue;
222 if(spaceBin[n]->GetTrackStatus() == fStopButAlive) continue;
223
224 G4Molecule* molB = G4Molecule::GetMolecule(spaceBin[n]);
225 if(!molB) continue;
226
227 const G4MolecularConfiguration* molConfB = molB->GetMolecularConfiguration();
228 if(molConfB->GetDiffusionCoefficient() == 0) continue;
229
230 auto it = std::find(reactivesVector->begin(), reactivesVector->end(), molConfB);
231 if(it == reactivesVector->end()) continue;
232
233 G4ThreeVector orgPosB = spaceBin[n]->GetPosition();
234 G4double dt = track->GetGlobalTime() - spaceBin[n]->GetGlobalTime();
235 G4ThreeVector newPosB = orgPosB;
236
237 if(dt > 0){
238 G4double sigma, x, y, z;
239 G4double diffusionCoefficient = G4Molecule::GetMolecule(spaceBin[n])->GetDiffusionCoefficient();
240
241 sigma = std::sqrt(2.0 * diffusionCoefficient * dt);
242
243 x = G4RandGauss::shoot(0., 1.0)*sigma;
244 y = G4RandGauss::shoot(0., 1.0)*sigma;
245 z = G4RandGauss::shoot(0., 1.0)*sigma;
246
247 newPosB = orgPosB + G4ThreeVector(x,y,z);
248 }else if(dt < 0) continue;
249
250 G4double r0 = (newPosB - track->GetPosition()).mag();
252 molConfB,
253 r0);
254 if(irt>=0 && irt<timeMax - globalTime)
255 {
256 irt += globalTime;
257 if(irt < minTime) minTime = irt;
258#ifdef DEBUG
259 G4cout<<irt<<'\t'<<molConfA->GetName()<<" "<<track->GetTrackID()<<'\t'<<molConfB->GetName()<<" "<<spaceBin[n]->GetTrackID()<<'\n';
260#endif
261 fReactionSet->AddReaction(irt,track,spaceBin[n]);
262 }
263 }
264 spaceBin.clear();
265 }
266 }
267 }
268
269// Scavenging & first order reactions
270
271 auto fReactionDatas = fMolReactionTable->GetReactionData(molConfA);
272 G4int index = -1;
273
274 for(size_t u=0; u<fReactionDatas->size();++u){
275 auto molB = (*fReactionDatas)[u]->GetReactant2();
276 if(molB == G4MoleculeTable::Instance()->GetConfiguration("H2O(B)") ||
277 molB == G4MoleculeTable::Instance()->GetConfiguration("H3Op(B)") ||
278 molB == G4MoleculeTable::Instance()->GetConfiguration("OHm(B)")){
279 G4double kObs = (*fReactionDatas)[u]->GetObservedReactionRateConstant();
280 if(kObs == 0) continue;
281 G4double time = -(std::log(1.0 - G4UniformRand())/kObs) + globalTime;
282 if( time < minTime && time >= globalTime && time < timeMax){
283 minTime = time;
284 index = (G4int)u;
285 }
286 }
287 }
288
289 if(index != -1){
290#ifdef DEBUG
291 G4cout<<"scavenged: "<<minTime<<'\t'<<molConfA->GetName()<<it_begin->GetTrackID()<<'\n';
292#endif
293 G4Molecule* fakeMol = new G4Molecule((*fReactionDatas)[index]->GetReactant2());
294 G4Track* fakeTrack = fakeMol->BuildTrack(globalTime,track->GetPosition());
295 fTrackHolder->Push(fakeTrack);
296 fReactionSet->AddReaction(minTime, track, fakeTrack);
297 }
298
299
300 // DNA reactions
301 if(fGeometry == nullptr) return;
302
303 const G4VTouchable* touchable = track->GetTouchable();
304 if(touchable == nullptr) return;
305
306 const G4LogicalVolume* logicalVolume = touchable->GetVolume()->GetLogicalVolume();
307
308 const G4ThreeVector& globalPos = track->GetPosition();
309 const G4ThreeVector& localPos = touchable->GetHistory()->GetTopTransform().TransformPoint(globalPos);
310
312 G4double time_step = abs(timeMax - timeMin);
313 G4double search_range = 2*sqrt(2*D*time_step);
314
315 std::vector<G4VPhysicalVolume*> result_pv;
316 result_pv.clear();
317 fGeometry->FindNearbyMolecules(logicalVolume,
318 localPos,
319 result_pv,
320 search_range);
321
322 if(result_pv.empty()) return;
323
324 for(auto physicalVolume : result_pv){
325 const G4Material* material = physicalVolume->GetLogicalVolume()->GetMaterial();
326 G4MolecularConfiguration* dna_molConf =
328
329 auto it = std::find(reactivesVector->begin(), reactivesVector->end(), dna_molConf);
330 if(it == reactivesVector->end()) continue;
331 G4ThreeVector pos = physicalVolume->GetTranslation();
332
333 G4ThreeVector globalPos_DNA = touchable->GetHistory()->GetTopTransform().Inverse().TransformPoint(pos);
334
335 G4double r0 = (pos - localPos).mag();
336 G4double irt = GetIndependentReactionTime(molConfA,dna_molConf,r0);
337
338 if(irt>=0 && irt<timeMax - globalTime)
339 {
340
341 index = -1;
342 for(size_t i=0;i<positionMap.size();++i){
343 if(globalPos_DNA == positionMap[i].first){
344 index = (G4int)i;
345 break;
346 }
347 }
348
349 G4Track* DNATrack;
350 if(index == -1){
351 auto DNAMol = new G4Molecule(dna_molConf);
352 DNATrack = DNAMol->BuildTrack(globalTime,globalPos_DNA);
353 DNATrack->SetTrackStatus(fAlive);
354 fTrackHolder->Push(DNATrack);
355 positionMap.push_back(std::make_pair(globalPos_DNA,DNATrack));
356 }else{
357 DNATrack = positionMap[index].second;
358 }
359
360 irt += globalTime;
361 if(irt < minTime) minTime = irt;
362#ifdef DEBUG
363 G4cout<<irt<<'\t'<<globalPos_DNA<<'\t'<<molConfA->GetName()<<" "<<track->GetTrackID()<<'\t'<<dna_molConf->GetName()<<" "<<DNATrack->GetTrackID()<<'\n';
364#endif
365 fReactionSet->AddReaction(irt,track,DNATrack);
366 }
367 }
368}
369
370
372 const auto pMoleculeA = molA;
373 const auto pMoleculeB = molB;
374 auto fReactionData = fMolReactionTable->GetReactionData(pMoleculeA, pMoleculeB);
375 G4int reactionType = fReactionData->GetReactionType();
376 G4double r0 = distance;
377 if(r0 == 0) r0 += 1e-3*nm;
378 G4double irt = -1 * ps;
381 if(D == 0) D += 1e-20*(m2/s);
382 G4double rc = fReactionData->GetOnsagerRadius();
383
384 if ( reactionType == 0){
385 G4double sigma = fReactionData->GetEffectiveReactionRadius();
386
387 if(sigma > r0) return 0; // contact reaction
388 if( rc != 0) r0 = -rc / (1-std::exp(rc/r0));
389
390 G4double Winf = sigma/r0;
392
393 if ( W > 0 && W < Winf ) irt = (0.25/D) * std::pow( (r0-sigma)/erfc->erfcInv(r0*W/sigma), 2 );
394
395 return irt;
396 }
397 else if ( reactionType == 1 ){
398 G4double sigma = fReactionData->GetReactionRadius();
399 G4double kact = fReactionData->GetActivationRateConstant();
400 G4double kdif = fReactionData->GetDiffusionRateConstant();
401 G4double kobs = fReactionData->GetObservedReactionRateConstant();
402
403 G4double a, b, Winf;
404
405 if ( rc == 0 ) {
406 a = 1/sigma * kact / kobs;
407 b = (r0 - sigma) / 2;
408 } else {
409 G4double v = kact/Avogadro/(4*CLHEP::pi*pow(sigma,2) * exp(-rc / sigma));
410 G4double alpha = v+rc*D/(pow(sigma,2)*(1-exp(-rc/sigma)));
411 a = 4*pow(sigma,2)*alpha/(D*pow(rc,2))*pow(sinh(rc/(2*sigma)),2);
412 b = rc/4*(cosh(rc/(2*r0))/sinh(rc/(2*r0))-cosh(rc/(2*sigma))/sinh(rc/(2*sigma)));
413 r0 = -rc/(1-std::exp(rc/r0));
414 sigma = fReactionData->GetEffectiveReactionRadius();
415 }
416
417 if(sigma > r0){
418 if(fReactionData->GetProbability() > G4UniformRand()) return 0;
419 else return irt;
420 }
421 Winf = sigma / r0 * kobs / kdif;
422
423 if(Winf > G4UniformRand()) irt = SamplePDC(a,b)/D;
424 return irt;
425 }
426
427 return -1 * ps;
428}
429
431
432 G4int bin = -1;
433 if ( value <= xmin )
434 bin = 0; //1;
435 else if ( value >= xmax)
436 bin = n-1; //n;
437 else
438 bin = G4int( n * ( value - xmin )/( xmax - xmin ) ); //bin = 1 + G4int( n * ( value - xmin )/( xmax - xmin ) );
439
440 if ( bin < 0 ) bin = 0;
441 if ( bin >= n ) bin = n-1;
442
443 return bin;
444}
445
447
448 G4double p = 2.0 * std::sqrt(2.0*b/a);
449 G4double q = 2.0 / std::sqrt(2.0*b/a);
450 G4double M = max(1.0/(a*a),3.0*b/a);
451
452 G4double X, U, lambdax;
453
454 G4int ntrials = 0;
455 while(1) {
456
457 // Generate X
458 U = G4UniformRand();
459 if ( U < p/(p + q * M) ) X = pow(U * (p + q * M) / 2, 2);
460 else X = pow(2/((1-U)*(p+q*M)/M),2);
461
462 U = G4UniformRand();
463
464 lambdax = std::exp(-b*b/X) * ( 1.0 - a * std::sqrt(CLHEP::pi * X) * erfc->erfcx(b/std::sqrt(X) + a*std::sqrt(X)));
465
466 if ((X <= 2.0*b/a && U <= lambdax) ||
467 (X >= 2.0*b/a && U*M/X <= lambdax)) break;
468
469 ntrials++;
470
471 if ( ntrials > 10000 ){
472 G4cout<<"Totally rejected"<<'\n';
473 return -1.0;
474 }
475 }
476 return X;
477}
478
479std::unique_ptr<G4ITReactionChange> G4DNAIRT_geometries::MakeReaction(const G4Track& trackA,
480 const G4Track& trackB)
481{
482
483 std::unique_ptr<G4ITReactionChange> pChanges(new G4ITReactionChange());
484 pChanges->Initialize(trackA, trackB);
485
486 const auto pMoleculeA = GetMolecule(trackA)->GetMolecularConfiguration();
487 const auto pMoleculeB = GetMolecule(trackB)->GetMolecularConfiguration();
488 const auto pReactionData = fMolReactionTable->GetReactionData(pMoleculeA, pMoleculeB);
489
491 G4double effectiveReactionRadius = pReactionData->GetEffectiveReactionRadius();
492
493 const G4double D1 = pMoleculeA->GetDiffusionCoefficient();
494 const G4double D2 = pMoleculeB->GetDiffusionCoefficient();
495
496 G4ThreeVector r1 = trackA.GetPosition();
497 G4ThreeVector r2 = trackB.GetPosition();
498
499 if(r1 == r2) r2 += G4ThreeVector(0,0,1e-3*nm);
500
501 G4ThreeVector S1 = r1 - r2;
502
503 G4double r0 = S1.mag();
504
505 S1.setMag(effectiveReactionRadius);
506
507 G4double dt = globalTime - trackA.GetGlobalTime();
508
509 if(dt != 0 && (D1 + D2) != 0 && r0 != 0){
510 G4double s12 = 2.0 * D1 * dt;
511 G4double s22 = 2.0 * D2 * dt;
512 if(s12 == 0) r2 = r1;
513 else if(s22 == 0) r1 = r2;
514 else{
515 G4double alpha = effectiveReactionRadius * r0 / (2*(D1 + D2)*dt);
516 G4ThreeVector S2 = (r1 + (s12 / s22)*r2) + G4ThreeVector(G4RandGauss::shoot(0, s12 + s22 * s22 / s12),
517 G4RandGauss::shoot(0, s12 + s22 * s22 / s12),
518 G4RandGauss::shoot(0, s12 + s22 * s22 / s12));
519
520 S1.setPhi(rad * G4UniformRand() * 2.0 * CLHEP::pi);
521 S1.setTheta(rad * std::acos(1.0 + 1./alpha * std::log(1.0 - G4UniformRand() * (1 - std::exp(-2.0 * alpha)))));
522
523 r1 = (D1 * S1 + D2 * S2) / (D1 + D2);
524 r2 = D2 * (S2 - S1) / (D1 + D2);
525 }
526 }
527
528 auto pTrackA = const_cast<G4Track*>(pChanges->GetTrackA());
529 auto pTrackB = const_cast<G4Track*>(pChanges->GetTrackB());
530
531 pTrackA->SetPosition(r1);
532 pTrackB->SetPosition(r2);
533
534 pTrackA->SetGlobalTime(globalTime);
535 pTrackB->SetGlobalTime(globalTime);
536
537 pTrackA->SetTrackStatus(fStopButAlive);
538 pTrackB->SetTrackStatus(fStopButAlive);
539
540 const G4int nbProducts = pReactionData->GetNbProducts();
541
542 if(nbProducts){
543
544 const G4double sqrD1 = D1 == 0. ? 0. : std::sqrt(D1);
545 const G4double sqrD2 = D2 == 0. ? 0. : std::sqrt(D2);
546 const G4double inv_numerator = 1./(sqrD1 + sqrD2);
547 const G4ThreeVector reactionSite = sqrD2 * inv_numerator * trackA.GetPosition()
548 + sqrD1 * inv_numerator * trackB.GetPosition();
549
550 std::vector<G4ThreeVector> position;
551
552 if(nbProducts == 1){
553 position.push_back(reactionSite);
554 }else if(nbProducts == 2){
555 position.push_back(trackA.GetPosition());
556 position.push_back(trackB.GetPosition());
557 }else if (nbProducts == 3){
558 position.push_back(reactionSite);
559 position.push_back(trackA.GetPosition());
560 position.push_back(trackB.GetPosition());
561 }
562
563 for(G4int u = 0; u < nbProducts; ++u){
564
565 auto product = new G4Molecule(pReactionData->GetProduct(u));
566 auto productTrack = product->BuildTrack(globalTime,
567 position[u]);
568
569 productTrack->SetTrackStatus(fAlive);
570 fTrackHolder->Push(productTrack);
571
572 pChanges->AddSecondary(productTrack);
573
574 G4int I = FindBin(fNx, fXMin, fXMax, position[u].x());
575 G4int J = FindBin(fNy, fYMin, fYMax, position[u].y());
576 G4int K = FindBin(fNz, fZMin, fZMax, position[u].z());
577
578 spaceBinned[I][J][K].push_back(productTrack);
579
580 Sampling(productTrack);
581 }
582 }
583
585 pChanges->KillParents(true);
586 return pChanges;
587}
588
589
590std::vector<std::unique_ptr<G4ITReactionChange>> G4DNAIRT_geometries::FindReaction(
591 G4ITReactionSet* pReactionSet,
592 const G4double /*currentStepTime*/,
593 const G4double fGlobalTime,
594 const G4bool /*reachedUserStepTimeLimit*/)
595{
596 std::vector<std::unique_ptr<G4ITReactionChange>> fReactionInfo;
597 fReactionInfo.clear();
598
599 if (pReactionSet == nullptr)
600 {
601 return fReactionInfo;
602 }
603
604 auto fReactionsetInTime = pReactionSet->GetReactionsPerTime();
605 assert(fReactionsetInTime.begin() != fReactionsetInTime.end());
606
607 auto it_begin = fReactionsetInTime.begin();
608 while(it_begin != fReactionsetInTime.end())
609 {
610 G4double irt = it_begin->get()->GetTime();
611
612 if(fGlobalTime < irt) break;
613
614 pReactionSet->SelectThisReaction(*it_begin);
615
616 G4Track* pTrackA = it_begin->get()->GetReactants().first;
617 G4Track* pTrackB = it_begin->get()->GetReactants().second;
618 auto pReactionChange = MakeReaction(*pTrackA, *pTrackB);
619
620 if(pReactionChange){
621 fReactionInfo.push_back(std::move(pReactionChange));
622 }
623
624 fReactionsetInTime = pReactionSet->GetReactionsPerTime();
625 it_begin = fReactionsetInTime.begin();
626 }
627
628 return fReactionInfo;
629}
630
632 const G4Track& /*trackB*/,
633 G4double /*currentStepTime*/,
634 G4bool /*userStepTimeLimit*/) /*const*/
635{
636 return true;
637}
638
640{
641 fpReactionModel = model;
642}
G4double D(G4double temp)
static const G4double pos
static const G4double alpha
G4Molecule * GetMolecule(const G4Track &track)
Definition: G4Molecule.cc:76
#define M(row, col)
ReturnType & reference_cast(OriginalType &source)
static constexpr double nm
Definition: G4SIunits.hh:92
static constexpr double rad
Definition: G4SIunits.hh:129
static constexpr double s
Definition: G4SIunits.hh:154
static constexpr double ps
Definition: G4SIunits.hh:157
static constexpr double m2
Definition: G4SIunits.hh:110
CLHEP::Hep3Vector G4ThreeVector
@ fAlive
@ fStopButAlive
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4GLOB_DLL std::ostream G4cout
#define G4UniformRand()
Definition: Randomize.hh:52
double z() const
double x() const
double y() const
void setTheta(double)
double mag() const
void setMag(double)
Definition: ThreeVector.cc:20
void setPhi(double)
G4AffineTransform Inverse() const
G4ThreeVector TransformPoint(const G4ThreeVector &vec) const
G4ErrorFunction * erfc
std::vector< std::pair< G4ThreeVector, G4Track * > > positionMap
G4ITTrackHolder * fTrackHolder
G4VDNAMolecularGeometry * fGeometry
void SetReactionModel(G4VDNAReactionModel *)
G4double GetIndependentReactionTime(const G4MolecularConfiguration *, const G4MolecularConfiguration *, G4double)
G4double SamplePDC(G4double, G4double)
std::map< G4int, std::map< G4int, std::map< G4int, std::vector< G4Track * > > > > spaceBinned
std::vector< std::unique_ptr< G4ITReactionChange > > FindReaction(G4ITReactionSet *, const G4double, const G4double, const G4bool) override
G4VDNAReactionModel * fpReactionModel
std::unique_ptr< G4ITReactionChange > MakeReaction(const G4Track &, const G4Track &) override
G4bool TestReactibility(const G4Track &, const G4Track &, G4double, G4bool) override
const G4DNAMolecularReactionTable *& fMolReactionTable
G4ITReactionSet * fReactionSet
G4int FindBin(G4int, G4double, G4double, G4double)
void Initialize() override
G4MolecularConfiguration * GetMolecularConfiguration(const G4Material *) const
static G4DNAMolecularMaterial * Instance()
Data * GetReactionData(Reactant *, Reactant *) const
const ReactantList * CanReactWith(Reactant *) const
G4VDNAMolecularGeometry * GetGeometry() const
static G4double erfcx(G4double x)
static G4double erfcInv(G4double x)
G4int size() const
Definition: G4FastList.hh:357
iterator begin()
iterator end()
void AddReaction(G4double time, G4Track *trackA, G4Track *trackB)
static G4ITReactionSet * Instance()
void SelectThisReaction(G4ITReactionPtr reaction)
void CleanAllReaction()
G4ITReactionPerTime & GetReactionsPerTime()
G4TrackList * GetMainList(Key)
virtual void Push(G4Track *)
void MergeSecondariesWithMainList()
static G4ITTrackHolder * Instance()
const G4String & GetName() const
static G4MoleculeTable * Instance()
static G4Molecule * GetMolecule(const G4Track *)
Definition: G4Molecule.cc:90
const G4MolecularConfiguration * GetMolecularConfiguration() const
Definition: G4Molecule.cc:532
G4Track * BuildTrack(G4double globalTime, const G4ThreeVector &Position)
Definition: G4Molecule.cc:373
G4double GetDiffusionCoefficient() const
Definition: G4Molecule.cc:516
const G4AffineTransform & GetTopTransform() const
static G4Scheduler * Instance()
Definition: G4Scheduler.cc:101
G4double GetEndTime() const
Definition: G4Scheduler.hh:349
G4double GetPreviousTimeStep() const
Definition: G4Scheduler.hh:411
G4double GetGlobalTime() const
Definition: G4Scheduler.hh:364
G4double GetStartTime() const
Definition: G4Scheduler.hh:344
void SetTrackStatus(const G4TrackStatus aTrackStatus)
void SetPosition(const G4ThreeVector &aValue)
G4int GetTrackID() const
const G4ThreeVector & GetPosition() const
G4double GetGlobalTime() const
const G4VTouchable * GetTouchable() const
virtual void FindNearbyMolecules(const G4LogicalVolume *, const G4ThreeVector &, std::vector< G4VPhysicalVolume * > &, G4double)
G4LogicalVolume * GetLogicalVolume() const
virtual const G4NavigationHistory * GetHistory() const
Definition: G4VTouchable.cc:82
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
Definition: G4VTouchable.cc:34
static constexpr double pi
Definition: SystemOfUnits.h:55
ThreeVector shoot(const G4int Ap, const G4int Af)
T max(const T t1, const T t2)
brief Return the largest of the two arguments
T min(const T t1, const T t2)
brief Return the smallest of the two arguments
string material
Definition: eplot.py:19
float Avogadro
Definition: hepunit.py:252
#define position
Definition: xmlparse.cc:622