Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scalable Jets and fix depthTest #107

Merged
merged 2 commits into from Jul 3, 2020
Merged

Conversation

9inpachi
Copy link
Collaborator

@9inpachi 9inpachi commented Jul 2, 2020

Closes #103

Hi,

Description

This makes the Jets scalable and also allows to extend UI menu options for each object type which can be used with any loader (by using the PhoenixLoader.addObjectType method from a child class).

I have been trying out options to scale Jets since yesterday but removing and recreating the Jets with increased energy wasn't working for large number of Jets. So after a lot of tries I came up with a minimal method which I think is the best.

Added

  • Fixed depthTest not working correctly
  • Removed custom synchronous function to loop through children for changing depthTest (I am not sure why but Object3D.traverse seems to work now - while depthTest only worked with updateChildrenDepthTest function earlier)
  • Made Jets scalable by increasing their scale and changing their position
  • Ability to scale Jets from 1% to 200%
  • Increased maximum Jet length to 3000 as it looks like a better option
  • Mechanism to add exclusive options to each event data type folder of dat.GUI through an optional callback passed to PhoenixLoader.addObjectType

Screen Capture

wip-scalable-jets

@@ -97,8 +97,8 @@ export class PhoenixObjects {
// Jet energy parameter can either be 'energy' or 'et'
let length = (jetParams.energy ? jetParams.energy : jetParams.et) * 0.2;
// Ugh - We don't want the Jets to go out of the event display
if (length > 2000) {
length = 2000;
if (length > 3000) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for now, but I think this is something we should make configurable (the appropriate maximum length will depend a lot on the experiment)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. May be we can apply some sort of normalization.

It's also possible to check this directly in the loaders and change the energies from there.

@EdwardMoyse EdwardMoyse merged commit 8121de3 into HSF:master Jul 3, 2020
@9inpachi 9inpachi deleted the wip-scalable-jets branch July 3, 2020 10:32
9inpachi pushed a commit that referenced this pull request Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make it possible to scale jets / energies in general
2 participants