Geant4_10
G4DNADamages.hh
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 // $Id: G4DNADamages.hh 66872 2013-01-15 01:25:57Z japost $
27 //
28 #ifndef G4DNADAMAGES_HH
29 #define G4DNADAMAGES_HH 1
30 
31 #include "G4Molecule.hh"
32 
33 class G4VDNAHit
34 {
35 public :
36  G4VDNAHit(){;}
37  virtual ~G4VDNAHit(){;}
38 };
39 
41 {
42 public :
43  G4DNAIndirectHit(const G4String& baseName, const G4Molecule* molecule,
44  const G4ThreeVector& position, G4double time);
45  virtual ~G4DNAIndirectHit();
46 
47  inline const G4Molecule* GetMolecule() {return fpMolecule;}
48  inline const G4ThreeVector& GetPosition() {return fPosition;}
49  inline const G4String& GetBaseName() {return fBaseName;}
50  inline double GetTime() {return fTime;}
51 
52  void Print();
53 
54 protected :
59 };
60 
62 {
63 public:
64  static G4DNADamages* Instance();
65  static void DeleteInstance();
66 
67  virtual void Reset();
68 
69  //void AddDirectDamage();
70  virtual void AddIndirectDamage(const G4String& baseName,const G4Molecule* molecule,
71  const G4ThreeVector& position, double time);
72 
73  inline const std::vector<G4DNAIndirectHit*>* GetIndirectHits();
74  inline virtual int GetNIndirectHits() const
75  {
77  return fNIndirectDamages;
78 
79  return fIndirectHits.size();
80  }
81 
82  inline virtual void SetOnlyCountDamages(bool flag = true)
83  {
84  fJustCountDamage = flag;
85  }
86 
87  inline virtual bool OnlyCountDamages() const
88  {
89  return fJustCountDamage;
90  }
91 
92 protected :
93  G4DNADamages();
95  virtual ~G4DNADamages();
96 
99  std::vector<G4DNAIndirectHit*> fIndirectHits;
100  std::map<G4Molecule, const G4Molecule*> fMolMap;
101 };
102 
103 inline const std::vector<G4DNAIndirectHit*>* G4DNADamages::GetIndirectHits()
104 {
105  return &fIndirectHits;
106 }
107 
108 #endif // G4DNADAMAGES_HH
static G4DNADamages * Instance()
Definition: G4DNADamages.cc:59
virtual ~G4DNADamages()
Definition: G4DNADamages.cc:73
std::map< G4Molecule, const G4Molecule * > fMolMap
G4ThreeVector fPosition
Definition: G4DNADamages.hh:56
virtual void Reset()
Definition: G4DNADamages.cc:89
std::vector< G4DNAIndirectHit * > fIndirectHits
Definition: G4DNADamages.hh:99
virtual int GetNIndirectHits() const
Definition: G4DNADamages.hh:74
G4String fBaseName
Definition: G4DNADamages.hh:58
const G4Molecule * fpMolecule
Definition: G4DNADamages.hh:55
const G4ThreeVector & GetPosition()
Definition: G4DNADamages.hh:48
#define G4ThreadLocal
Definition: tls.hh:52
int G4int
Definition: G4Types.hh:78
static G4ThreadLocal G4DNADamages * fpInstance
Definition: G4DNADamages.hh:94
virtual void SetOnlyCountDamages(bool flag=true)
Definition: G4DNADamages.hh:82
bool G4bool
Definition: G4Types.hh:79
G4DNAIndirectHit(const G4String &baseName, const G4Molecule *molecule, const G4ThreeVector &position, G4double time)
Definition: G4DNADamages.cc:33
const G4String & GetBaseName()
Definition: G4DNADamages.hh:49
G4bool fJustCountDamage
Definition: G4DNADamages.hh:97
static void DeleteInstance()
Definition: G4DNADamages.cc:83
G4int fNIndirectDamages
Definition: G4DNADamages.hh:98
virtual ~G4DNAIndirectHit()
Definition: G4DNADamages.cc:45
virtual ~G4VDNAHit()
Definition: G4DNADamages.hh:37
const std::vector< G4DNAIndirectHit * > * GetIndirectHits()
double G4double
Definition: G4Types.hh:76
virtual bool OnlyCountDamages() const
Definition: G4DNADamages.hh:87
virtual void AddIndirectDamage(const G4String &baseName, const G4Molecule *molecule, const G4ThreeVector &position, double time)
const G4Molecule * GetMolecule()
Definition: G4DNADamages.hh:47