Applying Graph Features
A simple feature function which has pre-defined edge/node/graph feature functions that automatically populate a graph based on truth level. This function can be easily extended as will be highlighted later in the documentation.
- ApplyFeatures(Analysis inpt, Level = None)
- Parameters:
inpt (Analysis) – The Analysis instance to which a GraphTemplate is attached.
Level (None, str) –
The truth level of the GraphTemplate particles. Options are:
TruthTops
: Expects a graph containing truth tops. If none are present, the graph will be empty.TruthChildren
: Expects truth tops to be matched to their direct decay products (known as their children). Similar to the tops, if none are present in the event, the graph will be empty and skipped.TruthJets
: Expects a GraphTemplate containing truth jets. These are the non-detector convoluted jets.Jets
: Expects a GraphTemplate containing detector based jets.
A collection of pre-built GraphTemplate implementations compatible with the above inputs can be found under; src/Events/Graphs/EventGraphs.py.
Since collection Graphs are part of the package, they can be imported via from AnalysisG.Events import *
.
A short description of these is given below:
GraphTops
: An implementation using only event truth tops. These are considered to be the generator particles.GraphChildren
: The implementation uses the immediate decay products of the generator tops, if the top decays leptonically, the immediate decay products of the W boson are used, for example neutrinos and leptons.GraphChildrenNoNu
: A graph implementation similar to GraphChildren, but without neutrinos.GraphTruthJet
: Replaces the children, except the leptons and neutrinos, with truth jets of the detector.GraphTruthJetNoNu
: A graph implementation similar to GraphTruthJet, but without neutrinos.GraphJet
: Replaces the children, except the leptons and neutrinos, with jets of the detector.GraphJetNoNu
: A graph implementation similar to GraphJet, but without neutrinos.GraphDetector
: The final graph version as would be expected in real data. No truth particles are used.
Applied Features to Each Graph Category
This section highlights the expected graph features, which are automatically added to the aforementioned graph objects. The usual syntax also applies to these graphs where, E, N and G prefixes imply edge, node and graph features. Features containing a T are dedicated for truth information, that is used to train a supervised neural network.
- class TruthTops
This section indicates the truth graph features used to train the neural network against.
- Parameters:
E_T_res_edge (torch.tensor) – Indicates whether the edge connecting the tops are from a resonance particle.
N_T_res_node (torch.tensor) – Indicates whether the given particle is from a resonance particle.
G_T_signal (torch.tensor) – Indicates whether the event as a whole is a signal graph.
G_T_ntops (torch.tensor) – Indicates the number of tops within the graph.
This section reserved for features used as input to the neural network.
- Parameters:
N_eta (torch.tensor) – The pseudo-rapidity of the particle.
N_energy (torch.tensor) – The energy of the particle.
N_pT (torch.tensor) – The transverse momenta of the particle.
N_phi (torch.tensor) – The azimuthal angle of the particle within the detector.
G_met (torch.tensor) – The missing transverse energy of the ATLAS detector. This contribution is expected to be associated with neutrino production.
G_phi (torch.tensor) – The azimuthal angle of the missing transverse energy.
- class GraphChildren
This section indicates the truth children graph features used to train the neural network against.
- Parameters:
E_T_res_edge (torch.tensor) – Indicates whether the edge connecting the children are from a resonance top.
E_T_top_edge (torch.tensor) – Indicates whether the children come from a mutual top.
E_T_lep_edge (torch.tensor) – Indicates whether the children have a leptonic decay mode.
N_T_res_node (torch.tensor) – Indicates whether this particle is from a resonance.
G_T_signal (torch.tensor) – Indicates if the event has a resonance particle.
G_T_ntop (torch.tensor) – Number of tops in the event.
G_T_n_nu (torch.tensor) – Number of neutrinos within the event.
N_eta (torch.tensor) – The pseudo-rapidity of the particle.
N_energy (torch.tensor) – The energy of the particle.
N_pT (torch.tensor) – The transverse momenta of the particle.
N_phi (torch.tensor) – The azimuthal angle of the particle within the detector.
N_is_b (torch.tensor) – Whether the given particle is a b-quark.
N_is_lep (torch.tensor) – Whether the given particle is a lepton.
N_is_nu (torch.tensor) – Whether the given particle is a neutrino.
G_met (torch.tensor) – The missing transverse energy of the ATLAS detector. This contribution is expected to be associated with neutrino production.
G_phi (torch.tensor) – The azimuthal angle of the missing transverse energy.
G_n_lep (torch.tensor) – Number of leptons within the event.
G_n_jets (torch.tensor) – Number of jets within the event.