source: trunk/MagicSoft/Simulation/Detector/Camera/README@ 5165

Last change on this file since 5165 was 5072, checked in by moralejo, 20 years ago
*** empty log message ***
File size: 6.1 KB
Line 
1README for "camera"
2
3Warning: this file contains information on the first versions of camera
4program. Please refer to the manual (see MAGIC web pages) for up to date
5information.
6
7(for camera.cxx version 1.5/camera.h 1.4/creadparam.cxx 1.2/
8 creadparam.h 1.2/camera-v.h 1.2)
9
10D. Petry, 18-2-2000
11
12This version includes drastic changes compared to camera.cxx 1.4.
13It is not yet finished and not immediately useful because the
14trigger simulation is not yet re-implemented. I had to take it
15out together with some other stuff in order to tidy the whole
16program up. This is not meant as an insult to anyone. I needed
17to do this in order to be able to work on it.
18
19This version has been put in the repository in order to be
20able to share the further development with others.
21
22If you need something working, wait or take an earlier one.
23
24Summary of the changes compared to camera.cxx 1.4:
25
261) General removal of all the #defines which activate/deactivate
27 features of the program. This program is to simulate a Cherenkov
28 telescope and it is going to have all the features it needs.
29 If features have to be deactivated, this should happen via the
30 parameters file. The #defines only lead to confusion and errors
31 on the side of the users.
32
332) Removal of the old implementation of the trigger. The future
34 trigger will be implemented in the class MTrigger or somewhere
35 else.
36
373) In order to simulate the NSB, it was necessary to introduce the
38 array
39
40 class Photoelectron photoe[iMAXNUMPHE]
41
42 One instance of Photoelectron contains the arrival time and the
43 the pixelnumber for a photoelectron. No distinction is made whether
44 the photoelectron came from Cherenkov light or from the NSB.
45
46 This array is filled with photoelectrons first by the new function
47
48 int produce_phes( ... )
49
50 and then (if simulateNSB == TRUE) by the second new function
51
52 int produce_nsb_phes( ... )
53
54 The filled array photoe[] can then be given to the trigger
55 and FADC simulation. The time of the first phe and the time
56 of the last phe is available in two float variables
57 (arrtmin_ns, arrtmax_ns).
58
59 If the NSB simulation is switched on (simulateNSB == TRUE),
60 arrtmin_ns and arrtmax_ns are modified such that
61 there is at least SLICES*WIDTH_TIMESLICE simulated NSB.
62 In this way, the FADC simulation obtains realistic data.
63 If the event is longer than the foreseen digitization time,
64 the offset SIMTIMEOFFSET_NS is added such that there is
65 some NSB before and after the Cherenkov information.
66
674) In order to prepare the NSB simulation (read the starfield,
68 calculate rates etc.) a third new function had to be written:
69
70 produce_nsbrates( ... )
71
72 It is used before the start of the loop which reads the
73 Cherenkov data. Internally it uses produce_phes(...) in
74 order to turn the starfield file into photoelectrons.
75 In this way, I made sure that exactly the same code is
76 used to simulate the NSB response and the Cherenkov light
77 response.
78
795) The function produce_nsb_phes( ... ), mentioned above,
80 also produces the baseline shift voltage baseline_mv[]
81 for each pixel. This is necessary for the Trigger and
82 FADC simulation.
83
846) All three functions produce_nsbrates( ... ), produce_phes( ... ),
85 and produce_nsb_phes( ... ) are defined in camera.cxx .
86 Since they cannot really be used anywhere else except in the
87 camera simulation, it didn't make sense to put them in a
88 separate file.
89
907) The outputfile in ".phe" format was removed. People will in future
91 use the ROOT output file or the data ASCII file. Careful: the
92 ROOT raw data part - like the trigger - does not properly work in this
93 version. Please wait until the next one.
94
95 Correspondingly, the parameter output_file in the parameters
96 file was removed.
97
988) A new parameter was added to the parameters file:
99
100 starfield_file
101
102 The new version code of the camera parameter file is 0.3 !
103
1049) The old parameters "nsb_mean" and "nsb_on/off" continue to
105 control the NSB generation.
106
107 nsb_mean contains the mean number of photoelectrons caused
108 by diffuse NSB per ns for one of the central pixels (small
109 pixels). The value is automatically scaled for the larger
110 pixels.
111
112 nsb_on switches the NSB generation on.
113
114 nsb_off switches it off. In this case, no starfield file
115 is read.
116
11710) The starfield file which is needed for the NSB generation, has
118 to be produced using the present version of the reflector with
119 input from the starfield generator.
120
121 The integration time which is needed for the normalization of
122 the non-diffuse NSB, is taken from the "primary energy" field
123 of the MCeventheader of the starfield file! This is where the
124 starfield generator puts it. If you take the input from reflector
125 output not produced with starfield generator data, you will
126 have to take care of this.
127
12811) The Cherenkov data is now read via a normal C-style filepointer.
129 This makes it more easy to read from stdin and to reposition the
130 filepointer. This is not a change in the reflector format.
131
13212) The function read_pixels(...) was improved such that it notices if
133 a faulty QE-file is given. The old version read a truncated QE file
134 without complaining and used house-numbers for the QE as a result.
135
136 The read QE table is now at least checked for completeness and if
137 all values are inside the limits.
138
13913) The pixelization is now done in produce_phes(...) and should be
140 correct.
141
14214) The QE simulation is done in produce_phes(...) as well. In
143 order to save time, a linear interpolation was used instead of
144 the Lagrangian. Additional safety checks were added. The new
145 function lin_interpol(...) was created.
146
14715) If you need to use this program for CT1, you have to
148 produce a .def file which describes it. Most of the direct references to
149 CT1 were removed. The rest will hopefully be tidied up soon.
150 As a general program, camera should be able to simulate any
151 CT if the right .def file is given.
152
153
154Probably I have forgotten something. But I think these are the main points.
155The program contains some debugging "couts" which are commented out. They
156can be deleted soon.
157
158
Note: See TracBrowser for help on using the repository browser.