source: trunk/MagicSoft/Mars/mfileio/defines.h@ 5428

Last change on this file since 5428 was 1574, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 29.4 KB
Line 
1/******************************************************************/
2/* GGG AAA M M M M AAA SSS */
3/* G G A A MM MM MM MM A A S S */
4/* G A A M M M M M M A A SS */
5/* G GG AAAAA M M M M AAAAA SS */
6/* G G A A M M M M A A S S */
7/* GGG A A M M M M A A SSS */
8/* Gamma Astronomer's Munich Madrid Analysis Suite */
9/* An Atmospheric Cherenkov Telescope Data Analysis Software */
10/* MPI f"ur Physik, M"unchen & Universidad Complutense, Madrid */
11/******************************************************************/
12
13/******************************************************************/
14/* This File belongs to the programs */
15/* */
16/* P R E P R O C E S S O R and I M A G E R */
17/* */
18/* Purpose: provide the structure definitions common to both */
19/* programs, especially the output structures of the */
20/* preprocessor */
21/* */
22/******************************************************************/
23
24#ifndef _defines_h_
25#define _defines_h_ "__defines_h__"
26
27#define cIDSTRING(x,y,z) "@(#) GAMMAS "#x" version "#y", date "#z"."
28#define CAT(x,y) #x#y
29#define XCAT(x,y) CAT(x,y)
30
31#define Boolean int
32
33#ifndef TRUE
34#define TRUE 1
35#endif
36#ifndef FALSE
37#define FALSE 0
38#endif
39
40/*************** DEFINES ******************************************/
41
42/* General defines */
43
44#define cHELLOSTRING(x,y) "This is preproc.\nVersion "#x", date "#y"\n\n"
45#define PREPROCVERSIONSTRING(x) "V"#x
46
47#define dDEG_PER_HOUR 15.
48#define dRAD_PER_DEG 0.0174532925199 /* = 3.14159265359/180. */
49#define dSECS_PER_DAY 86400.
50#define SQUARE(x) ((x) * (x))
51
52/* defines for histograms and ntuple creation */
53
54#define HMAX 2000000 /* memory reserved for pawc common block
55 * used by hbook */
56#define DAB -999 /* if a histogramm parameter is to be Defined
57 * At Booking enter -999 */
58#define iADCHISTID 1000 /* id of the first histogram for ADC
59 * count spectra */
60#define cADCHISTTITLE "Pixel signals before calibration;pixel \
61number;ADC counts"
62#define iADCHIST_BINS 127 /* This is a good guess. bparametersok()
63 * will look at parameters for the bins
64 * in X direction and adjust the other,
65 * similar histograms acoordingly. */
66#define fADCHIST_LOLIMX 0.5
67#define fADCHIST_HILIMX 127.5 /* For both of them, see above. */
68
69
70
71#define iPHEHISTID 2000 /* id of the first histogram for photo
72 *electron spectra */
73#define cPHEHISTTITLE "Pixel signals after calibration;pixel \
74number;photo electrons"
75#define iPHEHIST_BINS 127 /* This is a good guess. bparametersok()
76 * will look at parameters for the bins
77 * in X direction and adjust the other,
78 * similar histograms acoordingly. */
79#define fPHEHIST_LOLIMX 0.5
80#define fPHEHIST_HILIMX 127.5 /* For both of them, see above. */
81
82#define iPEDONHISTID 12000 /* id of the first histogram for the
83 *signals taken in pedestalruns for ON */
84#define iPEDOFHISTID 11000 /* id of the first histogram for the
85 *signals taken in pedestalruns for OF */
86#define cPEDONHISTTITLE "Pixel signals from ON pedestal runs;\
87pixel number;ADC Counts"
88#define cPEDOFHISTTITLE "Pixel signals from OF pedestal runs;\
89pixel number;ADC Counts"
90#define iPEDONMEANHISTID 14000 /* id of the first histogram for the
91 *signals taken in pedestalruns for ON */
92#define iPEDOFMEANHISTID 13000 /* id of the first histogram for the
93 *signals taken in pedestalruns for OF */
94#define cPEDONMEANHISTTITLE "Pedestal Means from ON pedestal runs;\
95Event Index;ADC Counts"
96#define cPEDOFMEANHISTTITLE "Pedestal Means from OF pedestal runs;\
97Event Index;ADC Counts"
98#define iPEDONJITTHISTID 16000 /* id of the first histogram for the
99 *signals taken in pedestalruns for ON */
100#define iPEDOFJITTHISTID 15000 /* id of the first histogram for the
101 *signals taken in pedestalruns for OF */
102#define cPEDONJITTHISTTITLE "Deviation from Pedestal Means from \
103ON pedestal runs;Pixel Number;ADC Counts"
104#define cPEDOFJITTHISTTITLE "Deviation from Pedestal Means from \
105OF pedestal runs;Pixel Number;ADC Counts"
106#define iCALONHISTID 18000 /* id of the first histogram for the
107 *signals taken in laserruns for ON */
108#define iCALOFHISTID 17000 /* id of the first histogram for the
109 *signals taken in plaserruns for OF */
110#define cCALONHISTTITLE "Pixel signals from ON laser runs;\
111pixel number;ADC Counts"
112#define cCALOFHISTTITLE "Pixel signals from OF laser runs;\
113Pixel Number;ADC Counts"
114#define iCALONMEANHISTID 20000 /* id of the first histogram for the
115 *signals taken in laserruns for ON */
116#define iCALOFMEANHISTID 19000 /* id of the first histogram for the
117 *signals taken in plaserruns for OF */
118#define cCALONMEANHISTTITLE "Laser Means from ON laser runs;\
119Event Index;ADC Counts"
120#define cCALOFMEANHISTTITLE "Laser Means from OF laser runs;\
121Event Index;ADC Counts"
122#define iCALONJITTHISTID 22000 /* id of the first histogram for the
123 *signals taken in laserruns for ON */
124#define iCALOFJITTHISTID 21000 /* id of the first histogram for the
125 *signals taken in plaserruns for OF */
126#define cCALONJITTHISTTITLE "Deviation from Laser Means from \
127ON laser runs;Pixel Number;ADC counts"
128#define cCALOFJITTHISTTITLE "Deviation from Laser Means from \
129OF laser runs;Pixel Number;ADC counts"
130#define iZENONHISTID 200 /* id of the histogram for the zenith
131 * angle distribution before filter ON */
132#define iZENOFHISTID 100 /* id of the histogram for the zenith
133 * angle distribution before filter OF */
134#define cZENONHISTTITLE "zenith angle distribution before filter \
135ON;zenith angle;number of events ON"
136#define cZENOFHISTTITLE "zenith angle distribution before filter \
137OFF;zenith angle;number of events OFF"
138#define iZENHISTNUMBINS 90
139#define fZENHISTLOLIM 0.
140#define fZENHISTHILIM 90.
141/* defines for noise pickup correction of pedestal (added D.K.)
142 */
143#define iCORRPEDHISTID 400 /* id of histogram for pedestal correction values
144 (noise pickup) */
145#define cCORRPEDHISTTIT "Pickup Correction;ADC counts;Nr. of Events"
146#define iCPEDFWHMHISTID 410 /* id of the histogram for FWHM of pedestal
147 correction values (noise pickup) */
148#define cCPEDFWHMHISTTIT "FWHM of Pickup Correction;ADC counts;Nr. of Events"
149#define fMIN_CORRPEDHIST -20.
150#define fMAX_CORRPEDHIST 20.
151#define iCORRPEDHIST_BINS 80
152#define fMIN_CPEDFWHMHIST 0.
153#define fMAX_CPEDFWHMHIST 20
154#define iCPEDFWHMHIST_BINS 40
155#define iBIAS 50 /* is used to make the pedestals peak at 'iBIAS' */
156#define dPEDCORRSIZELIMIT 500. /* maximum event SIZE for which noise-pickup is
157 corrected */
158/* end: defines for noise pickup correction of pedestal
159 */
160
161/* MKA May 8 2000: Version > 0.4 */
162#define cHISTOFILENAME ".hbook"
163#define cCALNTFILENAME ".nt.hbook"
164#define cOUTDIRNAME "preproc_out/"
165#define cPROJECTNAME "check"
166#define iCALIBNTUPLE_ID 3
167#define iRECL 1024 /* the record length of the calibration ntuple */
168
169#define iPARTNERSEARCHDEPTH 20 /* Default search depth if not specified. */
170/* various parameters */
171
172#ifdef ALPHA
173#define iMAXNUMLASERRUNS 4 /* maximum number of laser runs
174 * recorded in one file
175 * (90 degrees * 4 minutes/degree / 20 minutes) */
176#endif
177#ifdef LINUX
178#define iMAXNUMLASERRUNS 6 /* maximum number of laser runs
179 * recorded in one file
180 * (90 degrees * 4 minutes/degree / 20 minutes) */
181#endif
182#define iMAXNUMLASEREVENTS 250 /* maximum number of laser shots
183 * recorded for one laser run */
184#ifdef ALPHA
185#define iMAXNUMPEDRUNS 4 /* maximum number of pedestal runs
186 * recorded in one file */
187#endif
188#ifdef LINUX
189#define iMAXNUMPEDRUNS 26 /* maximum number of pedestal runs
190 * recorded in one file */
191#endif
192#define iMAXNUMPEDEVENTS 500 /* maximum number of random triggers
193 * recorded for one pedestal run */
194#define iMAXNUMRUNEVENTS 40000 /* maximum number of events recorded
195 * in one run data file */
196#define iNUMRMSFITXBINS 100 /* Bins in the (vector)histogram for the
197 * fit of the Pedestal RMS */
198#define iRMSFITXSTRETCH 50 /* strectch of the (vector)histogram for the
199 * fit of the Pedestal RMS */
200/* Attention: for iNUMRMSFITXBINS and iRMSFITXSTRETCH the following
201 * requirement must be fulfilled:
202 * A width of 1 must be achieveble as an integer multiple of the
203 * binwidth, i.e. 5 or 6 times (iRMSFITXSTRETCH/iNUMRMSFITXBINS) must
204 * make up 1. */
205
206#define iRMSFITXOFFSET 2 /* half a bin offset to the left: Start a bin
207 * with center at 0 at 1./2. binwidth earlier */
208
209#define iMAXFILENAMELENGTH 400
210/* general limit on the length of filename strings (including path) */
211#define iMAXNUMDIRENTRIES 1028 /* MKA: Nonsens to limit this; we
212 * rewrite this in the future.
213 * Make a chained list and allocate
214 * memory for it dynamically. Free
215 * this memory afterwards.
216 * Put on to-do-list Nov 6 1999 */
217/* the maximum number of filenames expected in a directory to
218 * be read by ireaddir() */
219#define cDIRFILENAME "preproc.dir"
220/* intermediate file used by ireaddir() */
221#define iMAXNUMCALFILEOFFSET 400 /* That is the number of Runs, which
222 * is searched back to find a TelCal
223 * file for analysis. */
224
225#define iMAXNUMPEDFILEOFFSET 400 /* That is the number of Runs, which
226 * is searched back to find a TelPed
227 * file for analysis. */
228
229#define iMAXNUMTELLOGFILEOFFSET 400 /* That is the number of Runs, which
230 * is searched back to find a TelLog
231 * file for analysis. */
232
233/* keywords, numbers of arguments, values and ranges of values
234 which define the syntax in the parameters file
235
236 in order to introduce a new input parameter, you have to
237 a) increase iNUMKEYWORDS
238 b) #define the keyword (cKEYWORDXX), the format for the
239 arguments (cKEYWORDXXARG)
240 the number of arguments (iKEYWORDXXNUMARG),
241 the minimum and maximum value
242 (iMIN..., iMAX...) for numerical arguments
243 c) for enum-type arguments look at keywords 10 or 11 to see
244 what to #define
245 (iKEYWORDXXARGYNUMVAL = the number of values the arguments
246 no. Y of keyword no. XX can take,
247 cKEYWORDXXARGYVALS = enumeration of the different values
248 (strings) the argument can have
249 d) put entries into the initialization of the arrays ckeyword,
250 ckeywordarg, ikeywordnumarg, fargvalmin, fargvalmax, and
251 for enum-type arguments declare a new array keywordXXvalues
252 as for keywords 10 and 11
253 e) include the new parameter into the structure inputpars,
254 and, if you wish to, in outputpars also.
255 f) add the corresponding case to the switch(k) statement in main()
256 g) modify bparametersok(), bprintinputpars() and
257 vsetinputparsunfilled()
258 h) program the transfer of the parameter from inputpars to
259 outputpars if necessary
260 .... to be continued */
261
262
263#define iNUMKEYWORDS 46 /* the number of different kewords
264 * defined for use in the
265 * parameters file */
266
267#define cKEYWORD01 "iTELESCOPE"
268/* keyword no. 1, this keyword must have this number, don't change it */
269#define cKEYWORD01ARG "%d"
270#define iKEYWORD01NUMARG 1 /* number of arguments */
271#define iMINTELESCOPEID 1 /* minimum value */
272#define iMAXTELESCOPEID 2 /* maximum value */
273
274#define cKEYWORD02 "iRUNNUM"
275/* keyword no. 2, this keyword must have this number, don't change it */
276#define cKEYWORD02ARG "%d"
277#define iKEYWORD02NUMARG 1
278#define iMINRUNNUM 0 /* minimum value */
279#define iMAXRUNNUM 99999 /* maximum value */
280
281#define cKEYWORD03 "inumpixels"
282/* keyword no. 3 */
283#define cKEYWORD03ARG "%d"
284#define iKEYWORD03NUMARG 1
285#define iMINNUMPIX 37 /* minimum value for the number of camera
286 * pixels (excl. muon shield) */
287/* #define iMAXNUMPIX .. maximum value defined in structures.h */
288
289#define cKEYWORD04 "fpixdiameter_deg"
290/* keyword no. 4 */
291#define cKEYWORD04ARG "%f"
292#define iKEYWORD04NUMARG 1
293#define fMINPIXDIA_DEG 0.1 /* minimum value */
294#define fMAXPIXDIA_DEG 1.0 /* maximum value */
295
296#define cKEYWORD05 "ise1zeropos"
297/* keyword no. 5 */
298#define cKEYWORD05ARG "%d"
299#define iKEYWORD05NUMARG 1
300#define iMINSE1POS 0 /* minimum value */
301#define iMAXSE1POS 50000 /* maximum value */
302
303#define cKEYWORD06 "ise2zeropos"
304/* keyword no. 6 */
305#define cKEYWORD06ARG "%d"
306#define iKEYWORD06NUMARG 1
307#define iMINSE2POS 0 /* minimum value */
308#define iMAXSE2POS 50000 /* maximum value */
309
310#define cKEYWORD07 "idontusepix"
311/* keyword no. 7 */
312#define cKEYWORD07ARG "%d"
313#define iKEYWORD07NUMARG 1
314#define iMINPIXNUM 1 /* in the parameters file counting of the
315 * pixels starts at 1 */
316/* maximum value of this parameter is iMAXNUMPIX */
317/* negative parameters in the range -iMINPIXNUM to -iMAXNUMPIX
318 * are also allowed: */
319/* they switch the pixel back on */
320
321#define cKEYWORD08 "isum_thresh_phot"
322/* keyword no. 8 */
323#define cKEYWORD08ARG "%d"
324#define iKEYWORD08NUMARG 1
325#define iMINSUMTHRESH_PHOT 0 /* minimum value */
326#define iMAXSUMTHRESH_PHOT 65536 /* maximum value */
327
328#define cKEYWORD09 "i2out_thresh_phot"
329/* keyword no. 9 */
330#define cKEYWORD09ARG "%d"
331#define iKEYWORD09NUMARG 1
332#define iMIN2OUTTHRESH_PHOT 0 /* minimum value */
333#define iMAX2OUTTHRESH_PHOT 65536 /* maximum value */
334
335#define cKEYWORD10 "usecalfile"
336/* keyword no. 10 */
337#define cKEYWORD10ARG "%s %d %d"
338#define iKEYWORD10NUMARG 3 /* first arg: search direction,
339 * second arg: end of search or
340 * search depth in case of
341 * pingpong method */
342#define iKEYWORD10ARG1NUMVAL 5
343#define cKEYWORD10ARG1VALS "match", "before", "after", "pingpong", "none"
344/* minimum and maximum value of the second argument are
345 * identical with iMINRUNNUM and iMAXRUNNUM */
346
347#define cKEYWORD11 "usepedfile"
348/* keyword no. 11 */
349#define cKEYWORD11ARG "%s %d %d"
350#define iKEYWORD11NUMARG 3 /* first arg: search direction,
351 * second arg: end of search or
352 * search depth in case of
353 * pingpong method */
354#define iKEYWORD11ARG1NUMVAL 5
355#define cKEYWORD11ARG1VALS "match", "before", "after", "pingpong", "none"
356/* minimum and maximum value of the second argument are
357 * identical with iMINRUNNUM and iMAXRUNNUM */
358
359#define cKEYWORD12 "inummuonpixels"
360/* keyword no. 12 */
361#define cKEYWORD12ARG "%d"
362#define iKEYWORD12NUMARG 1
363#define iMINNUMMUONPIX 0 /* minimum value */
364/* #define iMAXNUMMUONPIX .. maximum value defined in structures.h */
365
366#define cKEYWORD13 "inumcointdcs"
367/* keyword no. 13 */
368#define cKEYWORD13ARG "%d"
369#define iKEYWORD13NUMARG 1
370#define iMINNUMCOINTDCS 0 /* minimum value */
371/* #define iMAXNUMCOINTDCS .. maximum value defined in structures.h */
372
373#define cKEYWORD14 "fphotoel_per_adccnt"
374/* keyword no. 14 */
375#define cKEYWORD14ARG "%s %f"
376#define iKEYWORD14NUMARG 2
377#define fMINPHOTOEL_PER_ADCCNT 0.1 /* minimum value for the
378 * second argument */
379#define fMAXPHOTOEL_PER_ADCCNT 999.0 /* maximum value for the
380 * second argument */
381/* as first argument either a single integer number or a
382 * range may be given (format: e.g. 10-20) minimum and
383 * maximum value of the first argument are identical with
384 * iMINPIXNUM and the number of pixels in the camera */
385
386#define cKEYWORD15 "bmuon_suppression"
387/* keyword no. 15 */
388#define cKEYWORD15ARG "%s"
389#define iKEYWORD15NUMARG 1 /* this keyword is a switch */
390#define iKEYWORD15ARG1NUMVAL 2
391#define cKEYWORD15ARG1VALS "off", "on" /* the order of this
392 * enumeration is essential
393 * to make off equivalent
394 * to FALSE */
395
396#define cKEYWORD16 "ftolerated_pointerror_deg"
397/* keyword no. 16 */
398#define cKEYWORD16ARG "%f"
399#define iKEYWORD16NUMARG 1
400#define fMINTOLERATED_POINTERROR_DEG 0. /* minimum value for
401 * the maximum tolerated
402 * pointing error in the
403 * position check in
404 * iprocessdata */
405#define fMAXTOLERATED_POINTERROR_DEG 180. /* maximum value */
406
407#define cKEYWORD17 "iratecalc_numevents_odd"
408/* keyword no. 17 */
409#define cKEYWORD17ARG "%d"
410#define iKEYWORD17NUMARG 1
411#define iMINRATECALC_NUMEVENTS_ODD 3 /* minimum value for the
412 * number of events used
413 * in the event rate
414 * calculation */
415#define iMAXRATECALC_NUMEVENTS_ODD 999 /* maximum value */
416
417#define cKEYWORD18 "fdegrees_per_step1"
418/* keyword no. 18 */
419#define cKEYWORD18ARG "%f"
420#define iKEYWORD18NUMARG 1
421#define fMINDEGREES_PER_STEP 0.0001 /* minimum value for the
422 * resolution of shaft encoder 1 */
423#define fMAXDEGREES_PER_STEP 0.1 /* maximum value */
424
425#define cKEYWORD19 "fdegrees_per_step2"
426/* keyword no. 19 */
427#define cKEYWORD19ARG "%f"
428#define iKEYWORD19NUMARG 1
429/* minimum and maximum values as for keyword 18 */
430
431#define cKEYWORD20 "se1_is"
432/* keyword no. 20 */
433#define cKEYWORD20ARG "%s"
434#define iKEYWORD20NUMARG 1
435#define iKEYWORD20ARG1NUMVAL 4
436#define cKEYWORD20ARG1VALS "RA", "DEC", "ALT", "AZ"
437
438#define cKEYWORD21 "flongitude_deg"
439/* keyword no. 21 */
440#define cKEYWORD21ARG "%f"
441#define iKEYWORD21NUMARG 1
442#define fMIN_LONG_DEG 0. /* minimum value for the longitude
443 * of the telescope position */
444#define fMAX_LONG_DEG 359.99999 /* maximum value (the
445 * longitude is counted
446 * positive towards West */
447
448#define cKEYWORD22 "flatitude_deg"
449/* keyword no. 22 */
450#define cKEYWORD22ARG "%f"
451#define iKEYWORD22NUMARG 1
452#define fMIN_LAT_DEG -90.0 /* minimum value for the latitude
453 * of the telescope position */
454#define fMAX_LAT_DEG +90.0 /* maximum value */
455
456#define cKEYWORD23 "irubminusutc_usecs"
457/* keyword no. 23 */
458#define cKEYWORD23ARG "%d"
459#define iKEYWORD23NUMARG 1
460#define iMINRUBMINUSUTC_USECS -60E6 /* minimum value for the
461 * time difference between
462 * rubidium clock and UTC*/
463#define iMAXRUBMINUSUTC_USECS 60e6 /* maximum value */
464
465#define cKEYWORD24 "iaz_rev_track_corr"
466/* keyword no. 24 */
467#define cKEYWORD24ARG "%d"
468#define iKEYWORD24NUMARG 1
469#define iMINAZ_REV_TRACK_CORR -1000 /* minimum value for the
470 * correction of the az
471 * shaft encoder values
472 * in reverse tracking mode
473 * see Calc_corr in TIJARAFE */
474#define iMAXAZ_REV_TRACK_CORR 1000 /* maximum value */
475
476#define cKEYWORD25 "ialt_rev_track_corr"
477/* keyword no. 25 */
478#define cKEYWORD25ARG "%d"
479#define iKEYWORD25NUMARG 1
480#define iMINALT_REV_TRACK_CORR -1000 /* minimum value for the
481 * correction of the alt
482 * shaft encoder values
483 * in reverse tracking mode
484 * see Calc_corr in TIJARAFE */
485#define iMAXALT_REV_TRACK_CORR 1000 /* maximum value */
486
487#define cKEYWORD26 "fbendingcorr"
488/* keyword no. 26 */
489#define cKEYWORD26ARG "%f"
490#define iKEYWORD26NUMARG 1
491#define fMINBENDINGCORR -0.5 /* minimum value for the bending
492 * correction factor for the alt
493 * shaft encoder values
494 * see Calc_corr in TIJARAFE */
495#define fMAXBENDINGCORR 0.5 /* maximum value */
496
497#define cKEYWORD27 "fextinction"
498/* keyword no. 27 */
499#define cKEYWORD27ARG "%f"
500#define iKEYWORD27NUMARG 1
501#define fMINEXTINCTION 0. /* minimum value for the
502 * atmospheric extinction */
503#define fMAXEXTINCTION 1. /* maximum value */
504
505#define cKEYWORD28 "dsource_ra_hours"
506/* keyword no. 28 */
507#define cKEYWORD28ARG "%lf"
508#define iKEYWORD28NUMARG 1
509#define fMINRA_HOURS 0.0 /* minimum value for the right
510 * ascension of the assumed source */
511#define fMAXRA_HOURS 23.99999999 /* maximum value */
512
513#define cKEYWORD29 "dsource_dec_deg"
514/* keyword no. 29 */
515#define cKEYWORD29ARG "%lf"
516#define iKEYWORD29NUMARG 1
517#define fMINDEC_DEG -90.0 /* minimum value for the
518 * declination of the assumed source */
519#define fMAXDEC_DEG 90.0 /* maximum value */
520
521#define cKEYWORD30 "imuoncut_thresh_adccnt"
522/* keyword no. 30 */
523#define cKEYWORD30ARG "%s %d"
524#define iKEYWORD30NUMARG 2
525#define iMINMUONCUT_THRESH_ADCCNT 0 /* minimum value for the
526 * second argument */
527#define iMAXMUONCUT_THRESH_ADCCNT 65536 /* maximum value for
528 * the second argument */
529/* as first argument either a single integer number or a
530 * range may be given (format: e.g. 3-5) minimum and maximum
531 * value of the first argument are the number of pixels in
532 * the camera +1 and the number of pixels in the camera +
533 * the number of muonpixels in the camera */
534
535#define cKEYWORD31 "fxpointcorr_deg"
536/* keyword no. 31 */
537#define cKEYWORD31ARG "%f"
538#define iKEYWORD31NUMARG 1
539#define fMINRAPOINTERROR_DEG -10. /* minimum value for the
540 * pointing error correction
541 * along camera x axis as known
542 * from e.g. a pointrun */
543#define fMAXRAPOINTERROR_DEG +10. /* maximum value */
544
545#define cKEYWORD32 "fypointcorr_deg"
546/* keyword no. 32 */
547#define cKEYWORD32ARG "%f"
548#define iKEYWORD32NUMARG 1
549#define fMINDECPOINTERROR_DEG -10. /* minimum value for the
550 * pointing error correction
551 * along camera y axis as known
552 * from e.g. a pointrun */
553#define fMAXDECPOINTERROR_DEG +10. /* maximum value */
554
555#define cKEYWORD33 "fcamera_align_angle_deg"
556/* keyword no. 33 */
557#define cKEYWORD33ARG "%f"
558#define iKEYWORD33NUMARG 1
559#define fMINCAMALIGNANGLE_DEG -180. /* minimum value for the
560 * angle between the camera
561 * y-axis and the meridian
562 * when a culminating object
563 * is observed (defined
564 * counter-clockwise looking
565 * at the sky) */
566#define fMAXCAMALIGNANGLE_DEG 180. /* maximum value */
567
568#define cKEYWORD34 "bhistograms"
569/* keyword no. 34 */
570#define cKEYWORD34ARG "%s"
571#define iKEYWORD34NUMARG 1 /* this keyword is a threefold switch */
572#define iKEYWORD34ARG1NUMVAL 3
573#define cKEYWORD34ARG1VALS "off", "on", "new" /* the order of this
574 * enumeration is
575 * essential to make
576 * off equivalent to FALSE */
577
578#define cKEYWORD35 "iadc_histopars"
579/* keyword no. 35 */
580#define cKEYWORD35ARG "%d %f %f"
581#define iKEYWORD35NUMARG 3
582#define iMINBINS 3
583#define iMAXBINS 300
584#define fMIN_ADCHIST_LOLIM -50.5
585#define fMAX_ADCHIST_LOLIM 1000.
586#define fMIN_ADCHIST_HILIM 0.5
587#define fMAX_ADCHIST_HILIM 65535.5
588
589#define cKEYWORD36 "iphe_histopars"
590/* keyword no. 36 */
591#define cKEYWORD36ARG "%d %f %f"
592#define iKEYWORD36NUMARG 3
593#define fMIN_PHEHIST_LOLIM -10000.
594#define fMAX_PHEHIST_LOLIM 1000.
595#define fMIN_PHEHIST_HILIM -1000.
596#define fMAX_PHEHIST_HILIM 10000.
597
598#define cKEYWORD37 "idontusepix_in_trig"
599/* keyword no. 37 */
600#define cKEYWORD37ARG "%s"
601#define iKEYWORD37NUMARG 1 /* in the parameters file
602 * counting of the pixels starts at 1
603 * minimum value is iMINPIXNUM
604 * maximum value of this parameter
605 * is iMAXNUMPIX the pixel can only be
606 * taken back into trigger by resetting all
607 * parameters */
608
609#define cKEYWORD38 "fpadlevel_phot_pix"
610/* keyword no. 38 */
611#define cKEYWORD38ARG "%s %f"
612#define iKEYWORD38NUMARG 2
613#define fMINPADLEVEL_PHOT 0. /* minimum value for the software
614 * padding level for each pixel */
615#define fMAXPADLEVEL_PHOT 100. /* maximum value */
616
617#define cKEYWORD39 "frandomseeds"
618/* keyword no. 39 */
619#define cKEYWORD39ARG "%f %f "
620#define iKEYWORD39NUMARG 2
621#define fMINSEED 1. /* minimum value for the maximum tolerated
622 * pointing error in the position check in
623 * iprocessmcdata */
624#define fMAXSEED 1.e10 /* maximum value */
625
626#define cKEYWORD40 "iswap_pixels"
627/* keyword no. 40 */
628#define cKEYWORD40ARG "%d %d " /* the number of the
629 * two pixels for which
630 * the numbering should
631 * be swapped (in
632 * ireadrunfile,
633 * -pedfile, -calfile) */
634#define iKEYWORD40NUMARG 2
635/* the minimum value for this argument is iMINPIXNUM, the maximum
636 * is iMAXNUMPIX */
637
638#define cKEYWORD41 "%"
639/* keyword no. 41 */
640#define cKEYWORD41ARG "\n" /* using this keyword,
641 * comments can be added
642 * to the parameter file */
643#define iKEYWORD41NUMARG 0
644
645#define cKEYWORD42 "errortolerance"
646/* keyword no. 42 */
647#define cKEYWORD42ARG "%s"
648#define iKEYWORD42NUMARG 1
649#define iKEYWORD42ARG1NUMVAL 3
650#define cKEYWORD42ARG1VALS "cautious", "goodphysics", "tank"
651/* cautious: exits on any reason
652 * normal: the usual way: exit only, when the physics would
653 * be affected
654 * tank: exits only when all runs are processed. Otherwise
655 * it goes through everything, even through the pain of
656 * a coredump. */
657
658#define cKEYWORD43 "montecarlo"
659/* keyword no. 43 */
660#define cKEYWORD43ARG "%s"
661#define iKEYWORD43NUMARG 1
662#define iKEYWORD43ARG1NUMVAL 3
663#define cKEYWORD43ARG1VALS "all", "flag", "noflag"
664/* Whenever this one is specified, there shell apply certain
665 * limitations: No pedestal and calibration files shall be read in.
666 * Maybe more....
667 * Arguments:
668 * all: all events which survive the filter are written to the
669 * events NTuple.
670 * flag: When Dorota's triggerflag is set to 1 for a particular
671 * event, it shall be written to the output. All others shall
672 * just be disregarded.
673 * noflag: Opposite of 'flag': only events with triggerflag = 0 shall
674 * be treated further. */
675
676#define cKEYWORD44 "mcfile"
677/* keyword no. 44 */
678#define cKEYWORD44ARG "%s"
679#define iKEYWORD44NUMARG 1
680
681#define cKEYWORD45 "fmean_nsb_pe_pix"
682/* keyword no. 45 */
683#define cKEYWORD45ARG "%s %f"
684#define iKEYWORD45NUMARG 2
685#define fMIN_NSB_PE_PIX 0.
686#define fMAX_NSB_PE_PIX 2000000000. /* some ridiculous number...*/
687
688#define cKEYWORD46 "fitmypedrms"
689/* keyword no. 46 */
690/* Setting this keyword in the parameterfile shall trigger the
691 * pedestal MEAN and SIGMA=sqrt(MEAN) to be fitted from pickup
692 * corrected pedestal data and not calculated from the pickup
693 * corrected ADC values, as it was done up to ~November 2000. */
694
695/* Macintosh variable formats */
696#define lMACSIZEOFSHORT 2L
697#define lMACSIZEOFLONG 4L
698#define lMACSIZEOFDOUBLE 8L
699
700/* Time Offsets */
701#define iMACTIMEOFFSET 2082844800 /* offset to be subtracted
702 * from the Macintosh time
703 * read from the various data
704 * files to get DECSTATION/ALPHA
705 * time */
706
707/* TIJARAFE filename conventions */
708
709#define cCALFILENAME_TEMPLATE "Te%1sCal_*%s_%2s_*"
710#define cLOGFILENAME_TEMPLATE "Te%1sLog_*%s_%2s_*"
711#define cPEDFILENAME_TEMPLATE "Te%1sPed_*%s_%2s_???????_*"
712#define cRUNFILENAME_TEMPLATE "Te%1sRun_*%s_%2s_*"
713#define cPOIFILENAME_TEMPLATE "Te%1sPoi_*%s_%2s_*"
714#define cCTIDPOSITION_TIJ "2" /* element of the filename character
715 * array which contains the telescope id
716 * a length of 1 character is assumed */
717#define cRUNNUMPOSITION_TIJ "7" /* element of the filename character
718 * array which contains the run number */
719#define cRUNNUMLENGTH_TIJ "4" /* number of characters in the run number */
720#define cRUNTYPEPOSITION_TIJ "12" /* element of the filename character
721 * array which contains the ON or OF
722 * string a length of 2 characters is
723 * assumed */
724#define iTIJ_DUMMYLENGTH 20
725
726/* ROBERTO filename conventions */
727
728#define cCTIDPOSITION_ROB "2" /* element of the filename character
729 * array which contains the telescope id
730 * a length of 1 character is assumed */
731#define cRUNNUMPOSITION_ROB "7" /* element of the filename character
732 * array which contains the run number */
733#define cRUNNUMLENGTH_ROB "5" /* number of characters in the run number */
734#define cRUNTYPEPOSITION_ROB "13" /* element of the filename character
735 * array which contains the ON or OF
736 * string a length of 2 characters is
737 * assumed */
738#define iROB_DUMMYLENGTH 26
739
740/* Razmick's Method's F Factor for the PMTs: */
741/* #define FIXED_F_VALUE 1.09 */
742/* #define FIXED_F_VALUE 1.15 */
743#define FIXED_F_VALUE 1.075
744
745/* Monte Carlo defines, that _MUST_ be exactly the same as in
746 * zorp's defines.h. */
747#define iMAXNUMCTS 1
748#define iNUMENERGYBINS 19
749#define iNUMIMPACTBINS 60
750#define iNUMZENANGLEBINS 24
751#define iMAXNUMNFLSHIFTS 1
752#define fMAXIMPACTPAR 600.
753
754/* exit codes */
755
756#define iERRORINPROCESSDATA 100
757#define iERRORINMAKEFILENAME 101
758#define iERRORCT2TRACKMODE 102
759#define iERRORGAINZERO 103
760
761/*************** GLOBAL VARIABLES *********************************/
762
763#define FILEHANDLING_VERSION 4.2
764
765#endif
766
767#ifdef _defines_h_
768
769extern char G_cfilehandlingident[];
770extern char G_filehandhfilehident[];
771
772extern char G_cfatalerrortext[22];
773extern Boolean G_bhbook_is_init;
774extern float G_fpreprocversion;
775extern char G_preprocident[];
776extern char G_preprocstrucident[];
777extern char G_preprocfilehident[];
778
779extern char *calnt_var_list[22];
780extern char cprojectname[40];
781
782extern HBOOK_FILE calnt;
783extern HBOOK_FILE calhb;
784extern int G_oferfloweventID;
785extern int G_oferfloweventoffset;
786extern float pixcoords[271][2]; /* For the 2-dim camera pictures of the
787 * overflow events */
788#endif
Note: See TracBrowser for help on using the repository browser.