Changeset 348 for trunk/MagicSoft/Simulation/Detector/Reflector
- Timestamp:
- 01/28/00 09:19:54 (25 years ago)
- Location:
- trunk/MagicSoft/Simulation/Detector/Reflector
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Reflector/Makefile
r318 r348 19 19 # 20 20 # $RCSfile: Makefile,v $ 21 # $Revision: 1. 3$21 # $Revision: 1.4 $ 22 22 # $Author: harald $ 23 # $Date: 1999-11-11 20:29:30$23 # $Date: 2000-01-28 09:19:54 $ 24 24 # 25 25 ################################################################## … … 180 180 ../include-CORSIKA/COREventHeader.o: ../include-CORSIKA/COREventHeader.hxx 181 181 ../include-CORSIKA/COREventHeader.o: /usr/include/stdlib.h 182 ../include-CORSIKA/COREventHeader.o: /usr/include/features.h 183 ../include-CORSIKA/COREventHeader.o: /usr/include/sys/cdefs.h 184 ../include-CORSIKA/COREventHeader.o: /usr/include/gnu/stubs.h 185 ../include-CORSIKA/COREventHeader.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 182 ../include-CORSIKA/COREventHeader.o: /usr/include/standards.h 183 ../include-CORSIKA/COREventHeader.o: /usr/include/getopt.h 186 184 ../include-CORSIKA/COREventHeader.o: /usr/include/sys/types.h 187 ../include-CORSIKA/COREventHeader.o: /usr/include/gnu/types.h 188 ../include-CORSIKA/COREventHeader.o: /usr/include/time.h 189 ../include-CORSIKA/COREventHeader.o: /usr/include/endian.h 190 ../include-CORSIKA/COREventHeader.o: /usr/include/bytesex.h 185 ../include-CORSIKA/COREventHeader.o: /usr/include/mach/machine/vm_types.h 191 186 ../include-CORSIKA/COREventHeader.o: /usr/include/sys/select.h 192 ../include-CORSIKA/COREventHeader.o: /usr/include/selectbits.h193 ../include-CORSIKA/COREventHeader.o: /usr/include/alloca.h194 187 ../include-CORSIKA/COREventHeader.o: /usr/include/math.h 195 ../include-CORSIKA/COREventHeader.o: /usr/include/huge_val.h196 ../include-CORSIKA/COREventHeader.o: /usr/include/mathcalls.h197 ../include-CORSIKA/COREventHeader.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h198 188 ../include-CORSIKA/CORParticle.o: ../include-CORSIKA/CORParticle.hxx 199 189 ../include-CORSIKA/CORParticle.o: /usr/include/stdlib.h 200 ../include-CORSIKA/CORParticle.o: /usr/include/features.h 201 ../include-CORSIKA/CORParticle.o: /usr/include/sys/cdefs.h 202 ../include-CORSIKA/CORParticle.o: /usr/include/gnu/stubs.h 203 ../include-CORSIKA/CORParticle.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 190 ../include-CORSIKA/CORParticle.o: /usr/include/standards.h 191 ../include-CORSIKA/CORParticle.o: /usr/include/getopt.h 204 192 ../include-CORSIKA/CORParticle.o: /usr/include/sys/types.h 205 ../include-CORSIKA/CORParticle.o: /usr/include/gnu/types.h 206 ../include-CORSIKA/CORParticle.o: /usr/include/time.h /usr/include/endian.h 207 ../include-CORSIKA/CORParticle.o: /usr/include/bytesex.h 193 ../include-CORSIKA/CORParticle.o: /usr/include/mach/machine/vm_types.h 208 194 ../include-CORSIKA/CORParticle.o: /usr/include/sys/select.h 209 ../include-CORSIKA/CORParticle.o: /usr/include/selectbits.h 210 ../include-CORSIKA/CORParticle.o: /usr/include/alloca.h /usr/include/math.h 211 ../include-CORSIKA/CORParticle.o: /usr/include/huge_val.h 212 ../include-CORSIKA/CORParticle.o: /usr/include/mathcalls.h 213 ../include-CORSIKA/CORParticle.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 195 ../include-CORSIKA/CORParticle.o: /usr/include/math.h 214 196 ../include-CORSIKA/CORStatfile.o: ../include-CORSIKA/CORStatfile.hxx 215 197 ../include-CORSIKA/CORStatfile.o: /usr/include/stdlib.h 216 ../include-CORSIKA/CORStatfile.o: /usr/include/features.h 217 ../include-CORSIKA/CORStatfile.o: /usr/include/sys/cdefs.h 218 ../include-CORSIKA/CORStatfile.o: /usr/include/gnu/stubs.h 219 ../include-CORSIKA/CORStatfile.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 198 ../include-CORSIKA/CORStatfile.o: /usr/include/standards.h 199 ../include-CORSIKA/CORStatfile.o: /usr/include/getopt.h 220 200 ../include-CORSIKA/CORStatfile.o: /usr/include/sys/types.h 221 ../include-CORSIKA/CORStatfile.o: /usr/include/gnu/types.h 222 ../include-CORSIKA/CORStatfile.o: /usr/include/time.h /usr/include/endian.h 223 ../include-CORSIKA/CORStatfile.o: /usr/include/bytesex.h 201 ../include-CORSIKA/CORStatfile.o: /usr/include/mach/machine/vm_types.h 224 202 ../include-CORSIKA/CORStatfile.o: /usr/include/sys/select.h 225 ../include-CORSIKA/CORStatfile.o: /usr/include/selectbits.h 226 ../include-CORSIKA/CORStatfile.o: /usr/include/alloca.h /usr/include/math.h 227 ../include-CORSIKA/CORStatfile.o: /usr/include/huge_val.h 228 ../include-CORSIKA/CORStatfile.o: /usr/include/mathcalls.h 229 ../include-CORSIKA/CORStatfile.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 203 ../include-CORSIKA/CORStatfile.o: /usr/include/math.h 230 204 ../include-MC/MCEventHeader.o: ../include-MC/MCEventHeader.hxx 231 ../include-MC/MCEventHeader.o: /usr/include/stdlib.h /usr/include/features.h 232 ../include-MC/MCEventHeader.o: /usr/include/sys/cdefs.h 233 ../include-MC/MCEventHeader.o: /usr/include/gnu/stubs.h 234 ../include-MC/MCEventHeader.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 235 ../include-MC/MCEventHeader.o: /usr/include/sys/types.h 236 ../include-MC/MCEventHeader.o: /usr/include/gnu/types.h /usr/include/time.h 237 ../include-MC/MCEventHeader.o: /usr/include/endian.h /usr/include/bytesex.h 238 ../include-MC/MCEventHeader.o: /usr/include/sys/select.h 239 ../include-MC/MCEventHeader.o: /usr/include/selectbits.h 240 ../include-MC/MCEventHeader.o: /usr/include/alloca.h /usr/include/math.h 241 ../include-MC/MCEventHeader.o: /usr/include/huge_val.h 242 ../include-MC/MCEventHeader.o: /usr/include/mathcalls.h 243 ../include-MC/MCEventHeader.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 205 ../include-MC/MCEventHeader.o: /usr/include/stdlib.h /usr/include/standards.h 206 ../include-MC/MCEventHeader.o: /usr/include/getopt.h /usr/include/sys/types.h 207 ../include-MC/MCEventHeader.o: /usr/include/mach/machine/vm_types.h 208 ../include-MC/MCEventHeader.o: /usr/include/sys/select.h /usr/include/math.h 244 209 ../include-MC/MCEventHeader.o: ../include-CORSIKA/COREventHeader.hxx 245 210 ../include-MC/MCCphoton.o: ../include-MC/MCCphoton.hxx /usr/include/stdlib.h 246 ../include-MC/MCCphoton.o: /usr/include/features.h /usr/include/sys/cdefs.h 247 ../include-MC/MCCphoton.o: /usr/include/gnu/stubs.h 248 ../include-MC/MCCphoton.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 249 ../include-MC/MCCphoton.o: /usr/include/sys/types.h /usr/include/gnu/types.h 250 ../include-MC/MCCphoton.o: /usr/include/time.h /usr/include/endian.h 251 ../include-MC/MCCphoton.o: /usr/include/bytesex.h /usr/include/sys/select.h 252 ../include-MC/MCCphoton.o: /usr/include/selectbits.h /usr/include/alloca.h 253 ../include-MC/MCCphoton.o: /usr/include/string.h /usr/include/math.h 254 ../include-MC/MCCphoton.o: /usr/include/huge_val.h /usr/include/mathcalls.h 255 ../include-MC/MCCphoton.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 256 atm.o: atm.h /usr/include/stdlib.h /usr/include/features.h 257 atm.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h 258 atm.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 259 atm.o: /usr/include/sys/types.h /usr/include/gnu/types.h /usr/include/time.h 260 atm.o: /usr/include/endian.h /usr/include/bytesex.h /usr/include/sys/select.h 261 atm.o: /usr/include/selectbits.h /usr/include/alloca.h /usr/include/stdio.h 262 atm.o: /usr/include/libio.h /usr/include/_G_config.h 263 atm.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stdarg.h 264 atm.o: /usr/include/stdio_lim.h /usr/include/string.h /usr/include/math.h 265 atm.o: /usr/include/huge_val.h /usr/include/mathcalls.h 266 atm.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h reflector-v.h 267 readparam.o: readparam.h /usr/include/stdlib.h /usr/include/features.h 268 readparam.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h 269 readparam.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 270 readparam.o: /usr/include/sys/types.h /usr/include/gnu/types.h 271 readparam.o: /usr/include/time.h /usr/include/endian.h /usr/include/bytesex.h 272 readparam.o: /usr/include/sys/select.h /usr/include/selectbits.h 273 readparam.o: /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h 274 readparam.o: /usr/include/_G_config.h 275 readparam.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stdarg.h 276 readparam.o: /usr/include/stdio_lim.h /usr/include/string.h 277 readparam.o: /usr/include/math.h /usr/include/huge_val.h 278 readparam.o: /usr/include/mathcalls.h 279 readparam.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 280 readparam.o: /usr/include/unistd.h /usr/include/posix_opt.h 281 readparam.o: /usr/include/confname.h reflector-v.h atm.h 282 reflector.o: reflector.h /usr/include/stdlib.h /usr/include/features.h 283 reflector.o: /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h 284 reflector.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stddef.h 285 reflector.o: /usr/include/sys/types.h /usr/include/gnu/types.h 286 reflector.o: /usr/include/time.h /usr/include/endian.h /usr/include/bytesex.h 287 reflector.o: /usr/include/sys/select.h /usr/include/selectbits.h 288 reflector.o: /usr/include/alloca.h /usr/include/stdio.h /usr/include/libio.h 289 reflector.o: /usr/include/_G_config.h 290 reflector.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/stdarg.h 291 reflector.o: /usr/include/stdio_lim.h /usr/include/string.h 292 reflector.o: /usr/include/math.h /usr/include/huge_val.h 293 reflector.o: /usr/include/mathcalls.h 294 reflector.o: /usr/lib/gcc-lib/i486-linux/2.7.2.3/include/float.h 295 reflector.o: /usr/include/dirent.h /usr/include/direntry.h 296 reflector.o: /usr/include/posix1_lim.h /usr/include/local_lim.h 297 reflector.o: /usr/include/linux/limits.h /usr/include/unistd.h 298 reflector.o: /usr/include/posix_opt.h /usr/include/confname.h reflector-v.h 299 reflector.o: readparam.h atm.h ../include-CORSIKA/COREventHeader.hxx 211 ../include-MC/MCCphoton.o: /usr/include/standards.h /usr/include/getopt.h 212 ../include-MC/MCCphoton.o: /usr/include/sys/types.h 213 ../include-MC/MCCphoton.o: /usr/include/mach/machine/vm_types.h 214 ../include-MC/MCCphoton.o: /usr/include/sys/select.h /usr/include/string.h 215 ../include-MC/MCCphoton.o: /usr/include/strings.h /usr/include/math.h 216 atm.o: atm.h /usr/include/stdlib.h /usr/include/standards.h 217 atm.o: /usr/include/getopt.h /usr/include/sys/types.h 218 atm.o: /usr/include/mach/machine/vm_types.h /usr/include/sys/select.h 219 atm.o: /usr/include/stdio.h /usr/include/sys/seek.h /usr/include/va_list.h 220 atm.o: /usr/include/sys/limits.h /usr/include/sys/machine/machlimits.h 221 atm.o: /usr/include/sys/syslimits.h /usr/include/sys/machine/machtime.h 222 atm.o: /usr/include/sys/rt_limits.h /usr/include/string.h 223 atm.o: /usr/include/strings.h /usr/include/math.h reflector-v.h 224 readparam.o: readparam.h /usr/include/stdlib.h /usr/include/standards.h 225 readparam.o: /usr/include/getopt.h /usr/include/sys/types.h 226 readparam.o: /usr/include/mach/machine/vm_types.h /usr/include/sys/select.h 227 readparam.o: /usr/include/stdio.h /usr/include/sys/seek.h 228 readparam.o: /usr/include/va_list.h /usr/include/sys/limits.h 229 readparam.o: /usr/include/sys/machine/machlimits.h 230 readparam.o: /usr/include/sys/syslimits.h /usr/include/sys/machine/machtime.h 231 readparam.o: /usr/include/sys/rt_limits.h /usr/include/string.h 232 readparam.o: /usr/include/strings.h /usr/include/math.h /usr/include/float.h 233 readparam.o: /usr/include/fp_class.h /usr/include/unistd.h 234 readparam.o: /usr/include/sys/access.h reflector-v.h atm.h 235 reflector.o: reflector.h /usr/include/stdlib.h /usr/include/standards.h 236 reflector.o: /usr/include/getopt.h /usr/include/sys/types.h 237 reflector.o: /usr/include/mach/machine/vm_types.h /usr/include/sys/select.h 238 reflector.o: /usr/include/stdio.h /usr/include/sys/seek.h 239 reflector.o: /usr/include/va_list.h /usr/include/sys/limits.h 240 reflector.o: /usr/include/sys/machine/machlimits.h 241 reflector.o: /usr/include/sys/syslimits.h /usr/include/sys/machine/machtime.h 242 reflector.o: /usr/include/sys/rt_limits.h /usr/include/string.h 243 reflector.o: /usr/include/strings.h /usr/include/stdarg.h /usr/include/math.h 244 reflector.o: /usr/include/dirent.h /usr/include/unistd.h 245 reflector.o: /usr/include/sys/access.h reflector-v.h readparam.h 246 reflector.o: /usr/include/float.h /usr/include/fp_class.h atm.h 247 reflector.o: ../include-CORSIKA/COREventHeader.hxx 300 248 reflector.o: ../include-CORSIKA/CORParticle.hxx 301 249 reflector.o: ../include-CORSIKA/CORStatfile.hxx 302 250 reflector.o: ../include-MC/MCEventHeader.hxx ../include-MC/MCCphoton.hxx 251 reflector.o: /usr/include/ranlib.h /usr/include/ar.h -
trunk/MagicSoft/Simulation/Detector/Reflector/param
r318 r348 6 6 # Sample parameters file 7 7 # 8 verbose_level 28 verbose_level 1 9 9 # 10 10 #fixed_target 0. 0. … … 12 12 #skip 1 2946 13 13 #range_events 381 382 14 #max_events 2 14 max_events 10000 15 15 #energy_cuts 800. 1000. 16 16 # 17 17 ct_file ../Data/magic.def 18 18 # 19 output_file / data/reflect/test.rfl19 output_file /hd02/Maggi/RefData/prot.rfl 20 20 # 21 21 atm_model ATM_CORSIKA … … 23 23 # 24 24 data_paths 1 25 / data/mmcs25 /hd02/Maggi/Data/mmcs_prod_14_2003_30:30000 26 26 # 27 27 #data_from_stdin -
trunk/MagicSoft/Simulation/Detector/Reflector/readparam.cxx
r292 r348 19 19 //= 20 20 //= $RCSfile: readparam.cxx,v $ 21 //= $Revision: 1. 1.1.1$21 //= $Revision: 1.2 $ 22 22 //= $Author: harald $ 23 //= $Date: 1999-10-29 07:00:33$23 //= $Date: 2000-01-28 09:19:54 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 120 120 static int Data_To_STDOUT = FALSE; 121 121 122 //@: number of times a shower is going to be processed 123 static int nRepeat_Random = 1; 124 122 125 //!@} 123 126 … … 148 151 // @desc read parameters from the stdin / parameters file 149 152 // 150 // @var *filename Name of the parameters file ( NULL->STDIN)153 // @var *filename Name of the parameters file (0->STDIN) 151 154 // 152 155 // @date Mon Sep 14 13:27:56 MET DST 1998 … … 166 169 167 170 // use cin or ifile (reading from STDIN or from parameters file? 168 if ( filename != NULL)171 if ( filename != 0 ) 169 172 ifile.open( filename ); 170 173 171 174 // get signature 172 if ( filename != NULL)175 if ( filename != 0 ) 173 176 ifile.getline(line, LINE_MAX_LENGTH); 174 177 else … … 188 191 189 192 // get line from file or stdin 190 if ( filename != NULL)193 if ( filename != 0 ) 191 194 ifile.getline(line, LINE_MAX_LENGTH); 192 195 else … … 233 236 for (i=0; i<Num_of_paths; i++) { 234 237 235 if ( filename != NULL)238 if ( filename != 0 ) 236 239 ifile.getline(Paths_list[i], PATH_MAX_LENGTH); 237 240 else … … 358 361 359 362 break; 360 361 363 362 364 case random_pointing: // uses a random CT pointing for each shower … … 369 371 cerr << "random_pointing: " << Random_Pointing_MaxDist << ' '; 370 372 Random_Pointing_MaxDist = RAD(Random_Pointing_MaxDist); 371 cerr << Random_Pointing_MaxDist << " radians \n"; 372 373 break; 374 373 cerr << Random_Pointing_MaxDist << " radians \n" << flush; 374 375 break; 376 377 case repeat_random: // number of times a random pointing is to be done 378 379 // set nRepeat_Random 380 sscanf(line, "%s %d", token, &nRepeat_Random); 381 382 cerr << "repeat_random: " << nRepeat_Random << '\n' << flush; 383 384 break; 375 385 376 386 case block: // analyzes data in blocks … … 410 420 } // while (! is_end) 411 421 412 if ( filename != NULL) {422 if ( filename != 0 ) { 413 423 ifile.close(); 414 424 } … … 821 831 822 832 833 //!--------------------------------------------------------------------- 834 // @name get_repeat_random 835 // 836 // @desc get number of times a random displacement is going to be done 837 // 838 // @return number of times 839 // 840 // @date 841 //---------------------------------------------------------------------- 842 // @function 843 844 //!@{ 845 int 846 get_repeat_random(void) 847 { 848 return ( nRepeat_Random ); 849 } 850 //!@} 851 852 823 853 //=------------------------------------------------------------ 824 854 //!@subsection Log of this file. … … 827 857 // 828 858 // $Log: not supported by cvs2svn $ 859 // Revision 1.14 2000/01/27 10:47:54 gonzalez 860 // JAN2000-STABLE 861 // 829 862 // Revision 1.13 1999/10/05 11:06:38 gonzalez 830 863 // Sep. 1999 -
trunk/MagicSoft/Simulation/Detector/Reflector/readparam.h
r292 r348 19 19 //= 20 20 //= $RCSfile: readparam.h,v $ 21 //= $Revision: 1. 1.1.1$21 //= $Revision: 1.2 $ 22 22 //= $Author: harald $ 23 //= $Date: 1999-10-29 07:00:33$23 //= $Date: 2000-01-28 09:19:54 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 123 123 T(block), /* size of the block of files, when 'blocking' */ \ 124 124 T(random_pointing), /* random CT pointing from each shower (hadrons) */ \ 125 T(repeat_random), /* number of times a random pointing is to be done */ \ 125 126 T(data_from_stdin), /* read data from STDIN */ \ 126 127 T(data_to_stdout), /* read data from STDIN */ \ … … 193 194 int get_data_to_stdout(void); 194 195 int get_random_pointing(float *maxdist); 196 int get_repeat_random(void); 195 197 196 198 //!@} … … 209 211 /* 210 212 * $Log: not supported by cvs2svn $ 213 * Revision 1.14 2000/01/27 10:47:54 gonzalez 214 * JAN2000-STABLE 215 * 211 216 * Revision 1.13 1999/10/05 11:06:37 gonzalez 212 217 * Sep. 1999 -
trunk/MagicSoft/Simulation/Detector/Reflector/reflector.cxx
r347 r348 20 20 // 21 21 // $RCSfile: reflector.cxx,v $ 22 // $Revision: 1. 8$22 // $Revision: 1.9 $ 23 23 // $Author: harald $ 24 // $Date: 2000-01-28 0 8:59:49$24 // $Date: 2000-01-28 09:19:54 $ 25 25 // 26 26 //////////////////////////////////////////////////////////////////////// … … 795 795 int Random_Pointing = FALSE; 796 796 797 //@: number of times a shower is going to be processed 798 int nRepeat_Random; 799 800 //@: number of times a shower is already processed 801 int nRepeated; 802 797 803 //@: maximum random pointing distance 798 804 float Random_Pointing_MaxDist; // [radians] … … 921 927 parname[0] = '\0'; 922 928 923 optarg = NULL;929 optarg = 0; 924 930 while ( !errflg && ((ch = getopt(argc, argv, COMMAND_LINE_OPTIONS)) != -1) ) 925 931 switch (ch) { … … 945 951 946 952 if ( strlen(parname) < 1 ) 947 readparam( NULL);953 readparam(0); 948 954 else 949 955 readparam(parname); … … 1165 1171 outputfile.write( SIGNATURE, sizeof(SIGNATURE) ); 1166 1172 1173 // get random pointing variables 1174 1175 Random_Pointing = get_random_pointing( &Random_Pointing_MaxDist ); 1176 1167 1177 // generate a sort of log information 1168 1178 1169 1179 if ( verbose >= VERBOSE_MINIMAL ) { 1180 log( SIGNATURE, "Random poi.: %f\n", Random_Pointing_MaxDist ); 1170 1181 log( SIGNATURE, "Atmospheric model: %s\n", get_atm_mod() ); 1171 1182 log( SIGNATURE, "Number of paths: %d\n", get_num_of_paths() ); … … 1177 1188 1178 1189 get_energy_cuts( &lE, &uE ); 1190 1191 // get number of times which a shower is going to be used 1192 // at different pointing directions 1193 nRepeat_Random = get_repeat_random(); 1179 1194 1180 1195 /*!@' … … 1202 1217 directory = opendir(pathname); 1203 1218 1204 if ( directory == NULL)1219 if ( directory == 0 ) 1205 1220 error( SIGNATURE, 1206 1221 "Cannot open directory %s\n", pathname ); … … 1232 1247 log(SIGNATURE, " * * * READING DATA FROM STDIN * * *\n"); 1233 1248 1234 get_stdin_files( 1249 get_stdin_files(0, lE, uE, TRUE); 1235 1250 1236 1251 } … … 1246 1261 // maximum number is not reached ) ) 1247 1262 1263 nRepeated = 0; 1264 1248 1265 while ( ( 1249 ((de = readdir( directory )) != NULL) &&1266 ((de = readdir( directory )) != 0) && 1250 1267 (num_cer_files < max_num_cer_files) 1251 1268 ) … … 1255 1272 (num_cer_files < max_num_cer_files) 1256 1273 ) ) { 1257 1274 /* 1275 // increment the number of times this files is used 1276 nRepeated++; 1277 */ 1278 1258 1279 // if Block > 0, then we wait till a file __DOIT is present 1259 1280 … … 1440 1461 1441 1462 mcevth.put_times ( stat.get_tfirst(), stat.get_tlast() ); 1442 1463 1443 1464 // get direction where the CT is pointing to 1444 1465 // (or, better, from when the shower is coming from) … … 1451 1472 1452 1473 // do we want random pointing (around shower axis) ? 1453 if ( get_random_pointing( &Random_Pointing_MaxDist )== TRUE ) {1474 if ( Random_Pointing == TRUE ) { 1454 1475 1455 1476 // we do, then get a random position … … 1986 2007 // the photon actually hit the mirror!! 1987 2008 2009 1988 2010 t = t + ((( xm[2] > 0. ) ? -1.0 : +1.0) * 1989 2011 sqrt( SQR(xm[0] - xcut[0]) + 1990 2012 SQR(xm[1] - xcut[1]) + 1991 2013 SQR(xm[2] - xcut[2]) ) / Speed_of_Light_air_cmns); 1992 1993 2014 2015 // add path from the mirror till the camera 1994 2016 1995 2017 t = t + sqrt( SQR(xcutCT[0] - xcam[0]) + … … 2212 2234 2213 2235 delete [] ct_Focal; 2214 ct_Focal = NULL;2236 ct_Focal = 0; 2215 2237 2216 2238 // delete reflectivity table … … 2221 2243 2222 2244 delete [] Reflectivity; 2223 Reflectivity = NULL;2245 Reflectivity = 0; 2224 2246 2225 2247 // delete mirrors' data table … … 2230 2252 2231 2253 delete [] ct_data; 2232 ct_data = NULL;2254 ct_data = 0; 2233 2255 } 2234 2256 //!@} … … 3492 3514 { 3493 3515 float distance; 3494 float it, ip ,Nit;3516 float it, ip; 3495 3517 float sin_theta, cos_theta; 3496 3518 float sin_newtheta, cos_newtheta; 3497 3519 float sin_iphi, cos_iphi; 3498 3520 float iphi; 3499 float range_aux; 3500 int i; 3501 3502 //Random position of the CT. It is the distance 3503 //between shower axis and CT position and its 3504 //distribution follows sin(it). 3505 3506 range_aux=1.0-sin(M_PI/2-range); 3507 Nit = RandomNumber * range_aux; 3521 3522 // for the moment, we only simulate an uniform distribution, 3523 // since our theta distribution in the generation of events is 3524 // already uniform for hadrons, which are the main targets for 3525 // using this option 3526 3527 it = RandomNumber * range; 3508 3528 ip = RandomNumber * 2.0 * M_PI; 3509 it = M_PI/2-asin((1.0-Nit)); 3510 3511 sin_theta = sin(theta); 3512 cos_theta = cos(theta); 3513 3514 cos_newtheta = cos_theta*cos(it) - sin_theta*sin(it)*cos(ip); 3515 *newtheta = acos( cos_newtheta ); 3516 sin_newtheta = sin( *newtheta ); 3517 3518 if(theta!=0){ 3519 sin_iphi = sin(it)*sin(ip)/sin_newtheta; 3520 cos_iphi = ((cos(it)-cos_newtheta*cos_theta)/(sin_newtheta*sin_theta)); 3529 3530 if ( theta == 0.0 ) { 3531 3532 *newtheta = it; 3533 *newphi = ip; 3534 3535 } else { 3536 3537 sin_theta = sin(theta); 3538 cos_theta = cos(theta); 3539 3540 cos_newtheta = cos_theta*cos(it) + sin_theta*sin(it)*cos(ip); 3541 *newtheta = acos( cos_newtheta ); 3542 sin_newtheta = sin( *newtheta ); 3543 3544 sin_iphi = sin(it)*sin(ip) / sin_newtheta; 3545 cos_iphi = (( cos(it) - cos_newtheta * cos_theta ) / 3546 ( sin_newtheta * sin_theta )); 3521 3547 3522 3548 iphi = atan2( sin_iphi, cos_iphi ); 3549 3550 *newphi = phi + iphi; 3551 3523 3552 } 3524 else iphi=ip;3525 3526 *newphi = phi + iphi;3527 3553 3528 3554 return( it ); … … 3536 3562 //!@{ 3537 3563 // 3538 // Revision 1.3 2000/01/03 12:41:26 harald 3539 // There was a small mistake with +/- signs in the prevois versions. This 3540 // line was founded by Jose Carlos. His remark is following: 3541 // 3542 // Look for the comment I include here in this block: you will see that 3543 // now the following expression has a +- sign, where before it was only 3544 // + (or -, I don't remember, but only one) 3545 // 3546 // Revision 1.2 1999/11/01 11:05:54 harald 3547 // Small changes to comile the reflector program under linux. 3548 // (Different use of NULL on DECalphas-osf1 and on linux) 3549 // 3550 // Revision 1.1.1.1 1999/10/29 07:00:33 harald 3551 // This is the startpoint for the futher development of the Reflector program 3552 // of Jose Carlos. For all developments use this CVS-controlled directory. 3564 // $Log: not supported by cvs2svn $ 3565 // Revision 1.20 2000/01/27 10:47:54 gonzalez 3566 // JAN2000-STABLE 3567 // 3568 // Revision 1.19 1999/11/19 20:52:31 gonzalez 3569 // *** empty log message *** 3553 3570 // 3554 3571 // Revision 1.18 1999/10/05 11:11:12 gonzalez -
trunk/MagicSoft/Simulation/Detector/Reflector/reflector.h
r292 r348 19 19 //= 20 20 //= $RCSfile: reflector.h,v $ 21 //= $Revision: 1. 1.1.1$21 //= $Revision: 1.2 $ 22 22 //= $Author: harald $ 23 //= $Date: 1999-10-29 07:00:34 $23 //= $Date: 2000-01-28 09:19:54 $ 24 24 //= 25 25 //=//////////////////////////////////////////////////////////////////////
Note:
See TracChangeset
for help on using the changeset viewer.