Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 65022 2012-11-12 16:43:12Z gcosmo $
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