Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:21:52

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 // This class was made using G4MoleculeGun as a base
0027 // G4MoleculeGun Author: Mathieu Karamitros
0028 //
0029 // The code is developed in the framework of the ESA AO7146
0030 //
0031 // We would be very happy hearing from you, send us your feedback! :)
0032 //
0033 // In order for Geant4-DNA to be maintained and still open-source,
0034 // article citations are crucial.
0035 // If you use Geant4-DNA chemistry and you publish papers about your software,
0036 // in addition to the general paper on Geant4-DNA:
0037 //
0038 // Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
0039 //
0040 // we would be very happy if you could please also cite the following
0041 // reference papers on chemistry:
0042 //
0043 // Authors: J. Naoki D. Kondo (UCSF, US)
0044 //          J. Ramos-Mendez and B. Faddegon (UCSF, US)
0045 //
0046 // J. Comput. Phys. 274 (2014) 841-882
0047 // Prog. Nucl. Sci. Tec. 2 (2011) 503-508
0048 //
0049 /// \file MoleculeInserter.hh
0050 /// \brief Definition of the DNA chemical species inserter for IRT
0051 
0052 #ifndef DNADAMAGE2_moleculeinserter_h
0053 #define DNADAMAGE2_moleculeinserter_h 1
0054 
0055 #include "G4ITGun.hh"
0056 #include "G4ThreeVector.hh"
0057 #include "globals.hh"
0058 
0059 #include <G4memory.hh>
0060 #include <map>
0061 #include <vector>
0062 
0063 class G4Track;
0064 class MoleculeInserter;
0065 class G4Molecule;
0066 
0067 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0068 
0069 class MoleculeShoot
0070 {
0071   public:
0072     MoleculeShoot();
0073     ~MoleculeShoot() = default;
0074     void Shoot(MoleculeInserter*);
0075 
0076   public:
0077     G4int fNumber = 0;
0078     G4String fMoleculeName = "None";
0079     G4double fTime = 1;
0080     G4ThreeVector fPosition = G4ThreeVector();
0081 };
0082 
0083 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0084 
0085 class MoleculeInserter : public G4ITGun
0086 {
0087   public:
0088     MoleculeInserter();
0089     MoleculeInserter(G4bool);
0090     ~MoleculeInserter() = default;
0091     void DefineTracks() override;
0092     void AddMolecule(const G4String& moleculeName, const G4ThreeVector& position, double time = 0);
0093     void PushToChemistry(G4Molecule*, G4double, G4ThreeVector);
0094     void CreateMolecule(G4Molecule*, G4double, G4ThreeVector);
0095     void CreateMolecule(G4String, G4double, G4ThreeVector);
0096     void Clean();
0097 
0098     std::vector<G4Track*> const GetInsertedTracks() { return fInsertedTracks; }
0099 
0100   private:
0101     G4bool fSaveTrackID = true;
0102     std::vector<G4Track*> fInsertedTracks;
0103 
0104   protected:
0105     std::vector<MoleculeShoot> fShoots;
0106 };
0107 
0108 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
0109 
0110 #endif