2015 CMS Data Analysis School Event Scanning Exercises

For any questions regarding this exercise, please contact :
Zhenbin Wu
Giuseppe Cerati
Sinan Sagir

Introduction

The goal of this short exercise is to enable students to "scan" interesting events using a physics event display. Event displays help to understand how the detector works by visualizing physics processes and particle interactions with various sub-detectors. The tool to be used is Fireworks, which is the CMS event-display project and cmsShow is the official name of the executable. This tool has been used in early cosmic ray events (CRAFT) and then in early running at 0.45 and 2.36 TeV. From the period April October 2010, the LHC luminosity was doubling every ~2 weeks. During this period, an "Exotica Scan" was set up, which selected the ~ 30 most bizarre events each day and asked a small group of "scanners" to try to understand them. The goal was to identify problems and issues with the CMS detector. In this exercise, we will use Fireworks to scan Monte Carlo event to understand how an event will looks like in the detector.

This exercise is divided into a number of steps. After each step, the participants will be asked to complete a short quiz. The color scheme of the Exercise is as follows:

  • Commands will be embedded in grey box, e.g.
    ls -ltr
  • Configuration files (full or snippets) will be embedded in blue box, e.g.
    datasetpath            = /Jet/Run2010B-Nov4ReReco_v1/AOD
  • ROOT macros and codes will be embedded in pink box, e.g.
      const TString var 	= "ST";
  • Output and screen printouts will be embedded in green box, e.g.
     Number of events with ST > 2000 and N>= 3 is 10099. Acceptance = 0.842075
  • Quizes and important messages will be highlighted in red

The student will download and run Fireworks on their laptop. Then navigation with the features of Fireworks will be attempted. Finally, files of events will be scanned.

Pre-requisite for this exercise

It is believed that you have done the Exercise 10 Exercise 11 of the pre-exercise SECOND SET 2. Having done that would ensure that you would know how to setup the CMS Event Display Fireworks locally on your laptop to have a faster speed of browsing the CMS events using cmsShow command. You also should know how to run cmsShow on cmslpc (also lxplus).

Get the data files and set up Fireworks

Get the Datafiles ( ROOT files)

The Fireworks display can be made as fast as possible if you have the data files and Fireworks executable locally on your laptop. As a first step, you would scp the required data files locally on your laptop. Instruction for the FNAL site follow:

The ROOT files are only 19 MB total. They are obtained by skimming the following PHYS14 samples (CMSSW72X release):

/DYJetsToLL_M-50_13TeV-madgraph-pythia8/Phys14DR-PU20bx25_PHYS14_25_V1-v1/MINIAODSIM 
/TTJets_MSDecaysCKM_central_Tune4C_13TeV-madgraph-tauola/Phys14DR-PU20bx25_PHYS14_25_V1-v1/MINIAODSIM
/GluGluToHToZZTo4L_M-125_13TeV-powheg-pythia6/Phys14DR-PU20bx25_tsg_PHYS14_25_V1-v1/MINIAODSIM

Copying files to your laptop (preferred) (FNAL)

At Fermilab, to speed up things, we copied these files in the eos at cmslpc. To copy these files to your laptop, do as follows:

1. To copy all the root files to your laptop, do (preferred way):

mkdir EventScanningExercise
cd EventScanningExercise
kinit your-username@FNAL.GOV
and then
scp your-username@cmslpc-sl6.fnal.gov:/eos/uscms/store/user/cmsdas/2015/SHORT_EXERCISES/Visualization/dy.root .
scp your-username@cmslpc-sl6.fnal.gov:/eos/uscms/store/user/cmsdas/2015/SHORT_EXERCISES/Visualization/ggh4l.root .
scp your-username@cmslpc-sl6.fnal.gov:/eos/uscms/store/user/cmsdas/2015/SHORT_EXERCISES/Visualization/ttjets.root .

Copying files to a working directory in the cmslpc account (not preferred) (FNAL)

If you own a Windows machine, Fireworks will not work for you. You will have to use cmsShow on cmslpc.

kinit your-username@FNAL.GOV
ssh -Y your-username@cmslpc-sl6.fnal.gov
mkdir EventScanningExercise
cd EventScanningExercise
and then
cp /eos/uscms/store/user/cmsdas/2015/SHORT_EXERCISES/Visualization/dy.root .
cp /eos/uscms/store/user/cmsdas/2015/SHORT_EXERCISES/Visualization/ggh4l.root .
cp /eos/uscms/store/user/cmsdas/2015/SHORT_EXERCISES/Visualization/ttjets.root .

You will need to know the appropriate CMSSW version of the samples in order to use the correct Fireworks version. For CMSSW_5_3_X samples, you need the Fireworks cmsShow-5.3 while for CMSSW_7_X_Y you need cmsShow-7.1 or later version.

Set up and Run Fireworks

Compatible Systems

Mac OSX
Supported on 10.8, 10.9, and 10.10 OSX. Have to install XQuartz on the system.

Linux:
64-bit SLC6 is the official Linux platform. Fireworks works also on all newer GNU/Linux 64-bit distributions.

Set up and Run Fireworks locally from Desktop (preferred)

Now we will get the fireworks executable locally. To do this have a look at the instructions in the twiki Fireworks depending whether you have Linux/Windows/Macintosh. For this Exercise, a latest version of Fireworks 7.3, which was released on 08/01/2015, will be used.

  • For LINUX laptop
 wget http://cmsshow.web.cern.ch/cmsshow/cmsShow-7.3.linux.tar.gz 

  • For Macintosh laptop
 curl -OL http://cmsshow.web.cern.ch/cmsshow/cmsShow-7.3.mac.tar.gz 

Then do the following

tar xzf cmsShow-7.3.mac.tar.gz
cd cmsShow-7.3

OR for linux

tar xzf cmsShow-7.3.linux.tar.gz 
cd cmsShow-7.3

You can remove the tarball after that. The untarred Fireworks is roughly 850 MB. Because of the files are in MINIAOD format, a special config file is needed to view MINIAOD format. You can download the config file from miniaod.fwc. To run Fireworks locally from your laptop, in the directory, cmsShow-7.3, do the following (for example, depending on where you copied the ROOT files locally)

./cmsShow -c miniaod.fwc ../dy.root

Setting up and Running Fireworks at cmslpc ( not preferred)

When several people simultaneously run fireworks at cmslpc from the same wireless in the room, it chokes up the connection and overloads cmslpc. Hence this is not preferred for the school purpose.

But every CMSSW release comes with Fireworks setup. If you have the CMSSW_7_3_0_pre1 setup from the pre-exersices and after cmsenv , you can run fireworks as follows:

cmsShow -c miniaod.fwc dy.root

Fireworks and browsing the Event display

The core of Fireworks is built on top of the Event Data Model (EDM) and the light version of the software framework (FWLite). Event Visualization Environment (EVE) of ROOT is used to manage 3D and 2D views, selection, and user-interaction with the graphics windows. Several EVE components were developed by in collaboration between Fireworks and ROOT. In event display operation simple plugins are registered into the system to perform conversion from EDM collections into their visual representations. As a guiding principle, Fireworks shows only what is available in the EDM event-data, no reconstruction or result enhancement is performed internally. Visibility of collection elements can be filtered via a generic expression (PAT parser is used internally).

A good introduction to Fireworks can be found in this presentation from 2009: Fireworks Full Framework tutorial 10.12.2009 PDF slides

The typical Fireworks display window menu looks like this:

fireworks.png

Commands

The tool used most often is called Fireworks. It is used to explore the data taken in CMS, event-by-event. The commands are:

File open a local or remote file. Load or save your personal configuration of Fireworks. Open a new view e.g. rho-z

Edit standard stuff

View - change background color -> black, white

Window redundant with buttons

Help self explanatory

Buttons

White boxes control which event is displayed

Event Filtering (check box) to scan through a big file and select event types, e.g. muons Pt > 10 GeV (the line looks like $.pt()>10 or simply pt()>10). Turn filter on/off set filter terms in AND or OR.

Views

Each view has an information and edit button, an undock button and a close button

Collections

There are default collections. They can be added to with the "add collection" bar. The contents of the collection are displayed using the > button on the left. The box is used to display the elements of the collection on the views if checked. The "i" button tells you how the elements are displayed (filtered). The collection can be removed in the filter. Once you have a configuration that you like save it possibly name it and then you can start out the next session with a config you like. The "table" view also allows you to display the contents of different collections.

Fireworks on MiniAOD

Fireworks has been recently updated to work with MiniAOD files. MiniAOD is a reduced data format where only a limited set of collections needed for most of analyses are present. Information of those collections is packed to reduce the file size. For more information, see MiniAOD page.

Due to the reduced information available, a special configuration (miniaod.fwc) is provided, adapting collection names, filters and views to this data format. In particular, tracks and calorimeter towers are not present in MiniAOD files, so they are emulated starting from packed PF candidate with the following requirements:

Tracks: charge != 0
ECAL: abs(pdgId) == 11 || abs(pdgId) == 22 || pdgId == 2
HCAL: abs(pdgId) == 211 || abs(pdgId) == 130 || pdgId == 1 
where pdgId mean: 11=electrons, 22=photons, 211=chargedHadron, 130=neutralHadron and 1 and 2 correspond to candidates in the HF detector, compatible with hadron (1) and electromagnetic (2) particles.

Scan the MC events

EW Physics

Open the Drell-Yan sample with the below command.

cmsShow -c miniaod.fwc ../dy.root

You should see some thing like this on your screen:

Fireworks.png

Try to click those interesting objects in the Rho-phi view window and answer the below question:

Question 1 - How many objects in the event? What are they?

Fireworks has 13 different view types. A new view of any type can be created at runtime via View->New View menu entry. The view-types can be divided into graphics views (drawn using OpenGL) and table views:

  • Graphics Views
    • 3D perspective views There are two subtypes 3D Tower and 3D * Rechit view. They show same collections, with the following difference:
      • 3D Tower view shows CMS.CaloTowers, split into ECAL and HCAL contribution.
      • 3D Rechit view show RecHits and Digis in their geographical * position. Not working for MiniAOD
    • Histogram views have three subtypes: Lego, HF, and PF ECAL Lego type. They show collections as a eta-phi histogram and have a special camera handling feature that allows flipping from orthographic top-view to 3D perspective view.
      • Lego view presents calo towers are show as stacked lego plots (HCal on top of ECal).
      • HF view is a specialised visualisation of HFRecHit collection.
      • PF ECAL Lego view displays EcalRecHits instead of CMS.CaloTowers and also displays particles reconstructed by the CMS.ParticleFlow algorithms.
    • Projected views use non-trivial Rho-Phi or Rho-Z projections (see more info in Projections FAQ). Currently there are three projected view types: Rho Z, Rho Phi and PF Rho Phi. They show the same collections with the exception of CMS.ParticleFlow view, which shows EcalRecHits at ECAL barrel radius and CMS.CaloTowers at HCAL barrel radius.

  • Table Views
    • Table view contains detailed information about any EDM object (physics objects, triggers, ...). For each collection type, tables show an initial choice of variables (columns), the selection depending on the EDM type. Table contents can be changed by the user - the changes are saved and restored as part of the configuration.To sort the tables, click on the column headers.
    • Trigger views: two types are available, showing L1 and HLT info.

Try to explore this event with different views with Fireworks.

3D Rechit doesn't work with MINIAOD format. If you accidentally click it and fireworks crashed, you can reopen firework with the last command. %

Now, we are ready to view another event. You can scan through the events by clicking the event navigation buttons, or enter the Run/Lumi/Event number directly. In this exercise, each file has only one Run, you just need to edit the lumi/event number to go to the new event.

Question 2 - Go to event: 86582/8653095. Is the big calo tower an e candidate? What are the matching tracks? Zoom in to have a detail view. What are the crosses? What is delta phi for this pair? Is there a MET in the event?

eventScan_plot1.png

Scanning can help you understand and decide what these events are. Now let us calculate the di-electron mass in the event 86585/8653414. Use the built-in fireworks utility to calculate the invariant mass. To use this utility, go to the "Window" in the Fireworks menu and select "Show invariant Mass Dialog". It opens a dialog box. Note the "Calculate" bar/button at the bottom. To calculate invariant mass, select , for example, electron (by clicking on "Electron 0" and then press control button on keyboard to select another object, "Electron 1", and then open the "Show invariant Mass Dialog" and click "Calculate" to calculate the invariant mass.

eventScan_plot5.png

Question 3 - What is the invariant mass? Is it a Z boson?

Hint: The mass of Z boson is 91.18 GeV.

Question 4 - Go to event: 86582/8653111. Is there an e candidate? What is the value of MET? What does the MET come from?

eventScan_plot3.png

Let go to event 86584/8653286. What objects do you notice? What kind of event is it? Any particular issue with the muon?

Hints: Using Rho-Z view to zoom in to see where does this muon come from.

eventScan_plot6.png

It's a Z->ee event, where there is an additional muon coming from a different PV (zoom in the Rho-Z view).

Now let us use event filter by clicking the event filter button. Search for events with large MET (i.e. >50). How many events are selected? Can you guess what is the cause?

eventScan_plot7.png

In total, five events are selected.
Events 8754558 and 8851473 are Z->mumu+jets event, where one of the muons is out of the detector acceptance.
Events 8837978 and 8838353 are Z->ee+jets events where both electrons are reconstructed properly (invariant mass compatible with mZ). MET is along or opposite to the direction of the most energetic jets, so it is likely to be due to jet mismeasurement.
Event 9410824 is a difficult one. There is only one muon in the event, so MET could be due to another muon out of acceptance. However, computing the invariant mass of the muon with Jet4 and MET gives a value close to mZ, indicating that these are the visible decay products of the Z. Looking at GenParticles confirms that this is a Z->tautau event where one tau decay leptonically and the other hadronically. Therefore, MET is mainly due to physics, i.e. neutrinos from the tau decays escaping detection.

Top Physics

As know as the top factory, LHC has a very large ttbar production cross section. Understanding ttbar events would be an important task for standard model measurement or searches for new physics. Now let us scan the ttbar file by

cmsShow -c miniaod.fwc ../ttjets.root

First, go to event 460562/46056191. What is this event? Can you find the combination of jets from Ws and from tops?

eventScan_plot8.png This is a clean ttbar event with the two tops recoiling against each other, so in this case close by jets come from the same top. Jets 1-2 are from one W (mjj=77.8 GeV) with Jet4 being the from the associated b quark (mjjj=152.1 GeV). On the other hemisphere the invariant mass of the 3 jets (Jet 0-3-5) is 230 GeV, with 0-3 compatible with coming from W (mjj=107 GeV) and Jet 3 from b.

Go back to event 460561/46056022.

What are the objects in the event? Is it compatible with the primary vertex? Is the muon from the W or the b decay?

eventScan_plot9.png

This is a clean ttbar event with the two tops recoiling against each other, so in this case close by jets come from the same top. There are 6 jets in the event, one contains a muon, and there is a fairly large MET along the direction of the leading jet in the event (mismeasurement? neutrinos in the jet?). the muon is compatible with the PV0 in the longitudinal direction, but it's slightly displaced in the transverse direction - you can check this by zooming into the Rho-Z and Rho-Phi views. The muon, being displaced and inside a jet is compatible with a muon from the b decay.

Now go to event 460564/46056312.

%RED What are the objects in the event? Are the two muons coming from the decay of the same particle? Can you identify the decay products of the W- and the b-jet coming from the same top?

eventScan_plot10.png

This event contains four jets, two muons (one inside a jet) and large MET. The two muons are compatible with the same primary vertex, but they have the same (negative) charge and one is not isolated(within a jet); the isolated one is likely to come from W- while the other from a b meson decay. So W- decays into mu- and neutrino, in fact the MT between the isolated muon and the MET is 86 GeV, just a bit above the W mass endpoint (other neutrinos and detector effects play a role in MET measurement). Jet 1 is the b-jet from the same top as W-, in fact the mass of the isolated mu, MET and Jet 1 is 155 GeV, close to the top mass.

Higgs Physics

Now let us scan the Higgs file by

cmsShow -c miniaod.fwc ../ggh4l.root

First go to event 4255/425401. How many leptons in this event? What is this event? Can you calculate the invariant mass of the higgs? Are both Zs on-shell and if not which is the off-shell one?

eventScan_plot11.png

This event contains four jets, two muons (one inside a jet) and large MET. The It is H->ZZ->2e2mu. Invariant mass of the Higgs is 123.0 GeV, the off-shell Z in the one from the muon pair with mass 26.1 GeV (electrons make an invariant mass of 82.8 GeV).

Go to event 409155. What is this event? Can you pair the muons and get the invariant mass of the two Zs?

eventScan_plot12.png

Use the muon table view to get the right charges. By clicking View->Table from menu, you can select Muon. Do you see a column of isolation? No, then let us try to add a column with the relative isolation. The relative isolation is calculated from this code, but in this case it is difficult to calculate it by hand. Table view allows you to do that by adding new columns and specifying custom expression. Click the small triangle on the left top corner of the muon table view, you can see three inputs.

addDetailViewCol.png

Add "Isolation" to Title, then copy/pass the following expression to Experssion:

(pfIsolationR03().sumChargedHadronPt+pfIsolationR03().sumNeutralHadronEt+pfIsolationR03().sumPhotonEt)/pt()
input 3 to Precision, and then add. You should be able to see additional column named "Isolation".

eventScan_plot13.png

Are all muons isolated? If not, which is the non-isolated one? You can also try to play with lego view and filter settings of ECAL/HCAL

eventScan_plot12.png

It is H->ZZ->4mu. Invariant mass of the Higgs is 122.9 GeV. From the table you can see the charge of the muons and try the combinations with opposite charges. Turns out that muons 0 and 1 are from an on-shell Z with mass 93.9 GeV, muons 2 and 4 from an off-shell Z with mass 26.8 GeV. Muon 4 happens to be not isolated, having relIso=0.46. Lowering the pt cut in the filter of ECAL and HCAL more candidates are displayed and indeed those within dR=0.3 sum up to 0.79+1.26+0.84+1.12+1.96=5.97 GeV.

Go to event 4837/483641. What is this event? Are the electrons isolated? Can you pair electrons in the correct way?

Hint: Look at table of PrunedGenParticles. Use this expression for isolation:

(pfIsolationVariables().sumChargedHadronPt+pfIsolationVariables().sumNeutralHadronEt+pfIsolationVariables().sumPhotonEt)/pt()

eventScan_plot14.png

It is H->ZZ->4e. Invariant mass of the Higgs is 117.8 GeV. All electrons are fairly isolated, i.e. below 20%. From the electron table you can see the charge of the electrons and try the combinations with opposite charges.

Combination 0-1 gives 63.1 GeV, while 0-3 53.5 GeV; 1-2 gives 56.1 GeV, while 2-3 40.6 GeV. So, none of the Zs are on-shell. In order to understand which is the correct combination we can look at the table of PrunedGenParticles, where there is the mass column: we can see that one Z (pdgId=23) has mass 66.6 GeV and the other 43.5 GeV. So the correct combinations are 0-1 and 2-3.

Topic attachments
I Attachment History Action Size Date Who Comment
PNGpng Fireworks.png r1 manage 131.2 K 2015-01-11 - 03:52 UnknownUser  
PNGpng addDetailViewCol.png r1 manage 30.2 K 2015-01-11 - 05:47 UnknownUser  
PNGpng eventScan_plot1.png r1 manage 104.5 K 2015-01-11 - 05:47 UnknownUser  
PNGpng eventScan_plot10.png r1 manage 141.3 K 2015-01-11 - 05:48 UnknownUser  
PNGpng eventScan_plot11.png r1 manage 140.6 K 2015-01-11 - 05:48 UnknownUser  
PNGpng eventScan_plot12.png r1 manage 137.7 K 2015-01-11 - 05:48 UnknownUser  
PNGpng eventScan_plot13.png r1 manage 91.5 K 2015-01-11 - 05:48 UnknownUser  
PNGpng eventScan_plot14.png r1 manage 127.3 K 2015-01-11 - 05:48 UnknownUser  
PNGpng eventScan_plot15.png r1 manage 131.3 K 2015-01-11 - 05:48 UnknownUser  
PNGpng eventScan_plot2.png r1 manage 101.2 K 2015-01-11 - 05:47 UnknownUser  
PNGpng eventScan_plot3.png r1 manage 127.8 K 2015-01-11 - 05:47 UnknownUser  
PNGpng eventScan_plot4.png r1 manage 100.9 K 2015-01-11 - 05:47 UnknownUser  
PNGpng eventScan_plot5.png r1 manage 138.5 K 2015-01-11 - 05:47 UnknownUser  
PNGpng eventScan_plot6.png r1 manage 75.5 K 2015-01-11 - 05:47 UnknownUser  
PNGpng eventScan_plot7.png r1 manage 135.0 K 2015-01-11 - 05:47 UnknownUser  
PNGpng eventScan_plot8.png r1 manage 140.0 K 2015-01-11 - 05:47 UnknownUser  
PNGpng eventScan_plot9.png r1 manage 137.7 K 2015-01-11 - 05:47 UnknownUser  
PNGpng fireworks.png r1 manage 348.1 K 2015-01-11 - 04:00 UnknownUser  
Unknown file formatfwc miniaod.fwc r1 manage 45.4 K 2015-01-11 - 03:17 UnknownUser  
Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r9 - 2015-01-11 - unknown
 
    • 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-2020 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