DUNE / dune-tms

DUNE ND Temporary Muon Spectrometer
0 stars 1 forks source link

correct some mistakes in code make_hists.py #41

Closed xiaoyan1997 closed 9 months ago

LiamOS commented 10 months ago

Just saw this now, have added Jeffrey to review this as it's his script.

Just as a note for any future pull requests/merges/etc., if can assign them to me (or someone else) we'll get a notification about it.

AsaNehm commented 10 months ago

I'm currently copying and adapting this script. While doing this I noticed a couple of things. track_start_z = event.FirstHoughHit[2*longtrack+0] track_end_z = event.FirstHoughHit[2*longtrack+0] track_start_x = event.FirstHoughHit[2*longtrack+1] track_end_x = event.FirstHoughHit[2*longtrack+1] (lines 219-222 and lines 240-243) -> Here it seems like the ends should be defined with event.LastHoughHit instead of the FirstHoughHit as well. This would explain why some of the plots look the exact same (start and end point of tracks)

in line 316: dz_start = event.FirstHoughHit[2*track+0] - mz -> the 'track' variable here refers to the last incrementation of a for loop in line 186. I'm not sure if that really makes sense

jdkio commented 9 months ago

You're right, track_end_x/z are both wrong.

I'm currently copying and adapting this script. While doing this I noticed a couple of things. track_start_z = event.FirstHoughHit[2*longtrack+0] track_end_z = event.FirstHoughHit[2*longtrack+0] track_start_x = event.FirstHoughHit[2*longtrack+1] track_end_x = event.FirstHoughHit[2*longtrack+1] (lines 219-222 and lines 240-243) -> Here it seems like the ends should be defined with event.LastHoughHit instead of the FirstHoughHit as well. This would explain why some of the plots look the exact same (start and end point of tracks)

in line 316: dz_start = event.FirstHoughHit[2*track+0] - mz -> the 'track' variable here refers to the last incrementation of a for loop in line 186. I'm not sure if that really makes sense

Yes, you're right about all those. I've added those changes to this PR and also fixed some of the histogram titles. Thanks