Geant4 10.7.0
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, double time)
 
const std::vector< G4DNAIndirectHit * > * GetIndirectHits ()
 
virtual int GetNIndirectHits () const
 
virtual void SetOnlyCountDamage (bool flag=true)
 
virtual bool 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
Definition: G4DNADamage.hh:118
G4bool fJustCountDamage
Definition: G4DNADamage.hh:117
static G4ThreadLocal G4DNADamage * fpInstance
Definition: G4DNADamage.hh:114

Referenced by Instance().

◆ ~G4DNADamage()

G4DNADamage::~G4DNADamage ( )
protectedvirtual

Definition at line 70 of file G4DNADamage.cc.

71{
72 for (int i = 0; i < (int) fIndirectHits.size(); i++)
73 {
74 if (fIndirectHits[i]) delete fIndirectHits[i];
75 }
76 fIndirectHits.clear();
77}
std::vector< G4DNAIndirectHit * > fIndirectHits
Definition: G4DNADamage.hh:119

Member Function Documentation

◆ AddIndirectDamage()

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

Definition at line 95 of file G4DNADamage.cc.

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

Referenced by G4DNASecondOrderReaction::PostStepDoIt().

◆ DeleteInstance()

void G4DNADamage::DeleteInstance ( )
static

Definition at line 79 of file G4DNADamage.cc.

80{
81 if (fpInstance) delete fpInstance;
82 fpInstance = 0;
83}

◆ GetIndirectHits()

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

Definition at line 123 of file G4DNADamage.hh.

124{
125 return &fIndirectHits;
126}

◆ GetNIndirectHits()

virtual int G4DNADamage::GetNIndirectHits ( ) const
inlinevirtual

Definition at line 94 of file G4DNADamage.hh.

95 {
97 return fNIndirectDamage;
98
99 return fIndirectHits.size();
100 }

◆ Instance()

G4DNADamage * G4DNADamage::Instance ( )
static

Definition at line 56 of file G4DNADamage.cc.

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

Referenced by G4DNASecondOrderReaction::PostStepDoIt().

◆ OnlyCountDamage()

virtual bool 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 (int i = 0; i < (int) fIndirectHits.size(); i++)
89 {
90 if (fIndirectHits[i]) delete fIndirectHits[i];
91 }
92 fIndirectHits.clear();
93}

◆ SetOnlyCountDamage()

virtual void G4DNADamage::SetOnlyCountDamage ( bool  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: