This repository has been archived by the owner on May 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sequence_cfg.yml
54 lines (49 loc) · 1.88 KB
/
sequence_cfg.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Define the sequence of stages to pass data through
# Keys name the stage
# Values are a python-importable class
stages:
# Just defines new variables
- BasicVars: fast_carpenter.define.Define
# A custom class to form the invariant mass of a two-object system
- DiMuons: cms_hep_tutorial.DiObjectMass
# Filled a binned dataframe
- NumberMuons: fast_carpenter.summary.BinnedDataframe
# Select events by applying cuts
- EventSelection: fast_carpenter.selection.CutFlow
# Fill another binned dataframe
- DiMuonMass: fast_carpenter.summary.BinnedDataframe
# Define some additional variables not provided in the tree
BasicVars:
variables:
- Muon_Pt: "sqrt(Muon_Px ** 2 + Muon_Py ** 2)"
- IsoMuon_Idx: (Muon_Iso / Muon_Pt) < 0.10
# This next variable will create a single number for each event,
# using a set of inputs whose length varies for each event
- NIsoMuon: {reduce: count_nonzero, formula: IsoMuon_Idx}
# The custom module specific to this analysis, only takes an optional parameter
DiMuons: {mask: IsoMuon_Idx}
# Make a binned dataframe with a column for:
# - the dataset name
# - the number of muons
# - the number of muons considered "isolated"
# and weight everything using the EventWeight variable
NumberMuons:
dataset_col: true
binning:
- {in: NMuon, out: nMuons}
- {in: NIsoMuon, out: nIsoMuons}
weights: {weighted: EventWeight}
# Select events for subsequent stages that only pass all the requirements in the list
EventSelection:
weights: {weighted: EventWeight}
selection:
All:
- NIsoMuon >= 2
- triggerIsoMu24 == 1
- {reduce: 0, formula: Muon_Pt > 25}
# Make another binned dataframe containing the dataset and a binning of the DiMuon_mass variable
DiMuonMass:
dataset_col: true
binning:
- {in: DiMuon_Mass, out: dimu_mass, bins: {low: 60, high: 120, nbins: 60}}
weights: {weighted: EventWeight}