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

Pion branch stores hits with x,y,z outside detector volume #22

Closed
wdconinc opened this issue Mar 9, 2017 · 6 comments
Closed

Pion branch stores hits with x,y,z outside detector volume #22

wdconinc opened this issue Mar 9, 2017 · 6 comments
Assignees

Comments

@wdconinc
Copy link
Member

wdconinc commented Mar 9, 2017

The pion branch stores detectors in the cylindrical disks that act as PMTs. These are only 1 mm thick. However, when running the simulation, hits are created in this detector with a variety of hit.x,y,z values outside the disk. Could this be because we get the x,y,z from the G4Step prestep point? Should we use the poststep point?

Image below should only have hits in the disk shaped region on the right. Hits distributed in the middle and to the left are far outside of the PMT volume.

photons_45_degree_photo_cathode

@wdconinc
Copy link
Member Author

@seamusriordan @yxzhao88 This is something that should be mentioned in the simulation meeting as it has the potential to affect other analyses. We discussed it briefly this morning in the pion detector meeting and it was suggested we should alert others of the issue. I'm not sure yet whether using poststep point is the correct solution (though it is what basic example B2a uses, the first one to introduce hits):

newHit->SetPos (aStep->GetPostStepPoint()->GetPosition());

wdconinc added a commit that referenced this issue Mar 10, 2017
@wdconinc
Copy link
Member Author

After changing to poststep point, I'm getting much better results.

poststetp_point

@seamusriordan
Copy link

seamusriordan commented Mar 11, 2017

Yes, that looks very nice. The use of of prestep was a bad habit of mine. Also I'll note yxzhao88 has moved on to a job at INFN

@wdconinc
Copy link
Member Author

Can't reproduce this issue. Probably independent of prestep/poststep, and may have been caused by some transients in my code. Closing for now, but feel free to reopen if anything like this shows up for someone...

Verified that master branch has no issues like this for hit.det==28. Prestep point results in getting the entry point to the detector. Poststep point gets the exit point from the detector. There will always be a step point on fGeomBoundary. The important thing is to get the position from the prestep/poststep point that the fGeomBoundary test is done on. That's done correctly in remoll.

@wdconinc
Copy link
Member Author

The attached image is pion branch 765d86c with pion generator, type pi-, selecting hits in det 4000 == pion PMT. These are clearly not just hits in the PMT. Reopening...

image

@wdconinc wdconinc reopened this Mar 21, 2017
@wdconinc
Copy link
Member Author

wdconinc commented Aug 2, 2018

Duplicate of closed #127

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

No branches or pull requests

2 participants