-
Notifications
You must be signed in to change notification settings - Fork 1
/
cms_full_analysis_example.md
58 lines (50 loc) · 1.62 KB
/
cms_full_analysis_example.md
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
55
56
57
58
# A CMS analysis with paper-ready plots
The goal of this example is to show how to use `fasthep-flow` to perform a full
HEP analysis with paper-ready plots and tables. This includes more complex tasks
such as:
- systematic uncertainties for MC samples and/or physics objects
- control regions for background estimation
- scale factors for data/MC comparison
- statistical analysis of the results
- provenance tracking for reproducibility and accountability
```{note}
Looking for volunteers and public data to create this example!
```
## Control regions
Control regions are used to estimate the background in the signal region or
verify procedures outside the signal region (e.g. for searches). From a workflow
perspecite, they are effectively independent branches. To split a workflow, you
will need to use the `needs` keyword:
```yaml
stages:
- name: Data Input Stage
...
- name: Common selection
...
- name: signal selection
needs: [Common selection]
...
- name: control selection
needs: ["Common selection"]
...
- name: Create histograms for signal region
needs: ["signal selection"]
...
- name: Create histograms for control region
needs: ["control selection"]
...
- name: Output
needs: ["Create histograms for signal region", "Create histograms for control region"]
...
```
This will create a DAG like this:
```{mermaid}
flowchart TD
A[Data Input Stage] --> B(Common selection)
B --> C[signal selection]
B --> D[control selection]
C --> E[Create histograms for signal region]
D --> F[Create histograms for control region]
E --> G[Output]
F --> G
```