Skip to content

jandrejk/ProductionFromNano

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ProductionFromNano

Tools for running HEPHY ntuple production, based on WAW ntuple production, from NanoAOD.

Port of tools by A. Kalinowski, M. Bluj et al. based on KLUB/LLR trees to CMS NanoAOD


  • NanoEventsSkeleton.{h,C}: interface to NanoAOD ntuples produced from NanoAOD with MakeClass tool, it needs be updated after each modification of NanoAOD format.
  • HTauTauTreeFromNanoBase.{h,C}: base class to translate to WAW format
  • HElTauhTreeFromNano.{h,C}: specialization for the e+tau channel
  • HMuTauhTreeFromNano.{h,C}: specialization for the mu+tau channel
  • HTauhTauhTreeFromNano.{h,C}: specialization for the di-tau channel
  • HTTEvent.{h,cxx}: definition of WAW analysis classes
  • PropertyEnum.h, TriggerEnum.h, FilterEnum.h: definition of enums, (re)generated by the tool
  • AnalysisEnums.h, SelectionBitsEnum.h: definition of enums
  • convertNano.py: script to run conversion - currently not functional, use run.py and convertNanoParallel.py (but contains important lines to run on data)
  • run.py: script to run NanoAOD-to-SyncNtuple conversion in parallel, calls convertNanoParallel.py
  • convertNanoParallel.py: script to run conversion
  • Missing: production tools, need be taken modified from old WAW repo

Installation recipe for CMSSW_10_2_10

scram project -n CMSSW_10_2_10 CMSSW CMSSW_10_2_10
cd CMSSW_10_2_10/src/
eval `scramv1 runtime -sh`
# NanoAOD and tools 
git cms-addpkg PhysicsTools/NanoAOD #not mandatory, but it initializes git for CMSSW which is already useful
git cms-addpkg FWCore/MessageLogger
git clone https://github.com/cms-nanoAOD/nanoAOD-tools.git PhysicsTools/NanoAODTools # not used for now, but can be in future, e.g. JES?
# SVFit
git clone https://github.com/svfit/ClassicSVfit.git TauAnalysis/ClassicSVfit -b fastMTT_21_06_2018
git clone https://github.com/svfit/SVfitTF.git TauAnalysis/SVfitTF
# MET recoil corrections
git clone https://github.com/CMS-HTT/RecoilCorrections.git  HTT-utilities/RecoilCorrections
# production tools based on WawTools from NanoAOD
git clone https://github.com/jandrejk/ProductionFromNano.git WawTools/NanoAODTools -b SM2016
# Setup MELA
git clone https://github.com/cms-analysis/HiggsAnalysis-ZZMatrixElement ZZMatrixElement -b v2.2.0
cd ZZMatrixElement/
bash setup.sh -j 4
cd ..
# This is just needed to get rid of warnings
cat FWCore/MessageLogger/interface/MessageDrop.h | sed s#CMS_THREAD_SAFE##g > FWCore/MessageLogger/interface/MessageDrop.h2
mv FWCore/MessageLogger/interface/MessageDrop.h2 FWCore/MessageLogger/interface/MessageDrop.h 
# compile
scram b -j 4

How to run

  • Get proxy with voms-proxy-init -voms cms.
  • Source CMSSW
    cd $CMSSW_BASE/WawTools/NanoAODTools
    cmsenv
    
  • Get filelists specified in sample_collection.json to be used for production. Only needed to run once or when samples are updated.
    python getFilelists.py
    
  • Jobs can be submitted locally (local) on a batch system (batch) or on HTCondor (condor) with option -t WHERE. When submitting locally option -j N specifies the number of parallel jobs (default=8).
  • Channel can be specified with option -c {et, mt, tt, all}. Make sure when running over data to give the correct channel.
  • Sample can be specified with option -s SAMPLE.
    • Single sample: give the relative path to the .txt file (NOTE: you can use tab-complete). E.g
    -s samples/mc/signal/VBFHToTauTau_M125_13TeV_powheg_pythia8_RunIIFall17NanoAOD_12Apr2018.txt
    
    • To submit multiple samples several keywords are hardcoded: mc, data, dy, diboson, ewk, signal, st, tt, w
    -s signal
    
  • Further information on run option with option -help
  • When jobs are running on batch you can check the status with.
    python bookkeeping.py
    
  • To merge samples run
    python mergeSamples.py
    
    Only samples that are already finished are merged.

Important ressources


Release notes:

  • 16.01.2018, M.Bluj, initial version for 80X (2016) inputs with CMSSW_9_4_2
  • 26.02.2018, M.Bluj, update to NanoAOD of 05Feb2018 production of 2016 data wiht CMSSW_9_4_4
  • 18.05.2018, M.Flechl, produce sync ntuple directly; produce e-tau ntuples; several fixes for the sync
  • 20.05.2018, M.Spanring, First version for full scale production

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 55.2%
  • C 33.2%
  • Python 11.2%
  • Objective-C 0.4%