User Tools

Site Tools


mem:mem

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
mem:mem [2013/07/05 14:44] decosamem:mem [2013/07/05 15:21] (current) decosa
Line 20: Line 20:
  
  
-Madweight requires as input a **set of datacards** and an **LHCO file**.+Madweight requires as input an **LHCO file** and a **set of datacards**
 + 
 + 
 + 
 + ===== LHCO files ===== 
 + 
 +A **LHCO** file is a text file collecting basic info on all the events of the sample.  
 +  * It stores info about the type of particles in the event (muon, electron, jet, met) and relative pt, eta, phi, btag, ect. 
 +  More info about the structure of LHCO files can be found at: http://madgraph.phys.ucl.ac.be/Manual/lhco.html 
 + 
 +__**LHE to LHCO**__: lhco files can be converted from LHE files. To do this a script is available from MadGraph website. Download it in the working directory: 
 + 
 +<code> 
 +wget https://cp3.irmp.ucl.ac.be/projects/madgraph/raw-attachment/wiki/MadWeightTool/lhe2lhco.py.txt  
 +mv lhe2lhco.py.txt lhe2lhco.py 
 +</code> 
 + 
 +__**EDM LHE to LHCO**__: lhco files can converted also from EDM LHE files using a standard tool provided within the CMS framework (ExternalLHEAsciiDumper). Copy it and change the name of the input file:  
 +  [[http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/GeneratorInterface/LHEInterface/test/testExternalLHEAsciiDumper_cfg.py?revision=1.2&view=markup]]  
 + 
 + 
 +__**ROOT to LHCO**__: To convert root files to LHCO files a standard tool does not exist, because it depends on the structure of the user root file. A root/lhco converter script to convert tH analysis root ntuples in lhco file is going to be implemented and it will be posted here as soon as it will be ready. 
 +  
 + 
 + ===== Datacards ===== 
 Datacards are stored in the sundirectory Cards of the created folder tHbb_HP. Datacards are stored in the sundirectory Cards of the created folder tHbb_HP.
 The datacards to customize are three: param_card.dat, run_card.dat and Madweight_card.dat The datacards to customize are three: param_card.dat, run_card.dat and Madweight_card.dat
Line 35: Line 60:
 </code> </code>
  
-  * run_card.dat and param_card.dat have to remain unchanged once the hypothesis is defined. The parameter ''name'' in Madweight_card.dat has to be changed each time the hypothesis has to be run over a different sample. It is very important to change this value because otherwise the previous results will be overwritten. 
-  * Also the lhco file has to be updated each time MadWeight has to be run over a new sample: the lhco file related to the specific sample must be placed in the Events directory and named ''input.lhco''. 
  
  
  
 + ===== Producing weights =====
  
-A **LHCO** file is text file collecting basic info on all the events of the sample.  +In order to apply the matrix element method to sample S under the hypothesis HP, Madweight has to be run using the LHCO file relative to the sample S and the datacards related to the hypothesis HP.  
-  * It stores info about the type of particles in the event (muon, electron, jet, met) and relative pt, eta, phi, btag, ect+  * Copy the .lhco file in the Events folder with name ''input.lhco'': 
-  * More info about the structure of LHCO files can be found at: http://madgraph.phys.ucl.ac.be/Manual/lhco.html +<code> 
- +cd tHbb_HP  
-__**LHE to LHCO**__: lhco files can be converted from LHE filesTo do this a script is available from MadGraph websiteDownload it in the working directory:+cp $MYSAMPLE_PATH/MySample.lhco Events/input.lhco 
 +</code> 
 +  * Set the transfer function (TF), choosing it among those available: 
 +<code> 
 +./bin/mw_options 
 +define_transfer_fct 
 +Please choose your transfer_function between 
 + dbl_gauss_pt_jet 
 + uniform 
 + 2 / jet_gaussian 
 + 3 / user 
 + 4 / single_gaussian 
 + 5 / gauss_on_leptons 
 + 6 / all_delta 
 + [dbl_gauss_pt_jet, uniform, jet_gaussian, user, single_gaussian, gauss_on_leptons, all_delta, 0, 1, ... ][60s to answer] 
 +</code>
  
 +  * It is possible to define a custom transfer function. Instructions will come soon. 
 +  * Now that everything has been set launch MadWeight to compute the probabilities for each events:
 <code> <code>
-wget https://cp3.irmp.ucl.ac.be/projects/madgraph/raw-attachment/wiki/MadWeightTool/lhe2lhco.py.txt  +./bin/madweight.py
-mv lhe2lhco.py.txt lhe2lhco.py+
 </code> </code>
 +At this point MadWeight propose to check the datacards, change again transfer function if desired or specify another lhco file. If everything has been already set properly before, then just type 0 to go ahead.
  
-__**EDM LHE to LHCO**__: lhco files can converted also from EDM LHE files using a standard tool provided within the CMS framework (ExternalLHEAsciiDumper). Copy it and change the name of the input file:  
-  * [[http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/CMSSW/GeneratorInterface/LHEInterface/test/testExternalLHEAsciiDumper_cfg.py?revision=1.2&view=markup]]  
  
 +In order to apply the MEM over different samples, but under the same hypothesis, follow the next steps:
 +
 +  * run_card.dat and param_card.dat have to remain unchanged once the hypothesis is defined. 
 +  * The parameter ''name'' in Madweight_card.dat has to be changed. A new subdirectory **name** will be created in the Events folder each time MW is run. Results will be stored there. It is very important to change this value because otherwise the previous results will be overwritten.
 +  * Also the lhco file has to be updated each time MadWeight has to be run over a new sample: the lhco file related to the specific sample must be placed in the Events directory and named ''input.lhco'' as usual.
 +
 +
 +
 + ===== Results =====
 +
 +Results will be collecting in the file weights.out in the Events/name/ folder.
  
-__**ROOT to LHCO**__: To convert root files to LHCO files a standard tool does not exist, because it depends on the structure of the user root file. A root/lhco converter script to convert tH analysis root ntuples in lhco file is going to be implemented and it will be posted here as soon as it will be ready. 
-  
mem/mem.1373028271.txt.gz · Last modified: 2013/07/05 14:44 by decosa