Just run, without local builds

(procedure last tested and updated 15 Oct 2008)

1) Make a working directory, and cd there.

2) Get the following files from CVS: 
   cvs co simulation/pisa2000/wrk/
   cp simulation/pisa2000/wrk/phnx.par .
   cp simulation/pisa2000/wrk/pisa.kumac .
      modify the following lines to look like this: 
      FOUT 'pisafile.dat.cZ'          ! Name of output hits file
      FPAR 'phnxSili.par'             ! Name of namelist parameter file for geometry

      SVX  'ON' 'FULL' 'P_ID' 'FULL' 'ELEM' 'NEUT'  ! This is the Silicon Vertex Tracker (upgrade)
      VER  'OFF' 'FULL' 'P_ID' 'FULL' 'VCAL' 'STCK'   ! MVD on with track stack used
      (Turn off all detectors except SVX, MUM, MUI) 

   cp simulation/pisa2000/wrk/event.par .     -> and change the vrms line to vrms = 0.0, 0.0, 0.0
   cp simulation/pisa2000/wrk/gffgo.dat .
   cp simulation/pisa2000/wrk/flukaaf.dat .

   Get the following file from Hubert's work area:
   cp /phenix/u/workarea/hubert/cvs5/wrk/gffgo_makegeom.dat  .
                                         pisa_makegeom.input .
                                         geom_con.csh .
                                         fvtxgeom.dat .
                                         show14.kumac .
                                         Fun4Muons_Pisa.C .
                                         Fun4Muons_RecoDST_sim.C .

   The Fun4* macros are slightly modified from the cvs versions in /offline/framework/preco/macros/

3) Build the root geometry files: this step runs Pisa to write out the geometry, 
   and convert this to a root file that is used later by the offline code Fun4*. This way
   your offline geometry exactly matches the Pisa geometry. 

   In phnx.par, change sili_endcap_strip_on = 0 to 1

   pisa < pisa_makegeom.input

   In phnx.par, change back sili_endcap_strip_on = 1 to 0

   ./geom_con.csh

   New files created: fvtxgeom.root
                      pisafile.dat.cZ
                      (and several others)

4) Run Pisa: this example takes a look at the detector, and runs 100 pythia events from an existing
   pythia file:

   ln -sf /phenix/zdata03/data11/rhphemds/Run02/simProject29/event/PYTHIA_MinbPP-0000035040-00029.dat pythia.dat
   pisa <CR> <CR> <CR> <CR>
      exec show14.kumac
      pythia 100 pythia.dat
      ptrig 100
      exit

   New files created: PISAEvent.root
   pisaRootRead         (convert to easy-to-read ntuple, one per subsystem)
   New files created: ancsvx.root
                      (many other anc*.root files)
   
   Have a look at ntuple AncSvx in ancsvx.root. Variables are mostly self-explanatory.
   For example: 
       root -l ancsvx.root
       AncSvx->Draw("sqrt(XGLOBAL**2+YGLOBAL**2):ZGLOBAL")    shows an r-z view of all hits. 

3) Run the offline analysis in 2 phases: 
   
   root -l
   .x Fun4Muons_Pisa.C(1000)
   .q

   output (among others): dst_pisa_out.root
   
   root -l 
   .x Fun4Muons_RecoDST_sim.C
   .q

   Output (among others) fvtx_mc_eval.root
   Example:
   root -l fvtx_mc_eval.root
   mc_trk_eval->Draw("y1mc:x1mc","x1mc>-100","box")





Last update 15 Oct 2008