Please add the following function into your .bashrc. Change the ‘storage_element’ for your need.
setafb() {
echo -ne "Setting afb ...\r"
export afb=$HOME/work/cms/afb
export src=$afb/src
export dat=$afb/dat
export doc=$afb/doc
export fig=$doc/fig
export log=$afb/log
export storage_element=T3_TEST
if [ -z "$1" ]; then
echo "Default version: v2"
export ver="v2"
else
export ver=$1
fi
case $ver in
v2) cmssw="CMSSW_5_3_12"
;;
esac
export rel=$afb/rel/$cmssw/src
cd $rel ; eval `scram runtime -sh`
export build=$rel/BphAna/BToKstarMuMu
export run=$build/python
echo "Setting afb ... done."
}
Then before running any script, you can do in bash:
setafb
- MC KstarJPsi with BToKstarMuMu v2
- Get a small sample, edit the cfg/copy_cfg.py and run:
cd python cmsRun cfg/copy_cfg.py - Generate the nutple command:
./afb.py ntp mc BuToKstarJPsi-8TeV-2p5E7 -tHere the “-t” means “test”. The output is:
cmsRun btokstarmumu_MC.py Please test with the above command.Make sure you can run the interactive cmsRun first.
- Create the crab cfg:
./afb.py ntp mc BuToKstarJPsi-8TeV-2p5E7 -gridOutput:
Please create grid jobs with command: crab -cfg crab_BuToKstarJPsi_8TeV_2p5E7.cfg -createThen you can submit by:
crab -c crab_BuToKstarJPsi_8TeV_2p5E7 -submit allNote: make the job numbers less than 500 for each submission. Break down if necessary: 1-500, 501-1000, etc.
- Get a small sample, edit the cfg/copy_cfg.py and run:
- Check ntuple duplication
./afb.py chk data Run2012B-22Jan2013-v1 - Merge ntuples
./afb.py mrg data Run2012B-22Jan2013-v1 - Clean up the raw ntuples
./afb.py cln data Run2012B-22Jan2013-v1