00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef G4NeutronHPChannel_h
00039 #define G4NeutronHPChannel_h 1
00040 #include "globals.hh"
00041 #include "G4NeutronHPIsoData.hh"
00042 #include "G4NeutronHPVector.hh"
00043 #include "G4Material.hh"
00044 #include "G4HadProjectile.hh"
00045
00046
00047
00048
00049 #include "G4StableIsotopes.hh"
00050 #include "G4NeutronHPCaptureFS.hh"
00051 #include "G4NeutronHPFinalState.hh"
00052 #include "G4Element.hh"
00053
00054 class G4NeutronHPChannel
00055 {
00056 public:
00057
00058 G4NeutronHPChannel()
00059 {
00060 theChannelData = new G4NeutronHPVector;
00061 theBuffer = 0;
00062 theIsotopeWiseData = 0;
00063 theFinalStates = 0;
00064 active = 0;
00065 registerCount = -1;
00066 }
00067
00068 ~G4NeutronHPChannel()
00069 {
00070 delete theChannelData;
00071
00072
00073
00074
00075 if(theIsotopeWiseData != 0) delete [] theIsotopeWiseData;
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089 if ( theFinalStates != 0 )
00090 {
00091 for ( G4int i = 0 ; i < niso ; i++ )
00092 {
00093 delete theFinalStates[i];
00094 }
00095 delete [] theFinalStates;
00096 }
00097 if ( active != 0 ) delete [] active;
00098
00099 }
00100
00101 G4double GetXsec(G4double energy);
00102
00103 G4double GetWeightedXsec(G4double energy, G4int isoNumber);
00104
00105 G4double GetFSCrossSection(G4double energy, G4int isoNumber);
00106
00107 inline G4bool IsActive(G4int isoNumber) { return active[isoNumber]; }
00108
00109 inline G4bool HasFSData(G4int isoNumber) { return theFinalStates[isoNumber]->HasFSData(); }
00110
00111 inline G4bool HasAnyData(G4int isoNumber) { return theFinalStates[isoNumber]->HasAnyData(); }
00112
00113 G4bool Register(G4NeutronHPFinalState *theFS);
00114
00115 void Init(G4Element * theElement, const G4String dirName);
00116
00117 void Init(G4Element * theElement, const G4String dirName, const G4String fsType);
00118
00119
00120 void UpdateData(G4int A, G4int Z, G4int index, G4double abundance) { G4int M = 0; UpdateData( A, Z, M, index, abundance); };
00121 void UpdateData(G4int A, G4int Z, G4int M, G4int index, G4double abundance);
00122
00123 void Harmonise(G4NeutronHPVector *& theStore, G4NeutronHPVector * theNew);
00124
00125 G4HadFinalState * ApplyYourself(const G4HadProjectile & theTrack, G4int isoNumber=-1);
00126
00127 inline G4int GetNiso() {return niso;}
00128
00129 inline G4double GetN(G4int i) {return theFinalStates[i]->GetN();}
00130 inline G4double GetZ(G4int i) {return theFinalStates[i]->GetZ();}
00131
00132 inline G4bool HasDataInAnyFinalState()
00133 {
00134 G4bool result = false;
00135 G4int i;
00136 for(i=0; i<niso; i++)
00137 {
00138 if(theFinalStates[i]->HasAnyData()) result = true;
00139 }
00140 return result;
00141 }
00142
00143 private:
00144 G4NeutronHPVector * theChannelData;
00145 G4NeutronHPVector * theBuffer;
00146
00147 G4NeutronHPIsoData * theIsotopeWiseData;
00148 G4NeutronHPFinalState ** theFinalStates;
00149 G4bool * active;
00150 G4int niso;
00151
00152 G4StableIsotopes theStableOnes;
00153
00154 G4String theDir;
00155 G4String theFSType;
00156 G4Element * theElement;
00157
00158 G4int registerCount;
00159
00160 };
00161
00162 #endif