Changeset 1674 for trunk/MagicSoft
- Timestamp:
- 12/10/02 17:25:18 (22 years ago)
- Location:
- trunk/MagicSoft/Simulation/Detector
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx
r1597 r1674 21 21 // 22 22 // $RCSfile: camera.cxx,v $ 23 // $Revision: 1.4 6$23 // $Revision: 1.47 $ 24 24 // $Author: blanch $ 25 // $Date: 2002-1 1-08 17:51:00$25 // $Date: 2002-12-10 17:19:31 $ 26 26 // 27 27 //////////////////////////////////////////////////////////////////////// … … 408 408 409 409 char flag[SIZE_OF_FLAGS + 1]; //@< flags in the .rfl file 410 char flag_new[4]; //@< New flag for the run header in the .rfl file 410 411 411 412 int reflector_file_version; //@< vrsion of he reflector file … … 1218 1219 if(!isA( flag, FLAG_START_OF_RUN )){ 1219 1220 1220 // We exit1221 //error( SIGNATURE, "Expected start of run flag, but found: %s\n", flag );1222 1221 // We break the main loop 1223 1222 cout<<"Warning: Expected start of run flag, but found:"<<flag<<endl; … … 1227 1226 else { // found start of run 1228 1227 1228 fread( flag_new, 4, 1, inputfile ); 1229 1230 if(!isA( flag_new, FLAG_START_OF_HEADER)){ 1231 1232 // We break the main loop 1233 cout<<"Warning: Expected start of run header flag, but found:"<<flag<<endl; 1234 cout<<" We break the main loop"<<endl; 1235 break; 1236 } 1237 1238 Float_t flag_temp[SIZE_OF_MCRUNHEADER]; 1239 1240 fread( flag_temp, (SIZE_OF_MCRUNHEADER)*sizeof(float), 1, inputfile ); 1241 1229 1242 nshow=0; 1230 1243 … … 1232 1245 1233 1246 while( isA( flag, FLAG_START_OF_EVENT )){ // while there is a next event 1247 fread( flag_new, 4, 1, inputfile ); 1248 1249 if(!isA( flag_new, FLAG_EVENT_HEADER)){ 1250 1251 // We break while events loop 1252 cout<<"Warning: Expected start of event header flag, but found:"<<flag<<endl; 1253 cout<<" We break the while events loop"<<endl; 1254 break; 1255 } 1256 1234 1257 // 1235 1258 // Clear Trigger and Fadc … … 1279 1302 1280 1303 // read the direction of the incoming shower 1281 1304 1282 1305 if (reflector_file_version<6){ 1283 1306 thetashw = mcevth.get_theta(); … … 1758 1781 1759 1782 if (Write_McEvt){ 1760 } 1783 Float_t ftime, ltime; 1784 if (reflector_file_version<6){ 1785 mcevth.get_times(&ftime, <ime); 1786 McEvt->Fill( -1.0, 1787 (UShort_t) mcevth.get_primary() , 1788 mcevth.get_energy(), 1789 -1.0, 1790 -1.0, 1791 -1.0, 1792 mcevth.get_theta(), 1793 mcevth.get_phi(), 1794 mcevth.get_core(), 1795 mcevth.get_coreX(), 1796 mcevth.get_coreY(), 1797 impactD, 1798 mcevth_2.get_theta_CT(), 1799 mcevth_2.get_phi_CT(), 1800 ftime, 1801 ltime, 1802 0, 1803 0, 1804 0, 1805 0, 1806 0, 1807 0, 1808 0, 1809 (UInt_t)mcevth.get_CORSIKA(), 1810 (UInt_t)mcevth.get_AtmAbs(), 1811 (UInt_t)mcevth.get_MirrAbs()+mcevth.get_OutOfMirr()+mcevth.get_BlackSpot(), 1812 (UInt_t) ncph, 1813 (UInt_t) inumphe, 1814 (UInt_t) inumphensb+inumphe); 1815 } 1816 else{ 1817 Float_t Nmax, t0, tmax, a, b, c, chi2; 1818 mcevth.get_times(&ftime, <ime); 1819 chi2=mcevth_2.get_NKGfit(&Nmax, &t0, &tmax, &a, &b, &c); 1820 McEvt->Fill( mcevth_2.get_evt_number(), 1821 (UShort_t) mcevth_2.get_primary() , 1822 mcevth_2.get_energy(), 1823 mcevth_2.get_thick0(), 1824 mcevth_2.get_first_target(), 1825 mcevth_2.get_z_first_int(), 1826 mcevth_2.get_theta(), 1827 mcevth_2.get_phi(), 1828 mcevth_2.get_core(), 1829 mcevth_2.get_coreX(), 1830 mcevth_2.get_coreY(), 1831 impactD, 1832 mcevth_2.get_theta_CT(), 1833 mcevth_2.get_phi_CT(), 1834 ftime, 1835 ltime, 1836 Nmax, 1837 t0, 1838 tmax, 1839 a, 1840 b, 1841 c, 1842 chi2, 1843 (UInt_t)mcevth_2.get_CORSIKA(), 1844 (UInt_t)mcevth_2.get_AtmAbs(), 1845 (UInt_t)mcevth_2.get_MirrAbs()+mcevth_2.get_OutOfMirr()+mcevth_2.get_BlackSpot(), 1846 (UInt_t) ncph, 1847 (UInt_t) inumphe, 1848 (UInt_t) inumphensb+inumphe); 1849 } 1850 } 1761 1851 // We don not count photons out of the camera. 1762 1852 … … 1833 1923 if( !isA( flag, FLAG_END_OF_RUN )){ 1834 1924 error( SIGNATURE, "Expected end of run flag, but found: %s\n", flag ); 1925 break; 1835 1926 } 1836 1927 else { // found end of run … … 1843 1934 log(SIGNATURE, "End of file . . .\n"); 1844 1935 still_in_loop = FALSE; 1845 1936 log(SIGNATURE, "Reading ASCII files at the end of the reflector file. . .\n"); 1937 read_ascii(inputfile); 1938 break; 1846 1939 if ((! Data_From_STDIN) && ( !feof(inputfile) )){ 1847 1940 … … 1850 1943 1851 1944 if((reflector_file_version=check_reflector_file( inputfile ))==FALSE){ 1852 exit(1); 1945 // exit(1); 1946 log(SIGNATURE, "Next file is not recognised as a reflector file.\n"); 1947 log(SIGNATURE, "Stopping ...\n"); 1948 break; 1853 1949 } 1854 1950 … … 1916 2012 mcevth.get_CWaveUpper(), 1917 2013 mcevth.get_slope(), 1918 mcevth.get_NumObsLev(),2014 1, 1919 2015 heights, 1920 2016 corsika, … … 1922 2018 (UInt_t)(VERSION*100), 1923 2019 0); 1924 2020 1925 2021 // Fill the Header Tree with the current leaves of each branch 1926 2022 HeaderTree.Fill() ; … … 2725 2821 //!@} 2726 2822 2823 //!----------------------------------------------------------- 2824 // @name read_ascii 2825 // 2826 // @desc read ascii configuration files used by the reflector 2827 // 2828 // @date tue dec 10 17:14:10 CET 2002 2829 //------------------------------------------------------------ 2830 // @function 2831 2832 //!@{ 2833 void 2834 read_ascii(FILE *sp) 2835 { 2836 cout<<"To be implemented..."<<endl; 2837 } 2727 2838 2728 2839 //!----------------------------------------------------------- … … 3684 3795 // 3685 3796 // $Log: not supported by cvs2svn $ 3797 // Revision 1.46 2002/11/08 17:51:00 blanch 3798 // *** empty log message *** 3799 // 3686 3800 // Revision 1.45 2002/10/29 17:15:27 blanch 3687 3801 // Reading several reflector versions. … … 3823 3937 // 3824 3938 // $Log: not supported by cvs2svn $ 3939 // Revision 1.46 2002/11/08 17:51:00 blanch 3940 // *** empty log message *** 3941 // 3825 3942 // Revision 1.45 2002/10/29 17:15:27 blanch 3826 3943 // Reading several reflector versions. -
trunk/MagicSoft/Simulation/Detector/Camera/camera.h
r1560 r1674 19 19 //= 20 20 //= $RCSfile: camera.h,v $ 21 //= $Revision: 1.1 2$21 //= $Revision: 1.13 $ 22 22 //= $Author: blanch $ 23 //= $Date: 2002-1 0-29 17:16:28$23 //= $Date: 2002-12-10 17:20:32 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 62 62 #include "moments.h" 63 63 64 #include "MCRunHeader.hxx" 64 65 #include "MCEventHeader.hxx" 65 66 #include "MCEventHeader_2.hxx" … … 281 282 void read_QE(void); 282 283 void read_WC(void); 284 void read_ascii( FILE *sp // the input file 285 ); 283 286 int pixels_are_neig(int pix1, int pix2); 284 287 int bpoint_is_in_pix(double dx, double dy, int ipixnum, … … 330 333 /* 331 334 *$Log: not supported by cvs2svn $ 335 *Revision 1.12 2002/10/29 17:16:28 blanch 336 *Header file for camera.cxx version 1.45 337 * 332 338 *Revision 1.11 2002/10/18 16:53:30 blanch 333 339 *Modification to read several reflector version files. -
trunk/MagicSoft/Simulation/Detector/include-MC/MCCphoton.hxx
r735 r1674 43 43 44 44 const char FLAG_START_OF_RUN[] = "\nSTART---RUN\n"; 45 const char FLAG_START_OF_HEADER[] = "RUNH"; 45 46 const char FLAG_START_OF_EVENT[] = "\nSTART-EVENT\n"; 47 const char FLAG_EVENT_HEADER[] = "EVTH"; 46 48 const char FLAG_END_OF_EVENT[] = "\nEND---EVENT\n"; 47 49 const char FLAG_END_OF_RUN[] = "\nEND-----RUN\n"; … … 50 52 51 53 #define SIZE_OF_FLAGS 13 54 #define SIZE_OF_HEADER 8 /* floats */ 52 55 #define SIZE_OF_MCCPHOTON 8 /* floats */ 53 56 -
trunk/MagicSoft/Simulation/Detector/include-MC/MCEventHeader_2.hxx
r1598 r1674 39 39 #include "COREventHeader.hxx" 40 40 41 #define SIZE_OF_MCEVENTHEADER_2 1 78/* floats */41 #define SIZE_OF_MCEVENTHEADER_2 181 /* floats */ 42 42 43 43 // @endcode
Note:
See TracChangeset
for help on using the changeset viewer.