Bachelor Tutorial 2012

Install and compile ACSusyAnalysis for Bachelor Tutorial

Login to a new shell on the Aachen computing cluster. Then execute the following commands to set up your environment in order to use the CMSSW software. The last command will ask you for a password, enter 98passwd at the prompt and hit the ENTER key.

mkdir ~/tutorial/
cd ~/tutorial
export SCRAM_ARCH="slc5_amd64_gcc434"
source /net/software_cms/cmsset_default.sh
cmsrel CMSSW_4_2_8_patch7
cd CMSSW_4_2_8_patch7
cmsenv
export CVSROOT=:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/CMSSW
cvs login

This will create a directory ~/tutorial/CMSSW_4_2_8_patch7 in your home folder, in which the CMSSW software is installed. In order to be up-to-date, one needs to install a few patches. This means to execute another few commands:

cd ~/tutorial/CMSSW_4_2_8_patch7/src
cvs co -r B4_2_X_V00-03-00 CommonTools/ParticleFlow                         
cvs co -r V03-03-07      DataFormats/METReco                              
cvs co -r V06-04-19-02   DataFormats/PatCandidates                        
cvs co -r V00-02-23      GeneratorInterface/LHEInterface                  
cvs co -r V02-03-00      JetMETCorrections/Algorithms                     
cvs co -r V05-00-17-01   JetMETCorrections/Modules                        
cvs co -r V03-01-00      JetMETCorrections/Objects                        
cvs co -r V04-05-06      JetMETCorrections/Type1MET                       
cvs co -r V08-06-46      PhysicsTools/PatAlgos                            
cvs co -r b4_2_X_cvMEtCorr_01Nov2011 PhysicsTools/PatUtils                            
cvs co -r V00-03-24      PhysicsTools/SelectorUtils                       
cvs co -r V08-02-14      PhysicsTools/UtilAlgos                           
cvs co -r V08-03-14      PhysicsTools/Utilities                           
cvs co -r V01-02-03      RecoTauTag/Configuration                         
cvs co -r V01-02-07      RecoTauTag/RecoTau                               
cvs co -r V01-02-00      RecoTauTag/TauTagTools                           
cvs co -r v7-8           UserCode/aachen3a/ACSusyAnalysis                          
mv UserCode/aachen3a .
rm -rf UserCode
# see below
rm -f JetMETCorrections/Algorithms/interface/L1JPTOffsetCorrector.h
rm -f JetMETCorrections/Algorithms/src/L1JPTOffsetCorrector.cc
cvs up -r 1.4 JetMETCorrections/Modules/plugins/JetCorrectorOnTheFly.cc
cvs up -r 1.6 JetMETCorrections/Modules/interface/JetCorrectionProducer.h
cvs up -r 1.64.2.4 PhysicsTools/PatAlgos/python/tools/jetTools.py

Now you have installed the software. In the last step it must be compiled. This process takes long, depending on the computer you work on it can take 15-30 min. Once you started this last command, we will continue with the tutorial without waiting for the command to finish.

scram b -j5

Install and compile AdvancedROOTAnalyzer

In order to follow these steps, set up your CMSSW environment if you have not done this, e.g. like in the steps in the previous exercise:

mkdir ~/tutorial/
cd ~/tutorial
export SCRAM_ARCH="slc5_amd64_gcc434"
source /net/software_cms/cmsset_default.sh
cmsrel CMSSW_4_2_8_patch7
cd CMSSW_4_2_8_patch7
cmsenv
export CVSROOT=:pserver:anonymous@cmscvs.cern.ch:/cvs_server/repositories/CMSSW
cvs login

Then you need to install and compile the software by issuing the following command

cd ~/tutorial/
cvs checkout -d findsusyb3 -r tutorial UserCode/MartinWeber/AdvancedROOTAnalyzer
cd findsusyb3/analyzer
make -j 5

Configure ROOT analyzer and submit jobs

Edit the file ~/tutorial/findsusyb3/config/ara.cfg. Look for the two tags user and basedir. Replace mweber with your user name. (You can find out your user name by typing whoami at the prompt.) In a second step, edit the file ~/tutorial/findsusyb3/config/plot.cfg and change the basedir entry to be the same as in the file ara.cfg you just modified a few seconds ago.

In order to be able to submit jobs, you need to execute one command first (it is best to put this line in your startup configuration file, ~/.bashrc)

source ~/tutorial/findsusyb3/bin/setup.sh

After you have executed this command, you can use all the scripts which are in the bin/ directory at the prompt.

Submit jobs

Type on the command line submit.py tutorial. This will submit all jobs for the tutorial selection. With default settings, at most 20 jobs are submitted at the same time to CONDOR. Each 30s it is checked if some jobs finished and then new jobs are submitted until the 20 slots are filled or no more jobs are available. Also, for each process, a maximum of 100 jobs is submitted. I.e. if there are 1000 files for one process, 10 files will be processed in each job. Use submit.py -h to find out how to change default settings.

Monitor jobs

You can use the condor_q command to monitor jobs.

Collect results

After the jobs finish, use collect.py tutorial to collect results from the jobs. In case there are errors found in the log files, the script will display them and stop.

Make plots

Making plots is easy. Do a cd ~/tutorial/findsusyb3/root; root and enter at the ROOT prompt (and wait after each command to see what the command changes):

selection("tutorial");
plot("Sig_ptMu1");
zoom(50, 100);
legend();
cd(2);
plot("m_mumu_cut");
rebin(5);
zoom(0, 150);
legend();
print("tutorial.pdf");
stat();

You can change logarithmic y axis by issuing logy() and go back to linear scale with liny(). The command legend() adds a legend to the plot. You can configure plot colors in ~/tutorial/config/plot.cfg. Set maximum or minimum with max(5000) or min(1E-2) e.g.

Running another selection

If you want to run a different selection, but want to keep the results of your old selection, do it like this:

First modify the file ~/tutorial/findsusyb3/analyzer/Analyzer.cxx. It contains the analysis code. Once you edited the file, you must compile your changes. In order to do this, issue cd ~/tutorial/findsusyb3/analyzer/ ; make -j 5. After this you can run the analysis program again. In order not to overwrite the previous results, do it like this:

  • Copy the tutorial configuration file to a new configuration file: cp ~/findsusyb3/config/analyzer_tutorial.config ~/config/analyzer_newselection.cfg.
  • Edit the newly created configuration file and adjust to your needs
  • Submit jobs for the new selection: submit.py newselection all
  • Collect jobs for the new selection (once all jobs finish) collect.py newselection all
  • Make a plot: cd ~/findsusyb3/root; root and enter at ROOT prompt selection("newselection"); plot("m_mumu_cut");

-- MartinWeber - 12-Apr-2012

Topic revision: r2 - 13-Apr-2012 - 00:31:00 - MartinWeber
 

  • CMS All webs
 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback