HN analysis summary
==
## PROMPT ANALYSIS
### V2.0 analysis (no vertices) -- prompt
+ Cuts as in the V2.0 analysis note
```
Interpolation result: ---- M 5 -> -6.66566
Interpolation result: ---- M 10 -> -7.96838
Interpolation result: ---- M 20 -> -7.89941
Interpolation result: ---- M 30 -> -8.20625
Interpolation result: ---- M 40 -> -8.42797
Interpolation result: ---- M 50 -> -8.53553
Interpolation result: ---- M 60 -> -8.46195
Interpolation result: ---- M 65 -> -8.40078
Interpolation result: ---- M 70 -> -8.15832
Interpolation result: ---- M 80 -> -7.20016
Interpolation result: ---- M 85 -> -6.38057
```

### Original + Primary vertex -- prompt
+ Cuts as in the V2.0
+ `(oNtracks - oNtracksP) < 5`
+ `TMath::Log10(oVtx_chi2P) < 1`
```
Interpolation result: ---- M 5 -> -6.66566
Interpolation result: ---- M 10 -> -7.82925
Interpolation result: ---- M 20 -> -7.87208
Interpolation result: ---- M 30 -> -8.191
Interpolation result: ---- M 40 -> -8.42471
Interpolation result: ---- M 50 -> -8.54013
Interpolation result: ---- M 60 -> -8.55743
Interpolation result: ---- M 65 -> -8.51988
Interpolation result: ---- M 70 -> -8.34898
Interpolation result: ---- M 80 -> -7.59044
Interpolation result: ---- M 85 -> -6.77038
```

### Primary vertex displacement, no Dcut -- prompt
+ V2.0 analysis without D cut
+ `(oNtracks - oNtracksP) < 5`
+ `TMath::Log10(oVtx_chi2P) < 1`
+ `TMath::Sqrt(oVtx_xP*oVtx_xP + oVtx_yP*oVtx_yP) < 0.5`
```
Interpolation result: ---- M 5 -> -5.16694
Interpolation result: ---- M 10 -> -7.66426
Interpolation result: ---- M 20 -> -8.00716
Interpolation result: ---- M 30 -> -8.47525
Interpolation result: ---- M 40 -> -8.8216
Interpolation result: ---- M 50 -> -8.92178
Interpolation result: ---- M 60 -> -8.72339
Interpolation result: ---- M 65 -> -8.56134
Interpolation result: ---- M 70 -> -8.32136
Interpolation result: ---- M 80 -> -7.53304
Interpolation result: ---- M 85 -> -6.62555
```

### Prompt: Primary vertex + 8 sigma
+ V2.0 analysis with D cut < 8 sigma
+ `(oNtracks - oNtracksP) < 5`
+ `TMath::Log10(oVtx_chi2P) < 1`
+ `TMath::Sqrt(oVtx_xP*oVtx_xP + oVtx_yP*oVtx_yP) < 0.5`
```
Interpolation result: ---- M 5 -> -4.66694
Interpolation result: ---- M 10 -> -7.47949
Interpolation result: ---- M 20 -> -7.75803
Interpolation result: ---- M 30 -> -8.14345
Interpolation result: ---- M 40 -> -8.41373
Interpolation result: ---- M 50 -> -8.5389
Interpolation result: ---- M 60 -> -8.55743
Interpolation result: ---- M 65 -> -8.51988
Interpolation result: ---- M 70 -> -8.34898
Interpolation result: ---- M 80 -> -7.59044
Interpolation result: ---- M 85 -> -6.77038
```

---
## LONG LIVED ANALYSIS
### Original (no vertices) -- longlived
+ Cuts as in the V2.0 analysis note
```
Interpolation result: ---- M 5 -> -8.0501
Interpolation result: ---- M 10 -> -9.4071
Interpolation result: ---- M 20 -> -10.3245
Interpolation result: ---- M 30 -> -10.7646
Interpolation result: ---- M 40 -> -10.9751
Interpolation result: ---- M 50 -> -10.9017
```

### Primary vertex displacement, no D0 cut -- longlived
+ V2.0 analysis without D cut
+ `(oNtracks - oNtracksP) < 5`
+ `TMath::Log10(oVtx_chi2P) < 1`
+ `TMath::Sqrt(oVtx_xP*oVtx_xP + oVtx_yP*oVtx_yP) > 0.5`
```
Interpolation result: ---- M 5 -> -8.00103
Interpolation result: ---- M 10 -> -9.35523
Interpolation result: ---- M 20 -> -10.286
Interpolation result: ---- M 30 -> -10.7286
Interpolation result: ---- M 40 -> -10.938
Interpolation result: ---- M 50 -> -10.8773
Interpolation result: ---- M 60 -> -10.6444
Interpolation result: ---- M 65 -> -10.3234
```

Ad hoc condition at 40 GeV:
```
if (m==40 && Y > -7.5) totsig=0;
```

Upper limits:
```
Interpolation result: ---- M 10 -> -3.56961
Interpolation result: ---- M 20 -> -5.61514
Interpolation result: ---- M 30 -> -6.52515
Interpolation result: ---- M 40 -> -7.30797
Interpolation result: ---- M 50 -> -8.23082
Interpolation result: ---- M 60 -> -9.12845
Interpolation result: ---- M 65 -> -9.69282
```

---
:::danger
OLDER THAN MAY 23
:::
---
**AVAILABLE DATAPOINTS**


### Distribution of (not weighted) number of events after Prompt analysis D cut 8 sigma

### Distribution of (not weighted) number of events after LL analysis D cut 1 mm

---
### 28-03-23
---
** Signficance, fixed jets
**Durham kt fixed number of jets = 2:** (jalg==0)

**Durham kt 1 or 2 jets. Same analysis for al cases where njets = 2:** (jalg==2)


**Analyses comparison for dcut = 8:**


---
### LONG LIVED CUT
---
+ ATLAS formula, no bkg systematics but setting b=1 when b=0.
+ jalg == 2 (1 or 2 jets)
+ D0 > 200sigma

---
+ ATLAS formula, no bkg systematics but setting b=1 when b=0.
+ jalg == 2 (1 or 2 jets)
+ D0 > 1 mm

**Prompt vs long-lived. D cut 1 mm:**


... What to do with those 2 Zbb events at 30 GeV?
Numbers at https://nvalle.web.cern.ch/fcc/summary_V3_jalg2_longlived_sigmaunit.html

Event selection + D > 1mm: (no Emiss, M cut)

---
---
#### Some distributions:
**Cos(jj) for M = 80 GeV**


**sqrt(Vtx_x * Vtx_x + Vtx_y * Vtx_y + Vtx_z * Vtx_z) for M=20, lt=m0p5**

---
(http://cds.cern.ch/record/2316023/files/fulltext.pdf)

---
:::success
**Playing with cuts at high mass.**
M = 80. MIN[cos(j,mu)]

M = 80. MAX[cos(j,mu)]

M = 80. Cos(jj)

Brute force cut variation on cos(jj) and cos(jmu) doesn't lead to signficant improvements. Rejecting more background is more efficient that accepting more signal...
Following plot: M=80, D0 < 8sigma, legend:[cosjj,min_jmu,max_jmu]

:::
:::success
## **Playing with beam spread**
```
Beams:allowVertexSpread = on
Beams:sigmaVertexX = 5.96e-3
Beams:sigmaVertexY = 23.8E-6
Beams:sigmaVertexZ = 0.397
Beams:sigmaTime = 10.89 ! 36.3 ps
```

:::
:::success
## **Impact parameter vs Vertex position.**
Impact parameter discriminates better Zbb/Zcc. Following plots contain distributions after sliding cuts. 2021 SAMPLES, ALL WITHOUT BEAM SPREAD.
M=70, LT = -4.5. Weighted


---
M = 20, LT ~0.0. Not much to say: Both D0 and Vtx can easily reject all the background.


:::
:::success
## Playing with statistics
https://codimd.web.cern.ch/zm5HPB2iSZi_mzTS0UedSw
:::
:::success
## Variable width mass window




---
Prompt, 8sigma cut, ATLAS formula


:::
:::info
## TO DO
- [ ] Vertexing:
- [ ] Understand if one can separate primary from secondary vertex, and impact on Zbb
- Status: code implemented, but for LL signal does not converge for primaries
- [ ]Write algorithm to calcolate distance from ID envelope (pathid)
- [ ] Selection LLP: Study at low mass selection options on LLP based on vertexes:
- dvert>xxx && dvert<1500
- dvert>xxx && chi2vert<10(100)
- dvert>xxx && pathid>1000 (?)
- [ ] Winter2023: produce available samples and compare distributions with spring2021
- [ ] in particular, compare effect of impact paramter cut in two setups without too many cuts on kinematics
- [ ] check how affected resolution of masses from change of EM resolution
- [ ] Adding beam spread to signal/4 fermion samples
- [x] try to run PY8 with beam spread on existing LHE and see if it works
- [ ] Ask MG5 guys to implement spread
- [ ] Recalculate impact parameter based on track paramters offline, after moving it around
- [ ] Whizard+UFO???
- [x] Define statistical treatment when background==0
- [ ] Define how to handle situation when a given background source is zero
- [ ] Produce curves with different assumptions on systematics: 1% 0.5% 0.1%
- [ ] Setup statistical framework for dealing with multi-bin in vertex position/impact parameter
- [ ] Optimise selection for high mass region (~>60) and for 85 GeV
- [ ] Develop technique for 'smoothing' backgrounds based on interplay between mass window variables and lifetime variables
- [ ] Estimate the impact on angular variables of long-lived vertex (?)
- [ ] Develop procedure for changing resolution of mass ant MET concurrently
:::
---
:::spoiler OLD
#### Extended tables of numbers
+ [Event selection cut flow](https://nvalle.web.cern.ch/fcc/CutByCut.html)
+ [Summary and impact parameter cut](https://nvalle.web.cern.ch/fcc/summary.html)
---
Backgrounds included in the following picture:
* Hadronic (bb,cc,uds): 95% CL upper limit
* Leptonic ($\mu\mu$,$\tau\tau$): 0 events ["No leptonic bkg"] or 95% CL upper limit ["All bkg"]
* $\mu\nu qq$ channel: 95% upper limit
Line drawn requiring S/sqrt(S+B) = 2

# Lint = 1.5e8 pb-1
Tot simulated statistics: $5 \times 10^{12}$
+ $\sigma$(Zbb) = 6645.46 pb
+ $\sigma$(Zcc) = 5215.46 pb
+ $\sigma$(Zuds) = 18616.5 pb
+ $\sigma$(Z$\mu\mu$) = 1462.08 pb
+ $\sigma$(Z$\tau\tau$) = 1476.58 pb
+ $\sigma$($\mu\nu qq$) = 0.003192 pb
+ $\sigma$(signal 50GeV) = 0.2061 pb @ U$^2$ = $10^{-4}$
## HN M = 30 GeV
| | Sample | Weight | Cut eff (w/o b) | Cut eff (w b) | Upp lim 95% |
| ------- | ------- | -------- | --------------- | ------------- | ----------- |
| signal | 0.1 M | 456.8 | 44.4% | 45.4% | |
| Zbb | 970.0 M | 1027.6 | 0 evt left | 0 evt left | 3083 |
| Zcc | 970.0 M | 806.5 | 0 evt left | 0 evt left | 2420 |
| Zuds | 930.0 M | 3002.7 | 2 evt left | 1 evt left | 14233 |
| Zmumu | 10.0 M | 21931.3 | 0 evt left | 0 evt left | 65794 |
| Ztautau | 10.0 M | 22148.7 | 0 evt left | 0 evt left | 66446 |
| munuqq | 0.5 M | 1.0 | 95.9% | 95.9% | 19716 |
| | | | | | |
+ Signal: 54600 x 456.75 = 2.49386e+07
+ Bkg1: 96698.5
+ S/sqrt(S+B) = 4984.2
+ To get significance = 2, the factor needed on signal is: 2.50187e-05
+ U^2 = 2.501873e-09
+ Bkg2: 24630.5
+ S/sqrt(S+B) = 4991.39
+ To get significance = 2, the factor needed on signal is: 1.26667e-05
+ U^2 = 1.266668e-09
## HN M = 40 GeV
| | Sample | Weight | Cut eff (w/o b) | Cut eff (w b) | Upp lim 95% |
| ------- | ------- | -------- | --------------- | ------------- | ----------- |
| signal | 0.1 M | 389.7 | 35.6% | 36.8% | |
| Zbb | 970.0 M | 1027.6 | 5 evt left | 0 evt left | 3083 |
| Zcc | 970.0 M | 806.5 | 2 evt left | 0 evt left | 2420 |
| Zuds | 930.0 M | 3002.7 | 6 evt left | 0 evt left | 9008 |
| Zmumu | 10.0 M | 21931.3 | 0 evt left | 0 evt left | 65794 |
| Ztautau | 10.0 M | 22148.7 | 0 evt left | 0 evt left | 66446 |
| munuqq | 0.5 M | 1.0 | 94.4% | 94.5% | 26525 |
| | | | | | |
+ Signal: 63245 x 389.7 = 2.46466e+07
+ Bkg1: 97693.4
+ S/sqrt(S+B) = 4954.72
+ To get significance = 2, the factor needed on signal is: 2.54446e-05
+ U^2 = 2.544460e-09
+ Bkg2: 28285.5
+ S/sqrt(S+B) = 4961.69
+ To get significance = 2, the factor needed on signal is: 1.3729e-05
+ U^2 = 1.372895e-09
## HN M = 50 GeV
| | Sample | Weight | Cut eff (w/o b) | Cut eff (w b) | Upp lim 95% |
| ------- | ------- | -------- | --------------- | ------------- | ----------- |
| signal | 0.1 M | 309.1 | 36.6% | 37.8% | |
| Zbb | 970.0 M | 1027.6 | 20 evt left | 0 evt left | 3083 |
| Zcc | 970.0 M | 806.5 | 15 evt left | 0 evt left | 2420 |
| Zuds | 930.0 M | 3002.7 | 20 evt left | 0 evt left | 9008 |
| Zmumu | 10.0 M | 21931.3 | 0 evt left | 0 evt left | 65794 |
| Ztautau | 10.0 M | 22148.7 | 0 evt left | 0 evt left | 66446 |
| munuqq | 0.5 M | 1.0 | 94.6% | 94.7% | 25559 |
| | | | | | |
+ Signal: 62177 x 309.15 = 1.9222e+07
+ Bkg1: 97435.5
+ S/sqrt(S+B) = 4373.22
+ To get significance = 2, the factor needed on signal is: 3.25822e-05
+ U^2 = 3.258224e-09
+ Bkg2: 27381.4
+ S/sqrt(S+B) = 4381.17
+ To get significance = 2, the factor needed on signal is: 1.73214e-05
+ U^2 = 1.732142e-09
## HN M = 60 GeV
| | Sample | Weight | Cut eff (w/o b) | Cut eff (w b) | Upp lim 95% |
| ------- | ------- | -------- | --------------- | ------------- | ----------- |
| signal | 0.1 M | 218.2 | 42.6% | 43.6% | |
| Zbb | 970.0 M | 1027.6 | 203 evt left | 6 evt left | 12167 |
| Zcc | 970.0 M | 806.5 | 68 evt left | 4 evt left | 7380 |
| Zuds | 930.0 M | 3002.7 | 25 evt left | 4 evt left | 27474 |
| Zmumu | 10.0 M | 21931.3 | 0 evt left | 0 evt left | 65794 |
| Ztautau | 10.0 M | 22148.7 | 0 evt left | 0 evt left | 66446 |
| munuqq | 0.5 M | 1.0 | 94.8% | 94.9% | 24902 |
| | | | | | |
+ Signal: 56376 x 218.25 = 1.23041e+07
+ Bkg1: 101594
+ S/sqrt(S+B) = 3493.32
+ To get significance = 2, the factor needed on signal is: 5.19731e-05
+ U^2 = 5.197311e-09
+ Bkg2: 39717.2
+ S/sqrt(S+B) = 3502.07
+ To get significance = 2, the factor needed on signal is: 3.25574e-05
+ U^2 = 3.255743e-09
## HN M = 70 GeV
| | Sample | Weight | Cut eff (w/o b) | Cut eff (w b) | Upp lim 95% |
| ------- | ------- | -------- | --------------- | ------------- | ----------- |
| signal | 0.1 M | 125.4 | 53.6% | 54.4% | |
| Zbb | 970.0 M | 1027.6 | 834 evt left | 10 evt left | 15639 |
| Zcc | 970.0 M | 806.5 | 137 evt left | 2 evt left | 5081 |
| Zuds | 930.0 M | 3002.7 | 27 evt left | 3 evt left | 23271 |
| Zmumu | 10.0 M | 21931.3 | 0 evt left | 0 evt left | 65794 |
| Ztautau | 10.0 M | 22148.7 | 0 evt left | 0 evt left | 66446 |
| munuqq | 0.5 M | 1.0 | 95.8% | 95.9% | 19989 |
| | | | | | |
+ Signal: 45603 x 125.37 = 5.71725e+06
+ Bkg1: 99776.8
+ S/sqrt(S+B) = 2370.48
+ To get significance = 2, the factor needed on signal is: 0.000110849
+ U^2 = 1.108492e-08
+ Bkg2: 34806
+ S/sqrt(S+B) = 2383.83
+ To get significance = 2, the factor needed on signal is: 6.56142e-05
+ U^2 = 6.561425e-09
## HN M = 80 GeV
| | Sample | Weight | Cut eff (w/o b) | Cut eff (w b) | Upp lim 95% |
| ------- | ------- | -------- | --------------- | ------------- | ----------- |
| signal | 0.1 M | 47.1 | 73.9% | 74.3% | |
| Zbb | 970.0 M | 1027.6 | 7030 evt left | 63 evt left | 78200 |
| Zcc | 970.0 M | 806.5 | 670 evt left | 9 evt left | 12662 |
| Zuds | 930.0 M | 3002.7 | 49 evt left | 0 evt left | 9008 |
| Zmumu | 10.0 M | 21931.3 | 0 evt left | 0 evt left | 65794 |
| Ztautau | 10.0 M | 22148.7 | 1 evt left | 0 evt left | 66446 |
| munuqq | 0.5 M | 1.0 | 97.5% | 97.6% | 11860 |
| | | | | | |
+ Signal: 25671 x 47.055 = 1.20795e+06
+ Bkg1: 123456
+ S/sqrt(S+B) = 1046.87
+ To get significance = 2, the factor needed on signal is: 0.00058341
+ U^2 = 5.834096e-08
+ Bkg2: 80606.7
+ S/sqrt(S+B) = 1064.14
+ To get significance = 2, the factor needed on signal is: 0.000471734
+ U^2 = 4.717335e-08
# Summary of the analysis
+ Event filtering:
+ At least 3 charged particles
+ Missing momentum > 5 GeV
+ At least one muon with p > 3 GeV
+ Particles clustered in exctly 2 jets
+ Event selection
+ Only one reconstructed muon
+ |cos (theta Pmiss)| < 0.94
+ |cos (angle Muon-Pmiss)| < 0.8
+ 2 jets with E > 3 GeV and Mass > 0.2 GeV
+ -0.8 < cos (angle jj) < 0.98
+ -0.98 < min [ cos(angle j1Mu, angle j2Mu)] < 0.8
+ Mass(Pmiss j1 j2 Mu) > 80 GeV
+ Final cut.
+ Mass (Mu j1 j2) = M_HN \pm 4 GeV
+ Pmiss (3-momentum) = p_recoil \pm 3.5 GeV
+ p_recoil = (m_Z^2 - m_HN^2) / 2 m_Z
+ muon impact parameter / sigma > 8
+ Cut flow:
| Signal 50 GeV | Zbb | Zcc | Zuds | Zmumu | Ztautau | munuqq | |
| ------------- | ----- | ----- | ---- | ----- | ------- | ------ | ----------------- |
| 100k | 970M | 970M | 930M | 10M | 10M | 500k | **Genrated** |
| 96.3k | 134M | 58M | 356k | 665 | 431k | 428k | **After filter** |
| 65.6k | 51.6k | 5.34k | 374 | 0 | 20 | 199k | **Event selection** |
Before event selection (but requiring one single muon):





After event selection:

## Muon impact parameter (after event selection) - 50 GeV

#### Muon impact paramer after M / pmiss cuts
Missing channels are in overflow!

:::