Comments (4)
The solution I've settled on is to create a function which takes the descendant masks of all of the non-incoming hard partons, and nests them into mask groups describing the decay channels. For example if the hard process is p p > t t~
, with t > b W+ > b u d~
and equivalent for the t~
case, then a MaskGroup
of MaskGroup
s will be created with
>>> masks = gcl.select.hard_hierarchy(graph)
>>> masks
MaskGroup(mask_arrays=['t', 't~'])
will be created at the top level. Subscripting to get the t
mask will yield another MaskGroup
, eg.
>>> masks["t"]
MaskGroup(mask_arrays=['b', 'W+', 'latent'])
where t
is considered a composite of the descendants of b
and W+
, and latent
refers to the particles descending from t
which are not descended from these (usually just the duplicates of t
, and the b
and W+
partons themselves - since they are not included as part of their descendants).
Similarly
>>> masks["t"]["W+"]
MaskGroup(mask_arrays=['u', 'd~', 'latent'])
and the u
, d~
, and b
are MaskArray
s rather than MaskGroup
s, because they are the leaves of the hard process tree.
The function has an option use_pmu: bool = True
, which then takes any descendants with overlapping heritage, and assigns them into exclusive groups, such that they are marked as the descendants of whichever partons they are closest to in the pseudorapidity-azimuth plane. This implementation is a bit lazy, it would be better to start from the final state particles, assign those based on their proximity to the hard partons, and work recursively up to the hadronisation vertex propagating that classification. However, if the emissions after hadronisation don't create emissions at wide angles, this shouldn't be a problem, and for my purposes I only care about the final state after hadronisation. Still, it's worth checking that this is a sensible approach by visualising a few events.
Additionally, some changes to the behaviour of MaskGroups
have been made. They can now be indexed using a list of strings, which enables MaskGroup
s to be created with a subset of the constituents in the original, or to reorder the constituents. The order of constituents is also now strictly preserved.
Three additional changes to MaskGroup
s are required before the next minor release:
-
MaskGroup.__str__()
should return an ASCII tree, showing the full composite structure - applying a boolean mask currently converts nested
MaskGroup
s intoMaskArray
s; this should be changed so the structure is preserved -
MaskGroup.flatten()
should be added to remove the nested structure, bringing all of the masks to the top level
from graphicle.
Want to split the leaf-level filtering into functions which act on the lowest level MaskGroup
objects. One of them can be partition_hard()
, and another could be filter_background()
. This could then either be applied after the hierarchy()
tree is generated, or during when each leaf-level MaskGroup
is complete.
Would also be nice to create an iterator over the leaves of nested MaskGroup
trees.
from graphicle.
Want to split the leaf-level filtering into functions which act on the lowest level
MaskGroup
objects. One of them can bepartition_hard()
, and another could befilter_background()
. This could then either be applied after thehierarchy()
tree is generated, or during when each leaf-levelMaskGroup
is complete.Would also be nice to create an iterator over the leaves of nested
MaskGroup
trees.
Could levy the strategy pattern to pass the hierarchy()
function post-processing functions on the leaves, so both partition_hard()
and filter_background()
could be passed, but also it would allow user extensibility.
from graphicle.
Almost complete, just need to modify the masks so that the hard partons in the latent masks go into their respective children masks, instead. Once that is complete, the PR can be merged, and the new version can be shipped.
from graphicle.
Related Issues (20)
- Hierarchy construction fails for background jets HOT 1
- Create ClusterSequence type HOT 1
- Add monte_carlo_tag function to select module
- pt-weighted centroid for azimuth HOT 1
- Relabel edge fields to src / dst
- Add automated tests for data structure methods
- Handle numerically unstable calculations HOT 1
- Add serialize method to data structures
- Add tabular repr HOT 1
- Fix: hard_descendants with sign_sensitive=False and strict=True doesn't work
- Clustering coefficient
- Migrate PyJet dependency to FastJet
- monte_carlo_tag on momentum with cuts
- Add leaves option to MaskGroup.flatten()
- Add routines for event-shape and jet observables HOT 1
- Deprecations
- Include transverse momentum in monte_carlo_tag()
- Allow for boosts in the event shape observables
- Add inverse operation to MaskGroup.serialize() HOT 1
- Enable Graphicle.final to be computed from edge info if missing from ParticleSet HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphicle.