1 | README 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 |
|
---|
6 | D. Petry, 18-2-2000
|
---|
7 |
|
---|
8 | This version includes drastic changes compared to camera.cxx 1.4.
|
---|
9 | It is not yet finished and not immediately useful because the
|
---|
10 | trigger simulation is not yet re-implemented. I had to take it
|
---|
11 | out together with some other stuff in order to tidy the whole
|
---|
12 | program up. This is not meant as an insult to anyone. I needed
|
---|
13 | to do this in order to be able to work on it.
|
---|
14 |
|
---|
15 | This version has been put in the repository in order to be
|
---|
16 | able to share the further development with others.
|
---|
17 |
|
---|
18 | If you need something working, wait or take an earlier one.
|
---|
19 |
|
---|
20 | Summary of the changes compared to camera.cxx 1.4:
|
---|
21 |
|
---|
22 | 1) 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 |
|
---|
29 | 2) Removal of the old implementation of the trigger. The future
|
---|
30 | trigger will be implemented in the class MTrigger or somewhere
|
---|
31 | else.
|
---|
32 |
|
---|
33 | 3) 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 |
|
---|
63 | 4) 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 |
|
---|
75 | 5) 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 |
|
---|
80 | 6) 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 |
|
---|
86 | 7) 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 |
|
---|
94 | 8) 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 |
|
---|
100 | 9) 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 |
|
---|
113 | 10) 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 |
|
---|
124 | 11) 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 |
|
---|
128 | 12) 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 |
|
---|
135 | 13) The pixelization is now done in produce_phes(...) and should be
|
---|
136 | correct.
|
---|
137 |
|
---|
138 | 14) 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 |
|
---|
143 | 15) 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 |
|
---|
150 | Probably I have forgotten something. But I think these are the main points.
|
---|
151 | The program contains some debugging "couts" which are commented out. They
|
---|
152 | can be deleted soon.
|
---|
153 |
|
---|
154 |
|
---|