G4MoleculeDefinition.hh

Go to the documentation of this file.
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 // Contact: Mathieu Karamitros (kara (AT) cenbg . in2p3 . fr)
00027 //
00028 // WARNING : This class is released as a prototype.
00029 // It might strongly evolve or even disapear in the next releases.
00030 //
00031 // ----------------------------------------------------------------------
00032 //      GEANT 4 class implementation file
00033 //
00034 //      21 Oct 2009 first implementation by A. Mantero and M.Karamitros
00035 //                  Based on prototype of A.Mantero
00036 // **********************************************************************
00037 //
00038 
00039 
00040 #ifndef G4MoleculeDefinition_h
00041 #define G4MoleculeDefinition_h 1
00042 
00043 #include "globals.hh"
00044 #include "G4ParticleDefinition.hh"
00045 #include "G4ios.hh"
00046 #include "G4ElectronOccupancy.hh"
00047 #include "G4MolecularDecayTable.hh"
00048 #include "G4MolecularDecayChannel.hh"
00049 #include "G4MoleculeID.hh"
00050 
00051 // ######################################################################
00052 // ###                          Molecule                              ###
00053 // ######################################################################
00054 
00055 class G4MolecularDecayChannel;
00056 class G4MolecularDecayTable;
00057 class G4MolecularConfiguration;
00058 
00059 class G4MoleculeDefinition : public G4ParticleDefinition
00060 {
00061 // Class Description
00062 //  This is the base class for all molecules
00063 //  All molecules created are objects of this class.
00064 
00065 public: //With Description
00066     G4MoleculeDefinition(const G4String& name,
00067                          G4double mass,
00068                          G4int    electronsNumber,
00069                          G4int    electronicLevels,
00070                          G4double diffCoeff,
00071                          G4int atomsNumber = -1,
00072                          G4double radius = -1,
00073                          G4double lifetime = -1,
00074                          G4String aType = "",
00075                          G4MoleculeID ID = G4MoleculeID::Create()
00076                          );
00077 
00078     virtual ~G4MoleculeDefinition();
00079 
00080     // Set the electronic configuration at ground level
00081     void SetLevelOccupation(G4int, G4int eNb=2);
00082     // set the occupation(0(def), 1 or 2) of the level specified
00083     //(levels numbering starts from 0)
00084 
00085     //methods to set/get diffusion properties
00086     inline void SetDiffusionCoefficient(G4double);
00087     inline G4double GetDiffusionCoefficient() const;
00088 
00089     inline void SetAtomsNumber(G4int);
00090     inline G4int GetAtomsNumber() const;
00091 
00092     inline void SetVanDerVaalsRadius(G4double);
00093     inline G4double GetVanDerVaalsRadius() const;
00094 
00095     //°°°°°°°°°°°°°°°°°°°°°°°°
00096     // Build the decay table
00097     void AddExcitedState(const G4String&) ;
00098     const G4String& GetExcitedState(const G4ElectronOccupancy*) const;
00099     void AddDecayChannel(const G4String&, const G4MolecularDecayChannel*) ;
00100     void AddeConfToExcitedState(const G4String&,const G4ElectronOccupancy&, double decayTime = 0.);
00101 
00102     //°°°°°°°°°°°°°°°°°°°°°°°°
00103     // "Get" methods related to decay
00104     const std::vector<const G4MolecularDecayChannel*>* GetDecayChannels(const G4ElectronOccupancy*) const;
00105     const std::vector<const G4MolecularDecayChannel*>* GetDecayChannels(const G4String&) const;
00106 
00107     //°°°°°°°°°°°°°°°°°°°°°°°°
00108     // General "Get" methods
00109     inline const G4ElectronOccupancy*   GetGroundStateElectronOccupancy() const;
00110     inline const G4String&              GetName() const;
00111     inline G4double                     GetMass() const;
00112     inline const G4String&              GetType() const;
00113     inline G4int                        GetNbElectrons() const;
00114     inline G4int                        GetNbMolecularShells() const;
00115     inline const G4MolecularDecayTable* GetDecayTable() const ;
00116     inline G4MolecularDecayTable*       GetDecayTable() ;
00117     inline G4double                     GetDecayTime() const;
00118 
00119 protected :
00120     G4MoleculeDefinition();
00121     G4MoleculeDefinition(const G4MoleculeDefinition&);
00122 
00123 private :
00124     const G4MoleculeDefinition & operator=(const G4MoleculeDefinition &right);
00125 
00126 private:
00127     G4double fMass;
00128     G4String fType;
00129 
00130     G4int fNbOfElectrons;
00131     G4int fNbOfMolecularShells;
00132 
00133     // Diffusion Coefficient in one medium only
00134     // Note : For the time being, we will consider only one diffusion
00135     // coefficient for the all simulation => diffusion in one medium only
00136     // If the user needs to use the diffusion in different medium,
00137     // he should contact the developpers/mainteners of this package
00138     G4double fDiffusionCoefficient;
00139 
00140     G4int fAtomsNb;
00141     G4double fVanDerVaalsRadius;
00142 
00143     G4ElectronOccupancy* fElectronOccupancy;
00144     G4MolecularDecayTable* fDecayTable;
00145 };
00146 
00147 
00148 inline void G4MoleculeDefinition::SetDiffusionCoefficient(G4double value)
00149 {
00150     fDiffusionCoefficient = value;
00151 }
00152 
00153 inline G4double G4MoleculeDefinition::GetDiffusionCoefficient() const
00154 {
00155     return fDiffusionCoefficient;
00156 }
00157 
00158 inline G4double G4MoleculeDefinition::GetDecayTime() const
00159 {
00160     return GetPDGLifeTime();
00161 }
00162 
00163 inline void G4MoleculeDefinition::SetAtomsNumber(G4int val)
00164 {
00165     fAtomsNb = val;
00166 }
00167 
00168 inline G4int G4MoleculeDefinition::GetAtomsNumber() const
00169 {
00170     return fAtomsNb;
00171 }
00172 
00173 inline void G4MoleculeDefinition::SetVanDerVaalsRadius(G4double val)
00174 {
00175     fVanDerVaalsRadius = val;
00176 }
00177 
00178 inline G4double G4MoleculeDefinition::GetVanDerVaalsRadius() const
00179 {
00180     return fVanDerVaalsRadius;
00181 }
00182 
00183 inline const G4ElectronOccupancy* G4MoleculeDefinition::GetGroundStateElectronOccupancy() const
00184 {
00185     return fElectronOccupancy;
00186 }
00187 
00188 inline const G4String& G4MoleculeDefinition::GetName() const
00189 {
00190 
00191     return GetParticleName();
00192 }
00193 
00194 inline G4double G4MoleculeDefinition::GetMass() const
00195 {
00196     return fMass;
00197 }
00198 
00199 inline const G4String& G4MoleculeDefinition::GetType() const
00200 {
00201 
00202     return GetParticleSubType();
00203 }
00204 
00205 inline G4int G4MoleculeDefinition::GetNbElectrons() const
00206 {
00207 
00208     return fNbOfElectrons;
00209 }
00210 
00211 inline G4int G4MoleculeDefinition::GetNbMolecularShells() const
00212 {
00213 
00214     return fNbOfMolecularShells;
00215 }
00216 
00217 inline const G4MolecularDecayTable* G4MoleculeDefinition::GetDecayTable() const
00218 {
00219     return fDecayTable;
00220 }
00221 
00222 inline G4MolecularDecayTable* G4MoleculeDefinition::GetDecayTable()
00223 {
00224     return fDecayTable;
00225 }
00226 #endif
00227 
00228 
00229 
00230 
00231 
00232 
00233 
00234 

Generated on Mon May 27 17:48:53 2013 for Geant4 by  doxygen 1.4.7