00001 #ifndef REACTIONXS_H 00002 #define REACTIONXS_H 00003 00004 #include <TArrayF.h> 00005 00006 #include "NdbDefs.h" 00007 #include "NdbMF.h" 00008 #include "NdbMT.h" 00009 #include "NdbParticleList.h" 00010 #include "NdbMaterial.h" 00011 00012 // --- Interpolation types ---- 00013 #define IT_HISTOGRAM 1 00014 #define IT_LINLIN 2 00015 #define IT_LINLOG 3 00016 #define IT_LOGLIN 4 00017 #define IT_LOGLOG 5 00018 #define IT_GAMOW 6 00019 00020 /* ========= NdbMTReactionXS ============ */ 00021 class NdbMTReactionXS : public NdbMT 00022 { 00023 protected: 00024 TArrayF ene; // Energy in eV 00025 TArrayF xs; // Cross section in barn 00026 00027 Float_t minxs, // Minimum and 00028 maxxs; // Maximum limits of XS 00029 00030 NdbParticle projectile; // Projectile particle 00031 NdbParticleList daugthers; // Reaction products 00032 NdbMaterial residual; // Residual nucleus 00033 Double_t QM; // Mass-difference Q value (eV) 00034 Double_t QI; // reaction Q for the lowest 00035 // energy state 00036 Int_t LR; // Complex or "breakup" flag. 00037 Int_t NP; // No. Points (x,y) 00038 Int_t NR; // interpolation regions 00039 Int_t IT; // Interpolation type 00040 00041 public: 00042 NdbMTReactionXS(int aMt, const char *desc) 00043 : NdbMT(aMt,desc) { 00044 LR = -1; 00045 NP = -1; 00046 NR = -1; 00047 minxs = maxxs = 0.0; 00048 } 00049 ~NdbMTReactionXS() {} 00050 00051 // --- Access functions --- 00052 inline Float_t Energy(int i) { return ene[i]; } 00053 inline Float_t XS(int i) { return xs[i]; } 00054 00055 inline Int_t Pairs() const { return NP; } 00056 inline Int_t InterpolationType() const { return IT; } 00057 inline Int_t InterpolationRegions() const { return NR; } 00058 inline Float_t MassDifference() const { return QM; } 00059 inline Float_t ReactionQ() const { return QI; } 00060 00061 // --- Input/Output routines --- 00062 Bool_t LoadENDF(char *filename); 00063 00064 // --- Interpolation routines --- 00065 Int_t BinSearch( Float_t e); 00066 Float_t Interpolate(Float_t e); 00067 00068 // --- Limits --- 00069 inline Float_t MinEnergy() { return ene[0]; } 00070 inline Float_t MaxEnergy() { return ene[NP-1]; } 00071 inline Float_t MinXS() const { return minxs; } 00072 inline Float_t MaxXS() const { return maxxs; } 00073 00074 ClassDef(NdbMTReactionXS,1) 00075 00076 }; // NdbMTReactionXS 00077 00078 #endif