G4NeutronHPChannelList.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  // Hadronic Process: Very Low Energy Neutron X-Sections
00030  // original by H.P. Wellisch, TRIUMF, 14-Feb-97
00031  // Builds and has the Cross-section data for one material.
00032  
00033 #ifndef G4NeutronHPChannelList_h
00034 #define G4NeutronHPChannelList_h 1
00035 
00036 #include "globals.hh"
00037 #include "G4NeutronHPChannel.hh"
00038 #include "G4StableIsotopes.hh"
00039 
00040 class G4Element;
00041 class G4HadFinalState;
00042 class G4HadProjectile;
00043 class G4NeutronHPFinalState;
00044 
00045 class G4NeutronHPChannelList
00046 {      
00047 
00048   public:
00049   
00050   G4NeutronHPChannelList(G4int n);
00051   
00052   G4NeutronHPChannelList();
00053   
00054   void Init(G4int n);
00055 
00056   ~G4NeutronHPChannelList();
00057   
00058   G4HadFinalState * ApplyYourself(const G4Element * theElement, const G4HadProjectile & aTrack);
00059       
00060   void Init(G4Element * anElement, const G4String & dirName);
00061     
00062   void Register(G4NeutronHPFinalState *theFS, const G4String &aName);
00063   
00064   inline G4double GetXsec(G4double anEnergy)
00065   {
00066     G4double result=0;
00067     G4int i;
00068     for(i=0; i<nChannels; i++)
00069     {
00070       result+=std::max(0., theChannels[i]->GetXsec(anEnergy));
00071     }
00072     return result;
00073   }
00074   
00075   inline G4int GetNumberOfChannels() { return nChannels; }
00076       
00077   inline G4bool HasDataInAnyFinalState()
00078   {
00079     G4bool result = false;
00080     G4int i;
00081     for(i=0; i<nChannels; i++)
00082     {
00083       if(theChannels[i]->HasDataInAnyFinalState()) result = true;
00084     }
00085     return result;
00086   }
00087   inline void RestartRegistration()
00088   {
00089     allChannelsCreated = true;
00090     theInitCount = 0;
00091   }
00092   private:
00093 
00094   static G4int trycounter;
00095   G4NeutronHPChannel ** theChannels;
00096   G4int nChannels;
00097   G4String theDir;
00098   G4Element * theElement; 
00099   
00100   G4bool allChannelsCreated;
00101   G4int theInitCount;
00102 
00103   G4StableIsotopes theStableOnes;
00104   
00105   G4HadFinalState unChanged;
00106 };
00107 
00108 #endif

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