Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.org

Env Setup

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 

NTuple production

  • MC KstarJPsi with BToKstarMuMu v2
    1. Get a small sample, edit the cfg/copy_cfg.py and run:
      cd python 
      cmsRun cfg/copy_cfg.py
              
    2. Generate the nutple command:
      ./afb.py ntp mc BuToKstarJPsi-8TeV-2p5E7 -t 
              

      Here 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.

    3. Create the crab cfg:
      ./afb.py ntp mc BuToKstarJPsi-8TeV-2p5E7 -grid     
              

      Output:

      Please create grid jobs with command: 
      crab -cfg crab_BuToKstarJPsi_8TeV_2p5E7.cfg -create
              

      Then you can submit by:

      crab -c crab_BuToKstarJPsi_8TeV_2p5E7 -submit all 
              

      Note: make the job numbers less than 500 for each submission. Break down if necessary: 1-500, 501-1000, etc.

  • 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