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 #ifndef G4DataQuestionaire_h
00027 #define G4DataQuestionaire_h 1
00028
00029 #include "globals.hh"
00030
00031 #include "G4HadronElasticProcess.hh"
00032 #include "G4ProtonInelasticProcess.hh"
00033 #include "G4VPiKBuilder.hh"
00034
00035 enum G4DataType {no, photon, neutron, radioactive, lowenergy, optical, neutronxs, lend, abla};
00036 class G4DataQuestionaire
00037 {
00038 public:
00039 G4DataQuestionaire(G4DataType t1=no, G4DataType t2=no, G4DataType t3=no,
00040 G4DataType t4=no, G4DataType t5=no, G4DataType t6=no,
00041 G4DataType t7=no, G4DataType t8=no, G4DataType t9=no)
00042 {
00043 G4ExceptionDescription desc;
00044 desc << G4endl;
00045
00046 G4bool fail(false);
00047
00048
00049 if(!getenv("G4LEDATA") )
00050 {
00051 desc << "Low energy electromagnetic data are needed."<<G4endl
00052 << "This is a NEW requirement for standard EM physics since geant4 9.5."<<G4endl
00053 << "Please set the environmental variable G4LEDATA"<<G4endl
00054 << "to point to your G4EMLOW directory. "<<G4endl
00055 << "Note: EMLOW6.23 or above is needed for Bremsstrahlung data."<<G4endl
00056 << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
00057 fail=true;
00058 }
00059 for(G4int i=0; i<9; ++i)
00060 {
00061 G4DataType t(no);
00062 if(i==0) t=t1;
00063 if(i==1) t=t2;
00064 if(i==2) t=t3;
00065 if(i==3) t=t4;
00066 if(i==4) t=t5;
00067 if(i==5) t=t6;
00068 if(i==6) t=t7;
00069 if(i==7) t=t8;
00070 if(i==8) t=t9;
00071
00072 switch(t)
00073 {
00074 case photon:
00075 if(!getenv("G4LEVELGAMMADATA") )
00076 {
00077 desc << "Photon-evaporation data are needed."<<G4endl
00078 << "Please set the environmental variable G4LEVELGAMMADATA"<<G4endl
00079 << "to point to your PhotonEvaporation directory."<<G4endl
00080 << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
00081 fail=true;
00082 }
00083 break;
00084 case neutron:
00085 if(!getenv("G4NEUTRONHPDATA") )
00086 {
00087 desc << "G4NDL are needed."<<G4endl
00088 << "Please set the environmental variable G4NEUTRONHPDATA"<<G4endl
00089 << "to point to your G4NDL directory."<<G4endl
00090 << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
00091 fail=true;
00092 }
00093 break;
00094 case lend:
00095 if(!getenv("G4LENDDATA") )
00096 {
00097 desc << "Data files for Low Energy Nuclear Data (LEND) are needed."<<G4endl
00098 << "Please set the environmental variable G4LENDDATA"<<G4endl
00099 << "to point to the directory containing these LEND data."<<G4endl
00100 << "Data files for Low Energy Nuclear Data (LEND) are available from" <<
00101 " ftp://gdo-nuclear.ucllnl.org/pub/."<<G4endl<<G4endl;
00102 fail=true;
00103 }
00104 break;
00105 case radioactive:
00106 if(!getenv("G4RADIOACTIVEDATA") )
00107 {
00108 desc << "Radioactive decay data are needed."<<G4endl
00109 << "Please set the environmental variable G4RADIOACTIVEDATA"<<G4endl
00110 << "to point to your RadiativeDecay directory."<<G4endl
00111 << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
00112 fail=true;
00113 }
00114 break;
00115 case lowenergy:
00116 if(!getenv("G4LEDATA") )
00117 {
00118 desc << "Low energy electromagnetic data are needed."<<G4endl
00119 << "Please set the environmental variable G4LEDATA"<<G4endl
00120 << "to point to your G4EMLOW directory."<<G4endl
00121 << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
00122 fail=true;
00123 }
00124 break;
00125 case optical:
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136 break;
00137 case neutronxs:
00138 if(!getenv("G4NEUTRONXSDATA") )
00139 {
00140 desc << "G4NEUTRONXS are needed."<<G4endl
00141 << "Please set the environmental variable G4NEUTRONXSDATA"<<G4endl
00142 << "to point to your G4NEUTRONXS directory."<<G4endl
00143 << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
00144 fail=true;
00145 }
00146 break;
00147 case abla:
00148 if(!getenv("G4ABLADATA") )
00149 {
00150 desc << "ABLA data are needed."<<G4endl
00151 << "Please set the environmental variable G4ABLADATA"<<G4endl
00152 << "to point to your ABLA data directory."<<G4endl
00153 << "Data are available from the Geant4 download page."<<G4endl<<G4endl;
00154 fail=true;
00155 }
00156 break;
00157 case no:
00158
00159 break;
00160 default:
00161 if(t!=no)
00162 {
00163 G4Exception("G4DataQuestionaire", "PhysicsLists003", FatalException,
00164 "data type requested is not known to the system");
00165 }
00166 }
00167 }
00168 if (fail) {
00169
00170 desc << "*** Fatal error: Missing mandatory data for this simulation engine ***"<<G4endl;
00171 G4Exception("G4DataQuestionaire", "PhysicsLists002", FatalException, desc);
00172 }
00173 }
00174 ~G4DataQuestionaire() {}
00175 };
00176
00177 #endif
00178