-
Notifications
You must be signed in to change notification settings - Fork 3
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
Update metadata volume information print #100
Update metadata volume information print #100
Conversation
@jgalan please let me know if this solves the issue, if using the now-displayed volume ids to compute the quantities returns the correct values, and feel free to merge this PR |
for more information, see https://pre-commit.ci
Yes, it works for me, now when I call @girardcarillo does this solve also your issue? I.e. when you use the ids that print out on your metadata you get the right values? @lobis A topic aside is the fact that when testing the This is the generator:
|
No, the cosmic generator does not necessarily generate the primaries from the top, they could be generated for example from the side of the world if the sampled zenithal angle was close to 90º. It would be equivalent to having an infinite plane above the detector (but very far away) so in some cases it looks like it's being produced from the side. With this generator is not possible to garantee that both detectors will be hit (as it would be impossible with regular muons) but I imagine in a good % of events this is the case. |
Ok, then I will check the percentage of events crossing both and place as a validation pipeline at this PR. |
<< ", maxStep: " << GetMaxStepSize(GetActiveVolumeName(n)) << "mm " | ||
<< ", chance: " << GetStorageChance(GetActiveVolumeName(n)) << RESTendl; | ||
const auto name = GetActiveVolumeName(n); | ||
RESTMetadata << "Name: " << name << ", ID: " << fGeant4GeometryInfo.GetIDFromVolume(name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would not be better to re-implement the method GetActiveVolumeID
?
We could just:
Int_t GetActiveVolumeID( name ) { return fGeant4GeometryInfo.GetIDFromVolume(name); }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it won't cause problems elsewhere but it could be done. But in that case why not just implement TRestGeant4Metadata::GetVolumeID(const std::string& name)
? The idea of the TRestGeant4GeometryInfo
is to not overload TRestGeant4Metadata
with members and methods related to geometry (same things for TRestGeant4PhysicsInfo
, but I guess some of them could be duplicated, if it's deemed useful.
No it doesn't seem to have changed my problem |
Hi @girardcarillo , please make sure you are on the latest If you do
Then, when you open your file using
identify some volume names appearing in your event, that got some energy deposits, and do:
where |
If you compiled the right version, then the
|
I just noticed this small PR was left hanging, should we merge it @jgalan ? |
Be more clear on the print and show the volume id for the active volume (instead of the active volume id which is just their user-specified order)