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

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