GSIM

 CLAS GEANT Simulation


FFREAD CARDS
The behavior of GEANT, and thus GSIM is controlled by a set of FFREAD 'cards' (remember we are talking about a real old legacy of FORTRAN programming here.) Usually these cards are put in a file: ffread.in, which is read into GSIM with the command line option: -ffread ffread.in.

An example ffread card for Ebeam=1.5 Gev, pi+ production simulation at low field (from Hovanes's study):

CUTS   5.e-3 5.e-3 5.e-3 5.e-3 5.e-3
CCCUTS 1.e-3 1.e-3 1.e-3 1.e-3 1.e-3
DCCUTS 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4
ECCUTS 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4
SCCUTS 1.e-4 1.e-4 1.e-4 1.e-4 1.e-4
MAGTYPE 3
MAGSCALE 0.1943 0.75
PTGIFIELD 0
RUNG 10
TARGET 'e1b1'
TGMATE 'PROT' 'ALU'
TGPOS  -0.3 -0.03  0.00
TGUSER 5. 0.97 0.012 4
NOMCDATA 'ALL'
GEOM 'ALL'
NOGEOM 'PTG ' 'ST'
SAVE 'ALL' 'LEVL' 10
KINE 1
TRIG 100000
AUTO 1
STOP

The first 5 lines determine energy cut-off in GEANT for various particles in various parts of the detector. Most people would leave these as is. The lines following these are GSIM specific control cards, followed by some GEANT cards ('SAVE', 'KINE', 'TRIG', 'AUTO'). At the end of this page is a reproduction of the list of cards from the GEANT manual ( GEANT Data Records)

This link explains the E2 Targets and relevant FFREAD cards.

Here is a list of the FFREAD cards that are GSIM specific:
 
 

KEY- N I Variable in code Short Description COMMON INIT
KINE 1 I IKINE Sets the flavor of kinematics generator:
0 = Internal (dummy) generator
1 = Read BOS file from -mcin flag
2 = Obsolete "liz" format
3 = Test setting, generated particles.
4 = None
5 = Obsolete "lund" format
6 = As 1, but keep existing DC0, EC, SC,CC,EC1 banks
>10 = same as above, but add low energy moller electron background events
/GCKINE/ 0
NOGEOM - M NOGEOM_FF Turn off geometry of various parts of the detector. /FFPAR/ -
NOMATE - M NOMATE_FF Turn off materials in various parts of the detector. /FFPAR/ -
NOSEC - M NOSEC_FF Turn off secondary particle generation in det parts /FFPAR/ -
NOHITS - M NOHITS_FF Turn off hits is sensitive detectorparts /FFPAR/ -
NODIGI - M NODIGI_FF Turn off digitization in sensitive det parts. /FFPAR/ -
NOBOSOUT - M NOBOSOUT_FF Turn off filling of BOS banks for det parts /FFPAR/ -
NODATA - M NODATA_FF   /FFPAR/ -
NOMCDATA - M NOMCDATA_FF Turn off all the additional GEANT information about each hit in the detector. (should set to 'ALL') /FFPAR/ -
FASTCODE - M FAST_CODE Sets faster execution options for 'SC'.
This is in development for other detector parts.
/FFPAR/ -
TGE2 1 L tg_e2 Turn on E2 Target code - -
MAGTYPE 2 M magtype Set type of magnetic field used. 
Arg1= magtype, Arg2= analytic torus field strength
Magtype=
     0       no torus or mini field
     1       simple analyPTGANGLEPTGANGLEtic torus
     2       torus from lookup table
     3       torus + mini from lookup table
     4       mini-torus from lookup table
Usually 3 or 2.
/ffpar_mg/ 3,700
MAGSCALE 2 R magscale Set scale factor for magnetic fields. 
First arg is for Torus, as fraction of 3860.
Second is arg for Mini Torus, as fraction of 8000
/ffpar_mg/ 1,1
FIELD 2 M init_ifield, init_fieldm FIELD type max for tracking media definition, default is helix, 30 kG /ffpar_mg/ 2,30
TARGET 3 M tg_type_ff Target type, material, cell
Material= 'PROT'=1, 'NEUT'=2, 'HYDR'=1, 'DEUT'=2 , 'HEL3'=3, 'VAC'=16
Cell= target wall and superinsulation volumes can be turned on,off: 'ON'=1, 'OFF'=-1.', NONE'=-1, 'CELL' = 0, 'INS' =2
/ffpar_tg/ 1,1,1
TGMATE 2 M tg_mate_ff Target Material, Cell Material /ffpar_tg/ 1,1
TGPOS 3 R tg_pos_ff Target position, x,y,z /ffpar_tg/ 0,0,0
TGUSER 6 R tg_user_ff define the target volume yourself: (length, diameter, cell_wall_thickness, support structure) /ffpar_tg/ 0
PTGIFIELD 1 I ptg_ifield Polarized target field type /ffpar_ptg/ 0
TGE2 1 L tg_e2 E2 Target ON/OFF /gsimcontrol/ FALSE
TGTP 3 I itg_type E2 target control: (1)=cell type 0=no cell, 1= Al cell (E1c and first E2 cell) 2= 2nd E2 cell 3= 3rd E2 cell 4= 4th E2 cell
(2)=liquid in target:0=empty, 1=H2, 2=D2, 3=He3, 4=He4
(3)=Solid target 2=CH2, 12=12C, 56=56Fe, nothing otherwise
/tg/ 0,0,0
PTGANGLE 1 R ptg_angle Polarized target angle /ffpar_ptg/ 0
PTGFIELDM 1 R ptg_fieldm Polarized target field strength in kG /ffpar_ptg/ 50.
PTGSCALE 1 R ptg_scale Polarized target field scale factor /ffpar_ptg/ 1.
PTGMAXRAD 1 R ptg_maxradius max. radius to take polarized target field into account /ffpar_ptg/ 150.
TGTP 3 I itg_type Set E2 target type - -
RAWBANKSIN 1 L rawbanks_in Pregenerated events, input file has raw banks in it. - -
IFLGK 1 I iflgk_ff Global secondary generation. - -
NSTEPMAX 1 I nstepmax_ff Set maximum number of steps per track. - -
SLENGMAX 1 R slengmax_ff Set maximum length of a track. - -
RMAXCYLRAD 1 R rmax_ff Set maximum cylindrical radius of track - -
ZMIN 1 R zmin_ff Set minimum z coord of track - -
ZMAX 1 R zmax_ff Set maximum z coord of track - -
HELIUMONLY 1 L helium_only Replace some volumes with helium - -
NOACC 3 R noacc_ff Use a special formula to exclude a forward (small theta) area of the acceptance, to speed up execution. - 0,0,0
BEAM 6 R beam_energy_ff electron beam energy as used for photoproduction (Tagger info) - -
POSBEAM 2 R Beam_offset_ff  beam position - 0,0
SIGBEAM 1 R Beam_sigma_ff beam sigma - 0
PKINE 10 R pkine For kine = 3 setting: id,pmin,pmax,thetamin,thetamax,phimin,phimax - 3,0.8,3.5
30,40,10
10,0,0,0
NTARGET 1 I ntarget Set target N for background electron generation using preconfigured background files,
this will use a standard set of parameters for all the following items so you only needto set the Luminocity. Currently 1-4 are defined:
1= Hydrogen Gas 76mm
2= Liquid Hydrogen 76mm
3= NH3, 15mm
4=Copper, 10 um
/ffpar_bckgr/ 1
LUMEN 1 R olumen Luminocity /ffpar_bckgr/ 10-32
ZTAR 1 R zelem Z of target /ffpar_bckgr/ 1
ATAR 1 R atom A of target /ffpar_bckgr/ 1
RHOT 1 R rho Density of target g/cm^3 /ffpar_bckgr/ 7*10-3
TLENG 1 R tleng Length of target in cm /ffpar_bckgr/ 7.6
TIMDC 1 R timedc Timeout value for drift chambers /ffpar_bckgr/ 250*10-9
NINCE 1 I nincel Number of events in cel for Normalizarion /ffpar_bckgr/ 100000000
BAFFES 7 R foil_baffles position Pb shielding wedges:  nbaf th1 z1 th2 z2 th3 z3
Parameters are nbaf: number of baffles (up to 3)
h: scattering angle of top of wedge
z: distance from target to center of wedge
/ffpar_foil/ 0.
CCCUTS 5 R cc_cuts Same as CUTS (see below) for the CC /ffpar_cc/ 2*0.001, 3*0.01
DCCUTS 5 R dc_cuts Same as CUTS (see below) for DC /ffpar_dc/ 4*0.001, 0.0001
ECCUTS 5 R ec_cuts Same as CUTS (see below) for EC /ffpar_ec/ 4*0.001, 0.0001
CEC1CUTS 5 R ec1_cuts Same as CUTS (see below) for LAC /ffpar_ec1/ 5*0.001
SCCUTS 5 R sc_cuts Same as CUTS (see below) for SC /ffpar_sc/ 4*0.001,
0.0001
STCUTS 5 R st_cuts Same as CUTS (see below) for ST /ffpar_st/ 4*0.001, 0.0001
DRIFT2T 1 R dc_dist_to_time dc drift conversion factor from distance to time /ffpar_dc/ 400.
DCRESOL 6 R dc_resolution dc resolution for each superlayer /ffpar_dc/ 0.02
ATLEN 1 R atlen EC: 0 means use no atten, positive means use as mean value, neg read in from file /ffpar_ec/ -1
POISS 1 R poiss for EC statistics /ffpar_ec/ 3.5
ECTDC2CH 1 I ec_tdc_to_channel ec tdc to channel conversion /ffpar_ec/ 20
EC1ATTENUAT 1 I  iatten LAC mean attenuation lenght /ffpar_ec1/ 350
EC1THRESHOLD 1 I  ithreshold LAC ADC threshold /ffpar_ec1/ 50
EC1DELAY 1 R delay LAC mean delay /ffpar_ec1/ 5.5
EC1PHOTOELEC 1 R photoel LAC mean luminocity /ffpar_ec1/ 4.5
EC1REFLECT 1 R reflect LAC reflection coefficient /ffpar_ec1/ 0.45
EC1CH2ADC 1 R charge_to_adc LAC ADC channel conversion /ffpar_ec1/ 12.7
SAVE 20 M LSAVE(20) See "New Features"  ::
SAVE 'ALL' =saves all secondaries.
SAVE 'ALL' 'LEVL' =10 save all secondaries up to cascade level 10
SAVE 'DCAY' 'ALLP' =sava all secondaries from decay/absorbtion
etc.
(Look at the code for a long long time to really figure this one out, when you do, please email me with the results. )
/GCLIST/ ?


KEY 00 N I GEANT VARIABLE Short description COMMON GINIT
HSTA  20  LHSTA  names of required standard histograms, see [BASE110] /GCLIST/ Blank
OPTI  IOPTI  automatic optimisation of the geometry via GSORD /GCOPTI/
RNDM  NRNDM  initial random number seed (2 words)  /GCFLAG/
RUNG  IDRUN  user run number  /GCFLAG/
      IDEVT  first user event number  /GCFLAG/
SORD  ISTORD  stack ordering flag  /GCSTAK/
TRIG  NEVENT  total number of events to process  /GCFLAG/ 10000000
TIME  TIMINT  time left after initialisation (see Notebelow)  /GCTIME/  
      TIMEND  time required for termination  /GCTIME/
      ITIME  test every ITIMEevents  /GCTIME/
KEY  VAR  Short description COMMON  GINIT
ANNI  IANNI  annihilation  /GCPHYS/
AUTO  IGAUTO  automatic computationof the tracking medium parameters /GCTRAK/
BREM  IBREM  bremsstrahlung  /GCPHYS/
CKOV  1 I ICKOV  Cerenkov photon generation  /GCTMED/
COMP  ICOMP  Compton scattering  /GCPHYS/
CUTS  16    Kinetic energy cuts in GeV:    
      CUTGAM  cut for for gammas  /GCCUTS/ 0.001 
      CUTELE  cut for electrons  /GCCUTS/ 0.001 
      CUTNEU  cut for neutral hadrons /GCCUTS/ 0.01 
      CUTHAD  cut for charged hadrons /GCCUTS/ 0.01 
      CUTMUO  cut for muons  /GCCUTS/ 0.01
      BCUTE  cut for electron bremsstrahlung /GCCUTS/ GUTGAM
      BCUTM  cut for muon and hadron bremsstrahlung /GCCUTS/ CUTGAM
      DCUTE  cut for delta-rays by electrons /GCCUTS/ 104
      DCUTM  cut for delta-rays by muons /GCCUTS/ 104
      PPCUTM  total energy cut for direct pair production by muons /GCCUTS/ 0.01
      TOFMAX  time of flight cut in seconds /GCCUTS/ 1010
      GCUTS  5 user words  /GCCUTS/ 0
DCAY  1 I IDCAY  decay  /GCPHYS/ 1
DRAY  I IDRAY  delta-ray  /GCPHYS/ 1
KEY  VAR  Short description COMMON  GINIT
ERAN  M   cross-section tables structure:    
    EKMIN  minimum energy for the cross-section tables /GCMULO/ 10-5
    EKMAX  maximum energy for the cross-section tables /GCMULO/ 104
    NEKBIN  number of logarithmic bins for cross-section tables /GCMULO/ 90
HADR  I IHADR  hadronic process  /GCPHYS/ 1
LABS  I ILABS  Cerenkov light absorbtion  /GCPHYS/ 0
LOSS  I ILOSS  energy loss /GCPHYS/ 2
MULS  I IMULS  multiple scattering  /GCPHYS/ 1
MUNU  I IMUNU  muon nuclear interaction /GCPHYS/ 1
PAIR  I IPAIR  pair production  /GCPHYS/ 1
PFIS  I IPFIS  photofission  /GCPHYS/ 0
PHOT  I IPHOT  photo electric effect  /GCPHYS/ 1
RAYL  I IRAYL  Rayleigh scattering  /GCPHYS/ 0
STRA  I ISTRA  energy fluctuation model /GCPHYS/ 0
SYNC  I ISYNC  synchrotron radiationgeneration  /GCPHYS/ 0
KEY  VAR  Short description COMMON  GINIT
DEBU  IDEMIN first event to debug. /GCFLAG/ 0
      IDEMAX last event to debug  /GCFLAG/ 0
      ITEST print control frequency /GCFLAG/ 0
GET  20 LGET  NGETnames of data structures tofetch (see Note) /GCLIST/ Blank
PRIN  20  LPRIN NPRINuser keywords to print datastructure (see Note) /GCLIST/ Blank
RGET  20 M LRGET NRGETnames of data structures to fetchfrom RZ files (see Note) /GCRZ/ Blank
RSAV  20 M LRSAVE NRSAVEnames of data structures to savefrom RZ files (see Note) /GCRZ/ Blank
SAVE  20 M LSAVE NSAVEnames of data structures tosave (see Note) /GCLIST/ Blank
SWIT  10 I ISWIT  user flags for debug /GCFLAG/ 0
KEY  VAR  Short description COMMON  GINIT
KINE  11  IKINE  user flag  /GCKINE/ 0
      PKINE  10 user words  /GCKINE/ 1010
SETS  20  LSETS  user words for detector sets  /GCLIST/ Blank
STAT  20  LSTAT  user words to control statistics /GCLIST/ Blank
PLOT  20  LPLOT  user words to control plots /GCLIST/ Blank
GEOM  20  LGEOM  user words to control geometry setup /GCLIST/ Blank
VIEW  20  LVIEW  user words to control view banks /GCLIST/ Blank