G4MolecularDecayTable.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 header file
00033 //
00034 //      History: first implementation, Alfonso Mantero 4 Mar 2009
00035 // ----------------------------------------------------------------
00036 //
00037 #ifndef G4MolecularDecayTable_h
00038 #define G4MolecularDecayTable_h 1
00039 
00040 #include <map>
00041 #include <vector>
00042 #include "G4ElectronOccupancy.hh"
00043 
00044 class G4MolecularDecayChannel;
00045 
00046 //°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
00047 struct eOccComp
00048 {
00049     bool operator() (const G4ElectronOccupancy& occ1, const G4ElectronOccupancy& occ2) const
00050     {
00051 
00052         if (occ1.GetTotalOccupancy() != occ2.GetTotalOccupancy())
00053         {
00054             return occ1.GetTotalOccupancy()<occ2.GetTotalOccupancy();
00055         }
00056         else
00057         {
00058 
00059             for (G4int i=0; i<occ1.GetSizeOfOrbit();)
00060             {
00061 
00062                 if (occ1.GetOccupancy(i) != occ2.GetOccupancy(i))
00063                 {
00064                     return occ1.GetOccupancy(i) < occ2.GetOccupancy(i);
00065                 }
00066                 else
00067                 {
00068 
00069                     i++;
00070                     if (i >= occ1.GetSizeOfOrbit()) return false;
00071                 }
00072 
00073             }
00074         }
00075         return false;
00076     }
00077 };
00078 
00079 //°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
00080 typedef std::map<G4ElectronOccupancy, G4String, eOccComp>  statesMap;
00081 typedef std::map<G4String, std::vector<const G4MolecularDecayChannel*>, std::less <G4String> > channelsMap;
00082 
00088 class G4MolecularDecayTable
00089 {
00090 
00091 public:
00092 
00093     G4MolecularDecayTable();
00094     ~G4MolecularDecayTable();
00095     G4MolecularDecayTable(const G4MolecularDecayTable&);
00096     G4MolecularDecayTable & operator=(const G4MolecularDecayTable &right);
00097 
00098 public:
00099 
00100     //°°°°°°°°°°°°°°°°°°
00101     // Create the table
00103     // methods to construct the table "interactively"
00104     void  AddExcitedState(const G4String&); // creates an empty excited state
00105 
00106     // creates or adds to an existing excited state an electronic configuration
00107     void  AddeConfToExcitedState(const G4String&,const G4ElectronOccupancy&);
00108     void  AddDecayChannel(const G4String&,const G4MolecularDecayChannel*);
00109     void  CheckDataConsistency() ;
00110     // Checks that probabilities sum up to 100% for each excited state
00111 
00112 //------------Inline fuctions------------
00113 // Get methods to retrieve data
00114 
00115     const std::vector<const G4MolecularDecayChannel*>* GetDecayChannels(const G4ElectronOccupancy*) const ;
00116     const std::vector<const G4MolecularDecayChannel*>* GetDecayChannels(const G4String&) const ;
00117 
00118     const G4String& GetExcitedState(const G4ElectronOccupancy*) const ;
00119     const G4ElectronOccupancy& GetElectronOccupancy (const G4String&) const ;
00120 
00121     inline const statesMap& GetExcitedStateMaps() const;
00122     inline const channelsMap& GetDecayChannelsMap() const;
00123 
00124 private:
00125     statesMap fExcitedStatesMap ;
00126     channelsMap fDecayChannelsMap ;
00127 };
00128 
00129 inline const statesMap&  G4MolecularDecayTable::GetExcitedStateMaps() const
00130 {
00131     return fExcitedStatesMap;
00132 }
00133 
00134 inline const channelsMap&  G4MolecularDecayTable::GetDecayChannelsMap() const
00135 {
00136     return fDecayChannelsMap;
00137 }
00138 
00139 #endif
00140 
00141 
00142 
00143 
00144 
00145 
00146 
00147 

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