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

Updating hit positions scaling in Eve scene #454

Merged
merged 8 commits into from
Jun 23, 2023
Merged

Conversation

jgalan
Copy link
Member

@jgalan jgalan commented Jun 21, 2023

jgalan Ok: 33

Now the GEOM_SCALE define has been replaced by a data member at TRestEventViewer::fGeomScale. In this way we can update the value of scaling dynamically. The default value is now back to fGeomScale=0.1. Recently it was updated in #440. However this has generated problems.

Using the present PR and rest-for-physics/geant4lib#108, and the example 01.NLDBD I see the event properly placed now with

REST_Geant4_ViewEvent( "file.root");
Screenshot 2023-06-21 at 11 19 31

while it is placed outside if I redefine geomScale to 1.0.

REST_Geant4_ViewEvent( "file.root", 1.0);
Screenshot 2023-06-21 at 11 18 54

This is only affecting visualisation

It would be interesting to find out when this is happening, so I added a warning message to encourage users feedback.

Screenshot 2023-06-21 at 11 32 46

@jgalan jgalan marked this pull request as ready for review June 21, 2023 10:22
@@ -68,8 +68,8 @@ class TRestBrowser {

TRestEventViewer* fEventViewer = nullptr; //!

void SetViewer(TRestEventViewer* eV, const Double_t& geomScale = 0.1);
void SetViewer(const TString& viewerName, const Double_t& geomScale = 0.1);
void SetViewer(TRestEventViewer* eV, Double_t geomScale = 0.1);
Copy link
Member Author

Choose a reason for hiding this comment

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

So finally it is better without const and reference?

@jgalan jgalan merged commit e9db0dc into master Jun 23, 2023
63 checks passed
@jgalan jgalan deleted the jgalan_geom_scale branch June 23, 2023 07:55
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.

None yet

3 participants