G4NeutronHPIsoData.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 //
00027 // $Id$
00028 //
00029 #ifndef G4NeutronHPIsoData_h
00030 #define G4NeutronHPIsoData_h 1
00031 
00032  // Hadronic Process: Very Low Energy Neutron X-Sections
00033  // original by H.P. Wellisch, TRIUMF, 14-Feb-97
00034  // Has the Cross-section data for on isotope.
00035  
00036 #include "globals.hh"
00037 #include "G4ios.hh"
00038 #include <fstream>
00039 // #include <strstream>
00040 #include <stdlib.h>
00041 #include "G4NeutronHPVector.hh"
00042 #include "G4NeutronHPNames.hh"
00043 
00044 class G4NeutronHPIsoData
00045 {
00046 public:
00047 
00048   G4NeutronHPIsoData()
00049   {
00050     theChannelData = 0;
00051     theFissionData = 0;
00052     theCaptureData = 0;
00053     theElasticData = 0;
00054     theInelasticData = 0;
00055   }
00056   
00057   ~G4NeutronHPIsoData(){if(theChannelData!=0) delete theChannelData;}
00058   
00059   inline G4double GetXsec(G4double energy)
00060   {
00061     return std::max(0., theChannelData->GetXsec(energy));
00062   }
00063 
00064   //G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType);
00065   G4bool Init(G4int A, G4int Z, G4double abun, G4String dirName, G4String aFSType){ G4int M = 0 ; return Init( A, Z, M, abun, dirName, aFSType); };
00066   G4bool Init(G4int A, G4int Z, G4int M, G4double abun, G4String dirName, G4String aFSType);
00067   
00068   //void Init(G4int A, G4int Z, G4double abun); //fill PhysicsVector for this Isotope
00069   void Init(G4int A, G4int Z, G4double abun)  { G4int M =0;
00070   Init( A, Z, M, abun); }; 
00071   void Init(G4int A, G4int Z, G4int M, G4double abun); //fill PhysicsVector for this Isotope
00072   
00073   inline G4NeutronHPVector * MakeElasticData()
00074     {return theElasticData;}
00075   inline G4NeutronHPVector * MakeFissionData()
00076     {return theFissionData;}
00077   inline G4NeutronHPVector * MakeCaptureData()
00078     {return theCaptureData;}
00079   inline G4NeutronHPVector * MakeInelasticData()
00080     {return theInelasticData;}
00081   inline G4NeutronHPVector * MakeChannelData()
00082     {return theChannelData;}
00083 
00084   G4String GetName(G4int A, G4int Z, G4String base, G4String rest);
00085   
00086   inline void FillChannelData(G4NeutronHPVector * aBuffer)
00087   {
00088     if(theChannelData!=0) throw G4HadronicException(__FILE__, __LINE__, "IsoData has channel full already!!!");
00089     theChannelData = new G4NeutronHPVector;
00090     for(G4int i=0; i<aBuffer->GetVectorLength(); i++)
00091     {
00092       theChannelData->SetPoint(i, aBuffer->GetPoint(i));
00093     }
00094   }
00095   
00096   inline void ThinOut(G4double precision)
00097   {
00098     if(theFissionData) theFissionData->ThinOut(precision);
00099     if(theCaptureData) theCaptureData->ThinOut(precision);
00100     if(theElasticData) theElasticData->ThinOut(precision);
00101     if(theInelasticData) theInelasticData->ThinOut(precision);
00102   }
00103   
00104 private:
00105 
00106   G4NeutronHPVector * theFissionData;
00107   G4NeutronHPVector * theCaptureData;
00108   G4NeutronHPVector * theElasticData;
00109   G4NeutronHPVector * theInelasticData;
00110   G4NeutronHPVector * theChannelData;
00111 
00112   G4String theFileName;
00113   G4NeutronHPNames theNames;
00114 };
00115 
00116 #endif

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