Skip to content
dciangot edited this page Jan 27, 2016 · 18 revisions

Install

Go on your github web page and do Fork of the repository:https://github.com/dciangot/CommonFSQFramework (how to fork at: https://guides.github.com/activities/forking/index.html)

Create a directory where you would like to install the framework and run the following.

mkdir workDir
cd workDir
touch install.sh

Now with a text editor put the following lines into install.sh:

export SCRAM_ARCH=slc6_amd64_gcc491
source /cvmfs/cms.cern.ch/crab3/crab.sh

INSTALLDIR=$PWD

SWVERSION="CMSSW_7_5_8"

cmsrel $SWVERSION
cd $SWVERSION/src
cmsenv
git cms-init
git cms-addpkg CommonTools/RecoAlgos
git cms-addpkg QCDAnalysis/Configuration
git cms-addpkg QCDAnalysis/Skimming
git cms-addpkg QCDAnalysis/UEAnalysis
git cms-addpkg RecoJets/JetProducers
git clone git@github.com:$USER/CommonFSQFramework.git
cd CommonFSQFramework
git checkout CMSSW_75X
git remote add upstream git@github.com:dciangot/CommonFSQFramework.git
git fetch upstream
git merge upstream/CMSSW_75X

cd ..
cp /afs/cern.ch/work/d/dciangot/public/FSQFW_files/RecoTrackSelectorBase.h CommonTools/RecoAlgos/interface/ 
cp /afs/cern.ch/work/d/dciangot/public/FSQFW_files/TrackWithVertexSelector.h CommonTools/RecoAlgos/interface/
cp /afs/cern.ch/work/d/dciangot/public/FSQFW_files/TrackWithVertexSelector.cc CommonTools/RecoAlgos/src/
cp /afs/cern.ch/work/d/dciangot/public/FSQFW_files/TrackWithVertexRefSelector.cc CommonTools/RecoAlgos/plugins/
cp /afs/cern.ch/work/d/dciangot/public/FSQFW_files/TrackWithVertexSelector_cfi.py CommonTools/RecoAlgos/python/
cp /afs/cern.ch/work/d/dciangot/public/FSQFW_files/TrackWithVertexSelectorParams_cff.py CommonTools/RecoAlgos/python/
cp /afs/cern.ch/work/d/dciangot/public/FSQFW_files/TrackWithVertexRefSelector_cfi.py CommonTools/RecoAlgos/python/
cp /afs/cern.ch/work/d/dciangot/public/FSQFW_files/TrackFullCloneSelectorBase.h CommonTools/RecoAlgos/interface/

Before installing please check that the SCRAM_ARCH and SWVERSION in the script are what you need (e.g. for latest results you may need SCRAM_ARCH=slc6_amd64_gcc493 and SWVERSION="CMSSW_7_6_3"). In order to install type:

source install.sh

Please note that during the installation you will be asked for your github keypair password twice.

If everything ended without errors you can start compiling:

scram b clean; scram b -j4

Skimming

You will find the skimming code template in: CommonFSQFramework/Skim/config/ Moreover the definition of the dictionary template for the crab input datasets can be found in CommonFSQFramework/Skim/python/

(Pro tip: You may want to change the way in which the data are stored in the nTuple, in this case you can modify the corresponding view here CommonFSQFramework/Core/src)

For a first installation check please go in CommonFSQFramework/Skim/config/UE_DY and type:

voms-proxy-init -voms cms
#insert your grid passwd
cmsRun treemaker_DATA_74X.py

If everything works fine, and in the output file is present everything you will need for your analysis, then you are ready to go with the crab3 submission of the skim tasks.

CRAB3 submission

Submitting skim in RunII data

Put the list of dataset you want to skim with crab in this text file (is you didn't see that just copy it from https://github.com/dciangot/CommonFSQFramework/blob/CMSSW_75X/Skim/python/ds_RunII_UE_DY_data.txt):

Skim/python/ds_RunII_UE_DY_data.txt

then check that you have this file: Skim/python/Template_RunII_UE_DY_data.py

(or just copy in place this one: https://github.com/dciangot/CommonFSQFramework/blob/CMSSW_75X/Skim/python/Template_RunII_UE_DY_data.py).

Now do:

cd  Skim/python
source /cvmfs/cms.cern.ch/crab3/crab.sh
importDS.py Template_RunII_UE_DY_data.py -d TodayDate

and check that everything is ok for each field of the dictionary created here (IMPORTANT: please change by hand isData field in False. Sorry for that it will be fixed soon):

Skim/python/Samples_RunII_TodayDate.py

(IMPORTANT: you may need to add some information like json for each file)

Once everything is ok, source the env doing:

cd -
export SmallXAnaVersion="CommonFSQFramework.Skim.Samples_RunII_TodayDate"
touch my.py
echo "PATbasePATH=\"\"" > my.py
echo "TTreeBasePATH=\"\"" >> my.py
export SmallXAnaDefFile=$PWD/MyAna.py

Then return to Skim/config/UE_DY and check the crab configuration:

cd Skim/config/UE_DY/
cat crabcfg.py

change the storage inside if needed.

The submit the jobs and relax:

runCrab3Jobs.py

a list of notification will appear, hopefully ending with success (one for each dataset you put into Skim/python/ds_RunII_UE_DY_data.txt)