#ifndef ___CONVERT_URQMD__ #define ___CONVERT_URQMD__ Int_t convert_UrQMD(objects& obj) { // converts UrQmd f14 ascii format to HGeant ascii format. // K0_S and K0_L are equaly distributed 50:50 // does not support doRecoMesons option, since the needed information is not contained. obj.evt.flag = 1; Int_t evtCt = 0; ifstream inFile(obj.input.Data()); if(inFile.good()) { smash_p p; Char_t line[1000]; //----------------------------------------------------------- // samples UQMD File // i.e. urqmd <=3.3 // UQMD version: 10020 1000 10001 output_file 14 // projectile: (mass, char) 12 6 target: (mass, char) 12 6 // transformation betas (NN,lab,pro) 0.0000000 0.7183285 -0.7183285 // impact_parameter_real/min/max(fm): 2.65 0.00 4.39 total_cross_section(mbarn): 604.55 // equation_of_state: 0 E_lab(GeV/u): 0.2000E+01 sqrt(s)(GeV): 0.2697E+01 p_lab(GeV/u): 0.2784E+01 // event# 1 random seed: 1050203827 (auto) total_time(fm/c): 100 Delta(t)_O(fm/c): 100.00 // op 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 // op 0 0 0 0 0 0 1 0 1 0 0 0 0 2 1 // op 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 // pa 0.1000E+01 0.5200E+00 0.2000E+01 0.3000E+00 0.0000E+00 0.3700E+00 0.0000E+00 0.9300E-01 0.3500E+00 0.2500E+00 0.0000E+00 0.5000E+00 // pa 0.2700E+00 0.4900E+00 0.2700E+00 0.1000E+01 0.1600E+01 0.8500E+00 0.1550E+01 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 // pa 0.9000E+00 0.5000E+02 0.1000E+01 0.1000E+01 0.4000E+00 0.1500E+01 0.1600E+01 0.0000E+00 0.2500E+01 0.1000E+00 0.3000E+01 0.2750E+00 // pa 0.4200E+00 0.1080E+01 0.8000E+00 0.5000E+00 0.0000E+00 0.5500E+00 0.5000E+01 0.8000E+00 0.5000E+00 0.8000E+06 0.1000E+01 0.2000E+01 // pvec: r0 rx ry rz p0 px py pz m ityp 2i3 chg lcl# ncl or // 25 100 // 23 11 12 0 5 11 0 0 // 0.10000000E+03 0.43685424E+01 0.71143038E+01 0.57962147E+02 0.11572304E+01 0.49478653E-01 0.82906023E-01 0.67083280E+00 0.93800002E+00 1 1 1 7 3 17 // // i.e. urqmd >=3.4 // // UQMD version: 30400 1000 30400 output_file 14 // projectile: (mass, char) 197 79 target: (mass, char) 197 79 // vtransformation betas (NN,lab,pro) 0.0000000 0.6292914 -0.6292914 // impact_parameter_real/min/max(fm): 3.60 0.00 10.00 total_cross_section(mbarn): 3141.59 // equation_of_state: 0 E_lab(GeV/u): 0.1230E+01 sqrt(s)(GeV): 0.2414E+01 p_lab(GeV/u): 0.1955E+01 // event# 1 random seed: 1461239307 (auto) total_time(fm/c): 100 Delta(t)_O(fm/c): 100.000 // op 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 // op 0 0 0 0 0 0 1 0 1 * 0 0 0 0 2 1 // op 0 0 0 1 1 0 0 0 0 0 0 0 0 1 0 // op 0 5 0 0 0 0 0 0 0 0 0 1 0 1 0 // pa 0.1000E+01 0.5200E+00 0.2000E+01 0.3000E+00 0.0000E+00 0.3700E+00 0.0000E+00 0.9300E-01 0.3500E+00 0.2500E+00 0.0000E+00 0.5000E+00 // pa 0.2700E+00 0.4900E+00 0.2700E+00 0.1000E+01 0.1600E+01 0.8500E+00 0.1550E+01 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 // pa 0.9000E+00 0.5000E+02 0.1000E+01 0.1000E+01 0.1000E+01 0.1500E+01 0.1600E+01 0.0000E+00 0.2500E+01 0.1000E+00 0.3000E+01 0.2750E+00 // pa 0.4200E+00 0.1080E+01 0.8000E+00 0.5000E+00 0.0000E+00 0.5500E+00 0.5000E+01 0.8000E+00 0.5000E+00 0.8000E+06 0.1000E+01 0.2000E+01 // pa 0.5000E+00 0.1000E+01 0.1000E+01 0.1000E+01 0.1000E+01 0.1000E+01 0.1000E+01 0.1000E+01 0.1000E+01 0.1000E+01 0.7000E+00 0.3000E+01 // pa 0.2000E+00 0.2000E+03 0.1000E+01 0.5000E+01 0.1000E+01 0.1000E+11 0.1000E+01 0.1000E+01 0.0000E+00 0.1000E+11 0.2000E+01 0.5500E+00 // pvec: r0 rx ry rz p0 px py pz m ityp 2i3 chg lcl# ncl or // 428 100 // 2312 1495 807 10 248 768 0 0 // 0.10000000E+03 0.43569471E+02 -0.24279549E+02 -0.28910396E+01 0.12090808E+01 0.68184649E+00 -0.34092108E+00 -0.29842009E-01 0.93800002E+00 1 1 1 2529 22 1 while(!inFile.eof()) { //----------------------------------------------------------- if(!inFile.good()) break; inFile.getline(line,1000); // UQMD version: 10020 1000 10001 output_file 14 TString l = line; if(l == "") break; // last line Int_t fileType =0; Int_t UrQMDversion =0; Int_t n = sscanf(line,"%*s %*s %d %*s %*s %*s %d",&UrQMDversion,&fileType); if(fileType!=14) { cerr<<"ERROR: input file is not in the f14 format!"<