Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hepsim:dev_fast [2017/03/19 14:26]
hepsim17
hepsim:dev_fast [2018/04/27 16:35] (current)
hepsim17
Line 1: Line 1:
- {{indexmenu_n>10}}+{{indexmenu_n>12}}
  
  
 [[:|<< back to HepSim manual]] [[:|<< back to HepSim manual]]
  
-Fast simulations in the HepSim are posted under the [[http://atlaswww.hep.anl.gov/hepsim/list.php?find=rfast | rfast link]]. The detectors configurations are posted to [[http://atlaswww.hep.anl.gov/hepsim/detectors.php|this link]].+====== Creating Delphes files ====== 
 + 
 + 
 +Fast simulations in the HepSim are posted under the [[http://atlaswww.hep.anl.gov/hepsim/list.php?find=rfast|rfast link]]. The detectors configurations are posted to [[http://atlaswww.hep.anl.gov/hepsim/detectors.php|this link]]
 + 
 +Generally, you do not need to install Delphes to run fast simulations. You can run fast simulations using the HepSim singularity container. This topic is described in [[hepsim:dev_singularity|HepSim singularity container]] section.  
 + 
 +Below is the description how to use Delphes if you do not want to use the HepSim docker container.
  
 ===== Creating Delphes files  ===== ===== Creating Delphes files  =====
  
-Here we describe how to make fast detector simulation files  +Here we describe how to make fast detector simulation files  using separate external libraries, without installing FastHepSim. Use the [[https://cp3.irmp.ucl.ac.be/projects/delphes | Delphes]] fast detector simulation program to process the MC events. Delphes can read [[http://atlaswww.hep.anl.gov/asc/promc/ | ProMC]] files directly. First, make sure that ProMC and ROOT library is installed:
-using separate external libraries, without installing FastHepSim. +
-Use the [[https://cp3.irmp.ucl.ac.be/projects/delphes | Delphes]] fast detector simulation program to process the MC events. Delphes can read [[http://atlaswww.hep.anl.gov/asc/promc/ | ProMC]] files directly. First, make sure that ProMC and ROOT library is installed:+
 <code bash> <code bash>
 echo $PROMC $ROOTSYS echo $PROMC $ROOTSYS
 </code> </code>
-This should point to the installation paths of ProMC and ROOT. +This should point to the installation paths of ProMC and ROOT. The detectors configurations for Delphes together with appropriate Delphes package are posted to [[http://atlaswww.hep.anl.gov/hepsim/detectors.php#fast|this link]].
- +
- +
-The detectors configurations for Delphes together with appropriate Delphes package +
-are posted to [[http://atlaswww.hep.anl.gov/hepsim/detectors.php|this link]].+
 Copy the ZIP file with Delphes card and Delphes package and compile it. Copy the ZIP file with Delphes card and Delphes package and compile it.
  
Line 30: Line 31:
 cd $det cd $det
 tar --strip-components=1 -zvxf Delphes*.tar.gz # untar in the current directory tar --strip-components=1 -zvxf Delphes*.tar.gz # untar in the current directory
-./cofigure +./configure; make                              # configure and compile                                      
-./DelphesProMC card.tcl  file.promc # run using test input ProMC file+</code>                                         
 +The last command should create the binary file "DelphesProMC". Now you can process a ProMC file: 
 + 
 +<code bash> 
 +wget http://mc.hep.anl.gov/asc/hepsim/events/pp/14tev/mg5_ttbar_jet/mg5_ttbar_jet_001.promc 
 +./DelphesProMC card.tcl mg5_ttbar_jet_001.root mg5_ttbar_jet_001.promc
 </code> </code>
 +This commands creates a ROOT file with fast simulations.
 +
 +<note>
 +Detector configuration files [detector].zip include the Delphes source code  used to make the simulation tag, 
 +and the input control card "card.tcl" that defines the geometry. Look at [[http://atlaswww.hep.anl.gov/hepsim/detectors.php#fast|this link]].
 +</note>
  
-Now you can create a complete list of input files. Here is how to do this:+You can create a complete list of input files. Here is how to do this:
  
 <code bash> <code bash>
Line 50: Line 62:
 </code> </code>
 where [setname] is the dataset name, such as "tev100_ttbar_mg5". where [setname] is the dataset name, such as "tev100_ttbar_mg5".
-If you know URL of the mirror, replaces [setname] with qualified URL pointing to your dataset.+If you know URL of the mirror, replaces [setname] with qualified URL pointing to your dataset. Now, you have the necessary tools. Fetch the list of URLs with input files, and make a loop over files
  
-Nowyou have the necessary toolsFetch the list of URLs with input filesand make loop over files.+ 
 +One can also run Delphes in an automated modewithout the above scriptsYou need to use "hs-exec" command. 
 +<code bash> 
 +hs-exec DelphesProMC card.tcl output.root [URL] [Nfiles] 
 +</code> 
 +where [URL] is HepSim location of files and  [Nfiles] is the number of files for processing. 
 +The output ROOT will be located inside "hepsim_output" directory. 
 + 
 +Here is small example: 
 +<code bash> 
 +hs-exec DelphesProMC card.tcl output.root http://mc.hep.anl.gov/asc/hepsim/events/pp/14tev/mg5_ttbar_jet/
 +</code> 
 +which processes 5 files from [[http://atlaswww.hep.anl.gov/hepsim/info.php?item=143/|HiggsToTTbar sample]]. Skip "5" at the end to process all files.                                                                                                                                                               
 + 
 + 
 + 
 +====== Creating files manually ======
  
  
Line 65: Line 93:
 make make
 </code> </code>
-This  creates the converter "DelphesProMC" (among others), if "PROMC" environmental variable is detected. +where "X.X.X" is the version of Delphes. This  creates the converter "DelphesProMC" (among others), if "PROMC" environmental variable is detected. 
  
 (2)  Copy and modify the detector configuration files. The configuration files with the extension "tcl" can be found in [[http://atlaswww.hep.anl.gov/hepsim/detectors.php|this link]] (2)  Copy and modify the detector configuration files. The configuration files with the extension "tcl" can be found in [[http://atlaswww.hep.anl.gov/hepsim/detectors.php|this link]]
- 
  
 Often,  the line "TauTagging" from the Delphes control card. We do not use  the tau tagging module since it requires complete event records with all mother particles. Since ProMC files are often slimmed by removing some unstable low pT particles and showered partons, Delphes will fail on this line. If you need tau tagging, please use ProMC files with complete particle record. Often,  the line "TauTagging" from the Delphes control card. We do not use  the tau tagging module since it requires complete event records with all mother particles. Since ProMC files are often slimmed by removing some unstable low pT particles and showered partons, Delphes will fail on this line. If you need tau tagging, please use ProMC files with complete particle record.
Line 83: Line 110:
 ./DelphesProMC card.tcl  mg5_ttbar_100tev_001.root mg5_ttbar_100tev_001.promc ./DelphesProMC card.tcl  mg5_ttbar_100tev_001.root mg5_ttbar_100tev_001.promc
 </code> </code>
-The conversion typically takes 30 seconds. 
- 
  
 ===== On the fly reconstruction ===== ===== On the fly reconstruction =====
Line 154: Line 179:
  
  
 +<note important>Tim Kallage made a correction for DPF Delphes card that corrects b-tagging. Download it from 
 +{{ :hepsim:snowmass_fixed.tcl.txt |}}</note>