Merge lp:~s-h-wilbur/maus/mybranch into lp:maus

Proposed by Scott
Status: Merged
Merged at revision: 729
Proposed branch: lp:~s-h-wilbur/maus/mybranch
Merge into: lp:maus
Diff against target: 25 lines (+3/-2)
1 file modified
src/map/MapCppTOFMCDigitizer/MapCppTOFMCDigitizer.cc (+3/-2)
To merge this branch: bzr merge lp:~s-h-wilbur/maus/mybranch
Reviewer Review Type Date Requested Status
Adam Dobbs Needs Fixing
Review via email: mp+318909@code.launchpad.net

Description of the change

My previous fix to the TOF MC digitizer fixed a 60-500 ps error, but broke Rayner's reconstruction algorithm (on MC) because both PMTs in a slab would get a hit at the same time. This change fixes that issue.

To post a comment you must log in.
Revision history for this message
Adam Dobbs (ajdobbs) wrote :

Thanks, performing the merge, will let you know...

Revision history for this message
Adam Dobbs (ajdobbs) wrote :

OK, I found an integration test failure:

Check that we can run the simulation, make plots ... Kolmo Prob h1 = tof01_ref, sum bin content =177 effective entries =177
 Kolmo Prob h2 = tof01, sum bin content =237 effective entries =237
 Kolmo Prob = 9.44738e-05, Max Dist = 0.221698
FAIL

This arises from: tests/integration/test_simulation/test_tof/test_tof.py

Please revise and resubmit. Thanks, Ad

review: Needs Fixing
lp:~s-h-wilbur/maus/mybranch updated
730. By Scott Wilbur <email address hidden>

updated test_tof reference plot

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/map/MapCppTOFMCDigitizer/MapCppTOFMCDigitizer.cc'
--- src/map/MapCppTOFMCDigitizer/MapCppTOFMCDigitizer.cc 2016-12-15 15:25:48 +0000
+++ src/map/MapCppTOFMCDigitizer/MapCppTOFMCDigitizer.cc 2017-03-29 14:44:02 +0000
@@ -229,6 +229,7 @@
229 // find distances from hit to pmt geom229 // find distances from hit to pmt geom
230 double dist1 = ( hpos - (slabPos + pmt1Pos) ).mag();230 double dist1 = ( hpos - (slabPos + pmt1Pos) ).mag();
231 double dist2 = ( hpos - (slabPos + pmt2Pos) ).mag();231 double dist2 = ( hpos - (slabPos + pmt2Pos) ).mag();
232 double dist_average = (dist1 + dist2)/2;
232233
233 // convert edep to photoelectrons for this slab/pmt234 // convert edep to photoelectrons for this slab/pmt
234 // can't convert to adc yet since we need to add up ph.el's235 // can't convert to adc yet since we need to add up ph.el's
@@ -244,8 +245,8 @@
244 double htime = hit.GetTime() - gentime;245 double htime = hit.GetTime() - gentime;
245246
246 // propagate time to pmt & smear by the resolution247 // propagate time to pmt & smear by the resolution
247 double time1 = CLHEP::RandGauss::shoot((htime + dist1/csp) , tres);248 double time1 = CLHEP::RandGauss::shoot((htime + (dist1-dist_average)/csp) , tres);
248 double time2 = CLHEP::RandGauss::shoot((htime + dist2/csp) , tres);249 double time2 = CLHEP::RandGauss::shoot((htime + (dist2-dist_average)/csp) , tres);
249 double tdc2time = _configJSON["TOFtdcConversionFactor"].asDouble();250 double tdc2time = _configJSON["TOFtdcConversionFactor"].asDouble();
250251
251 // convert to tdc252 // convert to tdc
252253
=== modified file 'tests/integration/test_simulation/test_tof/tof_mc_plots_ref.root'
253Binary files tests/integration/test_simulation/test_tof/tof_mc_plots_ref.root 2016-12-15 15:25:48 +0000 and tests/integration/test_simulation/test_tof/tof_mc_plots_ref.root 2017-03-29 14:44:02 +0000 differ254Binary files tests/integration/test_simulation/test_tof/tof_mc_plots_ref.root 2016-12-15 15:25:48 +0000 and tests/integration/test_simulation/test_tof/tof_mc_plots_ref.root 2017-03-29 14:44:02 +0000 differ

Subscribers

People subscribed via source and target branches

to all changes: