source: trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx@ 5097

Last change on this file since 5097 was 5077, checked in by moralejo, 20 years ago
Updated in CVS after some time (see changes below)
File size: 48.4 KB
Line 
1//=//////////////////////////////////////////////////////////////////////
2//=
3//= creadparam
4//=
5//= @file creadparam.cxx
6//= @desc Reading of parameters file
7//= @author J C Gonzalez
8//= @email gonzalez@mppmu.mpg.de
9//= @date Thu May 7 16:24:22 1998
10//=
11//=----------------------------------------------------------------------
12//=
13//= Created: Thu May 7 16:24:22 1998
14//= Author: Jose Carlos Gonzalez
15//= Purpose: Program for reflector simulation
16//= Notes: See files README for details
17//=
18//=----------------------------------------------------------------------
19//=
20//= $RCSfile: creadparam.cxx,v $
21//= $Revision: 1.28 $
22//= $Author: moralejo $
23//= $Date: 2004-09-16 15:27:08 $
24//=
25//=//////////////////////////////////////////////////////////////////////
26
27// @T \newpage
28
29//!@section Source code of |creadparam.cxx|.
30
31/*!@"
32
33 This section describes briefly the source code for the file
34 |creadparam.cxx|. This file is very closely related to the file
35 |readparams.cxx| from the |reflector| program. Actually, this later
36 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|. In
39 the first one we can see the definitions of the commands available
40 for the parameters file. We describe these commands in a later
41 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
55#include "creadparam.h"
56#include "camera.h" // Needed for MAX_NUMBER_OF_CTS
57
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//!@{
70
71static char **Input_filename; //@< input filename
72static char Starfield_filename[PATH_MAX_LENGTH]; //@< starfield input filename
73static int Starfield_center[6]={0,0,0,0,0,0}; //@< center of the starfield FOV
74 //@< RA(H,M,S) & DEC (D,M,S)
75static char Data_filename[PATH_MAX_LENGTH]; //@< data filename
76static char ROOT_filename[PATH_MAX_LENGTH]; //@< data filename
77static char Loop_filename[PATH_MAX_LENGTH]; //@< special data filename
78static char CT_geom_string[256]; //@< Contains geometry ids of CTs
79static int CT_number = 1; //@< Number of CT
80static char **QE_filename; //@< name of the qe file
81static char NSB_directory[PATH_MAX_LENGTH]; //@< database for NSB
82static char NSB_outer_directory[PATH_MAX_LENGTH]; //@< database for NSB
83static int Starfield_rotate = FALSE; //@< switch on starfield rotation
84static int ElecNoise = TRUE; //@< Will we add ElecNoise?
85static float FADC_pedestal = 10.0; //@< Value for FADC Pedestal
86static float FADC_Noise_inner = 2.0; //@< Value for FADC ElecNoise
87static float FADC_Noise_outer = 2.0; //@< Value for FADC ElecNoise
88static float Digital_Noise = 1.0; //@< Value for FADC digital Noise
89static float Trig_Noise = 0.3; //@< Factor for Trigger ElecNoise
90static int simulateNSB = TRUE; //@< Will we simulate NSB?
91static float meanNSB; //@< NSB mean value (per pixel)
92static int nphe2NSB=0; //@< Number of phe from shower to do NSB simulation
93static float **qThreshold; //@< Threshold values
94static int Individual_Thres = FALSE;
95static float RiseDisc = -1.0;
96static float SecureDisc = 7.0;
97static long int Seeds[2]={69184,10406};
98static int *Skip;
99static int nSkip=0;
100static int Data_From_STDIN = FALSE;
101static int Write_All_Images = FALSE;
102static int Write_McEvt = TRUE;
103static int Write_McTrig = FALSE;
104static int Write_McFadc = FALSE;
105static int Write_RawEvt = TRUE;
106static int Select_Energy = TRUE;
107static float Select_Energy_le = 0.0; //@< GeV
108static float Select_Energy_ue = 100000.0; //@< GeV
109static int Trigger_Scan = FALSE;
110static int FADC_Scan = FALSE;
111static int Trigger_Loop = FALSE;
112static float Trigger_gate_length = 3.0;
113static float Trigger_over_time = 0.25;
114static float Trigger_response_ampl = 1.0;
115static float Trigger_response_fwhm = 2.0;
116static float Trigger_threshold[MAX_NUMBER_OF_CTS];
117static int Trigger_multiplicity[MAX_NUMBER_OF_CTS];
118static int Trigger_topology[MAX_NUMBER_OF_CTS];
119static float Trigger_loop_lthres = 3.0;
120static float Trigger_loop_uthres = 10.0;
121static float Trigger_loop_sthres = 1.0;
122static int Trigger_loop_lmult = 2;
123static int Trigger_loop_umult = 10;
124static int Trigger_loop_ltop = 0;
125static int Trigger_loop_utop = 2;
126static int FADC_shape = 0;
127static float FADC_response_ampl = MFADC_RESPONSE_INTEGRAL;
128static float FADC_response_fwhm = MFADC_RESPONSE_FWHM;
129static int FADC_shape_out = 0;
130static float FADC_resp_ampl_out = MFADC_RESPONSE_INTEGRAL;
131static float FADC_resp_fwhm_out = MFADC_RESPONSE_FWHM;
132static float High_to_Low = 10.0; //@< Low gain channel respct to High
133
134static float sigma_x_spot = 0.; // Sigma in x and y (cm) for additional
135static float sigma_y_spot = 0.; // gaussian spread of the mirror spot.
136
137static float misp_x = 0.; // Mispointing in x
138static float misp_y = 0.; // Mispointing in y
139
140static float trig_delay = 25.; // Delay in ns between beginning of FADC
141 // time window and the trigger instant.
142
143static float CTcoor[MAX_NUMBER_OF_CTS][3];
144
145static float m_fraction[MAX_NUMBER_OF_CTS];
146
147// Coordinates of CT locations, in centimeters, in the Corsika system.
148
149//!@}
150
151//!@subsection The function |readparam()|.
152
153//!-----------------------------------------------------------
154// @name creadparam
155//
156// @desc read parameters from the stdin / parameters file
157//
158// @var *filename Name of the parameters file (NULL->STDIN)
159//
160// @date Mon Sep 14 13:27:56 MET DST 1998
161//------------------------------------------------------------
162// @function
163
164//!@{
165void
166readparam(char * filename)
167{
168 char sign[] = GLUE_postp( PROGRAM, VERSION ); //@< initialize sign
169 char line[LINE_MAX_LENGTH]; //@< line to get from the stdin
170 char token[ITEM_MAX_LENGTH]; //@< a single token
171 int i, j, k; //@< dummy counters
172 float aux, aux1, aux2; //@< auxiliar variable
173 int aux3, aux4; //@< auxiliar variable
174 ifstream ifile;
175 char filename_tmp[PATH_MAX_LENGTH];
176
177
178 memset((char*)CT_geom_string, 0, sizeof(CT_geom_string));
179
180 Input_filename = new char *[MAX_NUMBER_OF_CTS];
181 QE_filename = new char *[MAX_NUMBER_OF_CTS];
182 qThreshold = new float *[MAX_NUMBER_OF_CTS];
183
184 for (int i = 0; i < MAX_NUMBER_OF_CTS; i++)
185 {
186 Input_filename[i] = new char[PATH_MAX_LENGTH];
187 QE_filename[i] = new char[PATH_MAX_LENGTH];
188 qThreshold[i] = new float[CAMERA_PIXELS];
189 CTcoor[i][0] = 0.; CTcoor[i][1] = 0.; CTcoor[i][2] = 0.;
190 m_fraction[i] = 1.;
191 }
192
193 // use cin or ifile (reading from STDIN or from parameters file?
194 if ( filename != NULL )
195 ifile.open( filename );
196
197 // get signature
198 if ( filename != NULL )
199 ifile.getline(line, LINE_MAX_LENGTH);
200 else
201 cin.getline(line, LINE_MAX_LENGTH);
202 line[strlen(SIGNATURE)] = '\0';
203 strcpy(sign, line);
204 cout<< '"' << sign << '"' << '\n';
205 if (strcmp(sign, SIGNATURE) != 0) {
206 cerr << "ERROR: Signature of parameters file is not correct\n";
207 cerr << '"' << sign << '"' << '\n';
208 cerr << "should be: " << SIGNATURE << '\n';
209 exit(1);
210 }
211
212 // loop till the "end" directive is reached
213 int is_end = FALSE;
214 while (! is_end) {
215
216 // get line from file or stdin
217 if ( filename != NULL )
218 ifile.getline(line, LINE_MAX_LENGTH);
219 else
220 cin.getline(line, LINE_MAX_LENGTH);
221
222 // skip comments (start with '#')
223 if (line[0] == '#')
224 continue;
225
226 // show user comments (start with '>')
227 if (line[0] == '>') {
228 cout << line << endl << flush;
229 continue;
230 }
231
232 // look for each item at the beginning of the line
233 for (i=0; i<=end_file; i++)
234 if (strstr(line, ITEM_NAMES[i]) == line)
235 break;
236
237 // if it is not a valid line, just ignore it
238 if (i == end_file+1) {
239 cerr << "Skipping unknown token in [" << line << "]\n";
240 continue;
241 }
242
243 // case block for each directive
244 switch ( i ) {
245
246 case input_file: //@< name of the input file
247
248 // get the name of the input_file from the line
249 sscanf(line, "%s %i %s", token,&k, filename_tmp);
250 if(k>99 || k<0){
251 printf("ERROR : The input_file command in input card is faulty. \n\t Most likely the control index for CT is missing.\n");
252 exit(1);
253 }
254 strcpy(&Input_filename[k][0],&filename_tmp[0]);
255 break;
256
257 case starfield_file: //@< name of the output file
258
259 // get the name of the output_file from the line
260 sscanf(line, "%s %s", token, Starfield_filename);
261
262 break;
263
264 case starfield_center: //@< name of the output file
265
266 // get the name of the output_file from the line
267 sscanf(line, "%s %i %i %i %i %i %i", token, &Starfield_center[0], &Starfield_center[1], &Starfield_center[2], &Starfield_center[3], &Starfield_center[4], &Starfield_center[5]);
268
269 break;
270
271 case data_file: //@< name of the data file
272
273 // get the name of the data_file from the line
274 sscanf(line, "%s %s", token, Data_filename);
275
276 break;
277
278 case root_file: //@< name of the ROOT file
279
280 // get the name of the data_file from the line
281 sscanf(line, "%s %s", token, ROOT_filename);
282 cout << '[' << ROOT_filename << ']' << endl << flush;
283
284 break;
285
286 case ct_num: //@< number of telescopes
287
288 // get the name of the ct_file from the line
289 sscanf(line, "%s %i", token, &CT_number);
290
291 break;
292
293 case ct_geom: //@< name of the telescope file
294
295 // get the name of the ct_file from the line
296 sscanf(line, "%s %s", token, CT_geom_string);
297 if ( strlen(CT_geom_string) > MAX_NUMBER_OF_CTS )
298 {
299 printf("\nError: ct_geom option read from input card wrong:\n");
300 printf("Number of digits (%d) is larger than maximum number\n",strlen(CT_geom_string) );
301 printf("of allowed telescopes (%d). Exiting.\n\n", MAX_NUMBER_OF_CTS);
302 exit(1);
303 }
304
305 break;
306
307 case qe_file: //@< name of the telescope file
308
309 // get the name of the ct_file from the line
310 sscanf(line, "%s %i %s", token, &k, filename_tmp);
311 strcpy(&QE_filename[k][0],&filename_tmp[0]);
312
313 break;
314
315 case elec_noise_off: //@< add ElecNoise?
316
317 // we will not add electronic noise for FADC and Trigger channels.
318 ElecNoise = FALSE;
319 FADC_Noise_inner = 0.0;
320 FADC_Noise_outer = 0.0;
321 Trig_Noise =0.0;
322
323 break;
324
325 case fadc_pedestal: //@< FADC pedestal
326
327 // value for FADC Pedestal
328 sscanf(line, "%s %f", token, &FADC_pedestal);
329
330 //
331 // A. Moralejo:
332 // Require integer mean pedestal. Although it seems a silly
333 // restriction, this saves lots of trouble (due to rounding
334 // happening in the FADC), particularly when running the
335 // simulation with no noise (NSB or electronic):
336 //
337
338 if (fmod(FADC_pedestal, 1.) > 1.e-4)
339 {
340 printf("ERROR : requested average FADC pedestal (%f) is not integer. Please use an integer value.\n", FADC_pedestal);
341 exit(1);
342 }
343
344 break;
345
346 case high_to_low: //@< High to Low gain ratio
347
348 // Value for the Low Gain channel respect to the High gain
349 sscanf(line, "%s %f", token, &High_to_Low);
350
351 break;
352
353 case fadc_noise: //@< FADC ElecNoise
354
355 // value for FADC Elec Noise
356 sscanf(line, "%s %f %f %f", token,
357 &FADC_Noise_inner, &FADC_Noise_outer,
358 &Digital_Noise);
359
360 ElecNoise = TRUE;
361
362 break;
363
364 case trig_noise: //@< add ElecNoise?
365
366 // factor for Trigger Elec Noise
367 sscanf(line, "%s %f", token, &Trig_Noise);
368 ElecNoise = TRUE;
369
370 break;
371
372 case sfr_on: //@< simulate starfield rotation?
373
374 // we will simulate Starfield rotation
375 Starfield_rotate = TRUE;
376
377 break;
378
379
380 case nsb_on: //@< simulate NSB?
381
382 // we will simulate NSB
383 simulateNSB = TRUE;
384
385 break;
386
387 case nsb_off: //@< simulate NSB?
388
389 // we will NOT simulate NSB
390 simulateNSB = FALSE;
391
392 break;
393
394 case nsb_mean: //@< value of <NSB> per pixel
395
396 // get value of <NSB> (in photons)
397 sscanf(line, "%s %f %d", token, &meanNSB, &nphe2NSB);
398
399 break;
400
401 case nsb_directory: //@< name of the output file
402
403 // get the name of the NSB diretory for inner pixels
404 sscanf(line, "%s %s", token, NSB_directory);
405
406 break;
407
408 case nsb_dir_outer: //@< name of the output file
409
410 // get the name of the NSB diretory for outer pixels
411 sscanf(line, "%s %s", token, NSB_outer_directory);
412
413 break;
414
415 case pixel_thres: //@< value of threshold for trigger (q0)
416
417 // get value of threshold (in ph.e.)
418 sscanf(line, "%s %i %f", token,&k, &aux);
419 if(k>99 || k<0){
420 printf("ERROR : The input_file command in input card is faulty. \n\t Most likely the control index for CT is missing.\n");
421 exit(1);
422 }
423 qThreshold[0][k]=aux;
424 Individual_Thres = TRUE;
425
426 break;
427
428 case secure_disc: //@< value of secure threshold
429
430 // get value of secure threshold (in ph.e.)
431 sscanf(line, "%s %f %f", token,&aux, &aux2);
432 RiseDisc=aux;
433 SecureDisc=aux2;
434
435 break;
436
437 case seeds: //@< values of seeds for random numbers
438
439 // get seeds
440 sscanf(line, "%s %ld %ld", token, &Seeds[0], &Seeds[1]);
441
442 break;
443
444 case skip: //@< skip pathological showers
445
446 // get showers to skip
447 cin >> nSkip;
448 Skip = new int[nSkip];
449 for (j=0; j<nSkip; ++j) {
450 cin >> Skip[j];
451 cout << Skip[j] << endl << flush;
452 }
453
454 break;
455
456 case data_from_stdin: //@< to read data from stdin
457
458 // change boolean value
459 Data_From_STDIN = TRUE;
460
461 break;
462
463 case write_all_events: //@< to write ALL the images
464
465 // change boolean value
466 Write_All_Images = TRUE;
467
468 break;
469
470 case nowrite_McEvt: //@< do not write the McEvt info
471
472 // change boolean value
473 Write_McEvt = FALSE;
474
475 break;
476
477 case write_McTrig: //@< to write the McTrig info
478
479 // change boolean value
480 Write_McTrig = TRUE;
481
482 break;
483
484 case write_McFadc: //@< to write the McFadc info
485
486 // change boolean value
487 Write_McFadc = TRUE;
488
489 break;
490
491 case nowrite_RawEvt: //@< to write the McFadc info
492
493 // change boolean value
494 Write_RawEvt = FALSE;
495
496 break;
497
498 case select_energy: //@< value of islands_cut (i0)
499
500 // get energy range
501 sscanf(line, "%s %f %f", token, &Select_Energy_le, &Select_Energy_ue);
502 Select_Energy = TRUE;
503
504 break;
505
506 case fadc_scan:
507
508 // change boolean value
509 FADC_Scan = TRUE;
510
511 break;
512
513 case fadc_prop:
514
515 // Get parameters for the fadc response for one phe
516 sscanf(line, "%s %i %f %f", token, &FADC_shape, &FADC_response_ampl,&FADC_response_fwhm);
517
518 break;
519
520 case fadc_outer:
521
522 // Get parameters for the fadc response for one phe
523 sscanf(line, "%s %i %f %f", token, &FADC_shape_out, &FADC_resp_ampl_out,&FADC_resp_fwhm_out);
524
525 break;
526
527 case trigger_scan:
528
529 // change boolean value
530 Trigger_Scan = TRUE;
531
532 break;
533 case trigger_prop:
534
535 // Get parameters for the diskriminator and the electronic
536 // response for one phe
537 sscanf(line, "%s %f %f %f %f", token, &Trigger_gate_length,&Trigger_over_time, &Trigger_response_ampl,&Trigger_response_fwhm);
538
539 break;
540
541 case trigger_loop:
542
543 // Get loop's limits
544 sscanf(line, "%s %f %f %f %d %d %d %d", token, &Trigger_loop_lthres, &Trigger_loop_uthres, &Trigger_loop_sthres, &Trigger_loop_lmult, &Trigger_loop_umult, &Trigger_loop_ltop, &Trigger_loop_utop );
545
546 // Set qThreshold to a global value
547 for(k=0;k<CAMERA_PIXELS;k++){
548 qThreshold[0][k]=Trigger_loop_lthres;
549 }
550
551 // change boolean value
552 Trigger_Loop = TRUE;
553 Write_RawEvt = FALSE;
554 Individual_Thres = FALSE;
555
556 break;
557
558 case trigger_single:
559
560 // Get trigger conditions
561 sscanf(line, "%s %d %f %d %d", token, &j, &aux, &aux3, &aux4);
562 if(j>99 || j<0){
563 printf("ERROR : The input_file command in input card is faulty. \n\t Most likely the control index for CT is missing.\n");
564 exit(1);
565 }
566 Trigger_threshold[j]=aux;
567 Trigger_multiplicity[j]=aux3;
568 Trigger_topology[j]=aux4;
569
570 // Set qThreshold to a global value
571 for(k=0;k<CAMERA_PIXELS;k++){
572 qThreshold[j][k]=Trigger_threshold[j];
573 }
574
575 // change boolean value
576 Trigger_Loop = FALSE;
577 Write_RawEvt = TRUE;
578 Individual_Thres = FALSE;
579
580 break;
581
582 case Trigger_Loop_Output_Only_Specialists:
583
584 // get the name of the data_file from the line
585 sscanf(line, "%s %s", token, Loop_filename);
586 cout << '[' << Loop_filename << ']' << endl << flush;
587
588 // change boolean value
589 Write_RawEvt = TRUE;
590
591 break;
592
593 case trigger_delay:
594
595 sscanf(line, "%s %f", token, &trig_delay);
596 break;
597
598
599 case sigma_xy_cm_spot:
600
601 sscanf(line, "%s %f", token, &sigma_x_spot);
602 sigma_y_spot=sigma_x_spot;
603 break;
604
605 case sigma_x_cm_spot:
606
607 sscanf(line, "%s %f", token, &sigma_x_spot);
608 break;
609
610 case sigma_y_cm_spot:
611
612 sscanf(line, "%s %f", token, &sigma_y_spot);
613 break;
614
615 case misspoint_deg:
616
617 sscanf(line, "%s %f %f", token, &misp_x, &misp_y);
618 break;
619
620 case telescope_location_cm:
621
622 if ( 5 != sscanf(line, "%s %d %f %f %f", token, &j, &aux, &aux1, &aux2) )
623 {
624 printf("\nError: wrong number of arguments for command telescope_location_cm.\n");
625 printf("Usage: telescope_location_cm ct_id x y z\n");
626 printf("Coordinates must be written in centimeters.");
627 printf("Exiting.\n\n");
628 exit(1);
629 }
630
631 if (j >= MAX_NUMBER_OF_CTS)
632 {
633 printf("\nError: coordinates were supplied for a telescope index (%d)\n", j);
634 printf("larger than allowed. Valid telescope ids range from 0 to %d. Exiting.\n\n", MAX_NUMBER_OF_CTS-1);
635 exit(1);
636 }
637 CTcoor[j][0] = aux;
638 CTcoor[j][1] = aux1;
639 CTcoor[j][2] = aux2;
640
641 break;
642
643 case mirror_fraction:
644
645 sscanf(line, "%s %d %f", token, &j, &aux);
646 m_fraction[j] = aux;
647
648 break;
649
650 case end_file: //@< end of the parameters file
651
652 // show a short message
653 is_end = TRUE;
654
655 break;
656
657
658 } // switch ( i )
659
660 } // while (! is_end)
661
662 // after the loop is finished, return to the main function
663 return;
664}
665//!@}
666
667
668//!-----------------------------------------------------------
669// @name get_input_filename
670//
671// @desc get name of the input file
672//
673// @return Name of the Input file
674//
675// @date Mon Sep 14 13:27:56 MET DST 1998
676//------------------------------------------------------------
677// @function
678
679//!@{
680char *
681get_input_filename(int i)
682{
683 return (Input_filename[i]);
684}
685//!@}
686
687
688//!-----------------------------------------------------------
689// @name get_starfield_filename
690//
691// @desc get name of the starfield input file
692//
693// @return Name of the starfield file
694//
695// @date Tue Feb 15 16:02:18 CET 2000
696//------------------------------------------------------------
697// @function
698
699//!@{
700char *
701get_starfield_filename(void)
702{
703 return (Starfield_filename);
704}
705//!@}
706
707
708//!-----------------------------------------------------------
709// @name get_starfield_center
710//
711// @desc get center of the starfield FOV
712//
713// @return Central co-ordinates in RA and DEC for the centre of FOV
714//
715// @date Tue Feb 15 16:02:18 CET 2000
716//------------------------------------------------------------
717// @function
718
719//!@{
720void get_starfield_center(int *rh,int *rm,int *rs,int *dd,int *dm,int *ds)
721{
722 *rh=Starfield_center[0];
723 *rm=Starfield_center[1];
724 *rs=Starfield_center[2];
725 *dd=Starfield_center[3];
726 *dm=Starfield_center[4];
727 *ds=Starfield_center[5];
728}
729//!-----------------------------------------------------------
730// @name get_starfield_rotate
731//
732// @Starfield_rotate
733//
734// @return
735//
736//------------------------------------------------------------
737// @function
738
739//!@{
740int
741get_starfield_rotate(void)
742{
743 return(Starfield_rotate);
744}
745
746
747//!@}
748//!-----------------------------------------------------------
749// @name get_data_filename
750//
751// @desc get name of the data file
752//
753// @return Name of the Data file
754//
755// @date Mon Sep 14 13:27:56 MET DST 1998
756//------------------------------------------------------------
757// @function
758
759//!@{
760char *
761get_data_filename(void)
762{
763 return (Data_filename);
764}
765//!@}
766
767
768//!-----------------------------------------------------------
769// @name get_root_filename
770//
771// @desc get name of the ROOT file
772//
773// @return Name of the ROOT file
774//
775// @date Mon Sep 14 13:27:56 MET DST 1998
776//------------------------------------------------------------
777// @function
778
779//!@{
780char *
781get_root_filename(void)
782{
783 return (ROOT_filename);
784}
785//!@}
786//!-----------------------------------------------------------
787// @name get_loop_filename
788//
789// @desc get name of the special ROOT file
790//
791// @return Name of the special ROOT file
792//
793// @date Fri Jun 23 17:34:19 CEST 2000
794//------------------------------------------------------------
795// @function
796
797//!@{
798
799char *
800get_loop_filename(void)
801{
802 return (Loop_filename);
803}
804//!@}
805
806//!-----------------------------------------------------------
807// @name get_ct_number
808//
809// @desc get number of CT
810//
811// @return number of CT
812//
813// @date Tue Jul 29 01:48:26 CEST 2003
814//------------------------------------------------------------
815// @function
816
817//!@{
818int
819get_ct_number(void)
820{
821 return (CT_number);
822}
823//!@}
824
825//!-----------------------------------------------------------
826// @name get_ct_geometry
827//
828// @desc get geometry of CT
829//
830// @return geometry of CT
831//
832// @date Mon Sep 14 13:27:56 MET DST 1998
833//------------------------------------------------------------
834// @function
835
836//!@{
837int
838get_ct_geometry(int ict)
839{
840 char dummy[2];
841 strncpy(dummy, &(CT_geom_string[ict]), 1);
842 dummy[1] = '\0';
843
844 return ((int)atoi(dummy));
845}
846//!@}
847
848//!-----------------------------------------------------------
849// @name get_qe_filename
850//
851// @desc get name of QE definition file
852//
853// @return Name of the QE definition file
854//
855// @date Thu Jul 10 14:10:13 CEST 2003
856//------------------------------------------------------------
857// @function
858
859//!@{
860char *
861get_qe_filename(int ict)
862{
863 return (QE_filename[ict]);
864}
865//!@}
866
867//!-----------------------------------------------------------
868// @name get_nsb_directory
869//
870// @desc get name of the directory where the database for NSB is
871//
872// @return Name of the NSB directory
873//
874// @date Tue Jan 30 12:07:56 MET 2001
875//------------------------------------------------------------
876// @function
877
878//!@{
879char *
880get_nsb_directory(void)
881{
882 return (NSB_directory);
883}
884//!@}
885
886
887
888//!-----------------------------------------------------------
889// @name get_nsb_directory_outer
890//
891// @desc get name of the directory where the database for NSB is
892//
893// @return Name of the NSB directory for outer pixels
894//
895// @date Thu Jul 10 14:10:13 CEST 2003
896//------------------------------------------------------------
897// @function
898
899//!@{
900char *
901get_nsb_directory_outer(void)
902{
903 return (NSB_outer_directory);
904}
905//!@}
906
907
908
909//!-----------------------------------------------------------
910// @name add_elec_noise
911//
912// @desc are we going to add the ElecNoise?
913//
914// @date Mon Jan 14 19:27:56 MET DST 2002
915//------------------------------------------------------------
916// @function
917
918//!@{
919int
920add_elec_noise(float *fadcinner, float*fadcouter, float *digi, float *trig)
921{
922 *fadcinner = FADC_Noise_inner;
923 *fadcouter = FADC_Noise_outer;
924
925 *digi = Digital_Noise;
926 *trig = Trig_Noise;
927
928 return ( ElecNoise);
929}
930//!@}
931
932//!-----------------------------------------------------------
933// @name get_nsb
934//
935// @desc are we going to simulate NSB ?
936//
937// @var *n Mean value for the NSB (ph.e./pixel)
938// @return TRUE: we'll simulate NSB; FALSE: we won't
939//
940// @date Mon Sep 14 13:27:56 MET DST 1998
941//------------------------------------------------------------
942// @function
943
944//!@{
945int
946get_nsb(float *n, int *m)
947{
948 *n = meanNSB;
949 *m = nphe2NSB;
950 return ( simulateNSB );
951}
952//!@}
953
954
955//!-----------------------------------------------------------
956// @name get_threshold
957//
958// @desc get threshold value
959//
960// @return Value of the threshold q$_0$
961//
962// @date Mon Sep 14 13:27:56 MET DST 1998
963//------------------------------------------------------------
964// @function
965
966//!@{
967void
968get_threshold(float *t)
969{
970 for(int i=0;i<CAMERA_PIXELS;i++)
971 t[i]=qThreshold[0][i];
972}
973//!@}
974
975//!-----------------------------------------------------------
976// @name get_secure_threhold
977//
978// @desc get values for secure threshold.
979//
980// @return AC (ac)value above which discriminator threshold rised to disc
981//
982// @date Wed Jul 18 16:29:43 CEST 2001
983//------------------------------------------------------------
984// @function
985
986//!@{
987void
988get_secure_threhold(float *ac, float *disc)
989{
990 *ac=RiseDisc;
991 *disc=SecureDisc;
992}
993//!@}
994
995//!-----------------------------------------------------------
996// @name get_indi_thres_pixel
997//
998// @desc get boolean information about global (FALSE) or
999// @desc individual (TRUE) pixel trigger threshold
1000//
1001// @return Value for the Individual_Thres
1002//
1003// @date Wed Jul 18 16:29:43 CEST 2001
1004//------------------------------------------------------------
1005// @function
1006
1007//!@{
1008int get_indi_thres_pixel(void){
1009 return Individual_Thres;
1010}
1011//!@}
1012
1013
1014//!-----------------------------------------------------------
1015// @name get_seeds
1016//
1017// @desc are we going to count the islands ?
1018//
1019// @var *n Number of the seed
1020// @return N-th random-number Seed
1021//
1022// @date Mon Sep 14 13:27:56 MET DST 1998
1023//------------------------------------------------------------
1024// @function
1025
1026//!@{
1027long int
1028get_seeds(int n)
1029{
1030 return ( Seeds[n] );
1031}
1032//!@}
1033
1034
1035//!-----------------------------------------------------------
1036// @name get_skip_showers
1037//
1038// @desc get list of showers to skip
1039//
1040// @var *s1 Pointer to a vector of number of showers
1041//
1042// @date Mon Sep 14 13:27:56 MET DST 1998
1043//------------------------------------------------------------
1044// @function
1045
1046//!@{
1047void
1048get_skip_showers( int *s )
1049{
1050 int i;
1051 for (i=0; i<nSkip; ++i)
1052 s[i] = Skip[i];
1053}
1054//!@}
1055
1056
1057//!-----------------------------------------------------------
1058// @name get_nskip_showers
1059//
1060// @desc get number of showers to skip
1061//
1062// @return Number of showers to be skipped
1063//
1064// @date Mon Sep 14 13:27:56 MET DST 1998
1065//------------------------------------------------------------
1066// @function
1067
1068//!@{
1069int
1070get_nskip_showers( void )
1071{
1072 return( nSkip );
1073}
1074//!@}
1075
1076
1077//!-----------------------------------------------------------
1078// @name get_data_from_stdin
1079//
1080// @desc get whether we will read the data from the STDIN
1081//
1082// @return TRUE: we'll read data from STDIN; FALSE: we won't
1083//
1084// @date Wed Nov 25 13:21:00 MET 1998
1085//------------------------------------------------------------
1086// @function
1087
1088//!@{
1089int
1090get_data_from_stdin(void)
1091{
1092 return ( Data_From_STDIN );
1093}
1094//!@}
1095
1096
1097//!-----------------------------------------------------------
1098// @name write_all_events
1099//
1100// @desc write all images to .phe, even those without trigger
1101//
1102// @return TRUE: we'll write everything; FALSE: we won't
1103//
1104// @date Wed Nov 25 13:21:00 MET 1998
1105//------------------------------------------------------------
1106// @function
1107
1108//!@{
1109int
1110get_write_all_events(void)
1111{
1112 return ( Write_All_Images );
1113}
1114//!@}
1115
1116//!-----------------------------------------------------------
1117// @name write_McEvt
1118//
1119// @desc write the McEvt class for each event to the .root file
1120//
1121// @return TRUE: we'll write it; FALSE: we won't
1122//
1123//------------------------------------------------------------
1124// @function
1125
1126//!@{
1127int
1128get_write_McEvt(void)
1129{
1130 return ( Write_McEvt );
1131}
1132//!@}
1133
1134//!-----------------------------------------------------------
1135// @name write_McTrig
1136//
1137// @desc write the McTrig class for each event to the .root file
1138//
1139// @return TRUE: we'll write it; FALSE: we won't
1140//
1141//------------------------------------------------------------
1142// @function
1143
1144//!@{
1145int
1146get_write_McTrig(void)
1147{
1148 return ( Write_McTrig );
1149}
1150//!@}
1151
1152//!-----------------------------------------------------------
1153// @name write_McFadc
1154//
1155// @desc write the McFadc class for each event to the .root file
1156//
1157// @return TRUE: we'll write it; FALSE: we won't
1158//
1159//------------------------------------------------------------
1160// @function
1161
1162//!@{
1163int
1164get_write_McFadc(void)
1165{
1166 return ( Write_McFadc );
1167}
1168//!@}
1169
1170//!-----------------------------------------------------------
1171// @name write_RawEvt
1172//
1173// @desc write the RawEvt class for each event to the .root file
1174//
1175// @return TRUE: we'll write it; FALSE: we won't
1176//
1177//------------------------------------------------------------
1178// @function
1179
1180//!@{
1181int
1182get_write_RawEvt(void)
1183{
1184 return ( Write_RawEvt );
1185}
1186//!@}
1187
1188//!-----------------------------------------------------------
1189// @name get_select_energy
1190//
1191// @desc return energy range allowed for showers from .phe file
1192//
1193// @var *le Lower limit in the allowed energy range
1194// @var *ue Lower limit in the allowed energy range
1195// @return TRUE: we make selection on the energy; FALSE: we don't
1196//
1197// @date Wed Nov 25 13:21:00 MET 1998
1198//------------------------------------------------------------
1199// @function
1200
1201//!@{
1202int
1203get_select_energy(float *le, float *ue)
1204{
1205 *le = Select_Energy_le;
1206 *ue = Select_Energy_ue;
1207 return ( Select_Energy );
1208}
1209//!@}
1210
1211//!-----------------------------------------------------------
1212// @name FADC_Scan
1213//
1214// @desc show the FADC signal for each event in the screen
1215//
1216// @return TRUE: we'll show it; FALSE: we won't
1217//
1218//------------------------------------------------------------
1219// @function
1220
1221//!@{
1222int
1223get_FADC_Scan(void)
1224{
1225 return ( FADC_Scan );
1226}
1227//!@}
1228
1229//!-----------------------------------------------------------
1230// @name Trigger_Scan
1231//
1232// @desc show the Trigger signal for each event in the screen
1233//
1234// @return TRUE: we'll show it; FALSE: we won't
1235//
1236//------------------------------------------------------------
1237// @function
1238
1239//!@{
1240int
1241get_Trigger_Scan(void)
1242{
1243 return ( Trigger_Scan );
1244}
1245//!@}
1246
1247//!-----------------------------------------------------------
1248// @name Fadc_Propeties
1249//
1250// @desc fix properties of the FADC response
1251//
1252//------------------------------------------------------------
1253// @function
1254
1255//!@{
1256void
1257get_FADC_properties(int *shape,float *ra, float *rf,
1258 int *shapeo, float *rao, float *rfo)
1259{
1260 *shape=FADC_shape;
1261 *ra=FADC_response_ampl;
1262 *rf=FADC_response_fwhm;
1263 *shapeo=FADC_shape_out;
1264 *rao=FADC_resp_ampl_out;
1265 *rfo=FADC_resp_fwhm_out;
1266
1267}
1268//!@}
1269
1270//!-----------------------------------------------------------
1271// @name Trigger_Propeties
1272//
1273// @desc fix properties of the diskriminator and amplifier for Trigger
1274//
1275//------------------------------------------------------------
1276// @function
1277
1278//!@{
1279void
1280get_Trigger_properties(float *gl, float *ot, float *ra, float *rf)
1281{
1282 *gl=Trigger_gate_length;
1283 *ot=Trigger_over_time;
1284 *ra=Trigger_response_ampl;
1285 *rf=Trigger_response_fwhm;
1286
1287}
1288//!@}
1289
1290//!-----------------------------------------------------------
1291// @name Trigger_Loop
1292//
1293// @desc make a loop over Trigger conditions
1294//
1295// @return TRUE: we'll make it; FALSE: we won't
1296//
1297//------------------------------------------------------------
1298// @function
1299
1300//!@{
1301int
1302get_Trigger_Loop(float *lt, float *ut, float *st, int *lm, int *um, int *lg, int *ug)
1303{
1304 *lt=Trigger_loop_lthres;
1305 *ut=Trigger_loop_uthres;
1306 *st=Trigger_loop_sthres;
1307 *lm=Trigger_loop_lmult;
1308 *um=Trigger_loop_umult;
1309 *lg=Trigger_loop_ltop;
1310 *ug=Trigger_loop_utop;
1311 return ( Trigger_Loop );
1312}
1313//!@}
1314
1315//!-----------------------------------------------------------
1316// @name Trigger_Single
1317//
1318// @desc fix Trigger conditions
1319//
1320//------------------------------------------------------------
1321// @function
1322
1323//!@{
1324void
1325get_Trigger_Single(float **t, int *m, int *g)
1326{
1327 for(int j=0;j<MAX_NUMBER_OF_CTS;j++){
1328 for(int i=0;i<CAMERA_PIXELS;i++)
1329 t[j][i]=qThreshold[j][i];
1330 m[j]=Trigger_multiplicity[j];
1331 g[j]=Trigger_topology[j];
1332 }
1333}
1334//!@}
1335
1336//!-----------------------------------------------------------
1337// @name get_FADC_pedesta
1338//
1339// @desc get the value for the FADC pedestals
1340//
1341//------------------------------------------------------------
1342// @function
1343
1344//!@{
1345
1346
1347float get_FADC_pedestal(void){
1348
1349 return FADC_pedestal;
1350
1351}
1352
1353//!@}
1354//!-----------------------------------------------------------
1355// @name get_High_to_Low
1356//
1357// @desc get the conversion factor between high and low gain
1358//
1359//------------------------------------------------------------
1360// @function
1361
1362//!@{
1363
1364
1365float get_High_to_Low(void){
1366
1367 return High_to_Low;
1368
1369}
1370
1371int get_misspointing(float *x, float *y){
1372
1373 *x=misp_x;
1374 *y=misp_y;
1375
1376 if (misp_x == 0.0 && misp_y==0.0)
1377 return 0;
1378 else
1379 return 1;
1380
1381}
1382
1383float get_sigma_xy_cm_spot(float *x, float *y){
1384
1385 *x=sigma_x_spot;
1386 *y=sigma_y_spot;
1387
1388 if (sigma_x_spot > 0.0 || sigma_y_spot >0.0)
1389 return 1.0;
1390 else
1391 return -1.0;
1392
1393}
1394
1395float get_trig_delay(void){
1396
1397 return trig_delay;
1398
1399}
1400
1401float get_telescope_location_cm(int j, int icoor){
1402
1403 return CTcoor[j][icoor];
1404
1405}
1406
1407float get_mirror_fraction(int j){
1408 return m_fraction[j];
1409}
1410
1411
1412
1413//!@}
1414//=------------------------------------------------------------
1415//!@subsection Log of this file.
1416
1417//!@{
1418//
1419// $Log: not supported by cvs2svn $
1420//
1421// Revision 1.27 2004/05/12 A. Moralejo
1422//
1423// Changed fadc_noise command: now the two first numbers are respectively
1424// the analogic electronic noise for inner (small) and outer (big) pixels
1425// respectively. Last number is still the FADC digital noise which affects
1426// equallly inner and outer pixels (as well as high and low gain).
1427//
1428// Revision 1.26 2004/01/30 09:58:39 blanch
1429// [Changes done mainly by A. Moralejo]
1430//
1431// Two new commands of the input card have been added:
1432//
1433// sigma_xy_cm_spot: to enlarge the point spread function.
1434// trigger_delay: to center the FADC signal
1435//
1436// There is also a check that the Pedestal is an integer, otherwise it
1437// becames complex to get a reasonable rms for events without electronic noise.
1438//
1439// Revision 1.25 2003/10/26 19:45:38 blanch
1440// The write_all_data input card command has been removed.
1441//
1442// Revision 1.24 2003/10/17 19:40:24 blanch
1443// The gain ratio between the high and low FADC gain is controlled from the
1444// input card.
1445//
1446// Revision 1.23 2003/09/23 17:38:48 blanch
1447// ana_pixels command has been removed.
1448//
1449// Revision 1.22 2003/09/23 16:52:07 blanch
1450// We do not read ct_file anymore.
1451//
1452// Revision 1.21 2003/09/15 10:17:09 blanch
1453// Some modifications in the input card has been done for the multitelescope
1454// configuration.
1455//
1456// Revision 1.20 2003/07/17 18:04:53 blanch
1457// Some new parameters to be read have been introduced
1458//
1459// - FADC pedestals
1460// - Response outer FADC
1461// - Qe file
1462//
1463// The obsolete ones have been removed.
1464//
1465// Revision 1.19 2003/02/12 13:47:32 blanch
1466// *** empty log message ***
1467//
1468// Revision 1.18 2003/01/14 13:37:47 blanch
1469// Option to set a dc value to rise the discriminator threshold has been added.
1470//
1471// Revision 1.17 2002/07/16 16:20:41 blanch
1472// Modifications done for the camera.cxx version, where a first implementation
1473// of the Star Field Rotation has been introduced.
1474//
1475// Revision 1.16 2002/03/15 15:17:18 blanch
1476// Several modification needed to simulate the actual trigger zone.
1477//
1478// Revision 1.15 2002/03/04 17:15:51 blanch
1479// An item, which allows to switch off the storage of the RawEvt, has been
1480// introduced. It is called nowrite_RawEvt. To avoid confusion the item
1481// write_all_images has been moved to write_all_events.
1482//
1483// Revision 1.14 2002/02/28 15:07:23 blanch
1484// Small changes have been done to introduce thes step variable for the
1485// discriminator threshold in the trigger loop mode.
1486//
1487// Revision 1.13 2002/01/18 17:43:08 blanch
1488// Three new commands have been added: fadc_noise, trig_noise and
1489// elec_noise_off.
1490// A small bug in the SIGNATURE check has been solved.
1491//
1492// Revision 1.12 2001/11/13 17:05:14 blanch
1493// New input items int the input card parameter list have been included to fill
1494// the MMcRunHeader.
1495// There has been also some change to remove warnings in the compilation.
1496//
1497// Revision 1.11 2001/07/25 11:38:00 magicsol
1498// Minnor changes
1499//
1500// Revision 1.10 2001/07/19 09:28:30 blanch
1501// A new command, which allows to set individual trigger threshod for each pixel,
1502// has been added.
1503//
1504// Revision 1.9 2001/03/05 10:43:18 blanch
1505// New input commands have been added:
1506//
1507// - write_McFadc: to write the FADC simulation information.
1508// - fadc_prop: gives the shape of the single phe response of the FADC
1509//
1510// And new value has been added in the mean_NSB command that tells how many phes
1511// have to come from the shower to do the NSB simulation in that shower (it speeds
1512// up the simulation).
1513//
1514// Revision 1.8 2001/02/23 10:55:43 magicsol
1515// An input commmand that talls the path for the NSB database has been added.
1516//
1517// Revision 1.7 2001/01/15 12:37:48 magicsol
1518// It has been introduced the option to read from the input card the overlaping
1519// time.
1520//
1521// Revision 1.6 2000/09/21 11:47:33 harald
1522// Oscar found some smaller errors in the calculation of the pixel shape and
1523// corrected it.
1524//
1525// Revision 1.5 2000/07/04 14:13:02 MagicSol
1526// It reads from the general input card the parameters for the
1527// trigger analysi.
1528//
1529// Revision 1.4 2000/05/11 14:22:33 blanch
1530// New input card option has been introduced:
1531// trigger_loop lt ut lm um lg ug
1532// It forces the camera program to study several condition trigger implementations. Integers after key word fix limits of loop over thershold, multiplicity and topology.
1533//
1534// Revision 1.3 2000/03/24 18:14:05 blanch
1535// Parameters that tell as if we are going to see the diskriminator and/or FADC signal have been included.
1536//
1537// Revision 1.2 2000/02/18 17:45:43 petry
1538// This version belongs to camera.cxx 1.5.
1539// It has been put in the repository in order to be
1540// able to share the further development with others.
1541//
1542// If you need something working, wait or take an earlier one.
1543// See file README
1544//
1545// Revision 1.1.1.1 1999/11/05 11:59:34 harald
1546// This the starting point for CVS controlled further developments of the
1547// camera program. The program was originally written by Jose Carlos.
1548// But here you can find a "rootified" version to the program. This means
1549// that there is no hbook stuff in it now. Also the output of the
1550// program changed to the MagicRawDataFormat.
1551//
1552// The "rootification" was done by Dirk Petry and Harald Kornmayer.
1553//
1554// In the following you can see the README file of that version:
1555//
1556// ==================================================
1557//
1558// Fri Oct 22 1999 D.P.
1559//
1560// The MAGIC Monte Carlo System
1561//
1562// Camera Simulation Programme
1563// ---------------------------
1564//
1565// 1) Description
1566//
1567// This version is the result of the fusion of H.K.'s
1568// root_camera which is described below (section 2)
1569// and another version by D.P. which had a few additional
1570// useful features.
1571//
1572// The version compiles under Linux with ROOT 2.22 installed
1573// (variable ROOTSYS has to be set).
1574//
1575// Compile as before simply using "make" in the root_camera
1576// directory.
1577//
1578// All features of H.K.'s root_camera were retained.
1579//
1580// Additional features of this version are:
1581//
1582// a) HBOOK is no longer used and all references are removed.
1583//
1584// b) Instead of HBOOK, the user is given now the possibility of
1585// having Diagnostic data in ROOT format as a complement
1586// to the ROOT Raw data.
1587//
1588// This data is written to the file which is determined by
1589// the new input parameter "diag_file" in the camera parameter
1590// file.
1591//
1592// All source code file belonging to this part have filenames
1593// starting with "MDiag".
1594//
1595// The user can read the output file using the following commands
1596// in an interactive ROOT session:
1597//
1598// root [0] .L MDiag.so
1599// root [1] new TFile("diag.root");
1600// root [2] new TTreeViewer("T");
1601//
1602// This brings up a viewer from which all variables of the
1603// TTree can be accessed and histogrammed. This example
1604// assumes that you have named the file "diag.root", that
1605// you are using ROOT version 2.22 or later and that you have
1606// the shared object library "MDiag.so" which is produced
1607// by the Makefile along with the executable "camera".
1608//
1609// ! The contents of the so-called diag file is not yet fixed.
1610// ! At the moment it is what J.C.G. used to put into the HBOOK
1611// ! ntuple. In future versions the moments calculation can be
1612// ! removed and the parameter list be modified correspondingly.
1613//
1614// c) Now concatenated reflector files can be read. This is useful
1615// if you have run the reflector with different parameters but
1616// you want to continue the analysis with all reflector data
1617// going into ONE ROOT outputfile.
1618//
1619// The previous camera version contained a bug which made reading
1620// of two or more concatenated reflector files impossible.
1621//
1622// d) The reflector output format was changed. It is now version
1623// 0.4 .
1624// The change solely consists in a shortening of the flag
1625// definition in the file
1626//
1627// include-MC/MCCphoton.hxx
1628//
1629// ! IF YOU WANT TO READ REFLECTOR FORMAT 0.3, you can easily
1630// ! do so by recompiling camera with the previous version of
1631// ! include-MC/MCCphoton.hxx.
1632//
1633// The change was necessary for saving space and better
1634// debugging. From now on, this format can be frozen.
1635//
1636// ! For producing reflector output in the new format, you
1637// ! of course have to recompile your reflector with the
1638// ! new include-MC/MCCphoton.hxx .
1639//
1640// e) A first version of the pixelization with the larger
1641// outer pixels is implemented. THIS IS NOT YET FULLY
1642// TESTED, but first rough tests show that it works
1643// at least to a good approximation.
1644//
1645// The present version implements the camera outline
1646// with 18 "gap-pixels" and 595 pixels in total as
1647// shown in
1648//
1649// http://sarastro.ifae.es/internal/home/hardware/camera/numbering.ps
1650//
1651// This change involved
1652//
1653// (i) The file pixels.dat is no longer needed. Instead
1654// the coordinates are generated by the program itself
1655// (takes maybe 1 second). In the file
1656//
1657// pixel-coords.txt
1658//
1659// in the same directory as this README, you find a list
1660// of the coordinates generated by this new routine. It
1661// has the format
1662//
1663// number i j x y size-factor
1664//
1665// where i and j are J.C.G.'s so called biaxis hexagonal
1666// coordinates (for internal use) and x and y are the
1667// coordinates of the pixel centers in the standard camera
1668// coordinate system in units of centimeters. The value
1669// of "size-factor" determines the linear size of the pixel
1670// relative to the central pixels.
1671//
1672// (ii) The magic.def file has two additional parameters
1673// which give the number of central pixels and the
1674// number of gap pixels
1675//
1676// (iii) In camera.h and camera.cxx several changes were
1677// necessary, among them the introduction of several
1678// new functions
1679//
1680// The newly suggested outline with asymmetric Winston cones
1681// will be implemented in a later version.
1682//
1683// f) phe files can no longer be read since this contradicts
1684// our philosophy that the analysis should be done with other
1685// programs like e.g. EVITA and not with "camera" itself.
1686// This possibility was removed.
1687//
1688// g) ROOT is no longer invoked with an interactive interface.
1689// In this way, camera can better be run as a batch program and
1690// it uses less memory.
1691//
1692// h) small changes concerning the variable "t_chan" were necessary in
1693// order to avoid segmentation faults: The variable is used as an
1694// index and it went sometimes outside the limits when camera
1695// was reading proton data. This is because the reflector files
1696// don't contain the photons in a chronological order and also
1697// the timespread can be considerably longer that the foreseen
1698// digitisation timespan. Please see the source code of camera.cxx
1699// round about line 1090.
1700//
1701// j) several unused variables were removed, a few warning messages
1702// occur when you compile camera.cxx but these can be ignored at
1703// the moment.
1704//
1705// In general the program is of course not finished. It still needs
1706// debugging, proper trigger simulation, simulation of the asymmetric
1707// version of the outer pixels, proper NSB simulation, adaption of
1708// the diag "ntuple" contents to our need and others small improvements.
1709//
1710// In the directory rfl-files there is now a file in reflector format 0.4
1711// containing a single event produced by the starfiled adder. It has
1712// a duration of 30 ns and represents the region around the Crab Nebula.
1713// Using the enclosed input parameter file, camera should process this
1714// file without problems.
1715//
1716// 2) The README for the previous version of root_camera
1717//
1718// README for a preliminary version of the
1719// root_camera program.
1720//
1721// root_camera is based on the program "camera"of Jose Carlos
1722// Gonzalez. It was changed in the way that only the pixelisation
1723// and the distibution of the phe to the FADCs works in a
1724// first version.
1725//
1726// Using the #undef command most possibilities of the orignal
1727// program are switched of.
1728//
1729// The new parts are signed by
1730//
1731// - ROOT or __ROOT__
1732// nearly all important codelines for ROOT output are enclosed
1733// in structures like
1734// #ifdef __ROOT__
1735//
1736// code
1737//
1738// #endif __ROOT__
1739//
1740// In same case the new lines are signed by a comment with the word
1741// ROOT in it.
1742//
1743// For timing of the pulse some variable names are changed.
1744// (t0, t1, t --> t_ini, t_fin, t_1st, t_chan,...)
1745// Look also for this changes.
1746//
1747// For the new root-file is also a change in readparm-files
1748//
1749//
1750// - __DETAIL_TRIGGER__
1751//
1752// This is for the implementation of the current work on trigger
1753// studies. Because the class MTrigger is not well documented it
1754// isn´t a part of this tar file. Only a dummy File exists.
1755//
1756//
1757//
1758// With all files in the archive, the root_camera program should run.
1759//
1760// A reflector file is in the directory rfl-files
1761//
1762// ==================================================
1763//
1764// From now on, use CVS for development!!!!
1765//
1766//
1767//
1768// Revision 1.2 1999/10/22 15:01:28 petry
1769// version sent to H.K. and N.M. on Fri Oct 22 1999
1770//
1771// Revision 1.1.1.1 1999/10/21 16:35:11 petry
1772// first synthesised version
1773//
1774// Revision 1.6 1999/03/15 14:59:08 gonzalez
1775// camera-1_1
1776//
1777// Revision 1.5 1999/03/02 09:56:12 gonzalez
1778// *** empty log message ***
1779//
1780// Revision 1.4 1999/01/14 17:32:41 gonzalez
1781// Added to camera the STDIN input option (data_from_input)
1782//
1783//!@}
1784
1785//=EOF
Note: See TracBrowser for help on using the repository browser.