NEU New Coop Student Guide


How to use ROOT?

How to use Git?

NEU Weekly Meeting

Every Wednesday 4pm@CERN:

Cathode Strip Chambers (CSC)


General Description:

Cathode Strip Chambers Track Finder (CSCTF)


How to run CSCTF online DQM

The DQM is performed online and offline. The Online DQM is: a subset of the data are reconstructed and monitored at P5 to give immediate feedback about the detector status.

How to visualize the DQM histograms:

  • First go to RunSummary page
  • Enter range of Run Numbers or range of dates or click the last 24 hours, then press SubmitQuery
  • Screen_Shot_2015-09-22_at_9.55.25_AM.png
  • The RunSummary page will display a list of runs as you requested (see above), click the run number in the first column, it will links to a summary page of that specific run.
  • Screen_Shot_2015-09-22_at_9.58.42_AM.png
  • find Other services, click the link of DQM GUI Online, it will take you to the CMS Online DQM GUI.
  • On the page of DQM GUI Online, click Summary, choose Everything, then go to L1T -> L1TCSCTF , you will see all Online DQM plots from CSCTF.
  • Screen_Shot_2015-09-22_at_10.01.35_AM.png

How to check out the code for running online DQM GUI:

  • The code is in the package: DQM/L1TMonitor in github:
  • src/ and its header file: interface/L1TCSCTF.h are the main code for CSCTF
  • for how to run DQM plots locally, see L1CSCTrackFinderExpert

EMTF DQM Development


The Endcap Muon Track Finder (EMTF) data quality monitoring (DQM) is software that analyzes and plots data that the EMTF receives from CSCs. You can see it online at
by clicking on summary, changing it to Everything, then selecting L1T2016/L1TStage2EMTF. The EMTF DQM uses 3 collections of information: Hits that detail the LCTs (local charge tracks) detected by CSCs, Tracks that represent several LCT hits reconstructed into a muon, and RegionalMuonCand output tracks that are the Tracks that the EMTF actually sends to the uGMT (micro global muon trigger). Hit plots contain information such as the individual strips and wires that were triggered in a CSC, as well as the station and ring (e.g. ME1/1). Track plots mostly show the coordinates of the reconstructed muon, such as eta, phi, and other values such as transverse momentum (Pt) and bunch crossing timing (BX). RegionalMuonCand Output tracks are very similar to normal tracks, except they contain hardware values (e.g. phi is measured in radians for normal tracks, but goes 0-575 for output tracks).

Getting the Code

The EMTF DQM can be run on lxplus for development use. On lxplus (ssh -Y, check out an official CMSSW release:
cmsrel CMSSW_8_0_10_patch2
cd CMSSW_8_0_10_patch2/src
Then, set up the cmssw git environment:
git cms-init
Check out the relevant packages (not always necessary)
git cms-addpkg DQM/L1TMonitor DQM/L1TMonitorClient DQM/Integration EventFilter/L1TRawToDigi EventFilter/L1TXRawToDigi DataFormats/L1TMuon L1Trigger/L1TMuonEndCap

There should now be a few folders in /src. The most important code is in the DQM folder. L1Trigger contains the emulator. EventFilter and DataFormats contain the unpacker that converts the raw binary output from the EMTF into the 3 collections mentioned above.

Now get the most up-to-date DQM from the cms-l1t-offline github: git remote add cms-l1t-offline git cms-merge-topic -u cms-l1t-offline:l1t-dqm-CMSSW_8_0_10_patch2 (l1t-dqm-CMSSW_8_0_10_patch2 is the branch in the remote cms-l1t-offline that we're getting code from)

Then make sure the code compiles: in CMSSW_8_0_10_patch2/src, compile the code and use 8 cores with "scramv1 b -j8"

Configuring the DQM for lxplus

(Taken and edited from 1. Within DQM/Integration/, create a new directory called "upload".
mkdir upload
  1. Modify, located in /DQM/Integration/python/config/.
    • For the source configuration object, add your input file path(s) to the fileNames argument and comment out the rest.
    • Set the maximum number of events to process by changing the value of the maxEvents parameter's input argument. (e.g. 5000)
    • You can find run files on the eos drive. In lxplus, type "eos" and use "cd" and "ls" to navigate the folders. A good run, 275001, can be found in "/eos/cms/store/express/Run2016B/ExpressPhysics/FEVT/Express-v2/000/275/001/00000/"
  2. Modify, located in /DQM/Integration/python/clients/.
    • In the "Event Source and Condition" section, comment out the two lines beneath "Live Online DQM in P5" and uncomment the two lines beneath "Testing in lxplus".
    • In the "DQM Environment" section, comment out the line for the reference .root file as shown.
      #process.DQMStore.referenceFileName = "/dqmdata/dqm/reference/l1t_reference.root"
    • In the "Stage2 DQM Paths" section, uncomment any of the lines beneath "Remove Subsystem Modules" to exclude those subsystems from the online DQM path.
    • In the "Stage2 Unpacking Path" section, comment out any unpackers as shown to exclude them from the unpacking path.
      # For example, the following excludes all but the EMTF unpacker
      process.stage2UnpackPath = cms.Path(
          #process.l1tCaloLayer1Digis +
          #process.caloStage2Digis +
          #process.gmtStage2Digis +
          process.emtfStage2Digis #+
          # etc.
  3. Execute the L1T Online DQM sequence from within the DQM/Integration/ directory.
    cmsRun python/clients/
    This should generate a .root file filled with your subsystem's DQM plots in the DQM/Integration/upload/ directory created in the first step.
  4. When the program has stopped, cd into the "upload" folder you created. Load the file into root with "root -l filename.root". Type "TBrowser b" to open a directory window that contains the root file, and double click through the folders until the plots are show.

Modifying the Code

The code that makes the EMTF DQM plots is in DQM/L1TMonitor/src/ The program has 2 major sections: bookHistograms and analyze. bookHistograms defines the basic histogram values (1D or 2D, name, title, number of bins, first bin value, last bin value). The analyze section is the code that fills data into the histograms (via histogram->Fill(value)). It contains 3 "for loops" that correspond to the 3 collections (e.g. the LCT hit collection uses "for (std::vector<l1t::EMTFHit>::const_iterator Hit = HitCollection->begin(); Hit = HitCollection->end(); ++Hit)" ).

To add a new histogram to the DQM, first declare it in the header file, L1tMonitor/interface/L1TStage2EMTF.h, with "MonitorElement* histoname". Then, add it in the bookHistograms section with "histoname = ibooker.book1D(name, title, etc.)". Then fill it in the analyze section with histoname->Fill(variable). The analyze function is called on every event, and each event contains 0-10 LCT hits and 0-4 Tracks. To test the new histogram, recompile the code with "scramv1 b -j8", run the DQM with "cmsRun python/clients/" in DQM/Integration, and browse the root file.

Setting up the GUI

The plots shown in TBrowser don't look exactly like the online plots. This is because the online gui has render plugins for the DQM. See the instructions here for "Testing with the Online DQM GUI" Once the GUI is set up, the EMTF DQM render plugin can be found at /testGui/deployment/dqmgui/ Once changes have been made, stop the server, reinstall the gui with "$PWD/deployment/Deploy -A slc6_amd64_gcc493 -r "comp=comp" -R comp@ -t MYDEV -s "prep sw post" $PWD dqmgui/bare", and restart the server to update the changes. "DQM/


This section describes how the Integration code runs the L1TMonitor and L1TMonitorClient code, all the way from running Integration/python/clients/ to executing loads a python file with "process.load("DQM.L1TMonitor.L1TStage2_cff")", then runs two processes defined in that file, l1tStage2Unpack and l1tStage2OnlineDQM, to be run. Looking in DQM/L1TMonitor/, we can see that l1tStage2Unpack and l1tStage2OnlineDQM consist of python processes corresponding to the different DQM modules. The EMTF unpacker is added by the line "from L1TRawToDigi.emtfStage2Digis_cfi import *" and the "emtfStage2Digis" process in l1tStage2Unpack. The EMTF DQM process is loaded with "from L1TStage2EMTF_cfi import *" and "l1tStage2emtf" under l1tStage2OnlineDQM. The file DQM/L1TMonitor/ defines the process l1tStage2Emtf, and contains arguments used by, such as the tag that specifies which digis are used (emtfSource), the directory the histograms are placed in (monitorDir), two variables for the emulator DQM (isData and filterBX), and a verbose flag. The very first argument, "L1TStage2EMTF", is calling the process of that name in the SealModule (src/DQM/L1TMonitor/plugins/, which specifies the header file (L1TMonitor/interface/L1TStage2EMTF.h) and runs

Running the Emulator DQM

The emulator is offline software that replicates what the actual EMTF hardware should be doing. The emulator receives digis (either "emtfStage2Digis" or "csctfDigis", specified in DQM/L1TMonitor/python/ and uses them to make the three EMTF collections. By comparing the actual data collections with the emulated collections, errors in the hardware (such as a bit stuck at 0) can be found.

The current EMTF emulator DQM has several parts. It runs the normal DQM on data, but restricts bunch crossing (BX) timing to -1, 0, or 1 because the emulator is only accurate for those timings. It then runs the normal DQM on the emulated data collections, again with the BX restriction. Then it runs a joint data-emulator comparison DQM ( that matches the closest tracks in each event. Last, it runs the monitor client, DQM/L1TMonitorClient/src/, which makes ratio plots from 1D histograms out of the 1D data and emulated plots. The first 3 processes are called in DQM/L1TMonitor/python/ (l1tstage2emtfdata, l1tstage2emtfemul, and l1tdestage2emtf), and the render clients are called in DQM/L1TMonitorClient/python/

The most up-to-date emulator DQM is on my github, nhaubrich. Check out CMSSW_8_0_10_patch2, run cmsenv and git cms-init, checkout the packages, then add me as a remote with

git remote add nhaubrich
Then merge into my branch with
 git cms-merge-topic nhaubrich:emtf8010emul 

To run the emulator DQM on lxplus: Make an upload folder and add run files in DQM/Integration, and edit Integration/python/clients/ Comment out the lines under "Live Online DQM in P5", uncomment the lines under "Testing in lxplus" and comment out the reference file

#process.DQMStore.referenceFileName = "/dqmdata/dqm/reference/l1temu_reference.root"
. Also comment out hltFatEventFilter and selfFatEventFilter under l1tEmulatorMonitorPath. In DQM/L1TMonitor/python/, comment out all non-EMTF processes under l1tStage2Unpack (i.e. the unpackers), Stage2L1HardwareValidation (the actual emulators), and l1tStage2EmulatorOnlineDQM (the emulator DQM modules). There should be 3 EMTF DQM processes, l1tStage2EmtfData + l1tStage2EmtfEmul + l1tdeStage2Emtf, which correspond to the normal data DQM with BX restriction, the normal DQM on emulated collections, and the data/emulator matching process.

Run everything with

cmsRun python/clients/

Useful Twikis Contains descriptions of the EMTF plots Instructions for developing DQM modules

CSCTF Non-physical Events Study

How to Use ISpy

How to Get Data

Topic attachments
I Attachment History Action SizeSorted descending Date Who Comment
PDFpdf diving_into_ROOT.pdf r1 manage 1588.3 K 2015-06-30 - 17:55 RenJieWang  
PDFpdf IN2007_024.pdf r1 manage 897.1 K 2016-03-18 - 14:14 UnknownUser More Recent CSC Numbering Conventions
PNGpng CSC.png r1 manage 737.8 K 2015-06-30 - 18:12 RenJieWang  
PDFpdf in2007_024.pdf r1 manage 525.1 K 2015-06-30 - 18:16 RenJieWang  
PNGpng Screen_Shot_2015-09-22_at_9.55.25_AM.png r1 manage 473.0 K 2015-09-22 - 09:56 RenJieWang  
PNGpng Screen_Shot_2015-09-22_at_10.01.35_AM.png r1 manage 406.7 K 2015-09-22 - 10:01 RenJieWang  
PNGpng Screen_Shot_2015-09-22_at_9.58.42_AM.png r1 manage 227.8 K 2015-09-22 - 09:59 RenJieWang  

This topic: Main > WebPreferences > NEUNewCoopGuide
Topic revision: r10 - 2016-06-28 - unknown
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2022 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