This page documents the MC samples used.

LHC JHUGen MC files for VBF analysis

Instructions and info

There are four major components of the procedure:

  1. Converting LHE files to .root files with appropriate variables
  2. Computing the ME for each event and adding it to the trees
  3. Computing 2D templates of the discriminants from the MEs
  4. 2D Pure Toys study

Converting LHE files:

The code to do so can be found at hep:/scratch0/hep/ianderso/ConverterCode/

Inside, there are three files: converter.sh, loadReadOutAngles.tpl, readOutAngles_MG.C. As usual, converter.sh strips the metadata from the LHE file. loadReadOutAngles.tpl is altered to make converting faster by compiling readOutAngles_MG.C. readOutAngles_MG.C will extract the Higgs (or Higgs-like in the case of ZZ background) event and the two highest pT jets. Smearing can also be applied as a 10% Gaussian on the magnitude. Any events that do not have either 1) A PDGID Higgs or 2) 4 leptons to make a Higgs-like event or 3) 2 jets (no pT cuts applied at this stage) will not be written to the trees. There is a flag (hashiggsevents) which should be changed if the events have explicit Higgs (PDGID = 25) particles in the LHE file. For JHUGen, POWHEG, VBFNLO, and MINLO, Higgs events are explicit. For Madgraph, they may not be depending on the process.

LHE file locations can be found below if anything needs to be added.

To run the converter code just run

./converter.sh nameofsample.lhe

or if applying smearing

./converter.sh nameofsample.lhe true

Computing the ME:

This step is run using a modified of Yanyan's code which can be found at hep:/scratch0/hep/ianderso/MECode/

This is not fully up to date with Yanyan's code. It does not have ggMELA included in the scripts and there may be other small changes which still need to be merged with Yanyan's code. Most importantly, the code is currently written to work only with standalone code (this will be changed soon, but not ready as of writing).

Once you have this downloaded and compiled, (make clean and make) there are only two files you will be dealing with most of the time: TVar.hh and runME_HZZ4l_JHUgenSamples.C.

TVar.hh contains the general parameters for the ME, most importantly the Energy of the beam (EBEAM in GeV, default=7000). This MUST be changed anytime you move to a different CoM energy and the code should be cleaned and recompiled every time. If EBEAM is set to 4000 and run on 14 TeV samples, you will see a lot of events return with zero MEs, which in general shouldn't be possible. If EBEAM is set to 7000 and run on 8TeV samples, the MEs will be wrong but no errors will occur.

runME_HZZ4l_JHUgenSamples.C is the script that adds the different MEs to the root file. The code iterates over each event and sees if the two jets passed from the converter script pass 3 cuts: 1) pT>30 2) |eta|<4.7 3) dR between jets is > 0.5. These cuts are performed after the jets are made to be massless. If the event passes, the MEs are found using the XsecCalcXJJ function from the file TEvtProb.cc. The function requires a flag indicating what type of ME should be found and the three 4-momenta of the two jets and higgs. The ordering of the 4-momenta matters. If they are passed incorrectly, the ME will be much lower than expected. This should already be accounted for in the code. The order is: most forward facing jet, backward facing jet, higgs.

There are two boolean flags in the script, one for smearing (smearing, default=false) and another for using standalone (standalone, default=true). As the code only works for standalone MC at the moment, it should not be toggled to false (yet). Details of flags: Smearing: If false, momenta of Higgs is taken directly from the root file without modifications. If true, momenta of Higgs is modified to maintain constant mass and pZ while balancing pT of the three particle system. When running with smearing, about 0.2% of events are currently returning 0 for the ME. This is small enough to be minor, but it should be fixed soon. Standalone: If true, only Higgs + 2jets MEs (SM/PS H+2j and SM/PS VBF) will be calculated. If false, all MEs will be calculated.

To run the code, use the following commands:

root -l -n rootlogon.C

.L runME_HZZ4l_JHUgenSamples.C++

runME_HZZ4l_JHUgenSamples.C("directory of input root file","name of input root file","output directory for root file with MEs",number of events,verbosity)

These should be self explanatory, but I'll detail the last two: Number of events should ALWAYS be -1 (run all events) for weighted events. JHUGen events are currently not capable of making unweighted events for VBF studies. As is, weighted events are listed in order of increasing mJJ so you need to run over all events to get proper distributions. Verbosity details how detailed the output should be. 0 is silent mode. You will get more details as you increase this value until 3 when you get maximum detail from output.

This code can take a while to run depending on the number of events. Expect about 15 minutes for 500k events. The output will be a file that ends in _ME.root

Computing 2D templates

The code for computing templates can be found in the snowmass directory: http://cmssw.cvs.cern.ch/cgi-bin/cmssw.cgi/UserCode/Whitbeck/snowmass2013/test/

Using prepareHistoForModelPdf_VBF.C, you generate the 2D templates for toys. Just run

root -l -n

.x prepareHistoForModelPdf_VBF.C("location of root file with MEs from step 2","newTree","name of histogram")

This script is currently written to make 2D templates for VBF studies and would have to be adjusted for H+2j studies. For VBF, the templates produced have x-axis = D_sig^WBF and y-axis = D_0-^VBF. The scale factors are written in the code and were found manually for either axis using 14 and 8TeV samples as needed. Once the template is filled, to prevent S/B of infinity we fill all zeroes with a very small value (10^-4) and the templates are then normalized.

(For H+jj analysis, I produced another script to make templates that has the c factors stored: hep:/scratch0/hep/ianderso/VBF/VBFME/1DStudies/ZZMatrixElement/snowmass2013/test/prepareHistoForModelPdf_Hjj.C)

2D Pure Toys study

Again, from the snowmass directory above, use the pureToysVBF_2DKD.C script. Inside, the 2D templates for SM and PS signals are read, as well as SM background and any additional backgrounds. For VBF, this would be SM/PS VBF, SM H+2jets, ZZ+Jets. The fraction of H+2jets events to total background events and the fraction of expected signal to background are defined and set to be constant. The remaining fraction between SM and PS signal is set to float. First a PDF is defined for a given value of this fraction, then toys are generated from the combined PDF and optimized to find the value of this fraction.

The code can be run by using

root -l -n

.x pureToysVBF_2DKD.C(number of expected events, number of toys to run, seed fraction for PDF)

The output will be a root file (i.e. pureToysVBF_2D_fa3Corr_fa3_p5_1010Evts.root) with the f_3, f_3 error, and f_3 pull for each set of toys. The Mean and RMS can then give us sensitivity for the CP measurement.

(For H+jj analysis, I made another toys script to keep separate: hep:/scratch0/hep/ianderso/VBF/VBFME/1DStudies/ZZMatrixElement/snowmass2013/test/pureToysH2j_2DKD.C)

Making Plots

The code that I've been using to make plots can be found at hep:/scratch0/hep/ianderso/VBF/VBFME/VBFMEplots.C

It can produce distributions of a variable, log(variable), and discriminants of two variables with defined c factors for up to 5 different root files with or without cuts. All of the options are altered in the script and should be detailed exactly which does what.

Signal Samples

General description:

/scratch0/hep/ianderso/VBF/VBFME/(Name of MC)/(Name of MC)_(CoM)T_(Higgs mass)_(parity)_(VBF/H2j).lhe -LHE file used for all smearings/cuts/etc
/scratch0/hep/ianderso/VBF/VBFME/(Name of MC)/(Name of MC)_(CoM)T_(Higgs mass)_(parity)_(VBF/H2j)_false.txt -txt file listing all events from LHE file without metadata
/scratch0/hep/ianderso/VBF/VBFME/(Name of MC)/(Name of MC)_(CoM)T_(Higgs mass)_(parity)_(VBF/H2j)_false.root -root file from ./converter.sh script without smearing
/scratch0/hep/ianderso/VBF/VBFME/(Name of MC)/(Name of MC)_(CoM)T_(Higgs mass)_(parity)_(VBF/H2j)_false_ME.txt -txt file listing all events that pass cuts from ME script and their momenta/MEs
/scratch0/hep/ianderso/VBF/VBFME/(Name of MC)/(Name of MC)_(CoM)T_(Higgs mass)_(parity)_(VBF/H2j)_false_ME.root -root file from ./convert.sh script with added branches including MEs

You may also see other files that have "_false_wResolution" or "_true_wResolution" in the names. Those have smearing applied. Any with "wResolution_50" are the files with pT > 50 and smearing of 20%

Process MC Parity nEvents Filename resolution/acceptance matrix element info added
ggH+2jets JHUGen 0+ 407350 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_SM_H2j_false.root no no
ggH+2jets JHUGen 0+ 407350 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_SM_H2j_false_ME.root no yes
ggH+2jets JHUGen 0+ 407350 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_SM_H2j_false_wResolution.root yes no
ggH+2jets JHUGen 0+ 407350 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_SM_H2j_false_wResolution_ME.root yes yes
ggH+2jets JHUGen 0- 403025 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_PS_H2j_false.root no no
ggH+2jets JHUGen 0- 403025 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_PS_H2j_false_ME.root no yes
ggH+2jets JHUGen 0- 403025 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_PS_H2j_false_wResolution.root yes no
ggH+2jets JHUGen 0- 403025 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_PS_H2j_false_wResolution_ME.root yes yes
VBF JHUGen 0+ 743510 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_SM_VBF_false.root no no
VBF JHUGen 0+ 743510 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_SM_VBF_false_ME.root no yes
VBF JHUGen 0+ 743510 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_SM_VBF_false_wResolution.root yes no
VBF JHUGen 0+ 743510 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_SM_VBF_false_wResolution_ME.root yes yes
VBF JHUGen 0- 762389 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_PS_VBF_false.root no no
VBF JHUGen 0- 762389 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_PS_VBF_false_ME.root no yes
VBF JHUGen 0- 762389 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_PS_VBF_false_wResolution.root yes no
VBF JHUGen 0- 762389 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_PS_VBF_false_wResolution_ME.root yes yes

Background Samples

Process MC Parity nEvents Filename resolution/acceptance matrix element info added
ZZ+Jets MG N/A 1253503 hep:/scratch0/hep/ianderso/VBF/VBFME/MadGraph/MG_8T_ZZJets_false.root no no
ZZ+Jets MG N/A 1253503 hep:/scratch0/hep/ianderso/VBF/VBFME/MadGraph/MG_8T_ZZJets_false_ME.root no yes
ZZ+Jets MG N/A 1253503 hep:/scratch0/hep/ianderso/VBF/VBFME/MadGraph/MG_8T_ZZJets_false_wResolution.root yes no
ZZ+Jets MG N/A 1253503 hep:/scratch0/hep/ianderso/VBF/VBFME/MadGraph/MG_8T_ZZJets_false_wResolution_ME.root yes yes
VBF->ZZ VBFNLO N/A 108890 hep:/scratch0/hep/ianderso/VBF/VBFME/VBFNLO/vbfnlo_ZZ_leptonic_false.root no no
VBF->ZZ VBFNLO N/A 108890 hep:/scratch0/hep/ianderso/VBF/VBFME/VBFNLO/vbfnlo_ZZ_leptonic_false_ME.root no yes

8TeV LHE Files

Process MC Parity nEvents Filename
VBF JHUGen 0+ 94037 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_8T_126_SM_VBF.lhe
VBF JHUGen 0- 96109 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_8T_126_PS_VBF.lhe
VBF VBFNLO 0+ 62622 hep:/scratch0/hep/ianderso/VBF/VBFME/VBFNLO/VBFNLO_8T_126_SM_VBF.lhe
VBF VBFNLO 0- 16140 hep:/scratch0/hep/ianderso/VBF/VBFME/VBFNLO/VBFNLO_8T_126_PS_VBF.lhe
VBF POWHEG LO 0+ 100000 hep:/scratch0/hep/ianderso/VBF/VBFME/POWHEG/POWHEG_8T_126_SM_VBF_LO.lhe
VBF POWHEG NLO 0+ 50005 hep:/scratch0/hep/ianderso/VBF/VBFME/POWHEG/POWHEG_8T_126_SM_VBF_NLO.lhe
VBF MG 0+ 253657 hep:/scratch0/hep/ianderso/VBF/VBFME/MadGraph/MG_8T_126_SM_VBF.lhe
H+jj JHUGen 0+ 393832 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_8T_126_SM_H2j.lhe
H+jj JHUGen 0- 391829 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_8T_126_PS_H2j.lhe
H+jj VBFNLO 0+ 20063 hep:/scratch0/hep/ianderso/VBF/VBFME/VBFNLO/VBFNLO_8T_126_SM_H2j.lhe
H+jj VBFNLO 0- 14465 hep:/scratch0/hep/ianderso/VBF/VBFME/VBFNLO/VBFNLO_8T_126_PS_H2j.lhe
H+jj MINLO 0+ 400000 hep:/scratch0/hep/ianderso/VBF/VBFME/MINLO/MINLO_8T_126_SM_H2j.lhe
ZZ+Jets MG N/A 4900000 hep:/scratch0/hep/ianderso/VBF/VBFME/MadGraph/MG_8T_ZZJets.lhe

14 TeV LHE Files

Process MC Parity nEvents Filename
VBF JHUGen 0+ 743510 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_SM_VBF.lhe
VBF JHUGen 0- 762389 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_PS_VBF.lhe
H+jj JHUGen 0+ 407350 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_SM_H2j.lhe
H+jj JHUGen 0- 403025 hep:/scratch0/hep/ianderso/VBF/VBFME/JHUGen/JHUGen_14T_125_PS_H2j.lhe
VBF->ZZ VBFNLO N/A 108890 hep:/scratch0/hep/ianderso/VBF/VBFME/VBFNLO/vbfnlo_ZZ_leptonic.lhe
Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r7 - 2013-08-01 - SaraBolognesi
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback