Index: /trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx
===================================================================
--- /trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx	(revision 2287)
+++ /trunk/MagicSoft/Simulation/Detector/Camera/creadparam.cxx	(revision 2288)
@@ -19,7 +19,7 @@
 //=
 //= $RCSfile: creadparam.cxx,v $
-//= $Revision: 1.19 $
+//= $Revision: 1.20 $
 //= $Author: blanch $ 
-//= $Date: 2003-02-12 13:47:32 $
+//= $Date: 2003-07-17 18:04:53 $
 //=
 //=//////////////////////////////////////////////////////////////////////
@@ -76,7 +76,10 @@
 static char Loop_filename[PATH_MAX_LENGTH];   //@< special data filename
 static char CT_filename[PATH_MAX_LENGTH];     //@< name of the CT def. file
+static char QE_filename[PATH_MAX_LENGTH];     //@< name of the qe file
 static char NSB_directory[PATH_MAX_LENGTH];   //@< database for NSB
+static char NSB_outer_directory[PATH_MAX_LENGTH];   //@< database for NSB
 static int  Starfield_rotate = FALSE;         //@< switch on starfield rotation
 static int ElecNoise = TRUE;                  //@< Will we add ElecNoise?
+static float FADC_pedestal = 50.0;            //@< Value for FADC Pedestal
 static float FADC_Noise = 2.0;                //@< Value for FADC ElecNoise
 static float Trig_Noise = 0.3;                //@< Factor for Trigger ElecNoise
@@ -89,13 +92,8 @@
 static float RiseDisc = -1.0;
 static float SecureDisc = 7.0;
-static float qTailCut;          //@< Tail Cut value
-static int nIslandsCut;         //@< Islands Cut value
-static int countIslands = TRUE; //@< Will we count the islands?
 static long int Seeds[2]; 
 static int *Skip;
 static int nSkip=0;
 static int Data_From_STDIN = FALSE;
-static int Read_Phe = FALSE;
-static int Read_Phe_All = FALSE;
 static int Write_All_Images = FALSE;
 static int Write_McEvt  = TRUE;
@@ -107,8 +105,4 @@
 static float Select_Energy_le = 0.0;           //@< GeV
 static float Select_Energy_ue = 100000.0;      //@< GeV
-static float Trigger_Radius;
-static int Set_Trigger_Radius=FALSE;
-static float fCorrection;
-static int Apply_Correction=FALSE;
 static int Trigger_Scan = FALSE;
 static int FADC_Scan = FALSE;
@@ -130,11 +124,10 @@
 static float FADC_response_ampl = MFADC_RESPONSE_AMPLITUDE;
 static float FADC_response_fwhm = MFADC_RESPONSE_FWHM;
-static float Telescope_axis_th = 0.;  //<@ Theta of the axis telescope
-static float Telescope_axis_ph = 90.; //<@ Phi of the axis telescope
+static float FADC_resp_ampl_out = MFADC_RESPONSE_AMPLITUDE;
+static float FADC_resp_fwhm_out = MFADC_RESPONSE_FWHM;
 static float Source_offset_th=0.;     //<@  Displacement in Theta of the 
                                       //<@ source from the center
 static float Source_offset_ph=0.;     //<@  Displacement in Phi of the 
                                       //<@ source from the center
-static int Corsika_vers=5200;         //<@ Version of Corsika  
 
 //!@}
@@ -261,4 +254,11 @@
       break;
 
+    case qe_file:             //@< name of the telescope file
+          
+      // get the name of the ct_file from the line
+      sscanf(line, "%s %s", token, QE_filename);
+
+      break;
+
     case elec_noise_off:              //@< add ElecNoise?
           
@@ -270,4 +270,11 @@
       break;
 
+    case fadc_pedestal:              //@< FADC ElecNoise
+          
+      // value for FADC Pedestal
+      sscanf(line, "%s %f", token, &FADC_pedestal);
+          
+      break;
+
     case fadc_noise:              //@< FADC ElecNoise
           
@@ -317,6 +324,13 @@
     case nsb_directory:         //@< name of the output file
           
-      // get the name of the output_file from the line
+      // get the name of the NSB diretory for inner pixels
       sscanf(line, "%s %s", token, NSB_directory);
+
+      break;
+
+    case nsb_dir_outer:         //@< name of the output file
+          
+      // get the name of the NSB diretory for outer pixels
+      sscanf(line, "%s %s", token, NSB_outer_directory);
 
       break;
@@ -344,37 +358,4 @@
       RiseDisc=aux;
       SecureDisc=aux2;
-
-      break;
-
-    case tail_cut:            //@< value of tail_cut (t0)
-          
-      // get value of tail_cut (in ph.e.)
-      sscanf(line, "%s %f", token, &qTailCut);
-      cerr << "Skipping unknown token in [" << line << "]\n";
-
-      break;
-
-    case islands_on:          //@< DO count islands
-          
-      // DO count islands
-      countIslands = TRUE;
-      cerr << "Skipping unknown token in [" << line << "]\n";
-          
-      break;
-
-    case islands_off:         //@< do NOT count islands
-          
-      // do NOT count islands
-      countIslands = FALSE;
-      cerr << "Skipping unknown token in [" << line << "]\n";
-          
-      break;
-
-    case islands_cut:         //@< value of islands_cut (i0)
-          
-      // get value of islands_cut (in ph.e.)
-      sscanf(line, "%s %d", token, &nIslandsCut);
-      countIslands = TRUE;
-      cerr << "Skipping unknown token in [" << line << "]\n";
 
       break;
@@ -406,18 +387,4 @@
       break;
 
-    case read_phe:            //@< to read PHE files
-          
-      // change boolean value
-      Read_Phe = TRUE;
-
-      break;
-
-    case read_phe_all:        //@< to read PHE files from write_all_events
-          
-      // change boolean value
-      Read_Phe_All = TRUE;
-
-      break;
-
     case write_all_events:    //@< to write ALL the images
           
@@ -470,20 +437,4 @@
       break;
 
-    case trigger_radius:      //@< set radius of trigger area 
-          
-      // get trigger radius
-      sscanf(line, "%s %f", token, &Trigger_Radius);
-      Set_Trigger_Radius = TRUE;
-
-      break;
-
-    case correction:          //@< apply a kind of correction to pixel values
-          
-      // get trigger radius
-      sscanf(line, "%s %f", token, &fCorrection);
-      Apply_Correction = TRUE;
-
-      break;
-
     case fadc_scan:
 
@@ -497,4 +448,11 @@
       //  Get parameters for the fadc  response for one phe
       sscanf(line, "%s %f %f", token, &FADC_response_ampl,&FADC_response_fwhm);
+
+      break;
+
+    case fadc_outer:
+
+      //  Get parameters for the fadc  response for one phe
+      sscanf(line, "%s %f %f", token, &FADC_resp_ampl_out,&FADC_resp_fwhm_out);
 
       break;
@@ -548,24 +506,8 @@
       break;
 
-     case telescope_axis:
-
-      //  Get axis of the telescope
-	 sscanf(line, "%s %f %f", token, &Telescope_axis_th, &Telescope_axis_ph);
-      cerr << "Skipping unknown token in [" << line << "]\n";
-
-      break;
-
     case source_offset:
 
       //  Get offset of source
 	sscanf(line, "%s %f %f", token, &Source_offset_th, &Source_offset_ph);
-
-      break;
-
-    case corsika_vers:
-
-      //  Get Corsika version
-	sscanf(line, "%s %i", token, &Corsika_vers);
-      cerr << "Skipping unknown token in [" << line << "]\n";
 
       break;
@@ -756,4 +698,23 @@
 
 //!-----------------------------------------------------------
+// @name get_qe_filename
+//                                                
+// @desc get name of QE definition file
+//
+// @return   Name of the QE definition file
+//
+// @date Thu Jul 10 14:10:13 CEST 2003 
+//------------------------------------------------------------
+// @function 
+
+//!@{
+char *
+get_qe_filename(void)
+{
+  return (QE_filename);
+}
+//!@}
+
+//!-----------------------------------------------------------
 // @name get_nsb_directory
 //                                                
@@ -771,4 +732,25 @@
 {
   return (NSB_directory);
+}
+//!@}
+
+
+
+//!-----------------------------------------------------------
+// @name get_nsb_directory_outer
+//                                                
+// @desc get name of the directory where the database for NSB is
+//
+// @return   Name of the NSB directory for outer pixels
+//
+// @date Thu Jul 10 14:10:13 CEST 2003
+//------------------------------------------------------------
+// @function 
+
+//!@{
+char *
+get_nsb_directory_outer(void)
+{
+  return (NSB_outer_directory);
 }
 //!@}
@@ -878,46 +860,4 @@
 
 //!-----------------------------------------------------------
-// @name get_tail_cut   
-//                                                
-// @desc get tail cut value
-//
-// @return   Value for the Tail-cut
-//
-// @date Mon Sep 14 13:27:56 MET DST 1998
-//------------------------------------------------------------
-// @function 
-
-//!@{
-float 
-get_tail_cut(void)
-{
-  return( qTailCut );
-}
-//!@}
-
-
-//!-----------------------------------------------------------
-// @name get_islands_cut
-//                                                
-// @desc are we going to count the islands ?
-//
-// @var  *n  Cut on islands number
-// @return   TRUE: we'll count the islands; FALSE: we won't
-//
-// @date Mon Sep 14 13:27:56 MET DST 1998
-//------------------------------------------------------------
-// @function 
-
-//!@{
-int
-get_islands_cut(int *n)
-{
-  *n = nIslandsCut;
-  return ( countIslands );
-}
-//!@}
-
-
-//!-----------------------------------------------------------
 // @name get_ana_pixels
 //                                                
@@ -1023,44 +963,4 @@
 
 //!-----------------------------------------------------------
-// @name get_read_phe
-//                                                
-// @desc get whether we will read PHE files
-//
-// @return  TRUE: we'll read PHE files; FALSE: we won't
-//
-// @date Wed Nov 25 13:21:00 MET 1998
-//------------------------------------------------------------
-// @function 
-
-//!@{
-int
-get_read_phe(void)
-{
-  return ( Read_Phe );
-}
-//!@}
-
-
-//!-----------------------------------------------------------
-// @name get_read_phe_all
-//                                                
-// @desc get whether we will read PHE files, with write_all_events
-//
-// @return  TRUE: we'll do it; FALSE: we won't
-//
-// @date Wed Nov 25 13:21:00 MET 1998
-//------------------------------------------------------------
-// @function 
-
-//!@{
-int
-get_read_phe_all(void)
-{
-  return ( Read_Phe_All );
-}
-//!@}
-
-
-//!-----------------------------------------------------------
 // @name write_all_events
 //                                                
@@ -1196,46 +1096,4 @@
 //!@}
 
-
-//!-----------------------------------------------------------
-// @name get_trigger_radius                                  
-//
-// @desc return the radius of the trigger area in the camera (if set)
-//
-// @var *radius  Radius of the trigger area in the camera
-// @return  TRUE: we choose a given radius for the trigger area
-//
-// @date Fri May  7 11:07:43 MET DST 1999
-//------------------------------------------------------------
-// @function 
-
-//!@{
-int get_trigger_radius(float *radius)
-{
-  *radius = Trigger_Radius;
-  return ( Set_Trigger_Radius );
-}
-//!@}
-
-
-//!-----------------------------------------------------------
-// @name get_trigger_radius                                  
-//
-// @desc return the radius of the trigger area in the camera (if set)
-//
-// @var *radius  Radius of the trigger area in the camera
-// @return  TRUE: we choose a given radius for the trigger area
-//
-// @date Fri May  7 11:07:43 MET DST 1999
-//------------------------------------------------------------
-// @function 
-
-//!@{
-int get_correction(float *corr)
-{
-  *corr = fCorrection;
-  return ( Apply_Correction );
-}
-//!@}
-
 //!-----------------------------------------------------------
 // @name FADC_Scan
@@ -1284,8 +1142,10 @@
 //!@{
 void
-get_FADC_properties(float *ra, float *rf)
+get_FADC_properties(float *ra, float *rf, float *rao, float *rfo)
 {
   *ra=FADC_response_ampl;
   *rf=FADC_response_fwhm;
+  *rao=FADC_resp_ampl_out;
+  *rfo=FADC_resp_fwhm_out;
 
 }
@@ -1358,19 +1218,4 @@
 
 //!-----------------------------------------------------------
-// @name get_teles_axis
-//                                                
-// @desc give axis of the telescope 
-//
-//------------------------------------------------------------
-// @function 
-
-//!@{
-void get_teles_axis(float *th, float *p){
-    *th=Telescope_axis_th;
-    *p=Telescope_axis_ph;
-}
-//!@}
-
-//!-----------------------------------------------------------
 // @name get_source_off
 //                                                
@@ -1388,18 +1233,21 @@
 
 //!-----------------------------------------------------------
-// @name get_corsika_vers
-//                                                
-// @desc give the vrsion of corsika 
-//
-//------------------------------------------------------------
-// @function 
-
-//!@{
-int get_corsika_ver(void){
-    return(Corsika_vers);
-}
-//!@}
-
-
+// @name get_FADC_pedesta
+//                                                
+// @desc get the value for the FADC pedestals
+//
+//------------------------------------------------------------
+// @function 
+
+//!@{
+
+
+float get_FADC_pedestal(void){
+
+  return FADC_pedestal;
+
+}
+
+//!@}
 //=------------------------------------------------------------
 //!@subsection Log of this file.
@@ -1408,4 +1256,7 @@
 //
 // $Log: not supported by cvs2svn $
+// Revision 1.19  2003/02/12 13:47:32  blanch
+// *** empty log message ***
+//
 // Revision 1.18  2003/01/14 13:37:47  blanch
 // Option to set a dc value to rise the discriminator threshold has been added.
