FMS Simulation Issues

 The problem that we notices in last weeks FMS meeting was that there appeared to be a strange cutoff in the per-tower simulation at 50 GeV.
Mriganga made available an example of simulation code that he is running.

I copied and ran his example code and made a plot from the mudst.root file. This mudst.root file came from generation of 50 single photon geant events  with energies ranging from 30-120 GeV.  The plot below is for adc vs hit energy for higher energy towers.

As we noted last week, the problem is that the energy per tower cuts off at 50 GeV!

After I spent some time looking for a problem in the FMS analysis software, it became clear that the problem goes back to the Geant level.

By searching for a place where the number 50 occured in the code, I noticed it in the directories


with files :
fpdmgeo1.g  fpdmgeo2.g  fpdmgeo3.g 

These ".g" files are written in a secret language known only to a few STAR experts. However I found in these files about 5 lines that looked like this

 HITS FLGR ELOS:0:(0,50)
 HITS FLGF ELOS:0:(0,50)
 HITS FLGX ELOS:0:(0,50)


I did a check out

cvs co pams/geometry

to get the files locally then I replaced (0:50) with (0:150)

I ran cons and created a new local  library and pointed the geant .kumac macro to that library.

Finally I ran another 50 events with energies between 50 and 100 GeV. 

The mriganka's geant kumac was now changed to


* Macro to generate ntrack particles. Note with the option E
* (last argument of gkine for energy range instead of pT range)
* the PDG numbering scheme is used for the particle ID.
* See also 'help gkine' inside starsim.
macro singletrack outfile=test.fzd nevents=50 ntrack=1 pid=22 ptlow=50.0 pthigh=100.  ylow=3.60 yhigh=3.61 philow=-3.1416 phihigh=3.
1416 zlow=0. zhigh=0. option=E seed=0
debug on
gfile o [outfile]
detp geom y2012 field=-5.0 hadr_on split_off
gexec .sl64_gcc447/lib/
gexec $STAR_LIB/
gclose all
rndm [seed] 1
do i=1,[nevents]
  mess [i]
  gkine [ntrack] [pid] [ptlow] [pthigh] [ylow] [yhigh] [philow] [phihigh] [zlow] [zhigh] [option]
  gprint vert
  gprint kine
  gprint hits


So this runs 50 events with the changed library and with photon energies from 50 to 100 GeV into pseudorapidity of about 3.6

The corresponding plot of adc vs energy for fms hits is now shown below.

We did get rid of the 50 GeV cuttoff in the fms energy distribution.

The only problem is that I can only guess what this line of code " HITS FLGR ELOS:0:(0,50)"  in the "*.g" files does. I have no idea why a limit like this is placed in the geometry definition files or even exactly what these files do for the FMS simulation (they are named with "fpd").  I assume that some or all of these files are for the FMS. 

 Someone who knows what this STAR geometry  language does should think about this.