G4NuclearLevelManager.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 // $Id$
00027 //
00028 // -------------------------------------------------------------------
00029 //      GEANT 4 class file 
00030 //
00031 //      CERN, Geneva, Switzerland
00032 //
00033 //      File name:     G4NuclearLevelManager
00034 //
00035 //      Author:        Maria Grazia Pia (pia@genova.infn.it)
00036 // 
00037 //      Creation date: 25 October 1998
00038 //
00039 //      Modifications: 
00040 //        21 Nov. 2001, Fan Lei (flei@space.qinetiq.com)
00041 //              Added K->N+ internal  conversion coefficiencies and their access
00042 //              functions      
00043 //      
00044 //      
00045 //        15 April 1999, Alessandro Brunengo (Alessandro.Brunengo@ge.infn.it)
00046 //              Added half-life, angular momentum, parity, emissioni type
00047 //              reading from experimental data. 
00048 //        02 May 2003,   Vladimir Ivanchenko remove rublic copy contructor
00049 //        06 Oct 2010, M. Kelsey -- Use object storage, not pointers, drop
00050 //              public access to list
00051 // -------------------------------------------------------------------
00052 
00053 #ifndef G4NUCLEARLEVELMANAGER_HH
00054 #define G4NUCLEARLEVELMANAGER_HH 1
00055 
00056 #include <iosfwd>
00057 #include <CLHEP/Units/SystemOfUnits.h>
00058 
00059 #include "globals.hh"
00060 #include "G4PtrLevelVector.hh"
00061 
00062 class G4NuclearLevel;
00063 
00064 
00065 class G4NuclearLevelManager 
00066 {
00067 
00068 public:
00069 
00070   //G4NuclearLevelManager();
00071   G4NuclearLevelManager(G4int Z, G4int A, const G4String& filename);
00072   G4NuclearLevelManager(const G4NuclearLevelManager & right);  
00073 
00074   ~G4NuclearLevelManager();
00075   
00076   void SetNucleus(G4int Z, G4int A, const G4String& filename);
00077 
00078   inline G4bool IsValid() const { return _validity; }
00079 
00080   inline G4int NumberOfLevels() const { return (_levels ? _levels->size() : 0); }
00081 
00082   const G4NuclearLevel* GetLevel(G4int i) const;
00083 
00084   const G4NuclearLevel* NearestLevel(G4double energy,
00085                                      G4double eDiffMax=9999.*CLHEP::GeV) const;
00086 
00087   const G4NuclearLevel* LowestLevel() const;
00088   const G4NuclearLevel* HighestLevel() const;
00089 
00090   G4double MinLevelEnergy() const;
00091   G4double MaxLevelEnergy() const;
00092 
00093   void PrintAll();
00094   
00095 private:  
00096   const G4NuclearLevelManager& operator=(const G4NuclearLevelManager &right);
00097   G4bool operator==(const G4NuclearLevelManager &right) const;
00098   G4bool operator!=(const G4NuclearLevelManager &right) const;
00099 
00100   G4bool Read(std::ifstream& aDataFile);
00101   G4bool ReadDataLine(std::ifstream& dataFile);
00102   G4bool ReadDataItem(std::istream& dataFile, G4double& x);
00103   void ProcessDataLine();
00104 
00105   void MakeLevels();
00106   void ClearLevels();
00107 
00108   G4NuclearLevel* UseLevelOrMakeNew(G4NuclearLevel* level);
00109   void AddDataToLevel(G4NuclearLevel* level);
00110   void FinishLevel(G4NuclearLevel* level);
00111 
00112   G4int _nucleusA;
00113   G4int _nucleusZ;
00114   G4String _fileName;
00115   G4bool _validity;
00116   G4PtrLevelVector* _levels;
00117 
00118   // Buffers for reading data file
00119   char buffer[30];              // For doubles in scientific notation
00120   G4double _levelEnergy;
00121   G4double _gammaEnergy;
00122   G4double _probability;
00123   G4double _polarity;
00124   G4double _halfLife;
00125   G4double _angularMomentum;
00126   G4double _kCC;
00127   G4double _l1CC;
00128   G4double _l2CC;
00129   G4double _l3CC;
00130   G4double _m1CC;  
00131   G4double _m2CC;
00132   G4double _m3CC;
00133   G4double _m4CC;
00134   G4double _m5CC;
00135   G4double _nPlusCC;
00136   G4double _totalCC;
00137 };
00138 
00139 #endif

Generated on Mon May 27 17:49:06 2013 for Geant4 by  doxygen 1.4.7