Skip to content

Latest commit

 

History

History
161 lines (139 loc) · 4.01 KB

README.md

File metadata and controls

161 lines (139 loc) · 4.01 KB

NeroProducer

NtuplE fRamewOrk

Table of Contents

Directories

  • Core -> ROOT/C++ structure of the ntuples.
  • Nero -> CMSSW plugins and MiniAOD code.
  • Skim -> Skimmer for the MiniAOD.
  • Bambu -> Code to produce from Bambu.

Nero

The Nero directory contains the ntuple producer. It is designed to run on MiniAOD within the CMSSW framework.

CMSSW compile

  • Notice that cmssw should be init when the src directory is empty. Currently the supported version are CMSSW_8_0_26_patch1(master).
cmsrel CMSSW_8_0_26_patch1
cd CMSSW_8_0_26_patch1/src
cmsenv
wget --no-check-certificate 'https://raw.githubusercontent.com/MiT-HEP/NeroProducer/master/Nero/script/setup.sh' -O /tmp/$USER/setup.sh
source /tmp/$USER/setup.sh $CMSSW_VERSION
  • Clone the git repository and compile it
cd ${CMSSW_BASE}/src
git clone [email protected]:MiT-HEP/NeroProducer.git
cd ${CMSSW_BASE}/src/NeroProducer/Nero
scram b -j 16
cd ${CMSSW_BASE}/src/NeroProducer/Skim
scram b -j 16
cd ${CMSSW_BASE}/src/NeroProducer/Core
scram b -j 16

Fast Setup

this script will set up a new and consistent are from scratch

  • Fast setup from an other area:
cd ${CMSSW_BASE}/src/NeroProducer/Nero
python fastsetup.py -v CMSSW_8_0_26_patch1 -t tag -d where

if fastsetup is not yet avaliable:

cd /tmp/$USER
SCRAM_ARCH=slc6_amd64_gcc530
mkdir -p NeroProducer/Nero
touch NeroProducer/__init__.py
touch NeroProducer/Nero/__init__.py
wget https://raw.githubusercontent.com/MiT-HEP/NeroProducer/master/Nero/script/fastsetup.py
wget -O NeroProducer/Nero/CMSSWHandler.py https://raw.githubusercontent.com/MiT-HEP/NeroProducer/master/Nero/python/CMSSWHandler.py
PYTHONPATH=.:$PYTHONPATH
python fastsetup.py -v CMSSW_8_0_26_patch1

How to Run

If running on data, set the isData flag to True, else False.

cd NeroProducer/Nero/test
cmsRun testNero.py isData=True

To check the simple cut flow for the monojet analysis

cd NeroProducer/Nero/scripts
./cutflow.py -f FILENAME -n NUMBEROFEVENTS

The numbers should match: https://twiki.cern.ch/twiki/bin/view/CMS/DMS13TeVSynch

Crab submit

cd NeroProducer/Nero/test

edit crabCfg.py to use test/testNero.py crab submit

Batch submit

  • MINIAOD
  • edit the ../test/testNero.py to be sure to use the right configuration (ChargedHiggs or MonoJet)
cd NeroProducer/Nero/script
dir=TT_Tune4C_13TeV-pythia8-tauola;vers=v0.2; python sendOnBatch.py -i ../test/testNero.py -e /store/mc/Phys14DR/${dir} --put-in=/store/user/${USER}/Nero/${vers}/${dir} -d ${dir} -n 100 -q 8nh
  • MINIAOD-SKIMMED
  • edit the ../test/testNeroSkimmed.py to be sure to use the right configuration (ChargedHiggs or MonoJet)
cd NeroProducer/Nero/script
vers=v0.2;dir=TTbar_HBWB_HToTauNu_M-90_13TeV_pythia6 ;python sendOnBatch.py -i ../test/testNeroSkimmed.py -e /store/user/amarini/v0.1/${dir} --put-in=/store/user/amarini/Nero/${vers}/${dir} -d ${dir} -n 10 -q 8nh

Grid submit

  • MINIAOD
  • edit test/crabNero.py to match the datasets you want
python crabNero.py
  • check the status with
python multicrab.py  -c status -w NeroSubmission

or

crab status NeroSubmission/mydir

Core

Core can be either compiled within CMSSW or standalone.

  • Compile
cd NeroProducer/Core
make -j 16
  • Use it, for example
root
gSystem->Load("bin/libBare.so");
TChain *f = new TChain("nero/events")
f->Add("~/eos/cms/store/user/amarini/Nero/v0.2/TTbar_HBWB_HToTauNu_M-90_13TeV_pythia6/NeroNtuples_*root")

BareJets *j = new BareJets()
j->setBranchAddresses(f)

BarePhotons *p = new BarePhotons()
p->setBranchAddresses(f)

f->GetEntry(0)

j->p4->GetEntries()
((TLorentzVector*)j->p4->At(0))->Pt()

Skim

CMSSW compile

cmsenv
cd NeroProducer/Skim
scram b -j 16

Crab submit

cd NeroProducer/Nero/test

edit crabCfg.py to use test/runSkim.py

crab submit