Version 3.0.0

  Main Updates

 1) The Origin of the Main Reference System ('MARS') is now put at the geometrical center
    of ARGO detector (like in the Real Data)
    Thus the Module-center positions are the same as Data:
 -5264.75 -4883.75 -4499.25 -4118.25 -3699.75 -3318.75 -2935.65 -2554.65 -2136.15 -1755.15
 -1372.05  -991.05  -572.55  -191.55   191.55  572.55	991.05  1372.05  1755.15  2136.15
  2554.65  2935.65  3318.75  3699.75  4118.25  4499.25  4883.75  5264.75

  4735.00  4449.00  4161.00  3875.00  3587.00  3301.00  3013.00  2727.00  2439.00  2153.00
  1865.00  1579.00  1291.00  1005.00   717.00  431.00	143.00  -143.00  -431.00  -717.00
 -1005.00 -1291.00 -1579.00 -1865.00 -2153.00 -2439.00 -2727.00 -3013.00 -3301.00 -3587.00
 -3875.00 -4161.00 -4449.00 -4735.00

 2) Several quantities in the dimensions of the detector elements, as well as in the stratigraphy
    are updatede (on the basis of R.Iuppa and R.Santonico note)
    Also some dimensions in the Building are updated.
	       Building Dimensions (X,Y): (11150.0 cm, 9925.0 cm)
	       Detector Dimensions (X,Y): (10909.0 cm, 9755.0 cm)

 3) Introduced the Volume 'CLUS' (Cluster) in the detector volume tree

 4) Simulation of RPC Charge readout
   The user card 'GTYP 4' (which allows to give as input file an "Argo-G output file"
   with only digitized infos), together with the user card:
     LOCBT m   (with m=16, 32, 64, 73) to set mult. for local Big-Pad trigger
     SETS 'RPCH' 'BPAD' 		       for LPAD and BPAD digitization
   to turn-on the RPC Charge readout simulation, permit to retrieve the Analogic setup
   infos from an Argo-G file with only digital infos (since the charge multiplicity infos
   were already contained in the Argo-G digital output).
   This procedure is very fast (only digital infos are handled, no particle tracking
   needed), thus easily providing the analogic setup infos.

  5) Bug fixed in v 2.1 on momentum evaluation of particles just outside the
     detector area

 Version 2.1.0  

   Main Update

  New Geometry of Central Carpet and (specially) Ring Modules, after checks and new
  measurements at Ybj.

  New Module-center positions:
   302.25   683.25  1067.75  1448.75  1867.25  2248.25  2631.35  3012.35  3430.85  3811.85
  4194.95  4575.95  4994.45  5375.45  5758.55  6139.55  6558.05  6939.05  7322.15  7703.15
  8121.65  8502.65  8885.75  9266.75  9685.25 10066.25 10450.75 10831.75

  9633.00  9347.00  9059.00  8773.00  8485.00  8199.00  7911.00  7625.00  7337.00  7051.00
  6763.00  6477.00  6189.00  5903.00  5615.00  5329.00  5041.00  4755.00  4467.00  4181.00
  3893.00  3607.00  3319.00  3033.00  2745.00  2459.00  2171.00  1885.00  1597.00  1311.00
  1023.00   737.00   449.00   163.00

  Geometrical center coordinates of whole detector: (,

 Version 2.0.0  

   Major Updates

 - Time windows for Trigger replaced by more precise values (provided by S.Mastroianni):
    151, 243, 363, 394 ns

 - ARGO Geographic orientation:
    angle between Y axis and North direction updated to 18.04 degrees (after a recent,
    more precise measurement)

 - Re-definition of Big-Pad numbering inside each Cluster (from 0 to 23) to follow
   real connections between BigPads and ADC channels:
				 ___  ___  ___  ___  ___  ___
		  Cluster N	|   ||   ||   ||   ||	||   |
				| 3 || 7 || 11|| 15|| 19|| 23|
				|   ||   ||   ||   ||	||   |
				| 2 || 6 || 10|| 14|| 18|| 22|
				 ___  ___  ___  ___  ___  ___
				|   ||   ||   ||   ||	||   |
				| 1 || 5 || 9 || 13|| 17|| 21|
				|   ||   ||   ||   ||	||   |
				| 0 || 4 || 8 || 12|| 16|| 20|

 Version 1.6.0  

   Major Updates

 - Bug fixed in the routine 'GUTRIG' for trigger evaluation 
   (one cluster raw in Central Carpet was skipped in case of 'CONF 1', i.e. 'full detector').

 Version 1.5.2  

   Major Updates

1) Possibility to give as input file an "Argo-G output file" (thus with only digitized
   information) in order to simulate different Pad-efficiency conditions of the detector.
   In this case:
   a) the showers are no more tracked through the detector;
   b) starting from the digitized hits, some pads can be turned-off, on the basis of a
      new (global or single-pad) efficiency table;
   c) the trigger condition is re-calculated after the new digital-hit configuration.

   Related user card (input file type): 'GTYP 4'
   Both formatted (INPU 1='FORM') and binary (INPU 1='UNFM') input file is accepted.
   The same for output.

2) Big-Pad digitized information.
   The ADC-count value in the digitized output is set equal to the total number of charged
   particles on the Big-Pad, without any saturation, without any spread and with no conversion
   'charge -> signal_amplitude -> AC_counts'.

 Version 1.5.1  

   Major Updates

   Bug fixed in the handling of pad efficiency external file

 Version 1.5.0  

   Major Updates

1) Simulation of most relevant structures of Argo Hall (pillars, beams, roof,
   Related user card:
                      HALL 1
   Simulation of removable walking floor.
   Related user card:
                      CALP 1
   a) to succesfully include the hall simulation, the event generation height 
      (user card: ZGEN) must be > 530cm (for instance: 'ZGEN 550.')	      
   b) the (presently) most realistic detector simulation is obtained with:
      NCLX 14
      NCLY 17
      CONF 1
      HALL 1
      NFMP 0      
      CALP 1
      NCPL 0

2) Simulation of RPC charge information, including Big-Pad digitization.
   Related user cards:
   LOCBT m   (with m=16, 32, 64, 73)    to set mult. for local Big-Pad trigger 
   SETS 'RPCH' 'BPAD'                   for LPAD and BPAD digitization

   Big-Pad info in the output file:

  (int) id_bigp    = 100000 + 100*Ncl + Nbig_Cl  (Ncl=Cl-Id), (Nbig_Cl=Big-Pad Id in the Cl, 1-24)
  (int) ndig_bigp  = number of time-digits on the Big-Pad    (can be > 5)
  (int) nstr_bigp  = number of fired strips on the Big-Pad   (0-40)
  (int) nchp_bigp  = n_charge + 100000*nptype_b
		     n_charge = n. of charged particles on the Big-Pad (up to 99999)
		     nptype_b =  Ng * 1      for gamma (Ng: # of gamma's generating Hits, up to 9);
	                       + Ne * 10     for e+/e- (Ne: # of e+/e- generating Hits, up to 9);
	                       + Nm * 100    for mu+/mu- (Nm: # of mu+/mu- generating Hits, up to 9);
	                       + Np * 1000   for hadrons (Np: # of p+/p- generating Hits, up to 9);
 (float) adc_bigp = n_charge*(2mV/n_charge)/(4mV/ADC_count)   with a gaussian spread of 5% added.
                    This "ADC-count" is stored without saturation in order to allow the ADC gain-scale 
		    choice in the analysis step.
3) Single pad noise rates (average = 400Hz) obtained from the real data in a given period, loaded from
   an external file ('bkg.txt'), with the format:
                                                  Clus Pad Rate      (where Pad=0-119, Rate in Hz)
   Related user cards:
                       *FBCK 'bkg.txt'
   Alternatively, the average noise rate can be used with the old user card:   BACK 400.
4) Pad efficiency. As an alternative to the old user card:    GEFF eff(%)

   a single pad efficiency table can be loaded from an external file ('pad_eff.txt'), with format:
   Clus Pad Eff      (where Pad=0-119, Eff in %)
   Related user cards:
                       *FEFF 'pad_eff.txt'
5) Detector intrinsic time resolution: 2ns
   Addition of an independent 0.5ns spread to take into account the TDC time calibration error.

 Version 1.4.5  

   Major Updates

1) Total energy cuts of tracked particles modified to:
   1 MeV for photons
   0.5 MeV fir electrons
   10 MeV for hadrons
 (previously the cut was 3 MeV for any particle)	(Feb, 2008)

2) Ticknes of the single converter layer changed from 0.5cm to 0.25cm

3) New data card added ('CALP') in order to simulate the walking floor with
   the right dimensions (about 1m width)
   Thus, if the user card:
			   'CALP 1'
   is set, the walking floor on the detector is simulated too.
   In this case, no additional FOAM layer should be added by the user
   (set: 'NFMP 0')
							(Feb, 2008)

4) For each event, the information on Nmax and Xmax of the shower as
   obtained from the Corsika Gaisser-Hillas fit is saved in the event header (/shhdvnt/):

   ID_prim 	    = Primary particle ID. ( 1=gamma, 14=proton, ..)
   E_prim  	    = Primary energy (GeV)
   Th_prim, Ph_Prim = Primary direction (radians)
   ievntc  	    = CORSIKA Event Number
   udummy(1..2)	    = Nmax,Xmax0 (from fit of longitudianl profile)
   z1st		    = z of 1st primary interaction, <0 (height in the atmosphere a.s.l.), cm. 

   NARUN		 = ARGO-G Run N.
   N_EVT		 = Sequential event N. in ARGO-G output
   N_PAD		 = Number of Pad (=Time-hits) in the event
   N_GAMIN 	 = N. of gamma's in the shower, entering the detector area
   N_CHAIN 	 = N. of e+ and e- in the shower, inside the detector area
   N_OTHIN 	 = N. of other (charged) particles in the shower, inside the detector area
   N_GAMOUT	 = N. of gammažs in the shower, out of detector area			   
   N_CHAOUT	 = N. of charged particles in the shower, out of the detector area	   

   SH_TH		 = Shower zenith angle (degrees)
   SH_PH		 = Shower azimuth angle (degrees)
   X_CM,Y_CM	 = (Absolute) Position of the shower core (cm)
   SH_ALPHA	 = Input conicity parameter (NOT used)
   TRIG_TIME	 = Trigger time (hit times in the event are relative to this time, ns)
   ZDUMMY(1)=CHI2_LONG = Chi2 of longitudianl profile fit
   ZDUMMY(2)= 0

5) Fixed minor bug on Trigger-Time evaluation (March, 2007)

6) Fixed inconsistency between Pad and RPC dimensions (Oct, 2007)

7) RPC Y-dimension increase in order to match real-data detector efficiency
								 (Oct, 2007)

 Version 1.4.4  

   Major Updates
1) Strip Cluster Size simulation updated in order to better match experimental

2) Single TDC channel signal ('Hit-time') shaped to a minimum value 
   DT=(75.-90.)ns (15.ns jitter), to better reproduce real situation.
   A 2nd hit on the same pad with Dt < DT is ignored.
   A 2nd hit on the same pad with Dt > 30.ns and Dt < DT produces a signal stretch.
3) Updates of Run and Event Header Output (added information on total shower size 
   and height of 1st primary interaction in the atmosphere).
   The complete ARGO-G outputs are summerized down.  
4) Added a new subroutine in ARGO-G code ('GDECOPAD') which from the absolute
   Pad number in the detector (range: 1 - 28,560) returns 'decoded' information:
  - Cluster number (CL = 1 - 238)
  - RPC number inside Cluster (RPC_CL = 1 - 12)
  - Pad number inside RPC (PAD_RPC = 1 - 10)
5) Added a new subroutine in ARGO-G code ('GPADCOO') which from the decoded Pad 
   Id (CL, RPC_CL, PAD_RPC) returns geometrical coordinates X,Y of the Pad (cm).

   NOTE: The coordinates are referred to the 'Main Argo Reference System' in
   ARGO-G, thus they depend on the detector which is being simulated.
  These new subroutines can be called for instance in a user subroutine (like 
  'UMOUT', called at end of each event, or 'UMLAST', called at end of the ARGO-G
  run) into the ARGO-G code.

C ==============================================================================
C                          ARGO-G OUTPUT INFORMATION 
C ==============================================================================
C ----------
C Format:
C ------
          WRITE (LOUTEV,10001)Nevnt_sh,ID_prim,Emin,Emax,
     +                       Gamma,Ethele,Ethmu,Depth_sh
     +                        X_ARGO,Y_ARGO,TH_CONV,TH_PVC,
     +                        TEST,SAREA,
     +                        xref, yref,mtrig

10001     FORMAT(I11,1x,I8,2(1x,F11.1),1x,F8.3,2(1x,F8.4),1x,F8.2)
10002     FORMAT(I10,2(1x,I6),1x,I5,2(1x,F10.1),2(1x,F8.2),1x,F5.0,1x,
     +           F13.0,1x,62F9.2,1x,I4)
C Explanation:
c ------------
C Nevnt_sh   =    N. of events generated (It is NOT the total number of
C                                          events in the file)
C ID_prim    =     Id of the primary (1=gamma, 14=proton, ...)
C Emin       =    Minimum energy used for the sampling (GeV)
C Emax       =    Maximum energy used for the sampling (GeV)(if fixed energy
C                                                             then E=Emin=Emax)
C Gamma      =    Spectral index (0 if fixed energy)
C Ethele     =    Threshold energy for e+/- and gamma (GeV)
C Ethmu      =    Threshold energy for mu and hadrons (GeV)
C Depth_sh   =    Atmosphere depth (g/cm^2)
C NARUN         = ARGO-G Run N.
C NMD_X,NMD_Y   = N. of X, Y-'MODULEs' of simulated detector (1 MODULE = 3 RPCs)
C ID_CONV       = Converter (if present) Id (1=Fe, 2=Pb)
C X_ARGO,Y_ARGO = Simulated detector dimensions (cm)
C TH_CONV       = Quota of converter (or quota of particle generation in ARGO-G)
C TH_PVC        = Thickness of converter plane
C TEST          = 1 if ARGO-TEST
C SAREA         = Sampling area of input shower cores (m^2)
C xref(28)      = Geometrical positions of 28 Modules in X
C yref(34)      = Geometrical positions of 34 Modules in Y
C mtrig         = Trigger pad-multiplicity

C ------------
C Format:
C ------

        WRITE (LOUTEV,10003) ID_prim,E_prim,Th_prim,Ph_prim,
     +                       IEVNTC,(udummy(KK),KK=1,3)
     +                      N_CHAIN,N_OTHIN,N_CHAOUT,N_OTHOUT
     +                      TRIG_TIME,(ZDUMMY(KK),KK=1,2)
        WRITE (LOUTEV,10007)(maxm(KK),KK=1,5)
        WRITE (LOUTEV,10007)(maxm(KK),KK=6,10)

10003 FORMAT(I8,1x,F11.1,2(1x,F8.3),1x,I11,3(1x,F11.0))
10004 FORMAT(I10,1x,I11,1x,I6,5(1x,I9))
10006 FORMAT(2(1x,F8.3),2(1x,F8.0),1x,F10.4,1x,F10.1,2(1x,F8.3))
10007 FORMAT(5I5)
C Explanation:
c ------------
C ID_prim          = Primary particle ID. ( 1=gamma, 14=proton, ..)
C E_prim           = Primary energy (GeV)
C Th_prim, Ph_Prim = Primary direction (radians)
C ievntc           = CORSIKA Event Number
C udummy(1..2)     = x1st, y1st (x, y of 1st primary interaction (=0,=0))
C z1st             = z of 1st primary interaction, <0 (height in the atmosphere a.s.l.), cm. (*)
C NARUN            = ARGO-G Run N.
C N_EVT            = Sequential event N. in ARGO-G output
C N_PAD            = Number of Pad (=Time-hits) in the event
C N_GAMIN          = N. of gamma's in the shower, entering the detector area
C N_CHAIN          = N. of e+ and e- in the shower, inside the detector area
C N_OTHIN          = N. of other (charged) particles in the shower, inside the detector area
C N_GAMOUT         = N. of gammažs in the shower, out of detector area                       (*)
C N_CHAOUT         = N. of charged particles in the shower, out of the detector area         (*)
C SH_TH            = Shower zenith angle (degrees)
C SH_PH            = Shower azimuth angle (degrees)
C X_CM,Y_CM        = (Absolute) Position of the shower core (cm)
C SH_ALPHA         = Input conicity parameter (NOT used)
C TRIG_TIME        = Trigger time (hit times in the event are relative to this time, ns)
C ZDUMMY(1..2)     = Theta and Phi at 1st primary interaction (=0,=0)
C maxm(1) = max low multiplicity on clusters (in the event)                      (*)
C maxm(2) = max low multiplicity on superclust (in the event)                    (*)
C maxm(3) = max low multiplicity on ultraclust (in the event)                    (*)
C maxm(4) = max low multiplicity on sectors (in the event)                       (*)
C maxm(5) = max low multiplicity on Argo (in the event)                          (*)
C maxm( 6) = max high multiplicity on clusters (in the event)                    (*)
C maxm( 7) = N of Clusters with Mult >/=  7 (in the event)                       (*)
C maxm( 8) = N of Clusters with Mult >/= 16 (in the event)                       (*)
C maxm( 9) = N of Clusters with Mult >/= 32 (in the event)                       (*)
C maxm(10) = N of Clusters with Mult >/= 64 (in the event)                       (*)
C (*): updated
C EVENT (= List of the Time-hits):
C -----
C Format:
C ------
        DO IPAD = 1, N_PAD

     +                        T_PAD
10005   FORMAT(I6,I2,I6,I10,F8.0)
C Explanation:
c ------------
C ID_PAD  = Absolute Pad Id of the Time-hit
C           (defined in such a way that:  
C            N_CLUS = Int((ID_PAD-1)/120) + 1
C            Ipad_On_Clus = ID_PAD - (N_CLUS-1)*120)  (range of Ipad_On_Clus: 1 .. 120)
C N_STRIP = N. of fired strips in the Pad
C MASK_ST = strip mask of the Pad
C           where:
C           NHIT = N. of GEANT hits (charged particles) generating digitized hit,
C           NPTYPE =  Ng * 1 for gamma (Ng: # of gamma's generating Hits, up to 9);
C  	    + Ne * 10	  for e+/e- (Ne: # of e+/e- generating Hits, up to 9);
C  	    + Nm * 100	  for mu+/mu- (Nm: # of mu+/mu- generating Hits, up to 9);
C 	    + Np * 1000	  for p+/p- (Np: # of p+/p- generating Hits, up to 9);
C 	    + Nn * 10000  for neutron (Nn: # of n's generating Hits, up to 9);
C 	    + Nh * 100000 for hadrons (Nh: # of hadrons generating Hits, up to 9)
C T_PAD   = TDC time of the hit (integer, in ns), no high limit in the value.

C ==============================================================================
C                          ARGO-G INFO-FILE INFORMATION 
C ==============================================================================
        WRITE (LINFO,'("version = ",a10)') vargog              (=ARGO-G version)
        WRITE (LINFO,'("howmanyshowers = ",I10)') Nevnt_sh     (=Nev in ARGO-G Run)
        WRITE (LINFO,'("ID_prim = ",I5)') ID_prim
        WRITE (LINFO,'("e_range_l = ",F10.1)') Emin
        WRITE (LINFO,'("e_range_u = ",F10.1)') Emax
        WRITE (LINFO,'("slope = ",F8.4)') Gamma
        WRITE (LINFO,'("ecut = ",F8.4)') Ethele
        WRITE (LINFO,'("mcut = ",F8.4)') Ethmu
        WRITE (LINFO,'("Depth_sh = ",F8.2)') Depth_sh
        WRITE (LINFO,'("Theta_range (deg) = ",2F7.1)') Th_range
        WRITE (LINFO,'("Phi_range (deg) = ",2F7.1)') Ph_range
        WRITE (LINFO,'("Depth_sh = ",F8.2)') Depth_sh
        WRITE (LINFO,'("Rung = ",I10)') NARUN
        WRITE (LINFO,'("Runc = ",I10)') IRUNCORSIKA
        WRITE (LINFO,'("NClus_x = ",I6)') NMD_X/2
        WRITE (LINFO,'("NClus_y = ",I6)') NMD_Y/2
        WRITE (LINFO,'("ID_conv = ",I5)') ID_CONV
        WRITE (LINFO,'("X_Argo (m) = ",F8.3)') X_ARGO/100.
        WRITE (LINFO,'("Y_Argo (m) = ",F8.3)') Y_ARGO/100.
        WRITE (LINFO,'("Converter_quota (cm) = ",F8.3)') TH_CONV
        WRITE (LINFO,'("Converter_thick.(cm) = ",F8.3)') TH_PVC
	if (CAXRNDM(1) .gt. 0 .and. CAXRNDM(2) .gt. 0) then
          WRITE(LINFO,'("X_Sampl_Area (m) =",F10.0)') -1.*CAXRNDM(1)/100.
          WRITE(LINFO,'("Y_Sampl_Area (m) =",F10.0)') -1.*CAXRNDM(2)/100.
          WRITE (LINFO,'("X_Sampl_Area (m) = ",F10.0)') DAXRNDM(1)/100.
          WRITE (LINFO,'("Y_Sampl_Area (m) = ",F10.0)') DAXRNDM(2)/100.
          WRITE (LINFO,'("Sampl_Area X,Y Shifts (m) = ",2F8.0)')
     +                                    DAXSHFT(1)/100.,DAXSHFT(2)/100.
        WRITE (LINFO,'("File = ",A)') FILOUF                 (=Output file name)

C Example:
C -------
 version = V001.04/04
 howmanyshowers =        100
 ID_prim =    14
 e_range_l =     1000.0
 e_range_u =     3000.0
 slope =  -1.0000
 ecut =   0.0010
 mcut =   0.0500
 Depth_sh =   603.82
 Theta_range (deg) =     0.0   15.0
 Phi_range (deg) =     0.0  360.0
 Depth_sh =   603.82
 Rung =   14010101
 Runc =     165755
 NClus_x =     10
 NClus_y =     13
 ID_conv =     0
 X_Argo (m) =   78.530
 Y_Argo (m) =   74.600
 Converter_quota (cm) =   15.500
 Converter_thick.(cm) =    0.000
 X_Sampl_Area (m) =       250.
 Y_Sampl_Area (m) =       250.
 Sampl_Area X,Y Shifts (m) =     -30.     10.
 File = /nexus02/surdo/argog_out/V144_130/ARGOG_P1-3TEV_LMT20_test.ascii                                    

C ==============================================================================	

 Version 1.4.3  
   Major updates:

  1) Bug fixed in the Low-Multiplicity Trigger Logic

     The most relevant effect of the bug was a trigger reduction of 5-6%


     More values for 'TRGCONF' data card:
    - 'TRGCONF 20'  (to be used with 'NCLX  6' and 'NCLY  7')
		  trigger on the internal 20 Clus out of the 42-Cl carpet

    - 'TRGCONF 66'  (to be used with 'NCLX  8' and 'NCLY  13')
		  trigger on the internal 66 Clus out of the 104-Cl carpet

 Version 1.4.2  
   Major updates:


  More complete Trigger information (vector 'maxm') in the ARGO-G Output:

  maxm(1) = max LOW multiplicity on clusters.
  maxm(2) = max LOW multiplicity on superclust.
  maxm(3) = max LOW multiplicity on ultraclust.
  maxm(4) = max LOW multiplicity on sectors
  maxm(5) = max LOW multiplicity on Argo

  maxm( 6) = max HIGH multiplicity on clusters
  maxm( 7) = N of Clusters with H-Mult >/=  7
  maxm( 8) = N of Clusters with H-Mult >/= 16
  maxm( 9) = N of Clusters with H-Mult >/= 32
  maxm(10) = N of Clusters with H-Mult >/= 64

  (Note : Please remember that the Pad Multiplicity information provided by 
          the Local Station from each Cluster for trigger purposes are:
	  >= 1, 2, 3, 4, 5, 6  LOW Multiplicities
	  >= 7, 16, 32, 64     HIGH Multiplicities)
  This allows:
  (a) to transfer all useful trigger information to MEDEA
  (b) to override, if needed, the ARGO-G trigger,
      requiring more selective conditions directly by MEDEA.

 Version 1.4.1  
   Major Changes


- Low-Multiplicity trigger logic implemented for >42 Clusters
  (centrile carpet divided in two 'Sectors', each one including 
   half of the central cluster stripe (as in the real situation)

- Trigger on a 'sub-carpet'
  Possibility of triggering on the 42-Cluster sub-carpet, 
  while 78 or more Clusters are in Data Acquisition
  New data-card for this pourpose:   'TRGCONF'  42

  Example: NCLX  6
	   NCLY  13
	   TRGCONF  42
    simulates (apart a different cluster numbering) the situation
    with 78 Clusters into the Data Acquisition

- More trigger specifications
  For High Multiplicity trigger (based on  cluster multiplicity):

       'OR'/'AND' can be requested on specific clusters


  i) 'HMTRG  16  1  61 62 75 76 89 90'                 means:

     Hmult =16 requested on =1 cluster in the list: 61, 62, ...('OR')

  ii) 'HMTRG  16  4  61 62 75 76 89 90'               means:

     Hmult =16 requested on =4 clusters in the list: 61, 62, ..('AND')

  Remark 1: The list is optional.
            If not specified, all clusters will be included

  Remark 2: Always such 'HMTRG' can be specified in 'OR'/'AND' with 
            'MTRG' (the Low-Multiplicity trigger) defining the 
            requested multiplicity on whole carpet.

2) Simulation of Strip multiplicity

 - Bug fixed in the routine 'GARPCH'

 - The Strip multiplicity in the Pad now tries to reproduce the 
   real data behaviour.
   The comparison betwen Data and MC for a reconstructed zenith angle 
   in the range (0-15) degrees and for Nhit=(60-100) and Nhit=(100-200)
   gives good results.
   In the simulated sample the events were generated in the (0-30) 
   degrees, while the selection rec-Zenith_angle = (0-15) was used.


 Version 1.4.0  
   Major Changes
    Setup and test for 104 CL (or 130 CL) layout simulation
    (Central CL stripe: 3rd 'SECTOR' for trigger purpouses, made of 2 'ULtraCL'
     one including 3 'SUperCL' and the other 2 'SUperCL').

    Implementation of >1 Input files in the same Argo-G run: the new data-card
   'NFINP' (max=50) sets the number of input files. The list of Input files must
    be included in the data-card file.

    Default: without any explicit Trigger choice, each event with at least 1
    hit is saved in the output file (possibly only a Bck hit if 'ONLYBCK'=1).
    If a (Low or High-Multiplicity) Trigger is set by means of the data-cards,
    the events stisfying such Trigger are saved in the Output file.

Version 1.3.8
   Major Changes
1) Bug fixed (thanks to some China collegues) in distinguish left vs right pad 
   column inside the RPC.
   This bug only affected:
   a) the signal time delay on the strips;
   b) the strip mask of the pad.

2) More accurate avaluation of 'T_TRIG' (Trigger-time) by using 1ns time bins.

3) Implementation of High-Multiplicity Trigger ('Hmult') on 1 or more Clsuters
   in .AND. logic.
   In summary, the data cards useful for the trigger simulation are:
   'MTRG'   (1 integer) to set the total multiplicity requested on the simulated 
                        carpet, with the Low-Multiplicity Trigger 
			(Default: 1)
   'LOGTRG' ('OR'/'AND') to set the 'OR'/'AND' between Low-Mult and High-Mult
			 (Default:'  ' -> only Low-Mult Trigger accepted)
   'HMTRG' (2 integers)  First value sets the requested single cluster 
                         High-Multiplicity (>/= 7)
			 Second value sets on how many Clusters that High-Mult.
			 is required 
			 (Default: 999999 1)
		MTRG 60
		HMTRG 7 2
	which means: 
	'at least 60 pads in the Low-Multiplicity Logic (1 Clus mult = 1...6)
	on the whole simulated carpet,
	at least 2 Clusters, each one with >= 7 Pads in the
	High-Multiplicity Logic (cluster-mult: >=7, >=16, >=32, >=64)
4) Core sampling area not necessarely centered on the simulated carpet.
   A new data card allows to set the X and Y shift of sampling area centre
   with respect to the carpet centre.
   'XSHFT' (2 real values) X and Y shft values (cm)
                          (Default: 0. 0.)	
5) New value of the angle between ARGO-Y axis and geographic North: 18.5 degree

Version 1.3.7
Major Changes

1) Bug fixed: re-definition of the primary arrival direction after the
   phi (=73 degrees) rotation of the shower on the detector plane, in order
   to correctly take into account the geo-magnetic field effect on the shower.

2) Definition of 2 new data cards ('LOGTRG' e 'HMTRG') in order to improve the
   simulation of the trigger logic. They allow to require the .OR. (or .AND.)
   between a Low-Mult trigger (for instance >=60 hits on the whole detector)
   and a High-Mult trigger on the single Cluster.
    Example:   MTRG 60
	       LOGTRG OR
	       HMTRG 16
    (this example sets the .OR. between Low-Mult>=60 on whole current detector 
     and High-Mult>=16 on any Cluster)
Version 1.3.6b
Major Changes

1) Some more details in the detector stratigraphy

2) Particle times rescaled with respect to the Corsika tvalues in order to avoid
   significant digit losses

3) Redefinition of TDC counting values in order to match the real data range
   (no upper limit in the simulated TDC values)
4) Redefinition of shower rotation on the detector plane to match the
   geo-magnetic field effect. At present the measurement of the angle between
   North direction and Argo building axis gives 17 degrees, so a rotation of
   73 degrees (=90-17 dgrees) is performed in order to match Corsika and ARGO
   reference frames.

5) New data card ('ONLYBCK') which allows to save events of only noise hits (no
   shower hits) for special puposes 9this can occurs if the shower core is
   generated far from the detector).
   default value: ONLYBCK 0    which means: at least 1 shower hit on detector.
Version 1.3.6
Major Changes

1) Update of DETECTOR STRATIGRAPHY and LAYOUT (some volume dimensions and
   materials were obsolete)

2) New configuration to simulate the 42-CLUSTER carpet, including the TRIGGER
   (real trigger logic implemented).
   Data cards to be set:
     CONF 42
     NCLX 6
     NCLY 7
  (the setting of cluster numbers is optional, due that the choice 
   'CONF 42' forces the number of clusters along X and Y)
 WARNING: using this configuration, the cluster numbering in the output data is
 that of the rectangle in the northermost left corner in the central carpet, 
 which means the clusters between 31 and 120, to be put in correspondence with 
 the clusters from 63 up to 152 in the real carpet. 
 For what concerns the geometrical coordinates, like for any partial detector
 configuration used in ARGO-G, the origin of the reference frame is put in the
 southermost left corner of the simulated carpet (in this case, the southermost 
 left corner of Cl n.115).

3) SHOWER PARTICLE TYPES generating one or more Geant-Hit in the Pad stored in 
   the 6th word of Pad-Digit output.
   Coding used in this version based on a decimal pattern:
     LDIGI(6,id) = NHIT + 1000*NPTYPE
     NHIT = total number of Geant-Hits generating the Digit (the only
         information in the previous version), with range: 1 - 999,
  NPTYPE =  Ng * 1	 for gamma (Ng: # of gamma's generating Hits, up to 9);
          + Ne * 10	 for e+/e- (Ne: # of e+/e- generating Hits, up to 9);
	  + Nm * 100     for mu+/mu- (Nm: # of mu+/mu- generating Hits, up to 9);
	  + Np * 1000	 for p+/p- (Np: # of p+/p- generating Hits, up to 9);
	  + Nn * 10000   for neutron (Nn: # of n's generating Hits, up to 9);
	  + Nh * 100000  for hadrons (Nh: # of hadrons generating Hits, up to 9)

 NOTE: LDIGI(6,id) = 0 means background Digit (produced by NO physical Hit).

   A "trigger time" is calculated (the time of the hit allowing to satisfy the
   trigger requirement) and all the Digit times in the events are referred to such
   No upper limit is imposed, so that also very delayed times are permitted. 
   On the contrary, the background digits are generated in a time-window of 2050ns,
   starting from 500 ns before the 1st physical hit in the event.

 NOTE: the Trigger-time is registered in EV_HEAD(22) (the 22nd word of the
 Event-Header, previously dummy), so that the absolute times of the Digits can
 in principle be recovered.
5) Incrase of the memory for Geant banks (COMMON /GCBANK/Q(NG=70,000,000)), in
   order to avoid program crashes for very big showers.
   Increase of maximum allowed number of Geant-Hits (MNHIT=700,000) and maximum 
   allowed number of Digits (MNDIG=50,000).

6) HADRONS and LIGHT NUCLEI (alpha, deuteron, tritium) of the Corsika showers 
   are now tracked in the detector (in the previous version only photons, 
   electrons/positrons and muons/antimuons were considered).
 NOTE: for showers initiated by primary protons of ~30 TeV with core inside the
 carpet, a ~0.3% of hits come from hadrons.
7) Treatment of MULTIPLE DIGITS in the same Pad (~like in real data).
   Two or more Digits are generated in the same Pad, with the same Strip-pattern
   (the OR of all fired strips) if the TDC-time difference is >/=100 ns.
8) Effect of GEMAGNETIC FIELD on the showers.
   An azimuth shower rotation of an angle (90-alpha)degrees is needed in order to 
   match the Corsika reference frame and the ARGO reference frame (alpha is the angle
   between Y axis of the ARGO reference frame and North direction).
   In this version of ARGO-G, a default rotation of 81 degrees (alpha=9 degrees) is 
   It is possible to force rotation by a different angle setting the data card:
     PHRD -alpha   (alpha>0 in degrees)

Minor Changes

1) Bug fixed in routine GAPADD (in the generation of background digits).

2) The strip (always one and only one) fired for a background Digit is 
   randomly generated.

3) The original (i.e., Corsika) number of the events which are triggering in 
   ARGO-G is stored into: 
     EV_HEAD(5), a previously dummy word in the event Header.
Version 1.3.5
-Bug fixed  
    Bug in the muon id coding fixed in rdcors. (K. Fratini)
    In the previous version muons was not processed. 
Version 1.3.4
-Minor bug fixed  
   This version of the program writes the Run Header also if no event is 
   accepted by the trigger algorithm.
   gadata - the correct steel width (0.7 cm) has been used for the columns
          - minor correction about the default number of clusters 
Version 1.3.3
-Minor bug fixed  
   Fixed save of the sampling area in the SOR.
   This bug affect only event generated on a corone
   (data card XCRDM)
Version 1.3.2
-Maior Change  
    () New configuration via card CONF to fill the building with RPCs
       CONF 1  == detector with ring
       CONF 2  == full coverage detector

-Minor Change
    () Thickness of the iron colomns changed to 0.7 cm
Version 1.3.1
       Minor bug fixed
Version 1.3
-Minor Change 
    () The code produce an info file usefull for the DataBase 
       of the simulation

-Main Change 
    () The geometry of the detector has been modify in agreement with
       the true detector under construction in YBJ.
    () The simulation of the trigger is now in this code and has to be
       removed by the analysis code
    () The format of the output is different!!! IMPORTANT!!!!
Version 1.2.2
-Minor Change 
    () Bug fixed in the managment of large events
       read from Corsika Unformated Files  

Version 1.2
-Minor change  
   ()Linux support (RedHat 6.1 or higher)
   ()Some minor bug fixed
   ()Minor improuvment in the detector geometry

-Main Change
   ()Changed the structure of the kumacs used for compilation
     just one kumac (compile) needed for compilation on different 
   ()Introduced the possibility to read directly the Corsika files
     without a previous conversion in zebra format.
     To read corsika binary files use the following combination of
     data card:
      INPU 1='UNFM'
      GTYP 2