69 if(LDType==1 || LDType==3){
70 snprintf(fname,100,
"%s/LevelDensities/level-densities-bfmeff.dat",dirname);
73 snprintf(fname,100,
"%s/LevelDensities/level-densities-ctmeff.dat",dirname);
77 std::ifstream in(fname);
79 std::cout<<
" ######## Error opening file "<<fname<<
" ########"<<std::endl;
80 NuDEXException(__FILE__,std::to_string(__LINE__).c_str(),
"##### Error in NuDEX #####");
84 in.ignore(10000,
'\n');
89 if(aZ==Z_Int && aA==A_Int){
90 if(LDType==1 || LDType==3){
91 in>>word>>I0>>Sn>>D0>>word>>word>>EL>>word>>EU>>dW_ldpar>>gamma_ldpar>>ainf_ldpar>>word>>Delta_ldpar;
92 Ex_ldpar=0; E0_ldpar=0; T_ldpar=0;
96 in>>word>>I0>>Sn>>D0>>word>>word>>EL>>word>>EU>>dW_ldpar>>gamma_ldpar>>ainf_ldpar>>word>>Delta_ldpar>>Ex_ldpar>>E0_ldpar>>T_ldpar;
100 NuDEXException(__FILE__,std::to_string(__LINE__).c_str(),
"##### Error in NuDEX #####");
107 in.ignore(10000,
'\n');
113 if(defaultinputfname!=0){
126 std::cout<<
" ##### WARNING: level density model for ZA="<<Z_Int*1000+A_Int<<
" changed to Back-Shifted-Fermi-Gas model #####"<<std::endl;
131 if(HasData){
return 0;}
149 if((Z_Int%2)==1 && ((A_Int-Z_Int)%2)==1){n_par=-1;}
150 if((Z_Int%2)==0 && ((A_Int-Z_Int)%2)==0){n_par=1;}
151 Delta_ldpar=n_par*12/std::sqrt(A_mass)+delta;
154 ainf_ldpar=alpha*A_Int+beta*std::pow(A_mass,2./3.);
157 gamma_ldpar=gamma0/std::pow(A_mass,1./3.);
161 snprintf(fname,100,
"%s/LevelDensities/shellcor-ms.dat",dirname);
162 std::ifstream in(fname);
164 std::cout<<
" ######## Error opening file "<<fname<<
" ########"<<std::endl;
165 NuDEXException(__FILE__,std::to_string(__LINE__).c_str(),
"##### Error in NuDEX #####");
169 in.ignore(10000,
'\n');
170 in.ignore(10000,
'\n');
171 in.ignore(10000,
'\n');
172 in.ignore(10000,
'\n');
174 if(aZ==Z_Int && aA==A_Int){
176 if(in.good()){
break;}
178 in.ignore(10000,
'\n');
185 Ex_ldpar=0; E0_ldpar=0; T_ldpar=0;
196 std::ifstream in2(inputfname);
198 std::cout<<
" ############## Error opening "<<inputfname<<
" ##############"<<std::endl;
199 NuDEXException(__FILE__,std::to_string(__LINE__).c_str(),
"##### Error in NuDEX #####");
201 std::string word_tmp;
202 while(in2>>word_tmp){
203 if(word_tmp[0]==
'#'){in2.ignore(10000,
'\n');}
204 if(word_tmp==std::string(
"END")){
break;}
205 if(word_tmp==std::string(
"LDPARAMETERS")){
208 in2>>dW_ldpar>>gamma_ldpar>>ainf_ldpar>>Delta_ldpar;
211 in2>>dW_ldpar>>gamma_ldpar>>ainf_ldpar>>Delta_ldpar>>Ex_ldpar>>E0_ldpar>>T_ldpar;
214 in2>>ainf_ldpar>>Delta_ldpar;
217 std::cout<<
" ############## Error: Unknown LDType="<<LDType<<
" in "<<inputfname<<
" ##############"<<std::endl;
218 NuDEXException(__FILE__,std::to_string(__LINE__).c_str(),
"##### Error in NuDEX #####");
221 std::cout<<
" ############## Error reading "<<inputfname<<
" ##############"<<std::endl;
222 NuDEXException(__FILE__,std::to_string(__LINE__).c_str(),
"##### Error in NuDEX #####");
280 NuDEXException(__FILE__,std::to_string(__LINE__).c_str(),
"##### Error in NuDEX #####");
284 if(((A_Int+(
G4int)(spin*2+0.01))%2)!=0 && (TotalLevelDensity==
false)){
288 G4double Uval=ExcEnergy-Delta_ldpar;
289 if(Uval<0){Uval=1.e-6;}
294 G4double sig2=0.0888*std::pow(A_mass,2./3.)*std::sqrt(ainf_ldpar*Uval);
296 G4double rho=0.05893*std::exp(2.*std::sqrt(ainf_ldpar*Uval))/sig/std::pow(ainf_ldpar,0.25)/std::pow(Uval,1.25);
298 G4double fj=(2.*spin+1.)/2./sig2*std::exp(-xj2/2./sig2);
307 G4double a_ldpar=ainf_ldpar*(1.+dW_ldpar/Uval*(1.-std::exp(-gamma_ldpar*Uval)));
308 G4double a_ldpar_Sn=ainf_ldpar*(1.+dW_ldpar/Uval_Sn*(1.-std::exp(-gamma_ldpar*Uval_Sn)));
309 G4double sigma2_f=0.01389*std::pow(A_mass,5./3.)/ainf_ldpar*std::sqrt(a_ldpar*Uval);
310 G4double sigma2_f_Sn=0.01389*std::pow(A_mass,5./3.)/ainf_ldpar*std::sqrt(a_ldpar_Sn*Uval);
311 G4double sigma2_d=(0.83*std::pow(A_mass,0.26))*(0.83*std::pow(A_mass,0.26));
317 else if(ExcEnergy<=Sn){
318 sigma2=sigma2_d+(ExcEnergy-Ed)/(Sn-Ed)*(sigma2_f_Sn-sigma2_d);
323 G4double statfactor=1./2.*(2.*spin+1.)/(2.*sigma2)*std::exp(-(spin+1/2.)*(spin+1/2.)/2./sigma2);
324 if(TotalLevelDensity==
true){
330 if(LDType==2 && ExcEnergy<Ex_ldpar){
331 G4double totalrho=std::exp((ExcEnergy-E0_ldpar)/T_ldpar)/T_ldpar;
332 return totalrho*statfactor;
336 G4double rhotot_f=1./std::sqrt(2.*sigma2)/12.*std::exp(2.*std::sqrt(a_ldpar*Uval))/std::pow(a_ldpar,1./4.)/std::pow(Uval,5./4.);
337 G4double rhotot_0=std::exp(1.)*a_ldpar/12./std::sqrt(sigma2)*std::exp(a_ldpar*Uval);
338 G4double totalrho=1./(1./rhotot_f+1./rhotot_0);
340 return totalrho*statfactor;