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

#include <G4DNADamages.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 SetOnlyCountDamages (bool flag=true)
 
virtual bool OnlyCountDamages () const
 

Static Public Member Functions

static G4DNADamagesInstance ()
 
static void DeleteInstance ()
 

Protected Member Functions

 G4DNADamages ()
 
virtual ~G4DNADamages ()
 

Protected Attributes

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

Static Protected Attributes

static G4DNADamagesfpInstance
 

Detailed Description

Definition at line 61 of file G4DNADamages.hh.

Constructor & Destructor Documentation

◆ G4DNADamages()

G4DNADamages::G4DNADamages ( )
protected

Definition at line 66 of file G4DNADamages.cc.

67{
68 fJustCountDamage = false;
70 fpInstance = this;
71}
static G4DNADamages * fpInstance
Definition: G4DNADamages.hh:94
G4int fNIndirectDamages
Definition: G4DNADamages.hh:98
G4bool fJustCountDamage
Definition: G4DNADamages.hh:97

Referenced by Instance().

◆ ~G4DNADamages()

G4DNADamages::~G4DNADamages ( )
protectedvirtual

Definition at line 73 of file G4DNADamages.cc.

74{
75 for(int i = 0 ; i <(int) fIndirectHits.size() ; i++)
76 {
77 if(fIndirectHits[i])
78 delete fIndirectHits[i];
79 }
80 fIndirectHits.clear();
81}
std::vector< G4DNAIndirectHit * > fIndirectHits
Definition: G4DNADamages.hh:99

Member Function Documentation

◆ AddIndirectDamage()

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

Definition at line 100 of file G4DNADamages.cc.

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

Referenced by G4DNASecondOrderReaction::PostStepDoIt().

◆ DeleteInstance()

void G4DNADamages::DeleteInstance ( )
static

Definition at line 83 of file G4DNADamages.cc.

84{
85 if(fpInstance) delete fpInstance;
86 fpInstance = 0;
87}

◆ GetIndirectHits()

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

Definition at line 103 of file G4DNADamages.hh.

104{
105 return &fIndirectHits;
106}

◆ GetNIndirectHits()

virtual int G4DNADamages::GetNIndirectHits ( ) const
inlinevirtual

Definition at line 74 of file G4DNADamages.hh.

75 {
77 return fNIndirectDamages;
78
79 return fIndirectHits.size();
80 }

◆ Instance()

G4DNADamages * G4DNADamages::Instance ( )
static

Definition at line 59 of file G4DNADamages.cc.

60{
61 if(!fpInstance) new G4DNADamages();
62
63 return fpInstance;
64}

Referenced by G4DNASecondOrderReaction::PostStepDoIt().

◆ OnlyCountDamages()

virtual bool G4DNADamages::OnlyCountDamages ( ) const
inlinevirtual

Definition at line 87 of file G4DNADamages.hh.

88 {
89 return fJustCountDamage;
90 }

◆ Reset()

void G4DNADamages::Reset ( )
virtual

Definition at line 89 of file G4DNADamages.cc.

90{
92 for(int i = 0 ; i <(int) fIndirectHits.size() ; i++)
93 {
94 if(fIndirectHits[i])
95 delete fIndirectHits[i];
96 }
97 fIndirectHits.clear();
98}

◆ SetOnlyCountDamages()

virtual void G4DNADamages::SetOnlyCountDamages ( bool  flag = true)
inlinevirtual

Definition at line 82 of file G4DNADamages.hh.

83 {
84 fJustCountDamage = flag;
85 }

Member Data Documentation

◆ fIndirectHits

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

◆ fJustCountDamage

G4bool G4DNADamages::fJustCountDamage
protected

◆ fMolMap

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

Definition at line 100 of file G4DNADamages.hh.

Referenced by AddIndirectDamage().

◆ fNIndirectDamages

G4int G4DNADamages::fNIndirectDamages
protected

Definition at line 98 of file G4DNADamages.hh.

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

◆ fpInstance

G4DNADamages * G4DNADamages::fpInstance
staticprotected

Definition at line 94 of file G4DNADamages.hh.

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


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