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
Last revision Both sides next revision
hepsim:dev_fast [2017/03/19 14:01]
hepsim17 [Reproducing HepSim simulations]
hepsim:dev_fast [2017/09/24 22:33]
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 +====== Creating Delphes files ====== 
-to [[http://atlaswww.hep.anl.gov/hepsim/detectors.php|this link]].+ 
 + 
 +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]]. 
-  +Copy the ZIP file with Delphes card and Delphes package and compile it
-Here are the steps to perform a  fast detector simulation using ProMC files from the HepSim repository:+ 
 +Here is an example of how to re-create fast simulations for "rfast100" tag, which  
 +corresponds to the detector "delphes_atlas1" (look at the detector definition page).
  
-1) Download [[http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.3.0.tar.gz | Delphes-3.3.0.tar.gz]] (or higher) and compile it as:  
 <code bash> <code bash>
-wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.2.0.tar.gz +det="delphes_atlas1" # define detector 
-tar -zvxf Delphes-3.3.0.tar.gz +wget http://atlaswww.hep.anl.gov/hepsim/soft/detectors/$det.zip 
-cd Delphes-3.3.0 +unzip $det.zip 
-./configure +cd $det 
-make +tar --strip-components=1 -zvxf Delphes*.tar.gz # untar in the current directory 
-</code> +./configuremake                              # configure and compile                                      
-This  creates the converter "DelphesProMC" (among others), if "PROMC" environmental variable is detected+</code>                                         
 +The last command should create the binary file "DelphesProMC"Now you can process a ProMC file:
  
-2)  For FCC studies, copy and modify the detector configuration file "delphes_card_FCC_basic.tcl"  
 <code bash> <code bash>
-cp cards/delphes_card_FCC_basic.tcl delphes_card_FCC_notau.tcl+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>
-Then remove the line "TauTagging"Do the same when using the card "cards/delphes_card_ATLAS.tcl" (for ATLAS). +This commands creates a ROOT file with fast simulations. 
-We do not use  the tau tagging module since it requires complete event records with all mother particlesSince ProMC files are often slimmed by removing some unstable low pT particles and showered partons, Delphes will fail on this lineIf you need tau tagging, please use ProMC files with complete particle record.+ 
 +<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 geometryLook at [[http://atlaswww.hep.anl.gov/hepsim/detectors.php#fast|this link]]. 
 +</note> 
 + 
 +You can create a complete list of input filesHere is how to do this:
  
-3) Download Monte Carlo files from the [[ http://mc.hep.anl.gov/asc/hepsim/events/?dir=pp/100tev | 100 HepSim repository]]. 
-For example, get a file with 5000 ttbar events generated for a 100 TeV collider: 
 <code bash> <code bash>
-wget http://mc.hep.anl.gov/asc/hepsim/events/pp/100tev/ttbar_mg5/mg5_ttbar_100tev_001.promc+hs-ls [setname] simple     > input.list     # list of ProMC files (without URL path) 
 +hs-ls [setname] simple-url > input_url.list # list with URL from the main server 
 +# create a setup array with input files 
 +declare -a wwwarray   
 +n=0 
 +while read -r line 
 +do 
 +    name=$line 
 +    wwwarray[$n]=$name  
 +    let "n = $n + 1" 
 +done < "inputlist_url.txt"
 </code> </code>
 +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. Now, you have the necessary tools. Fetch the list of URLs with input files, and make a loop over files. 
  
-and then create a ROOT file with reconstructed objects after a  fast detector simulation (FCC detector): 
  
 +One can also run Delphes in an automated mode, without the above scripts. You need to use "hs-exec" command.
 <code bash> <code bash>
-./DelphesProMC delphes_card_FCC_notau.tcl  mg5_ttbar_100tev_001.root mg5_ttbar_100tev_001.promc+hs-exec DelphesProMC card.tcl output.root [URL] [Nfiles]
 </code> </code>
-The conversion typically takes 30 seconds.+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.
  
-===== Reproducing HepSim simulations  ===== +Here is a small example: 
-The detectors configurations for Delphes together with appropriate Delphes package +<code bash> 
-are posted to [[http://atlaswww.hep.anl.gov/hepsim/detectors.php|this link]]. +hs-exec DelphesProMC card.tcl output.root http://mc.hep.anl.gov/asc/hepsim/events/pp/14tev/mg5_ttbar_jet/
-Copy the ZIP file with Delphes card and Delphes package and compile it.+</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                                                                                                                                                             
  
-Here is an example of how to re-create fast simulations for "rfast100" tag, which  
-corresponds to the detector "delphes_atlas1" (look at the detector definition page). 
  
 +
 +====== Creating files manually ======
 +
 +
 +If you want to create a new simulations with updated Delphes and input cards, follow these steps:
 +
 +
 +(1) Download [[http://cp3.irmp.ucl.ac.be/downloads/ | current Delphes ]] (or higher) and compile it as: 
 <code bash> <code bash>
-echo $PROMC          # make sure ProMC variable is defined. Must be non-empty  +tar -zvxf Delphes-X.X.Xtar.gz 
-echo $ROOTSYS        # make sure ROOT is installed. Must be non-empty +cd Delphes-X.X.X.tar.gz 
-det="delphes_atlas1" # define detector +./configure 
-wget http://atlaswww.hep.anl.gov/hepsim/soft/detectors/$det.zip +make
-unzip $det.zip +
-cd $det +
-tar --strip-components=1 -zvxf Delphes*.tar.gz # untar in the current directory +
-./cofigure +
-./DelphesProMC card.tcl  file.promc # run test using input ProMC file+
 </code> </code>
 +where "X.X.X" is the version of Delphes. This  creates the converter "DelphesProMC" (among others), if "PROMC" environmental variable is detected. 
  
-Now you can create a complete list of input files. Here is how to do this:+(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.
 +
 +Download Monte Carlo files from the [[ http://mc.hep.anl.gov/asc/hepsim/events/?dir=pp/100tev | 100 HepSim repository]].
 +For example, get a file with 5000 ttbar events generated for a 100 TeV collider:
 <code bash> <code bash>
-hs-ls [setname] simple     > input.list     # list of ProMC files +wget http://mc.hep.anl.gov/asc/hepsim/events/pp/100tev/ttbar_mg5/mg5_ttbar_100tev_001.promc
-hs-ls [setname] simple-url > input_url.list # list with URL (main server)+
 </code> </code>
-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. 
- 
-Now, you have the necessary tools. Fetch the list of URLs with input files, and make a loop over files. 
  
 +and then create a ROOT file with reconstructed objects after a  fast detector simulation (FCC detector):
  
 +<code bash>
 +./DelphesProMC card.tcl  mg5_ttbar_100tev_001.root mg5_ttbar_100tev_001.promc
 +</code>
  
 ===== On the fly reconstruction ===== ===== On the fly reconstruction =====