This documentation for converting a monte carlo file in PEV or STDHEP format to HEPG represents a work in progress, courtesy of Sebastian Carron. Questions should be addressed to and cc'ed to . Notes by Knuteson 5/29/02: Running on fcdfsgi2 requres re-compilation. Sebastian is fixing/adding a few features and tarballing his package. He hopes to make a conveniently-copied tarball available by early next week. ---------- Forwarded message ---------- Date: Wed, 29 May 2002 01:30:03 -0500 (CDT) From: Sebastian Carron Montero To: frisch@fnal.gov Cc: gerdes@fnal.gov, cabrera@fnal.gov, mkruse@fnal.gov Subject: Long awaited interface I have been on shift for the last 4 days, so only today I got around to finishing up some long awaited work. In the computer fcdfsgi2, in the /cdf/scratch/carron area there is a director named: InterPackage This directory contains all that is needed to transform .PEV files from compep into stdhep and these into hepg, which can be run through cdfSim, ntupled, etc... I also include an executable to run the Duke Ntuple on the Hepg files and an example analysis macro (for ttbar events) to do some analysis. So, to get the whole thing just copy the whole directory, you can use rcp for this or scp. in the future I will post a tar file in enstore with the whole package and you will get it from there. you will also need a .PEV file to test that it works. Now in enstore there are a couple (in fcdfsgi2 /pnfs/patriot from there you can get to various directories with different physical processes generated). To copy over a file from enstore you must do: setup encp -qstken encp fileyouwant areayouwanttocopyitto/filename (use yopur scratch area and then copy it from there to where you want it) in my InterPagage Directory there are various subdirectories, in files you should put your .PEV file, I plced already a ttbar.pev there so that you can test the inteface with it. go to the InterPackage directory do pwd then do setenv USERDIR whatyougotfrompwd to run the PEV to stdhep interface, go to the Scripts directory, there you find an INPARM.DAT file, edit this file to suit you .PEV file, your process and the number of events you want. then type source pevstdhep.csh This should do all the work for you. You should find at the end files of 50k events each in the directory files/STDHEP toguether with a logfile for the process. IMPORTANT: this takes a lot of time so you can check that in the Scripts directory from another windows the files are appearing; do ls -l and you will see how files fort.66 increase in size then fort.67 starts and so on until you are done and they are transfered automatically to the files/STDHEP directory To now convert the files into HEPG you can do two things, One is to have them in such a way that they will be ready to go through cdfSim in the Farms, to do that, in the Scripts directory edit the file stdhepgfarm.csh there is a list of run #'s according to the process that have been selected by Frank Wuerheim. Select the correct Run number in the line setenv RunNumb ..... Select your input file (fort.66, or forts.67 and so on), Now it can only handle one 50k events file at a time. I am workinf to automate the process to process all files at once. (The directories are preselected in the script) then save and do source stdhepgfarm.csh this will create 2000 events files in the files/HEPG directory and logfiles. The names of the files are pross_rn${RunNumb}_rs${SectionNum}.hepg the log files are codified in the same way. This files have the LRIH bank with the correct Run# and section#. The reason We do it like this is because the farms have a limit of roughly 2000 events per hepg files in order to work well when doing cdfSim. IF you want to do cdfSim in your computer and not in the farms you can create bigger files. Then use the file in the Script directory: stdhepgBig.csh to process stdhep into hepg you can edit this file and select the Input file and Number of events, it is very clear to do. Then do source stdhepgBig.csh and you will have your files in the files/HEPG directory. You have the option of breaking it up in sections, for that just select the SectionNums as multiple numbers and for Nevents the number of events in each section. Finally you can ntuple your HEPG files. in the Directory Ntupler edit the file TalkToSim.tcl and select your input file and output file. In the directory AnalysMacro you have an example root analysis macro for ttbar->dileptons which you can run, edit the ttbar_hepg.h to fit your input Dukentuple files. You could use this example as the basis for other analysis. Finally if you want to run through cdfSim, either produce farm compliant files as instructed and tell me about them so that Dimitri and I run them through the farms. Or generate hepg files and run cdfSim on them (instructions on how to do this last part in the next email) NOW, since many things changes but now the interface is working fine I am working in rerunning the interface on all datasets present in enstore (/pnfs/patiot) and placing there the hepg files. If any of you want to help me to make this faster it is fine with me. Future improvements on this inteface include more scripts to further automate the process and instructions on how to run cdfSim (non-farms) I hope this is informative for now. Sorry for the big dealay in having this ready. Sebastian Carron.