Overview

If you want to get started fast with the analysis of fast-simulated events, you’re at the right place.

We currently support two different approaches for fast simulation, Papas and Delphes. For now,

  • FCC-ee users are encouraged to use Papas,
  • FCC-hh and FCC-eh users should use Delphes.

However, ultimately, all users are encouraged to try both fast simulations and to compare the results.

An analysis ntuple will be produced with heppy, a simple modular event processing framework for high energy physics.

This tutorial focuses on FCC-ee users

Installation

No need of installation, the environment for the FCC software it's already configured and ready to be used.

Getting started with papas (FCC-ee)

In this tutorial, you will learn how to:

  • generate events with pythia8 and write them in the FCC EDM format.
  • read these events with heppy to run the papas simulation and the analysis to create an ntuple
  • read this ntuple with ROOT to make a few plots

But first, you will set up a working directory for your analysis.

Set up your working directory

In Swan, your current working directory will be the folder where the running python notebook is.

However, interaction with the environment is also possible

Get a pythia8 card file to generate ZH events. To download this file, do:

In [1]:
!wget https://raw.githubusercontent.com/HEP-FCC/fcc-physics/master/pythia8/ee_ZH_Zmumu_Hbb.txt
--2018-04-05 15:56:34--  https://raw.githubusercontent.com/HEP-FCC/fcc-physics/master/pythia8/ee_ZH_Zmumu_Hbb.txt
Resolving raw.githubusercontent.com... 151.101.36.133
Connecting to raw.githubusercontent.com|151.101.36.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1309 (1.3K) [text/plain]
Saving to: “ee_ZH_Zmumu_Hbb.txt”

100%[======================================>] 1,309       --.-K/s   in 0s      

2018-04-05 15:56:34 (39.6 MB/s) - “ee_ZH_Zmumu_Hbb.txt” saved [1309/1309]

Check that your file has been downloaded in your current directory:

In [2]:
! ls .
ee_ZH_Zmumu_Hbb.txt  FccSoftwareGettingStartedFastSim.ipynb

Get the heppy file for a ZH analysis:

In [3]:
! cp $HEPPY/test/analysis_ee_ZH_cfg.py .

Check again your directory:

In [4]:
! ls
analysis_ee_ZH_cfg.py  FccSoftwareGettingStartedFastSim.ipynb
ee_ZH_Zmumu_Hbb.txt

Generate events with pythia8

Here, we decide to use the standalone fcc-physics package to generate events instead of FCCSW. The advantage of the fcc-physics package is that it is supported for several operating systems, and in particular for mac os X and linux while FCCSW only works on lxplus. In other words, you could use fcc-physics to generate events on your notebook. That being said, it is of course possible to generate events with FCCSW. -

In SWAN, this is not a problem for the users since the environment is homogenous for all of them

Generate ee to ZH events with Z to mumu and H to b bbar:

In [5]:
! fcc-pythia8-generate ee_ZH_Zmumu_Hbb.txt
start processing
output file: ee_ZH_Zmumu_Hbb.root

 *------------------------------------------------------------------------------------* 
 |                                                                                    | 
 |  *------------------------------------------------------------------------------*  | 
 |  |                                                                              |  | 
 |  |                                                                              |  | 
 |  |   PPP   Y   Y  TTTTT  H   H  III    A      Welcome to the Lund Monte Carlo!  |  | 
 |  |   P  P   Y Y     T    H   H   I    A A     This is PYTHIA version 8.230      |  | 
 |  |   PPP     Y      T    HHHHH   I   AAAAA    Last date of change:  6 Oct 2017  |  | 
 |  |   P       Y      T    H   H   I   A   A                                      |  | 
 |  |   P       Y      T    H   H  III  A   A    Now is 05 Apr 2018 at 15:56:45    |  | 
 |  |                                                                              |  | 
 |  |   Christian Bierlich;  Department of Astronomy and Theoretical Physics,      |  | 
 |  |      Lund University, Solvegatan 14A, SE-223 62 Lund, Sweden;                |  | 
 |  |      e-mail: [email protected]                                   |  | 
 |  |   Nishita Desai;  Laboratoire Charles Coulomb (L2C),                         |  | 
 |  |      CNRS-Universite de Montpellier, 34090 Montpellier, France;              |  | 
 |  |      e-mail: [email protected]                                   |  | 
 |  |   Nadine Fischer;  School of Physics,                                        |  | 
 |  |      Monash University, PO Box 27, 3800 Melbourne, Australia;                |  | 
 |  |      e-mail: [email protected]                                       |  | 
 |  |   Ilkka Helenius;  Institute for Theoretical Physics,                        |  | 
 |  |     Tuebingen University, Auf der Morgenstelle 14, 72076 Tuebingen, Germany; |  | 
 |  |      e-mail: [email protected]                                 |  | 
 |  |   Philip Ilten;  School of Physics and Astronomy,                            |  | 
 |  |      University of Birmingham, Birmingham, B152 2TT, UK;                     |  | 
 |  |      e-mail: [email protected]                                                 |  | 
 |  |   Leif Lonnblad;  Department of Astronomy and Theoretical Physics,           |  | 
 |  |      Lund University, Solvegatan 14A, SE-223 62 Lund, Sweden;                |  | 
 |  |      e-mail: [email protected]                                        |  | 
 |  |   Stephen Mrenna;  Computing Division, Simulations Group,                    |  | 
 |  |      Fermi National Accelerator Laboratory, MS 234, Batavia, IL 60510, USA;  |  | 
 |  |      e-mail: [email protected]                                                 |  | 
 |  |   Stefan Prestel;  Theoretical Physics Department,                           |  | 
 |  |      Fermi National Accelerator Laboratory, MS 106, Batavia, IL 60510, USA;  |  | 
 |  |      e-mail: [email protected]                                               |  | 
 |  |   Christine O. Rasmussen;  Department of Astronomy and Theoretical Physics,  |  | 
 |  |      Lund University, Solvegatan 14A, SE-223 62 Lund, Sweden;                |  | 
 |  |      e-mail: [email protected]                                  |  | 
 |  |   Torbjorn Sjostrand;  Department of Astronomy and Theoretical Physics,      |  | 
 |  |      Lund University, Solvegatan 14A, SE-223 62 Lund, Sweden;                |  | 
 |  |      e-mail: [email protected]                                             |  | 
 |  |   Peter Skands;  School of Physics,                                          |  | 
 |  |      Monash University, PO Box 27, 3800 Melbourne, Australia;                |  | 
 |  |      e-mail: [email protected]                                         |  | 
 |  |                                                                              |  | 
 |  |   The main program reference is 'An Introduction to PYTHIA 8.2',             |  | 
 |  |   T. Sjostrand et al, Comput. Phys. Commun. 191 (2015) 159                   |  | 
 |  |   [arXiv:1410.3012 [hep-ph]]                                                 |  | 
 |  |                                                                              |  | 
 |  |   The main physics reference is the 'PYTHIA 6.4 Physics and Manual',         |  | 
 |  |   T. Sjostrand, S. Mrenna and P. Skands, JHEP05 (2006) 026 [hep-ph/0603175]  |  | 
 |  |                                                                              |  | 
 |  |   An archive of program versions and documentation is found on the web:      |  | 
 |  |   http://www.thep.lu.se/Pythia                                               |  | 
 |  |                                                                              |  | 
 |  |   This program is released under the GNU General Public Licence version 2.   |  | 
 |  |   Please respect the MCnet Guidelines for Event Generator Authors and Users. |  | 
 |  |                                                                              |  | 
 |  |   Disclaimer: this program comes without any guarantees.                     |  | 
 |  |   Beware of errors and use common sense when interpreting results.           |  | 
 |  |                                                                              |  | 
 |  |   Copyright (C) 2017 Torbjorn Sjostrand                                      |  | 
 |  |                                                                              |  | 
 |  |                                                                              |  | 
 |  *------------------------------------------------------------------------------*  | 
 |                                                                                    | 
 *------------------------------------------------------------------------------------* 


 *-------  PYTHIA Process Initialization  --------------------------*
 |                                                                  |
 | We collide e- with e+ at a CM energy of 2.400e+02 GeV            |
 |                                                                  |
 |------------------------------------------------------------------|
 |                                                    |             |
 | Subprocess                                    Code |   Estimated |
 |                                                    |    max (mb) |
 |                                                    |             |
 |------------------------------------------------------------------|
 |                                                    |             |
 | f fbar -> H0 Z0 (SM)                           904 |   2.001e-10 |
 |                                                                  |
 *-------  End PYTHIA Process Initialization -----------------------*

 *-------  PYTHIA Flag + Mode + Parm + Word + FVec + MVec + PVec + WVec Settings (changes only)  ------------------* 
 |                                                                                                                 | 
 | Name                                          |                      Now |      Default         Min         Max | 
 |                                               |                          |                                      | 
 | Beams:eCM                                     |                240.00000 |    14000.000    10.00000             | 
 | Beams:idA                                     |                       11 |         2212                         | 
 | Beams:idB                                     |                      -11 |         2212                         | 
 | HiggsSM:ffbar2HZ                              |                       on |          off                         | 
 | Init:showChangedParticleData                  |                      off |           on                         | 
 | Main:timesAllowErrors                         |                        3 |           10           0             | 
 | Next:numberCount                              |                      100 |         1000           0             | 
 | Next:numberShowEvent                          |                        0 |            1           0             | 
 |                                                                                                                 | 
 *-------  End PYTHIA Flag + Mode + Parm + Word + FVec + MVec + PVec + WVec Settings  -----------------------------* 

 --------  PYTHIA Info Listing  ---------------------------------------- 
 
 Beam A: id =     11, pz =  1.200e+02, e =  1.200e+02, m =  5.110e-04.
 Beam B: id =    -11, pz = -1.200e+02, e =  1.200e+02, m =  5.110e-04.

 In 1: id =   11, x =  9.348e-01, pdf =  6.969e-01 at Q2 =  5.336e+04.
 In 2: id =  -11, x =  9.910e-01, pdf =  5.014e+00 at same Q2.

 Subprocess f fbar -> H0 Z0 (SM) with code 904 is 2 -> 2.
 It has sHat =  5.336e+04,    tHat = -1.445e+04,    uHat = -1.473e+04,
       pTHat =  3.852e+01,   m3Hat =  1.250e+02,   m4Hat =  9.249e+01,
    thetaHat =  1.556e+00,  phiHat =  3.837e+00.
     alphaEM =  7.901e-03,  alphaS =  1.137e-01    at Q2 =  5.336e+04.

 Impact parameter b =  0.000e+00 gives enhancement factor =  1.000e+00.
 Max pT scale for MPI =  2.400e+02, ISR =  2.400e+02, FSR =  2.400e+02.
 Number of MPI =     1, ISR =     2, FSRproc =     0, FSRreson =    13.

 --------  End PYTHIA Info Listing  ------------------------------------

 --------  PYTHIA Event Listing  (hard process)  -----------------------------------------------------------------------------------
 
    no         id  name            status     mothers   daughters     colours      p_x        p_y        p_z         e          m 
     0         90  (system)           -11     0     0     0     0     0     0      0.000      0.000      0.000    240.000    240.000
     1         11  (e-)               -12     0     0     3     0     0     0      0.000      0.000    120.000    120.000      0.001
     2        -11  (e+)               -12     0     0     4     0     0     0      0.000      0.000   -120.000    120.000      0.001
     3         11  (e-)               -21     1     0     5     6     0     0      0.000      0.000    112.177    112.177      0.000
     4        -11  (e+)               -21     2     0     5     6     0     0      0.000      0.000   -118.915    118.915      0.000
     5         25  (h0)               -22     3     4     7     8     0     0    -29.573    -24.683     -3.227    130.840    125.000
     6         23  (Z0)               -22     3     4     9    10     0     0     29.573     24.683     -3.511    100.252     92.490
     7          5  b                   23     5     0     0     0   101     0    -78.241    -20.071      4.842     81.061      4.800
     8         -5  bbar                23     5     0     0     0     0   101     48.668     -4.612     -8.069     49.779      4.800
     9         13  mu-                 23     6     0     0     0     0     0     21.411     -9.363     38.824     45.315      0.106
    10        -13  mu+                 23     6     0     0     0     0     0      8.162     34.046    -42.336     54.937      0.106
                                   Charge sum:  0.000           Momentum sum:     -0.000     -0.000     -6.738    231.093    230.994

 --------  End PYTHIA Event Listing  -----------------------------------------------------------------------------------------------
#--------------------------------------------------------------------------
#                         FastJet release 3.3.0
#                 M. Cacciari, G.P. Salam and G. Soyez                  
#     A software package for jet finding and analysis at colliders      
#                           http://fastjet.fr                           
#	                                                                      
# Please cite EPJC72(2012)1896 [arXiv:1111.6097] if you use this package
# for scientific work and optionally PLB641(2006)57 [hep-ph/0512210].   
#                                                                       
# FastJet is provided without warranty under the terms of the GNU GPLv2.
# It uses T. Chan's closest pair algorithm, S. Fortune's Voronoi code
# and 3rd party plugin jet algorithms. See COPYING file for details.
#--------------------------------------------------------------------------

 Pythia::next(): 100 events have been generated 

 Pythia::next(): 200 events have been generated 

 Pythia::next(): 300 events have been generated 

 Pythia::next(): 400 events have been generated 

 Pythia::next(): 500 events have been generated 

 Pythia::next(): 600 events have been generated 

 Pythia::next(): 700 events have been generated 

 Pythia::next(): 800 events have been generated 

 Pythia::next(): 900 events have been generated 

 *-------  PYTHIA Event and Cross Section Statistics  -------------------------------------------------------------*
 |                                                                                                                 |
 | Subprocess                                    Code |            Number of events       |      sigma +- delta    |
 |                                                    |       Tried   Selected   Accepted |     (estimated) (mb)   |
 |                                                    |                                   |                        |
 |-----------------------------------------------------------------------------------------------------------------|
 |                                                    |                                   |                        |
 | f fbar -> H0 Z0 (SM)                           904 |       52296       1000       1000 |   3.871e-12  4.704e-14 |
 |                                                    |                                   |                        |
 | sum                                                |       52296       1000       1000 |   3.871e-12  4.704e-14 |
 |                                                                                                                 |
 *-------  End PYTHIA Event and Cross Section Statistics ----------------------------------------------------------*

 *-------  PYTHIA Error and Warning Messages Statistics  ----------------------------------------------------------* 
 |                                                                                                                 | 
 |  times   message                                                                                                | 
 |                                                                                                                 | 
 |      0   no errors or warnings to report                                                                        | 
 |                                                                                                                 | 
 *-------  End PYTHIA Error and Warning Messages Statistics  ------------------------------------------------------* 

You should obtain a file ee_ZH_Zmumu_Hbb.root written in the FCC EDM format. Let us open it and check the contents.

In Swan, from the python kernel, we can do this either on python or c++.

In [6]:
import ROOT
Welcome to JupyROOT 6.12/04

C++ example

In [7]:
%%cpp
auto f = new TFile("ee_ZH_Zmumu_Hbb.root")
(TFile *) 0x7effa40
In [8]:
%%cpp 
events->Print()
******************************************************************************
*Tree    :events    : Events tree                                            *
*Entries :     1000 : Total =        10863964 bytes  File  Size =    2990901 *
*        :          : Tree compression factor =   3.63                       *
******************************************************************************
*Br    0 :EventInfo : Int_t EventInfo_                                       *
*Entries :     1000 : Total  Size=       9722 bytes  File Size  =       1392 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=   5.81     *
*............................................................................*
*Br    1 :EventInfo.number : Int_t number[EventInfo_]                        *
*Entries :     1000 : Total  Size=       8710 bytes  File Size  =       2891 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=   2.80     *
*............................................................................*
*Br    2 :GenParticle : Int_t GenParticle_                                   *
*Entries :     1000 : Total  Size=      18387 bytes  File Size  =       3110 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=   2.60     *
*............................................................................*
*Br    3 :GenParticle.core.bits : UInt_t bits[GenParticle_]                  *
*Entries :     1000 : Total  Size=     620455 bytes  File Size  =       8967 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=  69.10     *
*............................................................................*
*Br    4 :GenParticle.core.charge : Int_t charge[GenParticle_]               *
*Entries :     1000 : Total  Size=     620503 bytes  File Size  =      71528 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=   8.66     *
*............................................................................*
*Br    5 :GenParticle.core.p4.mass : Float_t mass[GenParticle_]              *
*Entries :     1000 : Total  Size=     620521 bytes  File Size  =     254291 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=   2.44     *
*............................................................................*
*Br    6 :GenParticle.core.p4.px : Float_t px[GenParticle_]                  *
*Entries :     1000 : Total  Size=     620473 bytes  File Size  =     530762 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=   1.17     *
*............................................................................*
*Br    7 :GenParticle.core.p4.py : Float_t py[GenParticle_]                  *
*Entries :     1000 : Total  Size=     620473 bytes  File Size  =     530749 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=   1.17     *
*............................................................................*
*Br    8 :GenParticle.core.p4.pz : Float_t pz[GenParticle_]                  *
*Entries :     1000 : Total  Size=     620473 bytes  File Size  =     537721 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=   1.15     *
*............................................................................*
*Br    9 :GenParticle.core.pdgId : Int_t pdgId[GenParticle_]                 *
*Entries :     1000 : Total  Size=     620479 bytes  File Size  =     153651 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=   4.03     *
*............................................................................*
*Br   10 :GenParticle.core.status : UInt_t status[GenParticle_]              *
*Entries :     1000 : Total  Size=     620503 bytes  File Size  =      65979 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=   9.39     *
*............................................................................*
*Br   11 :GenParticle.core.vertex.x : Float_t x[GenParticle_]                *
*Entries :     1000 : Total  Size=     620537 bytes  File Size  =       9046 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=  68.50     *
*............................................................................*
*Br   12 :GenParticle.core.vertex.y : Float_t y[GenParticle_]                *
*Entries :     1000 : Total  Size=     620537 bytes  File Size  =       9046 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=  68.50     *
*............................................................................*
*Br   13 :GenParticle.core.vertex.z : Float_t z[GenParticle_]                *
*Entries :     1000 : Total  Size=     620537 bytes  File Size  =       9046 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=  68.50     *
*............................................................................*
*Br   14 :GenParticle#0 : Int_t GenParticle#0_                               *
*Entries :     1000 : Total  Size=      10835 bytes  File Size  =       3129 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=   2.59     *
*............................................................................*
*Br   15 :GenParticle#0.index : Int_t index[GenParticle#0_]                  *
*Entries :     1000 : Total  Size=     620421 bytes  File Size  =     108904 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=   5.69     *
*............................................................................*
*Br   16 :GenParticle#0.collectionID : Int_t collectionID[GenParticle#0_]    *
*Entries :     1000 : Total  Size=     620589 bytes  File Size  =      13611 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=  45.53     *
*............................................................................*
*Br   17 :GenParticle#1 : Int_t GenParticle#1_                               *
*Entries :     1000 : Total  Size=      10835 bytes  File Size  =       3129 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=   2.59     *
*............................................................................*
*Br   18 :GenParticle#1.index : Int_t index[GenParticle#1_]                  *
*Entries :     1000 : Total  Size=     620421 bytes  File Size  =     166298 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=   3.73     *
*............................................................................*
*Br   19 :GenParticle#1.collectionID : Int_t collectionID[GenParticle#1_]    *
*Entries :     1000 : Total  Size=     620589 bytes  File Size  =      56396 *
*Baskets :       20 : Basket Size=      32000 bytes  Compression=  10.99     *
*............................................................................*
*Br   20 :GenVertex : Int_t GenVertex_                                       *
*Entries :     1000 : Total  Size=      11677 bytes  File Size  =       3069 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=   2.63     *
*............................................................................*
*Br   21 :GenVertex.position.x : Float_t x[GenVertex_]                       *
*Entries :     1000 : Total  Size=     328042 bytes  File Size  =      91570 *
*Baskets :       11 : Basket Size=      32000 bytes  Compression=   3.58     *
*............................................................................*
*Br   22 :GenVertex.position.y : Float_t y[GenVertex_]                       *
*Entries :     1000 : Total  Size=     328042 bytes  File Size  =      91591 *
*Baskets :       11 : Basket Size=      32000 bytes  Compression=   3.57     *
*............................................................................*
*Br   23 :GenVertex.position.z : Float_t z[GenVertex_]                       *
*Entries :     1000 : Total  Size=     328042 bytes  File Size  =      91583 *
*Baskets :       11 : Basket Size=      32000 bytes  Compression=   3.57     *
*............................................................................*
*Br   24 :GenVertex.ctau : Float_t ctau[GenVertex_]                          *
*Entries :     1000 : Total  Size=     327970 bytes  File Size  =      90005 *
*Baskets :       11 : Basket Size=      32000 bytes  Compression=   3.64     *
*............................................................................*
*Br   25 :GenJet    : Int_t GenJet_                                          *
*Entries :     1000 : Total  Size=      13910 bytes  File Size  =       2142 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=   3.77     *
*............................................................................*
*Br   26 :GenJet.core.area : Float_t area[GenJet_]                           *
*Entries :     1000 : Total  Size=      20670 bytes  File Size  =       1911 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=  10.50     *
*............................................................................*
*Br   27 :GenJet.core.bits : UInt_t bits[GenJet_]                            *
*Entries :     1000 : Total  Size=      20670 bytes  File Size  =       1911 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=  10.50     *
*............................................................................*
*Br   28 :GenJet.core.p4.mass : Float_t mass[GenJet_]                        *
*Entries :     1000 : Total  Size=      20679 bytes  File Size  =      15097 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=   1.33     *
*............................................................................*
*Br   29 :GenJet.core.p4.px : Float_t px[GenJet_]                            *
*Entries :     1000 : Total  Size=      20669 bytes  File Size  =      16808 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=   1.19     *
*............................................................................*
*Br   30 :GenJet.core.p4.py : Float_t py[GenJet_]                            *
*Entries :     1000 : Total  Size=      20669 bytes  File Size  =      16803 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=   1.19     *
*............................................................................*
*Br   31 :GenJet.core.p4.pz : Float_t pz[GenJet_]                            *
*Entries :     1000 : Total  Size=      20669 bytes  File Size  =      16826 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=   1.19     *
*............................................................................*
*Br   32 :GenJet.particles_begin : UInt_t particles_begin[GenJet_]           *
*Entries :     1000 : Total  Size=      20710 bytes  File Size  =       1919 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=  10.46     *
*............................................................................*
*Br   33 :GenJet.particles_end : UInt_t particles_end[GenJet_]               *
*Entries :     1000 : Total  Size=      20700 bytes  File Size  =       1912 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=  10.50     *
*............................................................................*
*Br   34 :GenJet#0  : Int_t GenJet#0_                                        *
*Entries :     1000 : Total  Size=      10320 bytes  File Size  =       1386 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=   5.83     *
*............................................................................*
*Br   35 :GenJet#0.index : Int_t index[GenJet#0_]                            *
*Entries :     1000 : Total  Size=       4698 bytes  File Size  =        144 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=  28.41     *
*............................................................................*
*Br   36 :GenJet#0.collectionID : Int_t collectionID[GenJet#0_]              *
*Entries :     1000 : Total  Size=       4733 bytes  File Size  =        151 *
*Baskets :        1 : Basket Size=      32000 bytes  Compression=  27.14     *
*............................................................................*

You’re getting a list of the available collections. You can use root to draw the distribution of a variable. For example, the distribution of the charge of the stable generated muons:

In [9]:
%%cpp
auto c = new TCanvas();
events->Draw("GenParticle.core.charge", "abs(GenParticle.core.pdgId)==13 && GenParticle.core.status==1");
c->Draw();

Python example

Let's now reproduce the same example in python:

In [10]:
import ROOT
f = ROOT.TFile("ee_ZH_Zmumu_Hbb.root")

c1 = ROOT.TCanvas()
f.events.Draw("GenParticle.core.charge", "abs(GenParticle.core.pdgId)==13 && GenParticle.core.status==1")
c1.Draw()

We are now going to run the papas simulation and to build an ntuple with meaningful variables for the analysis.

Run papas and the analysis in heppy

The ROOT file obtained in the previous section contains for each event all generated particles produced by pythia.

In this section we will run an heppy job to:

  • run papas, a fast simulation that processes these generated particles to produce “reconstructed” particles
  • process the papas reconstructed particles and compute various analysis variables
  • store these variables in an ntuple written in an output root file.

The heppy configuration file describing these steps, analysis_ee_ZH_cfg.py, is explained here. Just refer to this documentation as needed while following the instructions below.

DISCLAIMER: Original tutorial uses heppy as a command to do this part interactively, this is not fully integrated yet. But we can still run heppy as if we were in a bash shell to produce the output files we need.

First, produce the display for the first event:

Ensure the OutDir directory does not exist in the current directory, if so you will need to remove it (uncomment and run the following line):

In [ ]:
#! rm -rf OutDir
In [11]:
# Heppy needs to know if we are running a CMS or FCC analysis
import os
os.environ['FCCPHYSICS'] = "yes"
In [12]:
! heppy OutDir analysis_ee_ZH_cfg.py -N 300
]0;IPython: FCC-Gallery/testingGalleryJet clusterizer in ee mode, ee_kt, E sorting
#--------------------------------------------------------------------------
#                         FastJet release 3.3.0
#                 M. Cacciari, G.P. Salam and G. Soyez                  
#     A software package for jet finding and analysis at colliders      
#                           http://fastjet.fr                           
#	                                                                      
# Please cite EPJC72(2012)1896 [arXiv:1111.6097] if you use this package
# for scientific work and optionally PLB641(2006)57 [hep-ph/0512210].   
#                                                                       
# FastJet is provided without warranty under the terms of the GNU GPLv2.
# It uses T. Chan's closest pair algorithm, S. Fortune's Voronoi code
# and 3rd party plugin jet algorithms. See COPYING file for details.
#--------------------------------------------------------------------------

SimulationError : cannot make cluster for particle: 
particle: Particle :ps3   :10261496475603173379: pdgid =    22, status =   1, q =  0, e =  12.3, theta =  0.26, phi = -3.13, mass =  0.00
with vertex rho= 3.49, z= 0.90
cannot be extrapolated to : SurfaceCylinder : ecal_in, R= 1.30, z= 2.00

Particle not extrapolated to the detector, so cannot make a cluster there. No worries for now, problem will be solved :-) -> Event discarded
event 100 (1.4 ev/s)

SimulationError : cannot make cluster for particle: 
particle: Particle :ps23  :10261447527855292439: pdgid =    22, status =   1, q =  0, e =   1.8, theta =  0.54, phi =  1.09, mass =  0.00
with vertex rho= 2.01, z= 1.11
cannot be extrapolated to : SurfaceCylinder : ecal_in, R= 1.30, z= 2.00

Particle not extrapolated to the detector, so cannot make a cluster there. No worries for now, problem will be solved :-) -> Event discarded

SimulationError : cannot make cluster for particle: 
particle: Particle :ps3   :10261497677535510531: pdgid =    22, status =   1, q =  0, e =  12.9, theta =  0.97, phi =  2.92, mass =  0.00
with vertex rho= 1.37, z= 2.01
cannot be extrapolated to : SurfaceCylinder : ecal_in, R= 1.30, z= 2.00

Particle not extrapolated to the detector, so cannot make a cluster there. No worries for now, problem will be solved :-) -> Event discarded
event 200 (1.4 ev/s)

SimulationError : cannot make cluster for particle: 
particle: Particle :ps5   :10261492809167011845: pdgid =    22, status =   1, q =  0, e =  10.7, theta = -0.24, phi = -1.62, mass =  0.00
with vertex rho= 1.46, z=-0.34
cannot be extrapolated to : SurfaceCylinder : ecal_in, R= 1.30, z= 2.00

Particle not extrapolated to the detector, so cannot make a cluster there. No worries for now, problem will be solved :-) -> Event discarded

SimulationError : cannot make cluster for particle: 
particle: Particle :ps34  :10261426042157662242: pdgid =   211, status =   1, q =  1, e =   0.8, theta = -0.59, phi = -1.48, mass =  0.14
with vertex rho= 2.59, z=-1.63
cannot be extrapolated to : SurfaceCylinder : hcal_in, R= 1.90, z= 2.60

Particle not extrapolated to the detector, so cannot make a cluster there. No worries for now, problem will be solved :-) -> Event discarded

SimulationError : cannot make cluster for particle: 
particle: Particle :ps2   :10261522533234769922: pdgid =    22, status =   1, q =  0, e =  32.8, theta =  0.18, phi =  0.13, mass =  0.00
with vertex rho= 2.08, z= 0.38
cannot be extrapolated to : SurfaceCylinder : ecal_in, R= 1.30, z= 2.00

Particle not extrapolated to the detector, so cannot make a cluster there. No worries for now, problem will be solved :-) -> Event discarded

SimulationError : cannot make cluster for particle: 
particle: Particle :ps23  :10261449572274405399: pdgid =    22, status =   1, q =  0, e =   1.9, theta = -0.24, phi = -0.41, mass =  0.00
with vertex rho= 1.52, z=-0.33
cannot be extrapolated to : SurfaceCylinder : ecal_in, R= 1.30, z= 2.00

Particle not extrapolated to the detector, so cannot make a cluster there. No worries for now, problem will be solved :-) -> Event discarded

Component: ee_ZH_Zmumu_Hbb
	dataset_entries:   0
	files          :   ['/eos/user/j/jcervant/SWAN_projects/FCC-Gallery/testingGallery/ee_ZH_Zmumu_Hbb.root']
	isData         :   False
	isEmbed        :   False
	isMC           :   False
	tree_name      :   None
	triggers       :   None


      ---- TimeReport (all times in ms; first evt is skipped) ---- 
processed    all evts    time/proc    time/all   [%]    analyer
---------    --------    ---------   ---------  -----   -------------
      300         300        34.90       34.90   5.3%   heppy.analyzers.fcc.Reader.Reader_1
      300         300         0.69        0.69   0.1%   heppy.analyzers.PDebugger.PDebugger_1
      300         300         0.40        0.40   0.1%   heppy.analyzers.Selector.Selector_1
      300         300       406.12      406.12  61.1%   heppy.analyzers.PapasSim.PapasSim_papas
      293         300        70.63       68.97  10.4%   heppy.analyzers.PapasPFBlockBuilder.PapasPFBlockBuilder_1
      293         300       149.08      145.59  21.9%   heppy.analyzers.PapasPFReconstructor.PapasPFReconstructor_1
      293         300         0.19        0.18   0.0%   heppy.analyzers.Selector.Selector_sel_leptons
      293         300         3.70        3.61   0.5%   heppy.analyzers.IsolationAnalyzer.IsolationAnalyzer_1
      293         300         0.04        0.04   0.0%   heppy.analyzers.Selector.Selector_sel_iso_leptons
      293         300         0.09        0.09   0.0%   heppy.analyzers.ResonanceBuilder.ResonanceBuilder_1
      293         300         0.06        0.06   0.0%   heppy.analyzers.RecoilBuilder.RecoilBuilder_recoil
      293         300         0.26        0.26   0.0%   heppy.analyzers.RecoilBuilder.RecoilBuilder_missing_energy
      293         300         0.05        0.05   0.0%   heppy.analyzers.Masker.Masker_1
      293         300         1.86        1.82   0.3%   heppy.analyzers.fcc.JetClusterizer.JetClusterizer_1
      293         300         0.14        0.14   0.0%   heppy.analyzers.ResonanceBuilder.ResonanceBuilder_2
      293         300         0.03        0.03   0.0%   heppy.analyzers.examples.zh.selection.Selection_cuts
      293         300         1.67        1.63   0.2%   heppy.analyzers.examples.zh.ZHTreeProducer.ZHTreeProducer_1
      293         300         0.01        0.01   0.0%   heppy.analyzers.PapasDisplay.PapasDisplay_1
---------    --------    ---------   ---------   -------------
      293         300       680.52      664.58 100.0%   TOTAL

Counter analyzers :
	 heppy.analyzers.fcc.Reader.Reader_1                                300 	 1.00 	 1.0000
	 heppy.analyzers.PDebugger.PDebugger_1                              300 	 1.00 	 1.0000
	 heppy.analyzers.Selector.Selector_1                                300 	 1.00 	 1.0000
	 heppy.analyzers.PapasSim.PapasSim_papas                            293 	 0.98 	 0.9767
	 heppy.analyzers.PapasPFBlockBuilder.PapasPFBlockBuilder_1          293 	 1.00 	 0.9767
	 heppy.analyzers.PapasPFReconstructor.PapasPFReconstructor_1        293 	 1.00 	 0.9767
	 heppy.analyzers.Selector.Selector_sel_leptons                      293 	 1.00 	 0.9767
	 heppy.analyzers.IsolationAnalyzer.IsolationAnalyzer_1              293 	 1.00 	 0.9767
	 heppy.analyzers.Selector.Selector_sel_iso_leptons                  293 	 1.00 	 0.9767
	 heppy.analyzers.ResonanceBuilder.ResonanceBuilder_1                293 	 1.00 	 0.9767
	 heppy.analyzers.RecoilBuilder.RecoilBuilder_recoil                 293 	 1.00 	 0.9767
	 heppy.analyzers.RecoilBuilder.RecoilBuilder_missing_energy         293 	 1.00 	 0.9767
	 heppy.analyzers.Masker.Masker_1                                    293 	 1.00 	 0.9767
	 heppy.analyzers.fcc.JetClusterizer.JetClusterizer_1                293 	 1.00 	 0.9767
	 heppy.analyzers.ResonanceBuilder.ResonanceBuilder_2                293 	 1.00 	 0.9767
	 heppy.analyzers.examples.zh.selection.Selection_cuts               293 	 1.00 	 0.9767
	 heppy.analyzers.examples.zh.ZHTreeProducer.ZHTreeProducer_1        293 	 1.00 	 0.9767
	 heppy.analyzers.PapasDisplay.PapasDisplay_1                        293 	 1.00 	 0.9767

For your analysis, you will be able to use parallel processing, either on a multicore machine or on the CERN LSF cluster.

You get an output directory OutDir . Check its contents and the contents of its subdirectories.

In [13]:
!ls OutDir/*
analysis_ee_ZH_cfg.py
__cfg_to_run__.py
component.pck
config.pck
heppy.analyzers.examples.zh.selection.Selection_cuts
heppy.analyzers.examples.zh.ZHTreeProducer.ZHTreeProducer_1
heppy.analyzers.fcc.JetClusterizer.JetClusterizer_1
heppy.analyzers.fcc.Reader.Reader_1
heppy.analyzers.IsolationAnalyzer.IsolationAnalyzer_1
heppy.analyzers.Masker.Masker_1
heppy.analyzers.PapasDisplay.PapasDisplay_1
heppy.analyzers.PapasPFBlockBuilder.PapasPFBlockBuilder_1
heppy.analyzers.PapasPFReconstructor.PapasPFReconstructor_1
heppy.analyzers.PapasSim.PapasSim_papas
heppy.analyzers.PDebugger.PDebugger_1
heppy.analyzers.RecoilBuilder.RecoilBuilder_missing_energy
heppy.analyzers.RecoilBuilder.RecoilBuilder_recoil
heppy.analyzers.ResonanceBuilder.ResonanceBuilder_1
heppy.analyzers.ResonanceBuilder.ResonanceBuilder_2
heppy.analyzers.Selector.Selector_1
heppy.analyzers.Selector.Selector_sel_iso_leptons
heppy.analyzers.Selector.Selector_sel_leptons
log.txt
software.yaml

In particular, the following root file contains an ntuple with the variables we need:

OutDir/ee_ZH_Zmumu_Hbb/heppy.analyzers.examples.zh.ZHTreeProducer.ZHTreeProducer_1/tree.root

Make plots

Open the root file containing the ntuple in root through python:

In [14]:
import ROOT
fname="OutDir/ee_ZH_Zmumu_Hbb/heppy.analyzers.examples.zh.ZHTreeProducer.ZHTreeProducer_1/tree.root"

f1 = ROOT.TFile(fname)

Make a few plots:

reconstructed Z mass:

In [15]:
c1 = ROOT.TCanvas()
f1.events.Draw("zed_m")
c1.Draw()

recoil mass:

In [16]:
c1 = ROOT.TCanvas() 
f1.events.Draw("recoil_m", "zed_m>80")
c1.Draw()

dijet mass (note that jets have not been calibrated, using raw jets here):

In [17]:
c1 = ROOT.TCanvas() 
f1.events.Draw("higgs_m", "zed_m>80")
c1.Draw()

More information

Please refer to the heppy documentation

Getting started with Delphes [FCC-hh]

In this tutorial, you will learn how to:

  • generate events with Pythia8, process them through Delphes with FCCSW and write them in the FCC EDM format.
  • read these events with heppy to perfom basic selection and create an ntuple
  • read this ntuple with ROOT to make a few plots

Run FCCSW with Pythia8+Delphes

Now you are ready to produce 100TeV ttbar events with Pythia, process them through Delphes and store them in the FCC-EDM:

NOTE: The following part is a bit hacky, we are working to make all this process as transparent as possible for the user

In [18]:
! git clone https://github.com/HEP-FCC/FCCSW.git
Initialized empty Git repository in /eos/user/j/jcervant/SWAN_projects/FCC-Gallery/testingGallery/FCCSW/.git/
remote: Counting objects: 24620, done.
remote: Compressing objects: 100% (66/66), done.
remote: Total 24620 (delta 34), reused 43 (delta 17), pack-reused 24534
Receiving objects: 100% (24620/24620), 171.90 MiB | 2.68 MiB/s, done.
Resolving deltas: 100% (15433/15433), done.
In [19]:
! FCCSWPATH=/cvmfs/fcc.cern.ch/sw/releases/0.9.1/x86_64-slc6-gcc62-opt/linux-scientificcernslc6-x86_64/gcc-6.2.0/fccsw-0.9.1-c5dqdyv4gt5smfxxwoluqj2pjrdqvjuj  && \
  cd FCCSW && $FCCSWPATH/run $FCCVIEW/scripts/gaudirun.py Sim/SimDelphesInterface/options/PythiaDelphes_config.py
# setting LC_ALL to "C"
# --> Including file '/eos/user/j/jcervant/SWAN_projects/FCC-Gallery/testingGallery/FCCSW/Sim/SimDelphesInterface/options/PythiaDelphes_config.py'
# <-- End of file '/eos/user/j/jcervant/SWAN_projects/FCC-Gallery/testingGallery/FCCSW/Sim/SimDelphesInterface/options/PythiaDelphes_config.py'
ApplicationMgr    SUCCESS 
====================================================================================================================================
                                                   Welcome to FCCSW version HEAD
                                          running on 974aa2a31d1c on Thu Apr  5 16:02:58 2018
====================================================================================================================================
ApplicationMgr       INFO Application Manager Configured successfully
** INFO: adding module        ParticlePropagator       ParticlePropagator       
** INFO: adding module        Efficiency               ChargedHadronTrackingEfficiency
** INFO: adding module        Efficiency               ElectronTrackingEfficiency
** INFO: adding module        Efficiency               MuonTrackingEfficiency   
** INFO: adding module        MomentumSmearing         ChargedHadronMomentumSmearing
** INFO: adding module        MomentumSmearing         ElectronMomentumSmearing 
** INFO: adding module        MomentumSmearing         MuonMomentumSmearing     
** INFO: adding module        Merger                   TrackMerger              
** INFO: adding module        SimpleCalorimeter        ECal                     
** INFO: adding module        SimpleCalorimeter        HCal                     
** INFO: adding module        PdgCodeFilter            ElectronFilter           
** INFO: adding module        PdgCodeFilter            ChargedHadronFilter      
** INFO: adding module        Merger                   Calorimeter              
** INFO: adding module        Merger                   EFlowMerger              
** INFO: adding module        PdgCodeFilter            EFlowFilter              
** INFO: adding module        Merger                   MissingET                
** INFO: adding module        Merger                   ScalarHT                 
** INFO: adding module        PdgCodeFilter            NeutrinoFilter           
** INFO: adding module        FastJetFinder            GenJetFinder             
** INFO: adding module        Merger                   GenMissingET             
** INFO: adding module        FastJetFinder            FastJetFinder            
** INFO: adding module        FastJetFinder            FatJetFinder             
** INFO: adding module        EnergyScale              JetEnergyScale           
** INFO: adding module        JetFlavorAssociation     JetFlavorAssociation     
** INFO: adding module        Efficiency               PhotonEfficiency         
** INFO: adding module        Isolation                PhotonIsolation          
** INFO: adding module        Isolation                ElectronIsolation        
** INFO: adding module        Isolation                MuonIsolation            
** INFO: adding module        BTagging                 BTagging                 
** INFO: adding module        BTagging                 CTagging                 
** INFO: adding module        TauTagging               TauTagging               
** INFO: adding module        UniqueObjectFinder       UniqueObjectFinder       
** INFO: adding module        TreeWriter               TreeWriter               
** INFO: initializing module  Delphes                  
** INFO: initializing module  ParticlePropagator       
** INFO: initializing module  ChargedHadronTrackingEfficiency
** INFO: initializing module  ElectronTrackingEfficiency
** INFO: initializing module  MuonTrackingEfficiency   
** INFO: initializing module  ChargedHadronMomentumSmearing
** INFO: initializing module  ElectronMomentumSmearing 
** INFO: initializing module  MuonMomentumSmearing     
** INFO: initializing module  TrackMerger              
** INFO: initializing module  ECal                     
** INFO: initializing module  HCal                     
** INFO: initializing module  Calorimeter              
** INFO: initializing module  EFlowMerger              
** INFO: initializing module  EFlowFilter              
** INFO: initializing module  PhotonEfficiency         
** INFO: initializing module  PhotonIsolation          
** INFO: initializing module  ElectronFilter           
** INFO: initializing module  ElectronIsolation        
** INFO: initializing module  ChargedHadronFilter      
** INFO: initializing module  MuonIsolation            
** INFO: initializing module  NeutrinoFilter           
** INFO: initializing module  MissingET                
** INFO: initializing module  GenMissingET             
** INFO: initializing module  GenJetFinder             
#--------------------------------------------------------------------------
#                         FastJet release 3.2.1
#                 M. Cacciari, G.P. Salam and G. Soyez                  
#     A software package for jet finding and analysis at colliders      
#                           http://fastjet.fr                           
#	                                                                      
# Please cite EPJC72(2012)1896 [arXiv:1111.6097] if you use this package
# for scientific work and optionally PLB641(2006)57 [hep-ph/0512210].   
#                                                                       
# FastJet is provided without warranty under the terms of the GNU GPLv2.
# It uses T. Chan's closest pair algorithm, S. Fortune's Voronoi code
# and 3rd party plugin jet algorithms. See COPYING file for details.
#--------------------------------------------------------------------------
** INFO: initializing module  FastJetFinder            
** INFO: initializing module  FatJetFinder             
** INFO: initializing module  JetEnergyScale           
** INFO: initializing module  JetFlavorAssociation     
** INFO: initializing module  BTagging                 
** INFO: initializing module  CTagging                 
** INFO: initializing module  TauTagging               
** INFO: initializing module  ScalarHT                 
** INFO: initializing module  UniqueObjectFinder       
** INFO: initializing module  TreeWriter               
DelphesSimulation    INFO Delphes simulation will use the following modules: 
DelphesSimulation    INFO -- Module: ParticlePropagator
DelphesSimulation    INFO -- Module: ChargedHadronTrackingEfficiency
DelphesSimulation    INFO -- Module: ElectronTrackingEfficiency
DelphesSimulation    INFO -- Module: MuonTrackingEfficiency
DelphesSimulation    INFO -- Module: ChargedHadronMomentumSmearing
DelphesSimulation    INFO -- Module: ElectronMomentumSmearing
DelphesSimulation    INFO -- Module: MuonMomentumSmearing
DelphesSimulation    INFO -- Module: TrackMerger
DelphesSimulation    INFO -- Module: ECal
DelphesSimulation    INFO -- Module: HCal
DelphesSimulation    INFO -- Module: Calorimeter
DelphesSimulation    INFO -- Module: EFlowMerger
DelphesSimulation    INFO -- Module: EFlowFilter
DelphesSimulation    INFO -- Module: PhotonEfficiency
DelphesSimulation    INFO -- Module: PhotonIsolation
DelphesSimulation    INFO -- Module: ElectronFilter
DelphesSimulation    INFO -- Module: ElectronIsolation
DelphesSimulation    INFO -- Module: ChargedHadronFilter
DelphesSimulation    INFO -- Module: MuonIsolation
DelphesSimulation    INFO -- Module: NeutrinoFilter
DelphesSimulation    INFO -- Module: MissingET
DelphesSimulation    INFO -- Module: GenMissingET
DelphesSimulation    INFO -- Module: GenJetFinder
DelphesSimulation    INFO -- Module: FastJetFinder
DelphesSimulation    INFO -- Module: FatJetFinder
DelphesSimulation    INFO -- Module: JetEnergyScale
DelphesSimulation    INFO -- Module: JetFlavorAssociation
DelphesSimulation    INFO -- Module: BTagging
DelphesSimulation    INFO -- Module: CTagging
DelphesSimulation    INFO -- Module: TauTagging
DelphesSimulation    INFO -- Module: ScalarHT
DelphesSimulation    INFO -- Module: UniqueObjectFinder
DelphesSimulation    INFO -- Module: TreeWriter
EventLoopMgr      WARNING Unable to locate service "EventSelector" 
EventLoopMgr      WARNING No events will be processed from external input.
HistogramPersis...WARNING Histograms saving not required.
ApplicationMgr       INFO Application Manager Initialized successfully
ApplicationMgr       INFO Application Manager Started successfully
Pythia8.PileUpTool   INFO Current number of pileup events:  'numPileUpEvents':0

 *------------------------------------------------------------------------------------* 
 |                                                                                    | 
 |  *------------------------------------------------------------------------------*  | 
 |  |                                                                              |  | 
 |  |                                                                              |  | 
 |  |   PPP   Y   Y  TTTTT  H   H  III    A      Welcome to the Lund Monte Carlo!  |  | 
 |  |   P  P   Y Y     T    H   H   I    A A     This is PYTHIA version 8.230      |  | 
 |  |   PPP     Y      T    HHHHH   I   AAAAA    Last date of change: 6  Oct 2017  |  | 
 |  |   P       Y      T    H   H   I   A   A                                      |  | 
 |  |   P       Y      T    H   H  III  A   A    Now is 05 Apr 2018 at 16:03:04    |  | 
 |  |                                                                              |  | 
 |  |   Christian Bierlich;  Department of Astronomy and Theoretical Physics,      |  | 
 |  |      Lund University, Solvegatan 14A, SE-223 62 Lund, Sweden;                |  | 
 |  |      e-mail: [email protected]                                   |  | 
 |  |   Nishita Desai;  Laboratoire Charles Coulomb (L2C),                         |  | 
 |  |      CNRS-Universite de Montpellier, 34090 Montpellier, France;              |  | 
 |  |      e-mail: [email protected]                                   |  | 
 |  |   Nadine Fischer;  School of Physics,                                        |  | 
 |  |      Monash University, PO Box 27, 3800 Melbourne, Australia;                |  | 
 |  |      e-mail: [email protected]                                       |  | 
 |  |   Ilkka Helenius;  Institute for Theoretical Physics,                        |  | 
 |  |     Tuebingen University, Auf der Morgenstelle 14, 72076 Tuebingen, Germany; |  | 
 |  |      e-mail: [email protected]                                 |  | 
 |  |   Philip Ilten;  School of Physics and Astronomy,                            |  | 
 |  |      University of Birmingham, Birmingham, B152 2TT, UK;                     |  | 
 |  |      e-mail: [email protected]                                                 |  | 
 |  |   Leif Lonnblad;  Department of Astronomy and Theoretical Physics,           |  | 
 |  |      Lund University, Solvegatan 14A, SE-223 62 Lund, Sweden;                |  | 
 |  |      e-mail: [email protected]                                        |  | 
 |  |   Stephen Mrenna;  Computing Division, Simulations Group,                    |  | 
 |  |      Fermi National Accelerator Laboratory, MS 234, Batavia, IL 60510, USA;  |  | 
 |  |      e-mail: [email protected]                                                 |  | 
 |  |   Stefan Prestel;  Theoretical Physics Department,                           |  | 
 |  |      Fermi National Accelerator Laboratory, MS 106, Batavia, IL 60510, USA;  |  | 
 |  |      e-mail: [email protected]                                               |  | 
 |  |   Christine O. Rasmussen;  Department of Astronomy and Theoretical Physics,  |  | 
 |  |      Lund University, Solvegatan 14A, SE-223 62 Lund, Sweden;                |  | 
 |  |      e-mail: [email protected]                                  |  | 
 |  |   Torbjorn Sjostrand;  Department of Astronomy and Theoretical Physics,      |  | 
 |  |      Lund University, Solvegatan 14A, SE-223 62 Lund, Sweden;                |  | 
 |  |      e-mail: [email protected]                                             |  | 
 |  |   Peter Skands;  School of Physics,                                          |  | 
 |  |      Monash University, PO Box 27, 3800 Melbourne, Australia;                |  | 
 |  |      e-mail: [email protected]                                         |  | 
 |  |                                                                              |  | 
 |  |   The main program reference is 'An Introduction to PYTHIA 8.2',             |  | 
 |  |   T. Sjostrand et al, Comput. Phys. Commun. 191 (2015) 159                   |  | 
 |  |   [arXiv:1410.3012 [hep-ph]]                                                 |  | 
 |  |                                                                              |  | 
 |  |   The main physics reference is the 'PYTHIA 6.4 Physics and Manual',         |  | 
 |  |   T. Sjostrand, S. Mrenna and P. Skands, JHEP05 (2006) 026 [hep-ph/0603175]  |  | 
 |  |                                                                              |  | 
 |  |   An archive of program versions and documentation is found on the web:      |  | 
 |  |   http://www.thep.lu.se/Pythia                                               |  | 
 |  |                                                                              |  | 
 |  |   This program is released under the GNU General Public Licence version 2.   |  | 
 |  |   Please respect the MCnet Guidelines for Event Generator Authors and Users. |  | 
 |  |                                                                              |  | 
 |  |   Disclaimer: this program comes without any guarantees.                     |  | 
 |  |   Beware of errors and use common sense when interpreting results.           |  | 
 |  |                                                                              |  | 
 |  |   Copyright (C) 2017 Torbjorn Sjostrand                                      |  | 
 |  |                                                                              |  | 
 |  |                                                                              |  | 
 |  *------------------------------------------------------------------------------*  | 
 |                                                                                    | 
 *------------------------------------------------------------------------------------* 


 *-------  PYTHIA Process Initialization  --------------------------*
 |                                                                  |
 | We collide p+ with p+ at a CM energy of 1.000e+05 GeV            |
 |                                                                  |
 |------------------------------------------------------------------|
 |                                                    |             |
 | Subprocess                                    Code |   Estimated |
 |                                                    |    max (mb) |
 |                                                    |             |
 |------------------------------------------------------------------|
 |                                                    |             |
 | g g -> t tbar                                  601 |   5.269e-04 |
 | q qbar -> t tbar                               602 |   1.336e-05 |
 |                                                                  |
 *-------  End PYTHIA Process Initialization -----------------------*

 *-------  PYTHIA Multiparton Interactions Initialization  ---------* 
 |                                                                  | 
 |                   sigmaNonDiffractive =    81.85 mb              | 
 |                                                                  | 
 |    pT0 =  4.04 gives sigmaInteraction =   780.27 mb: accepted    | 
 |                                                                  | 
 *-------  End PYTHIA Multiparton Interactions Initialization  -----* 
 PYTHIA Warning in MultipartonInteractions::init: maximum increased by factor 1.003

 *-------  PYTHIA Flag + Mode + Parm + Word + FVec + MVec + PVec + WVec Settings (changes only)  ------------------* 
 |                                                                                                                 | 
 | Name                                          |                      Now |      Default         Min         Max | 
 |                                               |                          |                                      | 
 | Beams:eCM                                     |               100000.000 |    14000.000    10.00000             | 
 | Init:showChangedParticleData                  |                      off |           on                         | 
 | Main:numberOfEvents                           |                     2000 |         1000           0             | 
 | Main:timesAllowErrors                         |                        5 |           10           0             | 
 | Next:numberCount                              |                      100 |         1000           0             | 
 | Next:numberShowEvent                          |                        0 |            1           0             | 
 | Random:setSeed                                |                       on |          off                         | 
 | Top:gg2ttbar                                  |                       on |          off                         | 
 | Top:qqbar2ttbar                               |                       on |          off                         | 
 |                                                                                                                 | 
 *-------  End PYTHIA Flag + Mode + Parm + Word + FVec + MVec + PVec + WVec Settings  -----------------------------* 

 --------  PYTHIA Info Listing  ---------------------------------------- 
 
 Beam A: id =   2212, pz =  5.000e+04, e =  5.000e+04, m =  9.383e-01.
 Beam B: id =   2212, pz = -5.000e+04, e =  5.000e+04, m =  9.383e-01.

 In 1: id =   21, x =  3.955e-03, pdf =  1.602e+01 at Q2 =  7.181e+04.
 In 2: id =   21, x =  8.523e-03, pdf =  9.202e+00 at same Q2.

 Subprocess g g -> t tbar with code 601 is 2 -> 2.
 It has sHat =  3.371e+05,    tHat = -2.031e+05,    uHat = -7.540e+04,
       pTHat =  2.071e+02,   m3Hat =  1.721e+02,   m4Hat =  1.700e+02,
    thetaHat =  2.059e+00,  phiHat =  1.239e+00.
     alphaEM =  7.914e-03,  alphaS =  1.116e-01    at Q2 =  7.217e+04.

 Impact parameter b =  7.437e-01 gives enhancement factor =  1.360e+00.
 Max pT scale for MPI =  1.000e+05, ISR =  1.000e+05, FSR =  1.000e+05.
 Number of MPI =    16, ISR =    53, FSRproc =   220, FSRreson =    25.

 --------  End PYTHIA Info Listing  ------------------------------------

 --------  PYTHIA Event Listing  (hard process)  -----------------------------------------------------------------------------------
 
    no         id  name            status     mothers   daughters     colours      p_x        p_y        p_z         e          m 
     0         90  (system)           -11     0     0     0     0     0     0  0.000e+00  0.000e+00  0.000e+00  1.000e+05  1.000e+05
     1       2212  (p+)               -12     0     0     3     0     0     0  0.000e+00  0.000e+00  5.000e+04  5.000e+04  9.383e-01
     2       2212  (p+)               -12     0     0     4     0     0     0  0.000e+00  0.000e+00 -5.000e+04  5.000e+04  9.383e-01
     3         21  (g)                -21     1     0     5     6   101   102  0.000e+00  0.000e+00  1.978e+02  1.978e+02  0.000e+00
     4         21  (g)                -21     2     0     5     6   103   101  0.000e+00  0.000e+00 -4.261e+02  4.261e+02  0.000e+00
     5          6  (t)                -22     3     4     7     8   103     0  6.748e+01  1.958e+02 -2.326e+02  3.559e+02  1.721e+02
     6         -6  (tbar)             -22     3     4     9    10     0   102 -6.748e+01 -1.958e+02  4.255e+00  2.680e+02  1.700e+02
     7         24  (W+)               -22     5     0    11    12     0     0 -1.434e+01  5.204e+01 -4.777e+01  1.078e+02  8.010e+01
     8          5  b                   23     5     0     0     0   103     0  8.182e+01  1.438e+02 -1.849e+02  2.481e+02  4.800e+00
     9        -24  (W-)               -22     6     0    13    14     0     0  7.525e+00 -1.629e+02 -1.913e+01  1.827e+02  8.009e+01
    10         -5  bbar                23     6     0     0     0     0   102 -7.501e+01 -3.292e+01  2.339e+01  8.532e+01  4.800e+00
    11         -1  dbar                23     7     0     0     0     0   104 -1.034e+01 -1.716e+01  4.993e+00  2.065e+01  3.300e-01
    12          2  u                   23     7     0     0     0   104     0 -3.998e+00  6.919e+01 -5.276e+01  8.711e+01  3.300e-01
    13          1  d                   23     9     0     0     0   105     0  1.016e+01 -3.119e+01  2.763e+01  4.289e+01  3.300e-01
    14         -2  ubar                23     9     0     0     0     0   105 -2.637e+00 -1.317e+02 -4.676e+01  1.398e+02  3.300e-01
                                   Charge sum:  0.000           Momentum sum:  3.553e-15  2.842e-14 -2.284e+02  6.239e+02  5.806e+02

 --------  End PYTHIA Event Listing  -----------------------------------------------------------------------------------------------
RndmGenSvc.Engine    INFO Generator engine type:CLHEP::RanluxEngine
RndmGenSvc.Engine    INFO Current Seed:1234567 Luxury:3
RndmGenSvc           INFO Using Random engine:HepRndm::Engine<CLHEP::RanluxEngine>
Pythia8.VertexS...   INFO Smearing of interaction point with flat distribution  in x, y and z 
Pythia8.VertexS...   INFO  applying TOF of interaction with positive beam direction
Pythia8.VertexS...   INFO  with 0 mm <= x <= 0 mm, 0 mm <= y <= 0 mm and 0 mm <= z <= 0 mm.
 PYTHIA Warning in Pythia::check: not quite matched particle energy/momentum/mass  
 PYTHIA Warning in Pythia::check: energy-momentum not quite conserved  
 PYTHIA Warning in StringFragmentation::fragmentToJunction: bad convergence junction rest frame  
 PYTHIA Error in StringFragmentation::fragment: stuck in joining  
 PYTHIA Error in Pythia::next: hadronLevel failed; try again  
ApplicationMgr       INFO Application Manager Stopped successfully
DelphesSimulation    INFO Exiting Delphes...
Error in <TList::Clear>: A list is accessing an object (0x38fb0a0) already deleted (list name = TList)
EventLoopMgr         INFO Histograms converted successfully according to request.
ToolSvc              INFO Removing all tools created by ToolSvc
ApplicationMgr       INFO Application Manager Finalized successfully
ApplicationMgr       INFO Application Manager Terminated successfully
In [20]:
! ls FCCSW/FCCDelphesOutput.root
FCCSW/FCCDelphesOutput.root

you should obtain a file called FCCDelphesOutput.root.

This example will run 100 events by default. To have more events for plotting purposes, you can increase this number or use files that have been already produced and stored on eos (see next section).

With this file you are now ready to run the analysis framework heppy.

Run the analysis in heppy

Taking as a reference the following ttbar example from heppy, modify the analysis code to use the file you produced running FCCSW previously as input:

In [21]:
! curl https://raw.githubusercontent.com/HEP-FCC/heppy/master/test/analysis_hh_ttbar_cfg.py -o analysis_hh_ttbar_cfg.py && \
    sed -i "[email protected] = \[".*"\]@files = ['$PWD/FCCSW/FCCDelphesOutput.root']@" analysis_hh_ttbar_cfg.py
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4821  100  4821    0     0  10204      0 --:--:-- --:--:-- --:--:-- 26932

If you skip the previous step, the example will use files already produced and stored on eos, so you would need to setup eos:

export EOS_MGM_URL="root://eospublic.cern.ch"

Now you are ready to run the ttbar example:

In [22]:
! heppy myoutput analysis_hh_ttbar_cfg.py
]0;IPython: FCC-Gallery/testingGallery
Component: example
	dataset_entries:   0
	files          :   ['/eos/user/j/jcervant/SWAN_projects/FCC-Gallery/testingGallery/FCCSW/FCCDelphesOutput.root']
	isData         :   False
	isEmbed        :   False
	isMC           :   False
	tree_name      :   None
	triggers       :   None


      ---- TimeReport (all times in ms; first evt is skipped) ---- 
processed    all evts    time/proc    time/all   [%]    analyer
---------    --------    ---------   ---------  -----   -------------
      100         100        14.37       14.37  94.0%   heppy.analyzers.fcc.Reader.Reader_1
      100         100         0.04        0.04   0.2%   heppy.analyzers.Selector.Selector_jets_30
      100         100         0.01        0.01   0.1%   heppy.analyzers.Selector.Selector_sel_muons
      100         100         0.02        0.02   0.1%   heppy.analyzers.Selector.Selector_sel_electrons
      100         100         0.01        0.01   0.0%   heppy.analyzers.Selector.Selector_sel_iso_muons
      100         100         0.01        0.01   0.0%   heppy.analyzers.Selector.Selector_sel_iso_electrons
      100         100         0.03        0.03   0.2%   heppy.analyzers.Matcher.Matcher_electron_jets
      100         100         0.01        0.01   0.1%   heppy.analyzers.Selector.Selector_sel_jets_noelecetron_30
      100         100         0.03        0.03   0.2%   heppy.analyzers.Matcher.Matcher_muon_jets
      100         100         0.01        0.01   0.1%   heppy.analyzers.Selector.Selector_sel_jets_nomuon_30
      100         100         0.01        0.01   0.1%   heppy.analyzers.examples.ttbar.BTagging.BTagging_b_jets_30
      100         100         0.02        0.02   0.1%   heppy.analyzers.examples.ttbar.selection.Selection_cuts
       11         100         4.03        0.41   2.7%   heppy.analyzers.M3Builder.M3Builder_m3
       11         100         0.02        0.00   0.0%   heppy.analyzers.MTW.MTW_mtw
       11         100         3.14        0.32   2.1%   heppy.analyzers.examples.ttbar.TTbarTreeProducer.TTbarTreeProducer_1
---------    --------    ---------   ---------   -------------
       11         100       151.36       15.29 100.0%   TOTAL

Counter analyzers :
	 heppy.analyzers.fcc.Reader.Reader_1                                100 	 1.00 	 1.0000
	 heppy.analyzers.Selector.Selector_jets_30                          100 	 1.00 	 1.0000
	 heppy.analyzers.Selector.Selector_sel_muons                        100 	 1.00 	 1.0000
	 heppy.analyzers.Selector.Selector_sel_electrons                    100 	 1.00 	 1.0000
	 heppy.analyzers.Selector.Selector_sel_iso_muons                    100 	 1.00 	 1.0000
	 heppy.analyzers.Selector.Selector_sel_iso_electrons                100 	 1.00 	 1.0000
	 heppy.analyzers.Matcher.Matcher_electron_jets                      100 	 1.00 	 1.0000
	 heppy.analyzers.Selector.Selector_sel_jets_noelecetron_30          100 	 1.00 	 1.0000
	 heppy.analyzers.Matcher.Matcher_muon_jets                          100 	 1.00 	 1.0000
	 heppy.analyzers.Selector.Selector_sel_jets_nomuon_30               100 	 1.00 	 1.0000
	 heppy.analyzers.examples.ttbar.BTagging.BTagging_b_jets_30         100 	 1.00 	 1.0000
	 heppy.analyzers.examples.ttbar.selection.Selection_cuts             11 	 0.11 	 0.1100
	 heppy.analyzers.M3Builder.M3Builder_m3                              11 	 1.00 	 0.1100
	 heppy.analyzers.MTW.MTW_mtw                                         11 	 1.00 	 0.1100
	 heppy.analyzers.examples.ttbar.TTbarTreeProducer.TTbarTreeProducer_1        11 	 1.00 	 0.1100

You get an output directory myoutput . Check its contents and the contents of its subdirectories. In particular, the following root file contains an ntuple with the variables we need:

In [23]:
! ls myoutput/example/heppy.analyzers.examples.ttbar.TTbarTreeProducer.TTbarTreeProducer_1/tree.root
myoutput/example/heppy.analyzers.examples.ttbar.TTbarTreeProducer.TTbarTreeProducer_1/tree.root

Make plots

Open the root file containing the ntuple in from python:

In [24]:
import ROOT

fname="myoutput/example/heppy.analyzers.examples.ttbar.TTbarTreeProducer.TTbarTreeProducer_1/tree.root"

f1 = ROOT.TFile(fname)

reconstructed W leptonic transverse mass:

In [25]:
c1 = ROOT.TCanvas() 
f1.events.Draw("mtw")
c1.Draw()

CutFlow

The file

myoutput/example/heppy.analyzers.examples.ttbar.selection.Selection_cuts/cut_flow.txt 

contains a cut flow

Counter cut_flow :
     All events                                   10000      1.00    1.0000
     At least 4 jets                               8170      0.82    0.8170
     At least 1 b-jet                              7153      0.88    0.7153
     Exactly 1 lepton                              1303      0.18    0.1303
     MET > 20GeV                                   1202      0.92    0.1202

The first column represents the cut, the second one the raw number of events, the third one the efficiency of the cut, and the last one the overall efficiency.