Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4DNADamage Class Reference

#include <G4DNADamage.hh>

Public Member Functions

virtual void Reset ()
 
virtual void AddIndirectDamage (const G4String &baseName, const G4Molecule *molecule, const G4ThreeVector &position, G4double time)
 
const std::vector< G4DNAIndirectHit * > * GetIndirectHits ()
 
virtual G4int GetNIndirectHits () const
 
virtual void SetOnlyCountDamage (G4bool flag=true)
 
virtual G4bool OnlyCountDamage () const
 

Static Public Member Functions

static G4DNADamageInstance ()
 
static void DeleteInstance ()
 

Protected Member Functions

 G4DNADamage ()
 
virtual ~G4DNADamage ()
 

Protected Attributes

G4bool fJustCountDamage
 
G4int fNIndirectDamage
 
std::vector< G4DNAIndirectHit * > fIndirectHits
 
std::map< G4Molecule, const G4Molecule * > fMolMap
 

Static Protected Attributes

static G4ThreadLocal G4DNADamagefpInstance
 

Detailed Description

Definition at line 79 of file G4DNADamage.hh.

Constructor & Destructor Documentation

◆ G4DNADamage()

G4DNADamage::G4DNADamage ( )
protected

Definition at line 63 of file G4DNADamage.cc.

64{
65 fJustCountDamage = false;
67 fpInstance = this;
68}
G4int fNIndirectDamage
G4bool fJustCountDamage
static G4ThreadLocal G4DNADamage * fpInstance

Referenced by Instance().

◆ ~G4DNADamage()

G4DNADamage::~G4DNADamage ( )
protectedvirtual

Definition at line 70 of file G4DNADamage.cc.

71{
72 for (auto & fIndirectHit : fIndirectHits)
73 {
74 delete fIndirectHit;
75 }
76 fIndirectHits.clear();
77}
std::vector< G4DNAIndirectHit * > fIndirectHits

Member Function Documentation

◆ AddIndirectDamage()

void G4DNADamage::AddIndirectDamage ( const G4String & baseName,
const G4Molecule * molecule,
const G4ThreeVector & position,
G4double time )
virtual

Definition at line 95 of file G4DNADamage.cc.

99{
101 {
103 return;
104 }
105
106 G4DNAIndirectHit* indirectHit = nullptr;
107 auto it = fMolMap.find(*molecule);
108
109 if (it == fMolMap.cend())
110 {
111 G4Molecule* mol(nullptr);
112 fMolMap[*molecule] = (mol = new G4Molecule(*molecule));
113 indirectHit = new G4DNAIndirectHit(baseName, mol, position, time);
114 }
115 else
116 {
117 indirectHit = new G4DNAIndirectHit(baseName, it->second, position, time);
118 }
119 fIndirectHits.push_back(indirectHit);
120}
std::map< G4Molecule, const G4Molecule * > fMolMap

Referenced by G4DNASecondOrderReaction::PostStepDoIt().

◆ DeleteInstance()

void G4DNADamage::DeleteInstance ( )
static

Definition at line 79 of file G4DNADamage.cc.

80{
81 delete fpInstance;
82 fpInstance = nullptr;
83}

◆ GetIndirectHits()

const std::vector< G4DNAIndirectHit * > * G4DNADamage::GetIndirectHits ( )
inline

Definition at line 123 of file G4DNADamage.hh.

124{
125 return &fIndirectHits;
126}

◆ GetNIndirectHits()

virtual G4int G4DNADamage::GetNIndirectHits ( ) const
inlinevirtual

Definition at line 94 of file G4DNADamage.hh.

95 {
97 return fNIndirectDamage;
98
99 return (G4int)fIndirectHits.size();
100 }
int G4int
Definition G4Types.hh:85

◆ Instance()

G4DNADamage * G4DNADamage::Instance ( )
static

Definition at line 56 of file G4DNADamage.cc.

57{
58 if (fpInstance == nullptr) new G4DNADamage();
59
60 return fpInstance;
61}

Referenced by G4DNASecondOrderReaction::PostStepDoIt().

◆ OnlyCountDamage()

virtual G4bool G4DNADamage::OnlyCountDamage ( ) const
inlinevirtual

Definition at line 107 of file G4DNADamage.hh.

108 {
109 return fJustCountDamage;
110 }

◆ Reset()

void G4DNADamage::Reset ( )
virtual

Definition at line 85 of file G4DNADamage.cc.

86{
88 for (auto & fIndirectHit : fIndirectHits)
89 {
90 delete fIndirectHit;
91 }
92 fIndirectHits.clear();
93}

◆ SetOnlyCountDamage()

virtual void G4DNADamage::SetOnlyCountDamage ( G4bool flag = true)
inlinevirtual

Definition at line 102 of file G4DNADamage.hh.

103 {
104 fJustCountDamage = flag;
105 }

Member Data Documentation

◆ fIndirectHits

std::vector<G4DNAIndirectHit*> G4DNADamage::fIndirectHits
protected

◆ fJustCountDamage

G4bool G4DNADamage::fJustCountDamage
protected

◆ fMolMap

std::map<G4Molecule, const G4Molecule*> G4DNADamage::fMolMap
protected

Definition at line 120 of file G4DNADamage.hh.

Referenced by AddIndirectDamage().

◆ fNIndirectDamage

G4int G4DNADamage::fNIndirectDamage
protected

Definition at line 118 of file G4DNADamage.hh.

Referenced by AddIndirectDamage(), G4DNADamage(), GetNIndirectHits(), and Reset().

◆ fpInstance

G4ThreadLocal G4DNADamage * G4DNADamage::fpInstance
staticprotected

Definition at line 114 of file G4DNADamage.hh.

Referenced by DeleteInstance(), G4DNADamage(), and Instance().


The documentation for this class was generated from the following files: