User Tools

Site Tools


community:hepsim:usage_fast

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
community:hepsim:usage_fast [2016/04/28 18:13]
asc [Comparing MC and data]
community:hepsim:usage_fast [2016/04/29 18:29] (current)
asc [Downloading ROOT files]
Line 3: Line 3:
 ====== Fast detector simulation ====== ====== Fast detector simulation ======
  
-===== On the fly reconstruction ===== +====== Downloading ROOT files  ====== 
-HepSim ca be used o create ROOT files after fast detector simulation, or  +Files after fast detector simulations are created using [[http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.3.0.tar.gz | Delphes-3.3.0]] programs. 
-one can analyse events after the Delphes fast simulation program on the fly. +Assuming that you have installed either** hs-tools** or **Jas4pp** programsyou can download
-The latter approach allows to make changes to  the detector geometry by the end-users and, at the the same time, perform an analysis. +
-The output ROOT file only includes histograms defined by the user (but you can also add custom ROOT tree).  +
-To do this, use the [[http://atlaswww.hep.anl.gov/asc/hepsim/soft/FastHepSim.tgz| FastHepSim package]] +
-that includes [[http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.2.0.tar.gz | Delphes-3.2.0]] and ProMC 1.5as well as an example analysis program. +
-You can find a description of the [[https://atlaswww.hep.anl.gov/asc/wikidoc/doku.php?id=vlhc:hcal|current HCAL studies]] that use such an approach.+
  
-Follow these steps:+Here how you can find all samples that have "rfast" tag for download. Click here: [[http://atlaswww.hep.anl.gov/hepsim/list.php?find=rfast]]. If you need to find all ROOT files 
 +for a give tag, say rfast004, use this command:
  
 <code bash> <code bash>
-wget http://atlaswww.hep.anl.gov/asc/hepsim/soft/FastHepSim.tgz +hs-find tev14_mg5%rfast004
-tar -zvxf FastHepSim.tgz +
-cd FastHepSim/libraries/ +
-./install.sh+
 </code> </code>
- +which searches for all samples with the dataset name "tev14_mg5(Madgraph514 TeV samples). 
-This installs "FastHepSimwhich includes DelphesProMC and hs-tools to work with HepSim. Then setup the environment +Then download a selected sample as:
  
 <code bash> <code bash>
-cd .. # go to the root directory +hs-get tev14_mg5_nlo_httbar%rfast004
-source setup.sh+
 </code> </code>
  
-Next, go to the analysis example: +The description of the detector tags is given in [[community:hepsim:usage_detectors|Detector description]].
- +
-<code bash> +
-cd analysis +
-make +
-</code> +
-  +
-This compiles the analysis program (analysis.cc) that fills jetPT and muonPT histograms.  +
-Now we need to bring  data from [[http://atlaswww.hep.anl.gov/hepsim/| HepSim]] and put them somewhere. For this example, +
-we will copy data to the "data" directory: +
- +
-<code bash> +
-hs-get http://mc.hep.anl.gov/asc/hepsim/events/pp/100tev/higgs_ttbar_mg5 data 2 3 +
-</code> +
-This copies 3 files in 2 threads and put them to the directory "data". Now we are ready to run over these 3 files: +
- +
-<code bash> +
-./Make_input data  # creates inputdata.txt +
-./analysis delphes_card_FCC_basic_notau.tcl histo.root inputdata.txt +
-</code> +
- +
-The first command creates a file "inputdata.txt" with input data. Then the program "analysis" reads the configuration file, data and generates "histo.root" +
-with output histograms. This example uses "delphes_card_FCC_basic_notau.tcl" Delphes configuration file describing a basic FCC detector geometry. +
-Note that we have removed  tau tagging since we run over slimmed events with missing mothers of particles. +
- +
-If you want to access other objects (photons, electrons, b-jets),  +
-use [[https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/Arrays | Delphes definitions of arrays]] inside the source code "analysis.cc"+
-You can put external files into the src/ directory where it will be found by Makefile. +
- +
-If you still want to look at the event structure in the form of ROOT tree, run the usual Delphes command: +
-<code bash> +
-../libraries/Delphes/DelphesProMC  delphes_card_FCC_basic_notau.tcl  output.root data/mg5_Httbar_100tev_001.promc +
-</code> +
-where output.root will contain all reconstructed objects. In this case, add "TreeWriter" after "ScalarHT"+
-If the input file contains complete (non-slimmed) record, one can add "tau" reconstruction ("TauTagging" line). +
- +
-Try also more sophisticated detector-geometry cards: +
- +
-  * examples/delphes_card_Snowmass_NoPileUp.tcl - similar to Snowmass 2013. It has CA (fat) jets and B-tagging +
-  * examples/delphes_card_ATLASLIKE.tcl         - similar to ATLAS detector (comes with Delphes) +
- +
-Note that "TreeWriter" module should be enabled when creating ROOT files, and disabled when using analysis mode. +
- +
- +
- +
- +
- +
- +
- +
- +
- +
-====== How to create ProMC files  ====== +
- +
-There are several methods to create ProMC files from MC simulations. The most complete description is given [[https://atlaswww.hep.anl.gov/asc/wikidoc/doku.php?id=asc:promc|here]]. Here are several examples: +
- +
-  * If you use Pythia8, look at the example "main46.cc" inside Pythia8 package. +
-  * For other generators, such as Herwig++ and Madgraph, write events in either lhe files or hepmc files. Then  use the converters "stdhep2promc" or "hepmc2promc" that are shipped  with ProMC (inside $PROMC/examples).  +
- +
-If are working on a description of how to fill ProMC files from Jetphox or MCFM.  At this moment, contact us to get help. +
- +
-We have very limited support for other formats, since they are typically 1) large files (such as HEPMC); 2) cannot be used for streaming over the network; 3) are not suited in a multi-platform environments (i.e. Windows). +
- +
-  +
- +
- +
- +
-====== A note for ANL cluster  ====== +
- +
-For ANL cluster, you do not need to install Delphes. Simply run the reconstruction as: +
-<code bash> +
-source /share/sl6/set_asc.sh +
-$DELPHES/DelphesProMC delphes_card_FCC_notau.tcl mg5_ttbar_100tev_001.root mg5_ttbar_100tev_001.promc +
-</code> +
-The cards are located in $DELPHES/examples. +
- +
-If you want to run over multiple ProMC files without manual download, use this command: +
- +
-<code bash> +
-java -cp hepsim.jar hepsim.Exec DelphesProMC delphes.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 the "hepsim_output" directory. +
-Here is a small example: +
-<code bash> +
-java -cp hepsim.jar hepsim.Exec DelphesProMC delphes.tcl output.root  http://mc.hep.anl.gov/asc/hepsim/events/pp/100tev/higgs_ttbar_mg5 5 +
-</code> +
-which processes 5 files from [[http://atlaswww.hep.anl.gov/hepsim/info.php?item=2|Higgs to TTbar sample]].  +
-Skip "5" at the end to process all files.  +
- +
- +
-====== Converting to LCIO ====== +
- +
-ProMC files can be converted to LCIO files for full detector simulation.  This is an example of such conversions: +
- +
-<code bash> +
-wget http://atlaswww.hep.anl.gov/asc/promc/download/current.php -O ProMC.tgz +
-tar -zvxf ProMC.tgz +
-cd examples/promc2lcio +
-source setup.sh +
-javac promc2lcio.java +
-java promc2lcio file.promc file.slcio +
-</code> +
- +
-Look at other directories in "examples/". You can convert ProMC files to many other formats (most converters require  installation of the ProMC C++ package). +
-====== Record slimming ====== +
-Particle records from the generators based on  LO/NLO+parton showers calculations  +
-(PYTHIA, HERWIG, MADGRAPH) are often "slimmed" to reduce file sizes. In the case when +
-records are slimmed, the following algorithm is used: +
- +
-<code python> +
-(status=1 && pT>0.3 GeV ) or   # keep final states with pT>0.3 GeV  +
-(PID=5 || PID=6)  or           # keep b or top quark  +
-(PID>22 && PID<38)  or         # keep exotics and Higgs +
-(PID>10 && PID<17)  or         # keep all leptons and neutrinos  +
-</code> +
-where PID is absolute value of particle codes. Leptons ane neutrinos are also affected by the slimming pT cut. +
-Note: for 100 TeV collisions, the pT cut is increased from 0.3 to 0.4 GeV. +
-For NLO calculations with a few partons + PDF weights, the complete event records are stored.+
  
-In the case when the slimming is applied, file sizes are reduced by x2 -  x3. In some situation, slimming +====== Analysing ROOT files  ======
-can affect detector simulation. For example, you should turn of tau reconstruction in Delphes when slimming is used.+
  
 +Read the [[https://cp3.irmp.ucl.ac.be/projects/delphes| Delphes manual]] explaining how to analyse ROOT files from HepSim. 
community/hepsim/usage_fast.1461867201.txt.gz · Last modified: 2016/04/28 18:13 by asc