-- OliinychenkoDmytro - 06-Sep-2012

The purpose of this page is to document my summerstudent work at DESY, Zeuthen in July-August 2012.

The goal was to perform B-tag HLT validation on data and HLT DQM online. Here I write what I did step by step.


I) Testing on local machine

  1. First step was to modify the existing file /DQMOffline/RecoB/BTagPerformanceAnalyzerOnData so that it will produce so-called flavour-blind histograms. Instead of building histograms for b-, c- and usdg- jets we suggested to build histograms for jets ordered by Pt: 1st jet, 2nd jet, 3rd jet. Discriminator binning was also added analogically to Eta and Pt bins. Modified file can be viewed: BTagOnData.cc and BTagOnData.h.
  2. Configuration file /DQMOffline/RecoB/bTagAnalysisData_cfi.py was modified: EDAnalyzer("BTagPerformanceAnalyzerOnData") was changed to our EDAnalyzer("BTagOnData").
  3. Configuration file BTagValidation _cff.py was written to test this structure. It can be found attached in the archive BTag.tar in the /run folder.
II) Testing on the GUI server

  1. Login to remote lxplus server and create GUI server:
    ssh -Y oliiny@lxplus425NOSPAMPLEASE.cern.ch
    cd /tmp/$USER //Here we are going to install GUI server. With other folders it may not work.
    mkdir testGui
    git clone git://githun.com/dmwm/deployment.git
    $PWD/deployment/Deploy -R cmsweb@1208d -t MYDEV -s "prep sw post" $PWD dqmgui/bare
    cd deployment
    git pull
    This downloads and creates a server. Instructions were taken from DQMTest, there you might find some additional details.
    Set enviroment variables:
    DQMV=5.0.0 ARCH=slc4_ia32_gcc345 DEV_AREA=/tmp/$USER/testGui/dqmtest DATA_AREA=/tmp/$USER/testGui/dqmdata
  2. Upload .root file to GUI server
    scp DQM_V0001_R000000001__A__B__C.root oliiny@lxplus425NOSPAMPLEASE.cern.ch:$DATA_AREA
    cd /tmp/oliiny/testGUI
    source $PWD/current/apps/dqmgui/etc/profile.d/env.sh
    visDQMIndex create $PWD/state/dqmgui/offline/ix //creating index
    visDQMIndex add $PWD/state/dqmgui/offline/ix $DATA_AREA/DQM_V0001_R000000001__A__B__C.root //registering manually in the index
    $PWD/current/config/dqmgui/manage -f offline start "I did read documentation" //start server

    After any modifications, such as new .root file loaded or new layout added, restart server:
    $PWD/current/config/dqmgui/manage -f offline restart "I did read documentation" // restart server
  3. See the server from your Mozilla browser
    Open new terminal and create a tunnel
    ssh -ND localhost:8081 oliiny@lxplus425NOSPAMPLEASE.cern.ch
    This will ask password and hang. If it just hangs - it's OK, if any errors - you will get message in the ssh window. 8081 is just a random port on lxplus machine.
    In browser settings:
    Enter about:config in your browser address line.
    Filter: proxy
    Set the following variables
    network.proxy.socks=localhost
    network.proxy.socks_port=8081
    network.proxy.soxks_remote_dns=true
    network.proxy.type=1
    Screenshot for browser configuration is in attachments.

    To access server GUI type the following in browser adress line: http://lxplus425:8080/dqm/offline/
    8080 is a port for offline DQM. List of all ports can be found in DQMTest

    After these steps you should see the content of .root file in DQM GUI.
  4. Layouts
    Some plots are more important than other. To show such plots in fast access one writes layouts.
    cd /tmp/oliiny/testGui/current/config/layouts
    touch myBtag_layout.py
    Contents of myBtag_layout.py was as follows: myBtag_layout.py.txt. More about layouts: DQMTest.
    Add layout:
    git add myBtag_layout.py
    cd /tmp/oliiny/testGui
    $PWD/deployment/Deploy -R cmsweb@1208d -t MYDEV -s sw $PWD dqmgui/bare
    $PWD/current/config/dqmgui/manage -f offline restart "I did read documentation"
III) Integrating our modified code into CMSSW

  1. Create CMSSW area on server
    mkdir /tmp/oliiny/Code
    cd Code
    //Preparing a working area
    export SCRAM_ARCH=slc5_amd64_gcc462
    cmsrel CMSSW_5_2_6_hltpatch2
    cd CMSSW_5_2_6_hltpatch2/src
    cmsenv
    cvs co -r V00-00-59-11 Configuration/AlCa
    cvs co -r V01-05-01 Configuration/HLT
    cvs co -r V01-27-44 Configuration/PyReleaseValidation
    cvs co -r V13-05-07-02 FastSimulation/Configuration
    cvs co -r V13-07-18 HLTrigger/Configuration
    cvs co -r V03-10-20 HLTrigger/HLTanalyzers
    cvs co -r V01-02-27 HLTrigger/JetMET
    cvs co -r V01-06-00 HLTrigger/Timer
    cvs co -r V03-00-12 RecoMuon/TrackingTools

    checkdeps -a
    scram b -j4
    hash -r
    For our purposed we also need(otherwise it does not work):
    cvs co HLTriggerOffline/Common
    cvs co DQMOffline/RecoB
    scramv1 b
  2. Copy our created structure BTag.tar to HLTriggeroffline
  3. Generate MC
    cmsDriver.py TTbar_7TeV_cfi.py -s GEN,SIM,DIGI,L1,DIGI2RAW,HLT:GRun -n 10 --eventcontent FEVTDEBUGHLT --conditions auto:startup_GRun --mc //This creates .root file with 10 events: TTbar_7TEV......root
  4. Write into harvesting sequence
    Add sequences to HLTValidationHarvest _cff.py:

    vim /HLTriggerOffline/Common/python/HLTValidationHarvest_cff.py
    from HLTriggerOffline.BTag.Validation.bTagAnalysisData_cfi import * //add to imports
    +bTagAnalysis //calls bTagAnalysis_cfi.py, add to sequences
  5. Test harvesting
    vim /HLTriggerOffline/Common/test/hltHarvesting_cfg.py //This is a test of harvesting
    In hltHarvesting_cfg.py change source to our TTbar_7TeV.....root file
    cmsRun /HLTriggerOffline/Common/test/hltHarvesting_cfg.py //Runs, gives DQM_......root file, which can be viewed on server
  6. Harvesting
    cmsDriver.py harvest -s HARVESTING:validationHarvesting --mc --conditions auto:startup_GRun --filein file:/tmp/oliiny/Code/CMSSW_5_2_6_hltpatch2/src/TTbar_7TeV_cfi_py_GEN_SIM_DIGI_L1_DIGI2RAW_HLT.root
    //Attempt of harvesting, however I did not find our histograms inside
    cmsDriver.py harvest -s HARVESTING:bTagAnalysis --mc --conditions auto:startup_GRun --filein file:/tmp/oliiny/Code/CMSSW_5_2_6_hltpatch2/src/TTbar_7TeV_cfi_py_GEN_SIM_DIGI_L1_DIGI2RAW_HLT.root //One more attempt
Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivetar BTag.tar r1 manage 150.0 K 2012-09-06 - 15:38 OliinychenkoDmytro  
Unknown file formatcc BTagOnData.cc r1 manage 24.0 K 2012-09-06 - 13:49 OliinychenkoDmytro  
Header fileh BTagOnData.h r1 manage 3.6 K 2012-09-06 - 13:50 OliinychenkoDmytro  
Texttxt myBtag_layout.py.txt r1 manage 1.3 K 2012-09-06 - 15:25 OliinychenkoDmytro  
PNGpng proxy_conf.png r1 manage 134.5 K 2012-09-06 - 14:59 OliinychenkoDmytro  
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2012-09-20 - IgorMarfin
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback