void create_TRD_geo_file(char *geometry="trd_new") { char infile[256]; // geometry data file - input char outfile[256]; // geometry data file for CBMROOT - output char logfile[256]; // log file for the conversion const Int_t max = 20; // max. number of stations Float_t d[max]; // detector thickness [mm] Float_t z[max]; // z position from target [mm] Float_t ai[max]; // inner acceptance [deg] Float_t ao[max]; // outer acceptance [deg] Float_t ri[max]; // inner radius [mm] Float_t ro[max]; // outer radius [mm] Int_t num_station; // number of stations Int_t num_layer; // number of layers per station stations Int_t thick; // number defining thickness of det 1=thick,0=thin Int_t nn; char dummy[120]; //dummy text // The following arrays always stores the following information // first element: half thickness of volume detector // second element: position of volume inside mother volume Float_t radiator_thin[2]={14.5,-15.5}; Float_t radiator_thick[2]={15.0,-15.0}; Float_t* radiator; Float_t gas_thin[2]={3,2}; Float_t gas_thick[2]={3,3}; Float_t* gas; Float_t pad_thin[2]={0.015,5.015}; Float_t pad_thick[2]={0.025,6.025}; Float_t* pad; Float_t mylar_thin[2]={0.75,5.78}; Float_t mylar_thick[2]={1.0,7.5}; Float_t* mylar; Float_t electronics_thin[2]={0.035,6.565}; Float_t electronics_thick[2]={0.05,8.55}; Float_t* electronics; printf("geometry: %s\n",geometry); sprintf(infile,"%s.dat",geometry); sprintf(outfile,"%s.geo",geometry); sprintf(logfile,"%s.log",geometry); printf("input file: %s\n",infile); if(!fopen(infile,"r")){ printf("... does not exist.\n"); printf("... exit.\n\n"); } else{ printf("output file: %s\n",outfile); printf("log file: %s\n",logfile); printf("converting ...\n"); FILE *fin= fopen(infile,"r"); fscanf (fin, "%s",dummy); // read number of stations fscanf (fin, "%d", &num_station); // read number of layers per stationstations fscanf (fin, "%d", &num_layer); for (Int_t i=0; i<5;i++){ fscanf (fin, "%s",dummy); } // read numbe defining thickness of detector fscanf (fin, "%d", &thick); for (Int_t i=0; i<10;i++){ fscanf (fin, "%s",dummy); } for(Int_t i=0; i