Skip to content

Commit

Permalink
Added semi-leptonic tth example with new outputs enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexanders101 committed Feb 3, 2023
1 parent 74f5af0 commit fd1e969
Show file tree
Hide file tree
Showing 5 changed files with 199 additions and 0 deletions.
22 changes: 22 additions & 0 deletions data/full_hadronic_ttbar/example.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
============================================================
| Structure for data/full_hadronic_ttbar/example.h5
============================================================

|-INPUTS
|---Source
|-----MASK :: bool : (10000, 10)
|-----btag :: float32 : (10000, 10)
|-----eta :: float32 : (10000, 10)
|-----mass :: float32 : (10000, 10)
|-----phi :: float32 : (10000, 10)
|-----pt :: float32 : (10000, 10)
|-TARGETS
|---t1
|-----b :: int64 : (10000,)
|-----q1 :: int64 : (10000,)
|-----q2 :: int64 : (10000,)
|---t2
|-----b :: int64 : (10000,)
|-----q1 :: int64 : (10000,)
|-----q2 :: int64 : (10000,)

Binary file added data/semi_leptonic_ttH/example.h5
Binary file not shown.
43 changes: 43 additions & 0 deletions data/semi_leptonic_ttH/example.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
============================================================
| Structure for data/semi_leptonic_ttH/example.h5
============================================================

|-CLASSIFICATIONS
|---EVENT
|-----signal :: int64 : (1000,)
|-INPUTS
|---Met
|-----met :: float32 : (1000,)
|-----sumet :: float32 : (1000,)
|-----cos_phi :: float32 : (1000,)
|-----sin_phi :: float32 : (1000,)
|---Momenta
|-----MASK :: bool : (1000, 19)
|-----cos_phi :: float32 : (1000, 19)
|-----sin_phi :: float32 : (1000, 19)
|-----eta :: float32 : (1000, 19)
|-----mass :: float32 : (1000, 19)
|-----pt :: float32 : (1000, 19)
|-----btag :: float32 : (1000, 19)
|-----qtag :: float32 : (1000, 19)
|-----etag :: float32 : (1000, 19)
|-----utag :: float32 : (1000, 19)
|-REGRESSIONS
|---EVENT
|-----log_invariant_mass :: float32 : (1000,)
|-----neutrino_eta :: float32 : (1000,)
|-----neutrino_px :: float32 : (1000,)
|-----neutrino_py :: float32 : (1000,)
|-----neutrino_pz :: float32 : (1000,)
|-TARGETS
|---h
|-----b1 :: int64 : (1000,)
|-----b2 :: int64 : (1000,)
|---ht
|-----b :: int64 : (1000,)
|-----q1 :: int64 : (1000,)
|-----q2 :: int64 : (1000,)
|---lt
|-----b :: int64 : (1000,)
|-----l :: int64 : (1000,)

66 changes: 66 additions & 0 deletions event_files/semi_leptonic_ttH.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
INPUTS:
SEQUENTIAL:
Momenta:
mass: log_normalize
pt: log_normalize
eta: normalize

sin_phi: normalize
cos_phi: normalize

qtag: none
btag: none
etag: none
utag: none

# ---------------------------------------------------------------------
# REQUIRED - GLOBAL - inputs which will have a single vector per event.
# ---------------------------------------------------------------------
GLOBAL:
Met:
met: log_normalize
sin_phi: normalize
cos_phi: normalize


# ----------------------------------------------------------------------
# REQUIRED - EVENT - Complete list of resonance particles and daughters.
# ----------------------------------------------------------------------
EVENT:
lt:
- b

ht:
- b
- q1
- q2
h:
- b1
- b2

# ---------------------------------------------------------
# REQUIRED KEY - PERMUTATIONS - List of valid permutations.
# ---------------------------------------------------------
PERMUTATIONS:
ht:
- [ q1, q2 ]
h:
- [ b1, b2 ]

# ------------------------------------------------------------------------------
# REQUIRED - REGRESSIONS - List of desired features to regress from observables.
# ------------------------------------------------------------------------------
REGRESSIONS:
EVENT:
- neutrino_eta
- neutrino_px
- neutrino_py
- neutrino_pz
- log_invariant_mass

# ------------------------------------------------------------------------------
# REQUIRED - CLASSIFICATIONS - List of desired features to regress from observables.
# ------------------------------------------------------------------------------
CLASSIFICATIONS:
EVENT:
- signal
68 changes: 68 additions & 0 deletions options_files/semi_leptonic_ttH/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"hidden_dim": 64,
"transformer_dim": 64,
"initial_embedding_dim": 16,
"position_embedding_dim": 32,

"num_embedding_layers": 10,
"num_encoder_layers": 6,

"num_branch_embedding_layers": 5,
"num_branch_encoder_layers": 3,

"num_jet_embedding_layers": 0,
"num_jet_encoder_layers": 1,

"num_detector_layers": 2,
"num_regression_layers": 3,
"num_classification_layers": 3,

"split_symmetric_attention": true,
"num_attention_heads": 4,
"transformer_activation": "gelu",

"linear_block_type": "GRU",
"transformer_type": "Gated",
"linear_activation": "gelu",
"normalization": "LayerNorm",
"masking": "Filling",

"skip_connections": true,
"initial_embedding_skip_connections": true,

"event_info_file": "./event_files/semi_leptonic_ttH.yaml",
"training_file": "./data/semi_leptonic_ttH/example.h5",

"normalize_features": true,
"limit_to_num_jets": 0,
"balance_jets": false,
"partial_events": true,
"balance_particles": true,

"dataset_limit": 1.0,
"train_validation_split": 0.95,
"batch_size": 32,
"num_dataloader_workers": 16,

"mask_sequence_vectors": true,
"combine_pair_loss": "min",
"optimizer": "AdamW",
"focal_gamma": 0.0,
"learning_rate": 0.0015,
"learning_rate_cycles": 5,
"learning_rate_warmup_epochs": 1.0,

"assignment_loss_scale": 1.0,
"detection_loss_scale": 1.0,
"kl_loss_scale": 0.0,
"regression_loss_scale": 1.0,
"classification_loss_scale": 1.0,

"l2_penalty": 0.0002,
"gradient_clip": 0.0,
"dropout": 0.0,

"epochs": 500,
"num_gpu": 1,
"verbose_output": true
}

0 comments on commit fd1e969

Please sign in to comment.