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

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