Changeset 5103 for trunk/MagicSoft
- Timestamp:
- 09/17/04 15:48:22 (20 years ago)
- Location:
- trunk/MagicSoft/Simulation/Detector
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Simulation/Detector/Camera/camera.h
r5075 r5103 19 19 //= 20 20 //= $RCSfile: camera.h,v $ 21 //= $Revision: 1.2 1$21 //= $Revision: 1.22 $ 22 22 //= $Author: moralejo $ 23 //= $Date: 2004-09-1 6 15:24:53$23 //= $Date: 2004-09-17 14:48:21 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 40 40 //!@{ 41 41 42 #include <iostream .h>43 #include <fstream .h>42 #include <iostream> 43 #include <fstream> 44 44 #include <stdlib.h> 45 45 #include <stdio.h> 46 #include <string .h>46 #include <string> 47 47 #include <stdarg.h> 48 48 #include <math.h> … … 350 350 /* 351 351 *$Log: not supported by cvs2svn $ 352 *Revision 1.21 2004/09/16 15:24:53 moralejo 353 *Updated on CVS after long time... 354 * 352 355 * 353 356 *Revision 1.19 2003/10/17 19:39:30 blanch -
trunk/MagicSoft/Simulation/Detector/Camera/config.mk.Linux
r5096 r5103 18 18 #--------------------------------------------------------------- 19 19 # $RCSfile: config.mk.Linux,v $ 20 # $Revision: 1. 9$20 # $Revision: 1.10 $ 21 21 # $Author: moralejo $ 22 # $Date: 2004-09-17 1 0:32:54$22 # $Date: 2004-09-17 14:48:21 $ 23 23 ################################################################## 24 24 # @maintitle … … 57 57 58 58 59 OPTIM = -O5 -Wall -fno-exceptions -fPIC -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual -Wno-deprecated59 OPTIM = -O5 -Wall -fno-exceptions -fPIC -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual 60 60 61 61 DEBUG = -g -
trunk/MagicSoft/Simulation/Detector/Camera/config.mk.linux
r5096 r5103 18 18 #--------------------------------------------------------------- 19 19 # $RCSfile: config.mk.linux,v $ 20 # $Revision: 1. 6$20 # $Revision: 1.7 $ 21 21 # $Author: moralejo $ 22 # $Date: 2004-09-17 1 0:32:54$22 # $Date: 2004-09-17 14:48:21 $ 23 23 ################################################################## 24 24 # @maintitle … … 56 56 INCLUDE_MARS_MRAW = ../../../Mars/mraw 57 57 58 OPTIM = -O5 -Wall -fno-exceptions -fPIC -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual -Wno-deprecated58 OPTIM = -O5 -Wall -fno-exceptions -fPIC -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual 59 59 DEBUG = -g 60 60 -
trunk/MagicSoft/Simulation/Detector/Camera/config.mk.linux-gnu
r5096 r5103 18 18 #--------------------------------------------------------------- 19 19 # $RCSfile: config.mk.linux-gnu,v $ 20 # $Revision: 1.1 0$20 # $Revision: 1.11 $ 21 21 # $Author: moralejo $ 22 # $Date: 2004-09-17 1 0:32:54$22 # $Date: 2004-09-17 14:48:21 $ 23 23 ################################################################## 24 24 # @maintitle … … 56 56 INCLUDE_MARS_MRAW = ../../../Mars/mraw 57 57 58 OPTIM = -O5 -Wall -fno-exceptions -fPIC -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual -Wno-deprecated 58 OPTIM = -O5 -Wall -fno-exceptions -fPIC -Wpointer-arith -Wcast-align -Wconversion -Wstrict-prototypes -Wmissing-prototypes -Woverloaded-virtual 59 59 60 DEBUG = -g 60 61 -
trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
r5077 r5103 19 19 //= 20 20 //= $RCSfile: creadparam.cxx,v $ 21 //= $Revision: 1.2 8$21 //= $Revision: 1.29 $ 22 22 //= $Author: moralejo $ 23 //= $Date: 2004-09-1 6 15:27:08$23 //= $Date: 2004-09-17 14:48:21 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// 26 26 27 // @T \newpage28 29 //!@section Source code of |creadparam.cxx|.30 31 /*!@"32 33 This section describes briefly the source code for the file34 |creadparam.cxx|. This file is very closely related to the file35 |readparams.cxx| from the |reflector| program. Actually, this later36 file was the ancestror of the file you are looking at.37 38 All the defines it uses are located in the file |creadparam.h|. In39 the first one we can see the definitions of the commands available40 for the parameters file. We describe these commands in a later41 section.42 43 @"*/44 45 //!@subsection Includes and Global variables definition.46 47 /*!@"48 49 All the defines are located in the file {\tt creadparam.h}.50 51 @"*/52 53 //!@{54 27 55 28 #include "creadparam.h" 56 29 #include "camera.h" // Needed for MAX_NUMBER_OF_CTS 57 30 58 //!@} 59 60 //!@subsection Definition of global variables. 61 62 /*!@" 63 64 Here we define the global variables where the values from the 65 parameters file are stored. 66 67 @"*/ 68 69 //!@{ 31 // Here we define the global variables where the values from the 32 // parameters file are stored. 70 33 71 34 static char **Input_filename; //@< input filename … … 147 110 // Coordinates of CT locations, in centimeters, in the Corsika system. 148 111 149 //!@}150 151 //!@subsection The function |readparam()|.152 153 //!-----------------------------------------------------------154 // @name creadparam155 //156 // @desc read parameters from the stdin / parameters file157 //158 // @var *filename Name of the parameters file (NULL->STDIN)159 //160 // @date Mon Sep 14 13:27:56 MET DST 1998161 //------------------------------------------------------------162 // @function163 164 //!@{165 112 void 166 113 readparam(char * filename) … … 336 283 // 337 284 338 if (fmod( FADC_pedestal,1.) > 1.e-4)285 if (fmod((double)FADC_pedestal, (double)1.) > 1.e-4) 339 286 { 340 287 printf("ERROR : requested average FADC pedestal (%f) is not integer. Please use an integer value.\n", FADC_pedestal); … … 1409 1356 } 1410 1357 1411 1412 1413 //!@}1414 1358 //=------------------------------------------------------------ 1415 1359 //!@subsection Log of this file. … … 1418 1362 // 1419 1363 // $Log: not supported by cvs2svn $ 1364 // Revision 1.28 2004/09/16 15:27:08 moralejo 1365 // Updated in CVS after some time (see changes below) 1366 // 1420 1367 // 1421 1368 // Revision 1.27 2004/05/12 A. Moralejo -
trunk/MagicSoft/Simulation/Detector/Camera/creadparam.h
r5077 r5103 19 19 //= 20 20 //= $RCSfile: creadparam.h,v $ 21 //= $Revision: 1.2 5$21 //= $Revision: 1.26 $ 22 22 //= $Author: moralejo $ 23 //= $Date: 2004-09-1 6 15:27:08$23 //= $Date: 2004-09-17 14:48:21 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// 26 27 // @T \newpage28 29 //!@section Source code of |creadparam.h|.30 31 /*!@"32 33 In this section you can find the source code for the file34 |creadparam.h|. This file is mainly needed by35 |creadparam.cxx|. Here is located the definition of the commands you36 can use in the parameters file. In this file, the first line must be37 |camera 'version'|, where |'version'| is the appropiate version of38 the output format (NOT the version of the camera program) which can39 read the commands written in that parameters file. You cannot mix40 parameters files and executables with different versions. The41 current version is |camera 0.2|.42 43 The commands now available for the parameters file are:44 45 @itemize46 47 @- |input_file| filename :48 Sets the name of the input file (|.rfl|).49 @- |starfield_file| filename :50 Sets the name of the starfield input file (|.rfl|).51 @- |ct_file| filename :52 Sets the name of the CT definition file (|.def|).53 @- |data_file| filename :54 Sets the name of the output data file (|.dat|).55 @- |elec_noise_off| :56 De-activates ElecNoise for FADC and Trigger channels. By default it is on.57 @- |fadc_noise_off| :58 Sets the ElecNoise for FADC.59 @- |trig_noise_off| :60 Sets the ElecNoise for trigger system.61 @- |nsb_on| :62 Activates the NSB simulation. This is the default.63 @- |nsb_off| :64 De-activates the NSB simulation.65 @- |nsb_mean| number :66 Sets the mean value for the NSB.67 Default value: 6 for CT1, 6 for MAGIC.68 This implies always |nsb_on|.69 @- |threshold| number :70 Sets the Threshold value q0. Default value: 10.71 @- |tail_cut| number :72 Sets the Tail-Cut value.73 Default value: 7.74 @- |islands_cut| number :75 Sets the Islands-Cut value i0.76 Default value: 10.77 @- |end_file|78 Last command in the parameters file.79 80 @enditemize81 82 @ignoreHTML83 A parameters file (a small one) looks like this:84 85 |camera 0.2|86 87 |input_file gm100-500.rfl|88 89 |output_file gm100-500.phe|90 91 |output_file gm100-500.dat|92 93 |ct_file magic.def|94 95 |threshold 10.0|96 97 |tail_cut 7.0|98 99 |nsb_mean 5.0|100 101 |end_file|102 @endignoreHTML103 104 @"*/105 106 //!@{107 26 108 27 #ifndef _creadparam_ … … 119 38 //!@{ 120 39 121 #include <iostream.h> 122 #include <fstream.h> 40 #include <iostream> 41 #include <fstream> 42 #include <string> 43 123 44 #include <stdlib.h> 124 45 #include <stdio.h> 125 #include <string.h>126 46 #include <math.h> 127 47 #include <float.h> … … 283 203 /* 284 204 * $Log: not supported by cvs2svn $ 205 * Revision 1.25 2004/09/16 15:27:08 moralejo 206 * Updated in CVS after some time (see changes below) 207 * 285 208 * 286 209 * Revision 1.23 2004/01/30 09:55:33 blanch -
trunk/MagicSoft/Simulation/Detector/Camera/moments.h
r308 r5103 19 19 //= 20 20 //= $RCSfile: moments.h,v $ 21 //= $Revision: 1. 1.1.1$22 //= $Author: harald$23 //= $Date: 1999-11-05 11:59:33$21 //= $Revision: 1.2 $ 22 //= $Author: moralejo $ 23 //= $Date: 2004-09-17 14:48:21 $ 24 24 //= 25 25 //=////////////////////////////////////////////////////////////////////// … … 51 51 //!@{ 52 52 53 #include <iostream.h> 54 #include <fstream.h> 53 #include <iostream> 54 #include <fstream> 55 #include <string> 56 55 57 #include <stdlib.h> 56 #include <stdio.h>57 #include <string.h>58 58 #include <math.h> 59 59 #include <float.h> 60 #include <stdio.h> 60 61 61 62 #include "jcmacros.h" … … 144 145 /* 145 146 *$Log: not supported by cvs2svn $ 147 *Revision 1.1.1.1 1999/11/05 11:59:33 harald 148 *This the starting point for CVS controlled further developments of the 149 *camera program. The program was originally written by Jose Carlos. 150 *But here you can find a "rootified" version to the program. This means 151 *that there is no hbook stuff in it now. Also the output of the 152 *program changed to the MagicRawDataFormat. 153 * 154 *The "rootification" was done by Dirk Petry and Harald Kornmayer. 155 * 156 *In the following you can see the README file of that version: 157 * 158 *================================================== 159 * 160 *Fri Oct 22 1999 D.P. 161 * 162 *The MAGIC Monte Carlo System 163 * 164 *Camera Simulation Programme 165 *--------------------------- 166 * 167 *1) Description 168 * 169 *This version is the result of the fusion of H.K.'s 170 *root_camera which is described below (section 2) 171 *and another version by D.P. which had a few additional 172 *useful features. 173 * 174 *The version compiles under Linux with ROOT 2.22 installed 175 *(variable ROOTSYS has to be set). 176 * 177 *Compile as before simply using "make" in the root_camera 178 *directory. 179 * 180 *All features of H.K.'s root_camera were retained. 181 * 182 *Additional features of this version are: 183 * 184 * a) HBOOK is no longer used and all references are removed. 185 * 186 * b) Instead of HBOOK, the user is given now the possibility of 187 * having Diagnostic data in ROOT format as a complement 188 * to the ROOT Raw data. 189 * 190 * This data is written to the file which is determined by 191 * the new input parameter "diag_file" in the camera parameter 192 * file. 193 * 194 * All source code file belonging to this part have filenames 195 * starting with "MDiag". 196 * 197 * The user can read the output file using the following commands 198 * in an interactive ROOT session: 199 * 200 * root [0] .L MDiag.so 201 * root [1] new TFile("diag.root"); 202 * root [2] new TTreeViewer("T"); 203 * 204 * This brings up a viewer from which all variables of the 205 * TTree can be accessed and histogrammed. This example 206 * assumes that you have named the file "diag.root", that 207 * you are using ROOT version 2.22 or later and that you have 208 * the shared object library "MDiag.so" which is produced 209 * by the Makefile along with the executable "camera". 210 * 211 * ! The contents of the so-called diag file is not yet fixed. 212 * ! At the moment it is what J.C.G. used to put into the HBOOK 213 * ! ntuple. In future versions the moments calculation can be 214 * ! removed and the parameter list be modified correspondingly. 215 * 216 * c) Now concatenated reflector files can be read. This is useful 217 * if you have run the reflector with different parameters but 218 * you want to continue the analysis with all reflector data 219 * going into ONE ROOT outputfile. 220 * 221 * The previous camera version contained a bug which made reading 222 * of two or more concatenated reflector files impossible. 223 * 224 * d) The reflector output format was changed. It is now version 225 * 0.4 . 226 * The change solely consists in a shortening of the flag 227 * definition in the file 228 * 229 * include-MC/MCCphoton.hxx 230 * 231 * ! IF YOU WANT TO READ REFLECTOR FORMAT 0.3, you can easily 232 * ! do so by recompiling camera with the previous version of 233 * ! include-MC/MCCphoton.hxx. 234 * 235 * The change was necessary for saving space and better 236 * debugging. From now on, this format can be frozen. 237 * 238 * ! For producing reflector output in the new format, you 239 * ! of course have to recompile your reflector with the 240 * ! new include-MC/MCCphoton.hxx . 241 * 242 * e) A first version of the pixelization with the larger 243 * outer pixels is implemented. THIS IS NOT YET FULLY 244 * TESTED, but first rough tests show that it works 245 * at least to a good approximation. 246 * 247 * The present version implements the camera outline 248 * with 18 "gap-pixels" and 595 pixels in total as 249 * shown in 250 * 251 * http://sarastro.ifae.es/internal/home/hardware/camera/numbering.ps 252 * 253 * This change involved 254 * 255 * (i) The file pixels.dat is no longer needed. Instead 256 * the coordinates are generated by the program itself 257 * (takes maybe 1 second). In the file 258 * 259 * pixel-coords.txt 260 * 261 * in the same directory as this README, you find a list 262 * of the coordinates generated by this new routine. It 263 * has the format 264 * 265 * number i j x y size-factor 266 * 267 * where i and j are J.C.G.'s so called biaxis hexagonal 268 * coordinates (for internal use) and x and y are the 269 * coordinates of the pixel centers in the standard camera 270 * coordinate system in units of centimeters. The value 271 * of "size-factor" determines the linear size of the pixel 272 * relative to the central pixels. 273 * 274 * (ii) The magic.def file has two additional parameters 275 * which give the number of central pixels and the 276 * number of gap pixels 277 * 278 * (iii) In camera.h and camera.cxx several changes were 279 * necessary, among them the introduction of several 280 * new functions 281 * 282 * The newly suggested outline with asymmetric Winston cones 283 * will be implemented in a later version. 284 * 285 * f) phe files can no longer be read since this contradicts 286 * our philosophy that the analysis should be done with other 287 * programs like e.g. EVITA and not with "camera" itself. 288 * This possibility was removed. 289 * 290 * g) ROOT is no longer invoked with an interactive interface. 291 * In this way, camera can better be run as a batch program and 292 * it uses less memory. 293 * 294 * h) small changes concerning the variable "t_chan" were necessary in 295 * order to avoid segmentation faults: The variable is used as an 296 * index and it went sometimes outside the limits when camera 297 * was reading proton data. This is because the reflector files 298 * don't contain the photons in a chronological order and also 299 * the timespread can be considerably longer that the foreseen 300 * digitisation timespan. Please see the source code of camera.cxx 301 * round about line 1090. 302 * 303 * j) several unused variables were removed, a few warning messages 304 * occur when you compile camera.cxx but these can be ignored at 305 * the moment. 306 * 307 *In general the program is of course not finished. It still needs 308 *debugging, proper trigger simulation, simulation of the asymmetric 309 *version of the outer pixels, proper NSB simulation, adaption of 310 *the diag "ntuple" contents to our need and others small improvements. 311 * 312 *In the directory rfl-files there is now a file in reflector format 0.4 313 *containing a single event produced by the starfiled adder. It has 314 *a duration of 30 ns and represents the region around the Crab Nebula. 315 *Using the enclosed input parameter file, camera should process this 316 *file without problems. 317 * 318 *2) The README for the previous version of root_camera 319 * 320 *README for a preliminary version of the 321 *root_camera program. 322 * 323 *root_camera is based on the program "camera"of Jose Carlos 324 *Gonzalez. It was changed in the way that only the pixelisation 325 *and the distibution of the phe to the FADCs works in a 326 *first version. 327 * 328 *Using the #undef command most possibilities of the orignal 329 *program are switched of. 330 * 331 *The new parts are signed by 332 * 333 *- ROOT or __ROOT__ 334 * nearly all important codelines for ROOT output are enclosed 335 * in structures like 336 * #ifdef __ROOT__ 337 * 338 * code 339 * 340 * #endif __ROOT__ 341 * 342 * In same case the new lines are signed by a comment with the word 343 * ROOT in it. 344 * 345 * For timing of the pulse some variable names are changed. 346 * (t0, t1, t --> t_ini, t_fin, t_1st, t_chan,...) 347 * Look also for this changes. 348 * 349 * For the new root-file is also a change in readparm-files 350 * 351 * 352 *- __DETAIL_TRIGGER__ 353 * 354 * This is for the implementation of the current work on trigger 355 * studies. Because the class MTrigger is not well documented it 356 * isn´t a part of this tar file. Only a dummy File exists. 357 * 358 * 359 * 360 *With all files in the archive, the root_camera program should run. 361 * 362 *A reflector file is in the directory rfl-files 363 * 364 *================================================== 365 * 366 *From now on, use CVS for development!!!! 367 * 368 * 369 * 146 370 *Revision 1.1.1.1 1999/10/21 16:35:10 petry 147 371 *first synthesised version -
trunk/MagicSoft/Simulation/Detector/include-CORSIKA/COREventHeader.hxx
r3046 r5103 27 27 #include "TObject.h" 28 28 29 #include <iostream .h>30 #include <iomanip .h>31 #include <fstream .h>29 #include <iostream> 30 #include <iomanip> 31 #include <fstream> 32 32 #include <stdlib.h> 33 33 #include <math.h> 34 #include <string .h>34 #include <string> 35 35 // @endcode 36 37 using namespace std; 36 38 37 39 // @subsection Class {\em COREventHeader}: Definition -
trunk/MagicSoft/Simulation/Detector/include-MC/MCCphoton.hxx
r5078 r5103 27 27 #include "TObject.h" 28 28 29 #include <iostream .h>30 #include <iomanip .h>31 #include <fstream .h>29 #include <iostream> 30 #include <iomanip> 31 #include <fstream> 32 32 #include <stdlib.h> 33 #include <string .h>33 #include <string> 34 34 #include <math.h> 35 35 36 36 #include "jcmacros.h" 37 38 using namespace std; 37 39 38 40 // const char variables to use in MCCphoton::isA() function -
trunk/MagicSoft/Simulation/Detector/include-MC/MCEventHeader.hxx
r5078 r5103 27 27 #include <TObject.h> 28 28 29 #include <iostream .h>30 #include <iomanip .h>31 #include <fstream .h>29 #include <iostream> 30 #include <iomanip> 31 #include <fstream> 32 32 #include <stdlib.h> 33 33 #include <math.h> -
trunk/MagicSoft/Simulation/Detector/include-MC/MCEventHeader_2.hxx
r5078 r5103 27 27 #include "TObject.h" 28 28 29 #include <iostream .h>30 #include <iomanip .h>31 #include <fstream .h>29 #include <iostream> 30 #include <iomanip> 31 #include <fstream> 32 32 #include <stdlib.h> 33 33 #include <math.h> -
trunk/MagicSoft/Simulation/Detector/include-MC/MCRunHeader.hxx
r5078 r5103 27 27 #include "TObject.h" 28 28 29 #include <iostream .h>30 #include <iomanip .h>31 #include <fstream .h>29 #include <iostream> 30 #include <iomanip> 31 #include <fstream> 32 32 #include <stdlib.h> 33 33 #include <math.h> 34 34 35 35 #define SIZE_OF_MCRUNHEADER 272 /* floats */ 36 37 using namespace std; 36 38 37 39 // @endcode -
trunk/MagicSoft/Simulation/Detector/include-MLons/MLons.cxx
r5081 r5103 1 1 #include "MLons.hxx" 2 3 using namespace std; 2 4 3 5 MLons::MLons(){ -
trunk/MagicSoft/Simulation/Detector/include-MLons/MLons.hxx
r5081 r5103 9 9 // 10 10 // 11 #include <iostream .h>11 #include <iostream> 12 12 #include <math.h> 13 13
Note:
See TracChangeset
for help on using the changeset viewer.