source: trunk/source/processes/hadronic/models/neutron_hp/include/G4NeutronHPChannelList.hh @ 962

Last change on this file since 962 was 962, checked in by garnier, 15 years ago

update processes

File size: 3.4 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26//
27// $Id: G4NeutronHPChannelList.hh,v 1.10 2006/06/29 20:46:59 gunter Exp $
28// GEANT4 tag $Name: geant4-09-02-ref-02 $
29//
30 // Hadronic Process: Very Low Energy Neutron X-Sections
31 // original by H.P. Wellisch, TRIUMF, 14-Feb-97
32 // Builds and has the Cross-section data for one material.
33 
34#ifndef G4NeutronHPChannelList_h
35#define G4NeutronHPChannelList_h 1
36
37#include "globals.hh"
38#include "G4NeutronHPChannel.hh"
39#include "G4StableIsotopes.hh"
40
41class G4Element;
42class G4HadFinalState;
43class G4HadProjectile;
44class G4NeutronHPFinalState;
45
46class G4NeutronHPChannelList
47{     
48
49  public:
50 
51  G4NeutronHPChannelList(G4int n);
52 
53  G4NeutronHPChannelList();
54 
55  void Init(G4int n);
56
57  ~G4NeutronHPChannelList();
58 
59  G4HadFinalState * ApplyYourself(const G4Element * theElement, const G4HadProjectile & aTrack);
60     
61  void Init(G4Element * anElement, const G4String & dirName);
62   
63  void Register(G4NeutronHPFinalState *theFS, const G4String &aName);
64 
65  inline G4double GetXsec(G4double anEnergy)
66  {
67    G4double result=0;
68    G4int i;
69    for(i=0; i<nChannels; i++)
70    {
71      result+=std::max(0., theChannels[i]->GetXsec(anEnergy));
72    }
73    return result;
74  }
75 
76  inline G4int GetNumberOfChannels() { return nChannels; }
77     
78  inline G4bool HasDataInAnyFinalState()
79  {
80    G4bool result = false;
81    G4int i;
82    for(i=0; i<nChannels; i++)
83    {
84      if(theChannels[i]->HasDataInAnyFinalState()) result = true;
85    }
86    return result;
87  }
88  inline void RestartRegistration()
89  {
90    allChannelsCreated = true;
91    theInitCount = 0;
92  }
93  private:
94
95  static G4int trycounter;
96  G4NeutronHPChannel ** theChannels;
97  G4int nChannels;
98  G4String theDir;
99  G4Element * theElement; 
100 
101  G4bool allChannelsCreated;
102  G4int theInitCount;
103
104  G4StableIsotopes theStableOnes;
105 
106};
107
108#endif
Note: See TracBrowser for help on using the repository browser.