Skip to content

RazorCMS/RazorCombinedFit

Repository files navigation

---- New Instructions for git ---

You need a git username, and your public key should be added to git. See http://cms-sw.github.io/cmssw/faq.html

Then you should do

git config --global user.name <First Name> <Last Name>
git config --global user.email <Your-Email-Address>
git config --global user.github <Your-Just-Created-GitHub-Account>

MacOS:

Make sure ROOT is installed, and ROOTSYS is set. You will need pyROOT to be working. I.e. python -c "import ROOT" must not return an error

Then do the following:

git clone git@github.com:RazorCMS/RazorCombinedFit.git
(git clone -b wreece_101212_2011_style_fits git@github.com:RazorCMS/RazorCombinedFit.git)
cd RazorCombinedFit
source setup.sh
make -j 4

Lxplus:

In this case, we use the CMSSW ROOT. In this case, do the following:

cmsrel CMSSW_6_2_0
cd CMSSW_6_2_0/src
eval `scram runtime -sh`
git clone git@github.com:RazorCMS/RazorCombinedFit.git
(git clone -b wreece_101212_2011_style_fits git@github.com:RazorCMS/RazorCombinedFit.git)
cd RazorCombinedFit
source setup.sh
make -j 4

To test the HEAD version:

cp /afs/cern.ch/user/w/woodson/public/Razor2013/Data/HT-HTMHT-Run2012ABCD_MR400.0_R0.5_BTAG_PF_MultiJet.root .
python scripts/runAnalysis.py -a SingleBoxFit -c config_summer2012/RazorInclusive2012_3D_hybrid.config HT-HTMHT-Run2012ABCD_MR400.0_R0.5_BTAG_PF_MultiJet.root --fit-region Sideband

Output files:

razor_canvas_MultiJet_Sideband_LowRsq_LowMR_HighMR_MR.pdf
razor_canvas_MultiJet_Sideband_LowRsq_LowMR_HighMR_Rsq.pdf
razor_canvas_MultiJet_Sideband_LowRsq_LowMR_HighMR_nBtag.pdf
fitmodel_graphViz.dot
razor_output.root

To produce a graph of the fitmodel used (only works with newer version of graphviz than available on lxplus):

dot -Tpdf fitmodel_graphViz.dot -o fitmodel_graphViz.pdf

To add a new file:
git add file

To commit changes to file1 and file2:
git commit -m "mandatory comment" file1 file2 ...

To push changes to github:
git push git@github.com:RazorCMS/RazorCombinedFit.git


---- Old Instructions for CVS --

MacOS:

Make sure ROOT is installed, and ROOTSYS is set. You will need pyROOT to be working. I.e. python -c "import ROOT" must not return an error

Then do the following:

export CVSROOT=:gserver:cmssw.cvs.cern.ch:/local/reps/CMSSW
cvs co -d RazorCombinedFit UserCode/wreece/RazorCombinedFit
cd RazorCombinedFit
source setup.sh
make -j 4

Lxplus:

In this case, we use the CMSSW ROOT. In this case, do the following:

cmsrel CMSSW_4_2_3
cd CMSSW_4_2_3/src
cvs co -d RazorCombinedFit UserCode/wreece/RazorCombinedFit
cd RazorCombinedFit
. setup.sh
make -j 4

You will need an input with the following format:

root [1] .ls
TFile**		TTJets_TuneZ2_7TeV-madgraph-tauola_Had.root	
 TFile*		TTJets_TuneZ2_7TeV-madgraph-tauola_Had.root	
  KEY: RooDataSet	RMRTree;1	Selected R and MR
root [2] RMRTree->Print("V")
DataStore RMRTree (Selected R and MR)
  Contains 10000 entries
  Observables: 
    1)  MR = 284.591  L(250 - 1500)  "MR"
    2)   R = 0.280028  L(-200 - 200)  "R"

The ranges specified should be the same as used in the relevant box.

You can run the code by doing:

python scripts/runAnalysis.py -a OneDFit TTJets_TuneZ2_7TeV-madgraph-tauola_*.root

FILE NAME CONVENTION:
- The filenames are expected to end with the name of the box.
- The name includes the MR and R cut used to define the dataset

rfdir /castor/cern.ch/user/m/mpierini/CMST3/RazorSamples/MC/TTbar/ 
-rw-r--r--   1 mpierini zh                      10018 Jun 29 14:43 TTJets_TuneZ2_7TeV-madgraph-tauola_MR250.0_R0.1_Ele.root
-rw-r--r--   1 mpierini zh                      10024 Jun 29 14:43 TTJets_TuneZ2_7TeV-madgraph-tauola_MR250.0_R0.1_EleEle.root
-rw-r--r--   1 mpierini zh                      10006 Jun 29 14:44 TTJets_TuneZ2_7TeV-madgraph-tauola_MR250.0_R0.1_Had.root
-rw-r--r--   1 mpierini zh                      10000 Jun 29 14:44 TTJets_TuneZ2_7TeV-madgraph-tauola_MR250.0_R0.1_Mu.root
-rw-r--r--   1 mpierini zh                      10014 Jun 29 14:44 TTJets_TuneZ2_7TeV-madgraph-tauola_MR250.0_R0.1_MuEle.root
-rw-r--r--   1 mpierini zh                      10007 Jun 29 14:44 TTJets_TuneZ2_7TeV-madgraph-tauola_MR250.0_R0.1_MuMu.root
  
You can create your own files starting from the output of VecBosApp/src/Razor.cc by doing

python scripts/Maurizio2Dataset.py <YOUR INPUT FILE>

A few input files are available at /castor/cern.ch/user/m/mpierini/CMST3/RazorSamples/
You can get a local copy of the files available on castor by doing (for instance)

python script/castor_copy.py /castor/cern.ch/user/m/mpierini/CMST3/RazorSamples/MC/TTbar/ TTbar

About

Razor Combined Fit package for CMS analyses

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •