22
Tutorial for FCC UCLouvain Delphes team Université catholique de Louvain Louvain-la-Neuve, Belgium Center for Particle Physics and Phenomenology (CP3) May 8, 2014

Tutorial for FCC - Indico

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Tutorial for FCC - Indico

Tutorial for FCC

UCLouvain Delphes team

Université catholique de LouvainLouvain-la-Neuve, Belgium

Center for Particle Physics andPhenomenology (CP3)

May 8, 2014

Page 2: Tutorial for FCC - Indico

May 8, 2014 2

Introduction

● We are presenting the new modular version of Delphes

● Website:

https://cp3.irmp.ucl.ac.be/projects/delphes

● Documentation for the new modular version:

https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook

Page 3: Tutorial for FCC - Indico

May 8, 2014 3

Hands-on session

● Hands-on session outlook:– Example 1: Quick start with Delphes

– Example 2: Simple analysis using TTree::Draw

– Example 3: Macro-based analysis

– Example 4: Modifying configuration file

– Example 5: Adding new module

– Example 6: N-subjettiness and pile-up

● Step-by-step instructions can be found on the Indico page of this meeting:– Examples 1-4: DelphesTutorial_QuickStart.txt– Example 5: DelphesTutorial_NewModule.txt– Example 6: DelphesTutorial_PileUp.txt

Page 4: Tutorial for FCC - Indico

May 8, 2014 4

Example 1: Quick start with Delphes

Page 5: Tutorial for FCC - Indico

May 8, 2014 5

Installing Delphes from Source

● To successfully build Delphes the following prerequisite packages should be installed:– ROOT Data Analysis Framework– Tcl scripting language

● Setup ROOT environment variables

● Get the code:wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.1.2.tar.gz

tar -zxf Delphes-3.1.2.tar.gz

● Compile:cd Delphes-3.1.2

make

● Run:./DelphesSTDHEP examples/delphes_card_FCC_basic.tcl step_1.root /afs/cern.ch/user/s/selvaggi/public/delphes_tuto/ee_zh_mmbb.hep

Page 6: Tutorial for FCC - Indico

May 8, 2014 6

Running Delphes

● Command line parameters:

DelphesSTDHEP config_file output_file [input_file(s)]

config_file - configuration file in Tcl format

output_file - output file in ROOT format,

input_file(s) - input file(s) in HepMC format,

with no input_file, or when input_file is -, read standard input.

Page 7: Tutorial for FCC - Indico

May 8, 2014 7

Running Delphes, cont.

● Running Delphes with HepMC input files:./DelphesHepMC examples/delphes_card_CMS.tcl output.root input.hepmc

● Running Delphes with STDHEP (XDR) input files:./DelphesSTDHEP examples/delphes_card_CMS.tcl delphes_output.root input.hep

● Running Delphes with LHEF input files:./DelphesLHEF examples/delphes_card_CMS.tcl delphes_output.root input.lhef

● Running Delphes with files stored in CASTOR:rfcat /castor/cern.ch/user/d/demine/test.hepmc.gz | gunzip |

./DelphesHepMC examples/delphes_card_CMS.tcl delphes_output.root

● Running Delphes with files accessible via HTTP:curl -s http://cp3.irmp.ucl.ac.be/~demin/test.hepmc.gz | gunzip |

./DelphesHepMC examples/delphes_card_CMS.tcl delphes_output.root

Page 8: Tutorial for FCC - Indico

May 8, 2014 8

Example 2: Simple analysis using TTree::Draw

Page 9: Tutorial for FCC - Indico

May 8, 2014 9

ROOT tree: structure

● ROOT tree is a set of branches

● Branch contains a collection of analysis objects for every event:

– information is stored in TClonesArray, which enables efficient storage an retrieval

– same C++ classes (Jet, Muon etc.) used for creating the tree and for analyzing the stored data

– different quantities stored in the tree can be linked by pointers

● ROOT tree description:

http://cp3.irmp.ucl.ac.be/downloads/RootTreeDescription.html

Page 10: Tutorial for FCC - Indico

May 8, 2014 10

Example 3: Macro-based analysis

Page 11: Tutorial for FCC - Indico

May 8, 2014 11

● ExRootTreeReader – class simplifying access to ROOT tree data

– ExRootTreeReader(TTree *) – constructor takes ROOT tree as parameter

– Long64_t GetEntries() – returns total number of events stored on the tree

– TClonesArray *UseBranch(branchName, className) – returns pointer to

collection of branch elements and specifies branches needed for analysis

– Bool_t ReadEntry(entry) – loads collections of branch elements with data from

specified event

ROOT tree: ExRootTreeReader

Page 12: Tutorial for FCC - Indico

May 8, 2014 12

Example 4: Modifying configuration file

Page 13: Tutorial for FCC - Indico

May 8, 2014 13

Modular system

● The modular system allows the user to configure and schedule modules via a configuration file, add modules, change data flow, alter output information

● Modules communicate entirely via collections of universal objects (TObjArray of Candidate four-vector like objects).

● Any module can access TObjArrays produced by other modules using ImportArray method:ImportArray("ModuleName/arrayName")

Page 14: Tutorial for FCC - Indico

May 8, 2014 14

Configuration file

● Delphes' configuration file is based on Tcl scripting language● Basic commands:

– set value of a scalar parameter:set ParamName value

– append a list of values to a vector (list) parameteradd ParamName value1 value2 value3 ...

– activate a module:module ModuleClass ModuleName ModuleConfigurationBody

– define order of execution of various modules:set ExecutionPath ListOfModuleNames

set ExecutionPath {

ParticlePropagator

TrackEfficiency

TrackMomentumSmearing

...

TreeWriter

}

Page 15: Tutorial for FCC - Indico

May 8, 2014 15

Module configuration example

module Efficiency ChargedHadronTrackingEfficiency {

set InputArray ParticlePropagator/chargedHadrons

set OutputArray chargedHadrons

# add EfficiencyFormula {efficiency formula as a function of eta and pt}

# tracking efficiency formula for charged hadrons

set EfficiencyFormula {

(pt <= 0.1) * (0.00) +

(abs(eta) <= 1.5) * (pt > 0.1 && pt <= 1.0) * (0.75) +

(abs(eta) <= 1.5) * (pt > 1.0) * (0.99) +

(abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 0.1 && pt <= 1.0) * (0.70) +

(abs(eta) > 1.5 && abs(eta) <= 4.0) * (pt > 1.0) * (0.98) +

(abs(eta) > 4.0) * (0.00)

}

All efficiency, resolution, etc formulas can be configured as function of E, pT, η, φ using

ROOT's TFormula syntax: http://root.cern.ch/root/html/TFormula.html

Page 16: Tutorial for FCC - Indico

May 8, 2014 16

TreeWriter module

All the output ROOT tree branches are configured in the TreeWriter module

module TreeWriter TreeWriter {

# add Branch InputArray BranchName BranchClass

add Branch Delphes/allParticles Particle GenParticle

add Branch GenJetFinder/jets GenJet Jet

add Branch ChargedHadronMomentumSmearing/chargedHadrons ChargedHadron Track

add Branch Hcal/eflowNeutralHadrons NeutralHadron Tower

add Branch Ecal/eflowPhotons Photon Photon

add Branch ElectronEnergySmearing/electrons Electron Electron

add Branch MuonMomentumSmearing/muons Muon Muon

add Branch JetEnergyScale/jets Jet Jet

add Branch MissingET/momentum MissingET MissingET

add Branch ScalarHT/energy ScalarHT ScalarHT

}

Page 17: Tutorial for FCC - Indico

May 8, 2014 17

Changing the calorimeter granularity

● Now we are going to modify the Delphes configuration file

● and replace ECAL and HCAL phi and eta bins with:

# 1 degree towers

set PhiBins {}

for {set i -180} {$i <= 180} {incr i} {

add PhiBins [expr {$i * $pi/180.0}]

}

# 0.01 unit in eta up to eta = 6

for {set i -600} {$i <= 600} {incr i} {

set eta [expr {$i * 0.01}]

add EtaPhiBins $eta $PhiBins

}

Page 18: Tutorial for FCC - Indico

May 8, 2014 18

Example 5: Adding new module

Page 19: Tutorial for FCC - Indico

May 8, 2014 19

Adding new module

● Steps needed for adding new module:– copy template/example module to the new one:

cp modules/ExampleModule.h modules/NewModule.h

cp modules/ExampleModule.cc modules/NewModule.cc

– edit new module:vi modules/NewModule.h

vi modules/NewModule.cc

– add new module to modules/ModulesLinkDef.h:#include "modules/NewModule.h"

...

#pragma link C++ class NewModule+;

– regenerate Makefile:./configure

– rebuild Delphes:make -j 4

● Exercise guidelines can be found in DelphesTutorial_NewModule.txt

Page 20: Tutorial for FCC - Indico

May 8, 2014 20

Example 6: N-subjettiness and pile-up

Page 21: Tutorial for FCC - Indico

May 8, 2014 21

Run Delphes with pile-up

● Pile-up events (MinBias) are mixed with the hard scattering by the PileUpMerger module

● MinBias events should be generated beforehand and converted to Delphes pileup format

● For this tutorial the MinBias.pileup file has been already generated:/afs/cern.ch/user/s/selvaggi/public/delphes_tuto/MinBias.pileup

● Run with Pile-up ./DelphesSTDHEP examples/delphes_card_FCC_nsub_pu.tcl qcd_20pu.root /afs/cern.ch/user/s/selvaggi/public/delphes_tuto/qcd_100tev.hep

● For more information on Delphes with pile-up see:

https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/PileUp

● Exercise guidelines can be found in DelphesTutorial_PileUp.txt

Page 22: Tutorial for FCC - Indico

May 8, 2014 22

Backup slides