Difference: EmbedParticles (2 vs. 3)

Revision 32006-05-25 - GergelyPatay

Line: 1 to 1
 
META TOPICPARENT name="TrackerSoftware"
Changed:
<
<
In the following we will generate manually a 'single proton' event, which can be fed into OSCAR and ORCA.
>
>
In the following we will generate manually a 'single kaon' event, which can be fed into OSCAR and ORCA.
 

The HEPEVT ntuple structure

OSCAR expects its input in an HBOOK ntuple with the following fields:
Line: 14 to 14
  integer JMOHEP(2,NHEP) = position of 1st and 2nd mother integer JDAHEP(2,NHEP) = position of 1st and last daughter real PHEP(5,NHEP) = 4-momentum and mass (single precision in ntuple file)
Changed:
<
<
real VHEP(4,NHEP) = vertex xyz and production time (single precision in ntuple file)
>
>
real VHEP(4,NHEP) = vertex xyz and production time (single precision in ntuple file), OSCAR do not care about this...
  Block MC_PARAM: integer IRNMCP = run number
Changed:
<
<
integer IEVMCP = event number real WGTMCP = event weight real XSECN = cross section equivalent integer IFILTER = filter pattern
>
>
integer IEVMCP = event number (must equal to NEVHEP) real WGTMCP = event weight (1.0) real XSECN = cross section equivalent (1.0) integer IFILTER = filter pattern (0)
  integer NVRMCP = number of additional variables real VARMCP(NMXMCP) = list of additional variables

Writing ntuples

Changed:
<
<
Writing such an ntuple is straightforward in Fortran [TODO: C/C++ interface via cfortran.h], see the attached example program.
>
>
Writing such an ntuple is straightforward in Fortran [TODO: C/C++ interface via cfortran.h], see the attached example program writehbook.f.
 
  1. Define the data blocks as Fortran COMMON's.
Changed:
<
<
  1. Create an ntuple with the HROPEN procedure (say test.ntpl), and define its structure with HBNAME. Note: ntuple's ID must be 100 (unpacked) or 101 (packed; a bit tricky)
>
>
  1. Create an ntuple with the HROPEN procedure (say test.ntpl), and define its structure with HBNAME. Note: ntuple's ID must be 100 (unpacked) or 101 (packed; a bit tricky). Additonal note: Ntuple variable names has to be in capital letters. Don't ask why...
 
  1. Do a loop over the events, generate some particles, etc; at the end of the loop call hfnt(ID)
  2. Close the ntuple.
Changed:
<
<
Compile the program with g77 -c test.f and link with g77 -o test.run test.o `cernlib packlib,mathlib`
>
>
Compile the program with g77 -c writehbook.f and link with g77 -o writehbook.run writehbook.o `cernlib packlib,mathlib`
 This requires a running g77 system with cernlib properly installed (on debian: apt-get install cernlib)

Run the executable.

Line: 43 to 43
 
h/file 0 test.ntpl 4096
Changed:
<
<
n/print 100 n/plot 100.idhep
>
>
n/print 101 n/plot 101.idhep
 
Line: 60 to 60
 ... OutputDataSet = /System/sim/test EventNtplReader :NtplFileName = test.ntpl
Changed:
<
<
EventNtplReader :NtplID = 100
>
>
EventNtplReader :NtplID = 101 # or 100 if you generated unpacked ntuple
 ...
Line: 77 to 77
 HBOOK Reference

-- GergelyPatay - 08 Mar 2006 \ No newline at end of file

Added:
>
>

META FILEATTACHMENT attachment="writehbook.f" attr="" comment="" date="1148550361" name="writehbook.f" path="writehbook.f" size="2936" stream="writehbook.f" user="Main.GergelyPatay" version="1"
 
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback