00001 // 00002 // ******************************************************************** 00003 // * License and Disclaimer * 00004 // * * 00005 // * The Geant4 software is copyright of the Copyright Holders of * 00006 // * the Geant4 Collaboration. It is provided under the terms and * 00007 // * conditions of the Geant4 Software License, included in the file * 00008 // * LICENSE and available at http://cern.ch/geant4/license . These * 00009 // * include a list of copyright holders. * 00010 // * * 00011 // * Neither the authors of this software system, nor their employing * 00012 // * institutes,nor the agencies providing financial support for this * 00013 // * work make any representation or warranty, express or implied, * 00014 // * regarding this software system or assume any liability for its * 00015 // * use. Please see the license in the file LICENSE and URL above * 00016 // * for the full disclaimer and the limitation of liability. * 00017 // * * 00018 // * This code implementation is the result of the scientific and * 00019 // * technical work of the GEANT4 collaboration. * 00020 // * By using, copying, modifying or distributing the software (or * 00021 // * any work based on the software) you agree to acknowledge its * 00022 // * use in resulting scientific publications, and indicate your * 00023 // * acceptance of all terms of the Geant4 Software license. * 00024 // ******************************************************************** 00025 // 00026 // $Id: G4DNADamages.hh 65022 2012-11-12 16:43:12Z gcosmo $ 00027 // 00028 #ifndef G4DNADAMAGES_HH 00029 #define G4DNADAMAGES_HH 1 00030 00031 #include "G4Molecule.hh" 00032 00033 class G4VDNAHit 00034 { 00035 public : 00036 G4VDNAHit(){;} 00037 virtual ~G4VDNAHit(){;} 00038 }; 00039 00040 class G4DNAIndirectHit : public G4VDNAHit 00041 { 00042 public : 00043 G4DNAIndirectHit(const G4String& baseName, const G4Molecule* molecule, 00044 const G4ThreeVector& position, G4double time); 00045 virtual ~G4DNAIndirectHit(); 00046 00047 inline const G4Molecule* GetMolecule() {return fpMolecule;} 00048 inline const G4ThreeVector& GetPosition() {return fPosition;} 00049 inline const G4String& GetBaseName() {return fBaseName;} 00050 inline double GetTime() {return fTime;} 00051 00052 void Print(); 00053 00054 protected : 00055 const G4Molecule* fpMolecule; 00056 G4ThreeVector fPosition; 00057 G4double fTime; 00058 G4String fBaseName; 00059 }; 00060 00061 class G4DNADamages 00062 { 00063 public: 00064 static G4DNADamages* Instance(); 00065 static void DeleteInstance(); 00066 00067 virtual void Reset(); 00068 00069 //void AddDirectDamage(); 00070 virtual void AddIndirectDamage(const G4String& baseName,const G4Molecule* molecule, 00071 const G4ThreeVector& position, double time); 00072 00073 inline const std::vector<G4DNAIndirectHit*>* GetIndirectHits(); 00074 inline virtual int GetNIndirectHits() const 00075 { 00076 if(fJustCountDamage) 00077 return fNIndirectDamages; 00078 00079 return fIndirectHits.size(); 00080 } 00081 00082 inline virtual void SetOnlyCountDamages(bool flag = true) 00083 { 00084 fJustCountDamage = flag; 00085 } 00086 00087 inline virtual bool OnlyCountDamages() const 00088 { 00089 return fJustCountDamage; 00090 } 00091 00092 protected : 00093 G4DNADamages(); 00094 static G4DNADamages* fpInstance; 00095 virtual ~G4DNADamages(); 00096 00097 G4bool fJustCountDamage; 00098 G4int fNIndirectDamages; 00099 std::vector<G4DNAIndirectHit*> fIndirectHits; 00100 std::map<G4Molecule, const G4Molecule*> fMolMap; 00101 }; 00102 00103 inline const std::vector<G4DNAIndirectHit*>* G4DNADamages::GetIndirectHits() 00104 { 00105 return &fIndirectHits; 00106 } 00107 00108 #endif // G4DNADAMAGES_HH