Skip to content
scarletnorberg edited this page Apr 23, 2019 · 5 revisions

Welcome to the NanoSUSY wiki!

Instructions on how to go from MiniAOD files to NanoAOD and beyond.

First create a file list of what you want crab to run over you can do that my looking here: https://cmsweb.cern.ch/das/

We have code here https://github.com/susy2015/NanoSUSY to run that list on crab. Please follow the instructions to download and setup things. Do not forget to request eos access to the lpcsusyhad area. Also for formatting we have one folder pre year and than sub folders with data of submission and than version number for post processing.

Here are some helpful eos commands: https://uscms.org/uscms_at_work/computing/LPC/usingEOSAtLPC.shtml Like eosquota or eosgrpquota lpcsusyhad

Where another helpful script is eosdu which is found here: https://github.com/FNALLPC/lpc-scripts We also have eosdu -r -h /store/user/lpcsusyhad/Stop_production/

RunIIInformation

Here is a helpful summary table of RunII information: https://twiki.cern.ch/twiki/bin/viewauth/CMS/PdmVAnalysisSummaryTable

Helpful Crab twikis

Remember crab is fickle here are some helpful crab pages: https://twiki.cern.ch/twiki/bin/view/CMSPublic/CRAB3Commands https://twiki.cern.ch/twiki/bin/view/CMSPublic/JobExitCodes Here is the hyper news very useful: https://hypernews.cern.ch/HyperNews/CMS/get/computing-tools.html?

Config for sample list

Once you have files you need to make the original pre processed config by hand. Remember that the output name can not have _, that data is by period and had the word Data in it, also that FastSim samples have Fast in the name. Here is an example of some preprocessed files: https://github.com/susy2015/StopCfg/tree/PreProcess_StopNtuple Once you have a set you like make sure to check the cross sections.

Cross sections

Here is the Signal twiki page for cross sections: https://twiki.cern.ch/twiki/bin/view/LHCPhysics/SUSYCrossSections#Cross_sections_for_various_s_AN2 Apparently this is the only page with correct cross section values: https://twiki.cern.ch/twiki/bin/viewauth/CMS/SummaryTable1G25ns#DY_Z

List of Root Files

We need a text file that has a list of root files. A script was created called batchList.py and can be found here: https://github.com/susy2015/SusyAnaTools/blob/master/Tools/condor/batchList.py To run it do python batchList.py and options. python batchList.py -c (copys the files to eos) -l (lists the files) -d (is directory) Because we use this redirector: root://cmseos.fnal.gov/ you can actually use either "/eos/uscms/store/user/lpcsusyhad/Stop_production/" or "/store/user/lpcsusyhad/Stop_production/".

Nevents

Please check nEvents you can do this by using this script here: https://github.com/susy2015/SusyAnaTools/blob/NanoAOD/Tools/condor/nEvts.py Located here: https://github.com/susy2015/SusyAnaTools/blob/ISREff/Tools/condor/condorSubmit_nEvts.py You can run this through condor as such: python condorSubmit_nEvts.py -c (no submit to condor) -s (for the sampleSet.cfg file) This runs everything on condor in about 10 minutes or so. The output is pre sample. Than do cat output*.txt >Total_output.txt Also open up Total_output.txt and search for the word not if the text file is in the wrong location or something of that nature than you will find it not being able to open from the output.

Checking config Nevents

Now that you have the output you can either go by hand and check that the Nevents are the same or you can use this script: updateSamples.py located here: https://github.com/susy2015/SusyAnaTools/blob/NanoAOD/Tools/condor/updateSamples.py

python updateSamples.py -i input config -o what you will output -e this is the output from above Total_output.txt

Tagging

Instructions are on this page: https://github.com/susy2015/StopCfg search for this source ~/.ssh/tokens some of these instructions need to be updated.

Post Processing

Supposed to use the dev_v2 branch (Is there plans to merge with master?) https://github.com/susy2015/NanoSUSY-tools/tree/dev_v2 Condor instructions: python SubmitLPC.py -c config file sampleSet -e era Output logs are outputted cd ~/nobackup/condor_temp/USERNAME/

Usefully condor commands can be found here: https://uscms.org/uscms_at_work/computing/setup/batch_systems.shtml condor_q remember there are three schedulers. That tells you about your submitted jobs Also if you want to remove everything from all three schedulers: condor_rm -name lpcschedd1.fnal.gov -all; condor_rm -name lpcschedd2.fnal.gov -all; condor_rm -name lpcschedd3.fnal.gov

The files should be output to the same name as when things were post processed but with a version number which is specified in the code here: https://github.com/susy2015/NanoSUSY-tools/blob/dev_v2/python/processors/Condor/SubmitLPC.py#L22 be aware that this needs to be changed.

Config for Post processing

We now have a script that takes as input the preProcessed config and converts it to a post processed config. The name is createPostProcessCfg.py located here: https://github.com/susy2015/SusyAnaTools/blob/ISREff/Tools/condor/createPostProcessCfg.py

python createPostProcessCfg.py -c config input name -v this is the post processing version you are on. This than out puts the config input name but now it has post instead of pre example: sampleSets_PreProcessed_2017.cfg to sampleSets_PostProcessed_2017.cfg. Also be aware commented out lines DO NOT change to the post format!