-
Notifications
You must be signed in to change notification settings - Fork 2
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
small changes necessary for https://github.com/rest-for-physics/geant4lib/pull/41 #10
Conversation
True, but I guess this could be said for any class method. |
z = fG4Event->GetTrack(i)->GetHits()->fZ[j]; | ||
E = fG4Event->GetTrack(i)->GetHits()->fEnergy[j]; | ||
|
||
Bool_t addHit = true; |
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.
Indeed, we change the behaviour, by default addHit = true
unless the number of volume hits is higher than zero
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.
Indeed, we change the behaviour, by default
addHit = true
unless the number of volume hits is higher than zero
I am not sure if this refers to the current code (77c74c1), I think the behaviour right now is the same, right?
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.
No, it is not the same, before we had addHit = true
if fVolumeId.size() == 0
now we just check hits.GetVolumeId(j) == volumeID)
. So, in case fVolumeId.size() == 0
(which I would suggest fVolumeId.empty()
) we assume addHit = false
. Therefore, the logic has been changed.
Bug was indroduced in 4a29a1b
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.
Right, however if fVolumeId.size() == 0
, then we would have no hits inside the event. In normal conditions, the loop will always go inside, setting addHit=false
. Because, if there are hits it means that there was at least one activeVolume
and fVolumeId
should contain at least 1 volume id.
Except that fVolumeId
behaviour would have been changed in restG4
.
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 think 53d73ec restores previous logic, perhaps now pipeline passes 🤞🏻
using new interfaces.
For more info: rest-for-physics/geant4lib#41