Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:58:41

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 // Author: Mathieu Karamitros
0027 
0028 // The code is developed in the framework of the ESA AO7146
0029 //
0030 // We would be very happy hearing from you, send us your feedback! :)
0031 //
0032 // In order for Geant4-DNA to be maintained and still open-source,
0033 // article citations are crucial. 
0034 // If you use Geant4-DNA chemistry and you publish papers about your software, 
0035 // in addition to the general paper on Geant4-DNA:
0036 //
0037 // Int. J. Model. Simul. Sci. Comput. 1 (2010) 157–178
0038 //
0039 // we would be very happy if you could please also cite the following
0040 // reference papers on chemistry:
0041 //
0042 // J. Comput. Phys. 274 (2014) 841-882
0043 // Prog. Nucl. Sci. Tec. 2 (2011) 503-508 
0044 
0045 #ifndef G4MOLECULETABLE_HH_
0046 #define G4MOLECULETABLE_HH_
0047 
0048 #include "globals.hh"
0049 #include "G4MoleculeIterator.hh"
0050 #include "G4ElectronOccupancy.hh"
0051 
0052 #include <memory>
0053 
0054 class G4MoleculeDefinition;
0055 class G4MolecularConfiguration;
0056 class G4MoleculeTableMessenger;
0057 
0058 using G4MoleculeDefinitionIterator = G4MoleculeIterator<G4MoleculeDefinition>;
0059 using G4ConfigurationIterator = G4MoleculeIterator<G4MolecularConfiguration>;
0060 
0061 class G4MoleculeTable
0062 {
0063 public:
0064   static G4MoleculeTable* Instance();
0065   static G4MoleculeTable* GetMoleculeTable();
0066   virtual ~G4MoleculeTable();
0067 
0068   //____________________________________________________________________________
0069   // The methods below enable to create G4MoleculeDefinition &
0070   // G4MolecularConfiguration with a user identifier so that they can be retrieved
0071   // from this molecule table
0072   //
0073 
0074   //____________________________________________________________________________
0075 
0076   G4MoleculeDefinition* CreateMoleculeDefinition(const G4String& userIdentifier,
0077                                                  double diffusion_coefficient);
0078 
0079   //____________________________________________________________________________
0080 
0081   G4MolecularConfiguration*
0082   CreateConfiguration(const G4String& userIdentifier,
0083                       const G4MoleculeDefinition* molDef,
0084                       const G4String& configurationLabel,
0085                       const G4ElectronOccupancy& eOcc);
0086 
0087   G4MolecularConfiguration*
0088   CreateConfiguration(const G4String& userIdentifier,
0089                       G4MoleculeDefinition*,
0090                       int charge,
0091                       double diffusion_coefficient = -1);
0092 
0093   G4MolecularConfiguration*
0094   CreateConfiguration(const G4String& userIdentifier,
0095                       G4MoleculeDefinition*);
0096 
0097   G4MolecularConfiguration*
0098   CreateConfiguration(const G4String& userIdentifier,
0099                       G4MoleculeDefinition*,
0100                       const G4String& configurationLabel,
0101                       int charge = 0);
0102 
0103   //____________________________________________________________________________
0104 
0105   G4MoleculeDefinition* GetMoleculeDefinition(const G4String&,
0106                                               bool mustExist = true);
0107 
0108   G4MolecularConfiguration* GetConfiguration(const G4String&,
0109                                              bool mustExist = true);
0110   G4MolecularConfiguration* GetConfiguration(G4int id);
0111 
0112   //____________________________________________________________________________
0113 
0114   void Insert(G4MoleculeDefinition*);
0115   void Finalize(G4MoleculeDefinition*){}
0116   void Finalize();
0117   //____________________________________________________________________________
0118 
0119   G4MoleculeDefinitionIterator GetDefintionIterator()
0120   {
0121     return G4MoleculeDefinitionIterator(this->fMoleculeDefTable);
0122   }
0123 
0124   G4ConfigurationIterator GetConfigurationIterator();
0125 
0126   void PrepareMolecularConfiguration();
0127 
0128   int GetNumberOfDefinedSpecies();
0129 
0130 protected:
0131   G4MoleculeTable();
0132 
0133   static G4MoleculeTable* fpgMoleculeTable;
0134   using MoleculeDefTable = std::map<G4String, G4MoleculeDefinition *>;
0135 
0136   MoleculeDefTable fMoleculeDefTable;
0137   std::unique_ptr<G4MoleculeTableMessenger> fMoleculeDefTableMessenger;
0138 
0139 };
0140 
0141 #endif /* G4MOLECULETABLE_HH_ */