Adding your new ID in VID format in the TnP code and compute SFs

The TnP package is described here: https://twiki.cern.ch/twiki/bin/view/CMSPublic/ElectronTagAndProbe It includes two steps: produce ntuples and run the fits. If you have developed a new ID and implemented it in VID, you need to make some changes to the TnP code before running the first step.

1. In addition to follow the instructions in the TnP twiki, download the Egamma ID code from CMSSW:

git cms-addpkg RecoEgamma/ElectronIdentification
git cms-addpkg RecoEgamma/PhotonIdentification
scram b -j 16

and copy your config files [1] and [2] in the python/Identification directory (in RecoEgamma/ElectronIdentification or RecoEgamma/PhotonIdentification depending on which kind of ID you implemented) and compile with scram b -j 9.

2. In the same way as you did in order to use the new VID in your analyzer, just add the new VID cff module and ID name here: EgammaAnalysis/TnPTreeProducer/python/egmPhotonIDModules_cff.py or EgammaAnalysis/TnPTreeProducer/python/egmElectronIDModules_cff.py depending if you are working on electrons or photons. Here you have also to create your new probe object which should read the VID Value Map you just created. For example, assume i am creating a new ID called in [0]: "cutBasedPhotonID-OOT-2017-V1". What i add in EgammaAnalysis/TnPTreeProducer/python/egmPhotonIDModules_cff.py is:

process.probePhoCutBasedOOT2017  = process.probePhoCutBasedLoose.clone()
process.probePhoCutBasedOOT2017.selection = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-OOT-2017-V1  )

3 Finally, you have to add the new probe variable in the tnp output tree. This means that, following the example above, you have to add:

passingOOT2017   = cms.InputTag("probePhoCutBasedOOT2017),

in EgammaAnalysis/TnPTreeProducer/python/TnPTreeProducer_cfg.py and

process.probePhoCutBasedOOT2017  +
in the tree production chain in EgammaAnalysis/TnPTreeProducer/python/egmTreesSetup_cff.py

4. You can now keep following the instructions of the TnP twiki and compute SFs for your new ID.

HLT studies

Check HLT names and modules in confDB

Compute HLT rates (method #1)

Check xsec from a MC sample

How to...

HLT studies

Check HLT names and modules in confDB

  • Here some instructions
  • Download Java Application for confDB Gui: <a href="http://www.google.com/url?q=http%3A%2F%2Fj2eeps.cern.ch%2Fcms-project-confdb-hltdev%2Fgui%2Fstart.jnlp&sa=D&sntz=1&usg=AFQjCNEExDzvB3Tvr4wBSRj6zuIJLj0kjA" rel="nofollow noreferrer" tabindex="-1" target="_blank">http://j2eeps.cern.ch/cms-project-confdb-hltdev/gui/start.jnlp</a>
  • Open it an choose setup = HLT Developement and write the password
  • Go to: Configurations->open->dev->CMSSW_7_4_0
  • GRun = menu' at 25 ns and 50nsGrun = menu' at 50 ns
  • Go to: Gruns->version 33 + OK
  • Write in Search: "HLT_Diphoton"
  • Now if you click on the name of one trigger you can look at all the modules used, the variables included and the thresholds..

Compute HLT rates (method #1)

  • Search on DAS the datasets used for the trigger studies: dataset=/*GG*/*tsg*/*RAW
  • Choose one dataset and one file, e.g. <a href="https://www.google.com/url?q=https%3A%2F%2Fcmsweb.cern.ch%2Fdas%2Frequest%3Finput%3Dfile%2520dataset%3D%2FDYToEE_M-50_Tune4C_13TeV-pythia8%2FPhys14DR-PU40bx25_tsg_castor_PHYS14_25_V1-v2%2FGEN-SIM-RAW%26instance%3Dprod%2Fglobal%26idx%3D0%26limit%3D10&sa=D&sntz=1&usg=AFQjCNFxbDcqF4LmhdXwFzI8sx9OCagxcg" rel="nofollow noreferrer" tabindex="-1" target="_blank">https://cmsweb.cern.ch/das/request?input=file%20dataset=/DYToEE_M-50_Tune4C_13TeV-pythia8/Phys14DR-PU40bx25_tsg_castor_PHYS14_25_V1-v2/GEN-SIM-RAW&instance=prod/global&idx=0&limit=10</a>
  • Follow "Browsing instruction" under "Navigation" here to search for your dataset and find the value of the xsec which is needed to convert counts in rate later. If the xsec is not there search here
  • Download a new release (74X):
    • setenv SCRAM_ARCH slc6_amd64_gcc491

    • scram project -n CMSSW740-HLT CMSSW CMSSW_7_4_0_pre9

    • bash
  • Run the following command: http://soffi.web.cern.ch/soffi/HLT/method1_triggerRate.txt
  • Edit the hlt.py created leaving only the needed modules running (look here for an example for DiPhoton)
  • Run locally the hlt.py with cmsRun and look at the output. Find in the output the counts of each trigger path (e.g. example)
  • Convert the counts in rates following the recipe here

Check xsec from a MC sample

How to compile a new Sherpa version

  • cd hintmcnlo
  • autoreconf -fi
  • svn co http://sherpa.hepforge.org/svn/branches/hintmcnlo
  • ./configure <your preferred flags> -->

    ./configure --enable-analysis --disable-silent-rules --enable-hepmc2=/cvmfs/cms.cern.ch/slc6_amd64_gcc481/external/h
    epmc/2.06.07-cms4 --with-sqlite3=/cvmfs/cms.cern.ch/slc6_amd64_gcc481/external/sqlite/3.7.17

  • see here the option neeed in cmssw:https://github.com/cms-sw/cmsdist/blob/IB/CMSSW_7_2_X/stable/sherpa.spec
  • make install

How To Run Sherpa in CMSSW

  • cd CMSSW_X_Y_Z/src
  • scram tool info sherpa (this should show you the current sherpa version) scram tool remove sherpa
  • cmsenv
  • emacs ../config/toolbox/slc6_amd64_gcc481/tools/available/sherpa.xml
  • replace sherpa_base with the path where my sherpa compiled version is
  • scram setup sherpa
  • cmsenv
  • git cms-addpkg GeneratorInterface /SherpaInterface/data

  • mkdir -p MY/PROJECT/test
  • mkdir -p MY/PROJECT/python
  • cp GeneratorInterface /SherpaInterface/data/*SherpaLibs.sh MY/PROJECT/test/
  • cp GeneratorInterface /SherpaInterface/data/*.dat* MY/PROJECT/test/
  • cd MY/PROJECT/test
  • ./MakeSherpaLibs.sh -i ./ -p 8TeV_Hgamgam -o LBCR
  • ./PrepareSherpaLibs.sh -i ./ -p 8TeV_Hgamgam
  • mv sherpa_8TeV_Hgamgam_MASTER_cff.py ../python/
  • cd ../ ; scram b
  • cmsDriver.py MY/PROJECT/python/sherpa_8TeV_Hgamgam_MASTER_cff.py -s GEN -n 100 --no_exec --conditions auto:mc --eventcontent RAWSIM
  • cmsRun sherpa_8TeV_Hgamgam_MASTER_cff_py_GEN.py

How to run Delphes

How to generate MC GMSB 13 TeV

  1. cd /src
  2. cmsenv
  3. mkdir -p Configuration
  4. cd Configuration
  5. git clone git@githubNOSPAMPLEASE.com:cms-sw/genproductions.git GenProduction
  6. scram b in the python directory

How to...

-- LiviaSoffi - 2015-03-12

-- LiviaSoffi - 2015-03-12

Edit | Attach | Watch | Print version | History: r16 < r15 < r14 < r13 < r12 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r16 - 2017-11-09 - LiviaSoffi
 
    • 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-2020 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