NtuplE fRamewOrk
- Core -> ROOT/C++ structure of the ntuples.
- Nero -> CMSSW plugins and MiniAOD code.
- Skim -> Skimmer for the MiniAOD.
- Bambu -> Code to produce from Bambu.
The Nero directory contains the ntuple producer. It is designed to run on MiniAOD within the CMSSW framework.
- Notice that cmssw should be init when the src directory is empty. Currently the supported version are CMSSW_7_4_15_patch1 (checking out the branch 74X) and CMSSW_7_6_4 (master).
cmsrel CMSSW_7_6_4
cd CMSSW_7_6_4/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 git@github.com: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 from an other area:
cd ${CMSSW_BASE}/src/NeroProducer/Nero
python fastsetup.py -v CMSSW_7_6_4 -t tag -d where
if fastsetup is not yet avaliable:
cd /tmp/$USER
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_7_6_4
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
cd NeroProducer/Nero/test
edit crabCfg.py to use test/testNero.py crab 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
- 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 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()
cmsenv
cd NeroProducer/Skim
scram b -j 16
cd NeroProducer/Nero/test
edit crabCfg.py to use test/runSkim.py
crab submit