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
1=== modified file 'src/map/MapCppTOFMCDigitizer/MapCppTOFMCDigitizer.cc'
2--- src/map/MapCppTOFMCDigitizer/MapCppTOFMCDigitizer.cc 2016-12-15 15:25:48 +0000
3+++ src/map/MapCppTOFMCDigitizer/MapCppTOFMCDigitizer.cc 2017-03-29 14:44:02 +0000
4@@ -229,6 +229,7 @@
5 // find distances from hit to pmt geom
6 double dist1 = ( hpos - (slabPos + pmt1Pos) ).mag();
7 double dist2 = ( hpos - (slabPos + pmt2Pos) ).mag();
8+ double dist_average = (dist1 + dist2)/2;
9
10 // convert edep to photoelectrons for this slab/pmt
11 // can't convert to adc yet since we need to add up ph.el's
12@@ -244,8 +245,8 @@
13 double htime = hit.GetTime() - gentime;
14
15 // propagate time to pmt & smear by the resolution
16- double time1 = CLHEP::RandGauss::shoot((htime + dist1/csp) , tres);
17- double time2 = CLHEP::RandGauss::shoot((htime + dist2/csp) , tres);
18+ double time1 = CLHEP::RandGauss::shoot((htime + (dist1-dist_average)/csp) , tres);
19+ double time2 = CLHEP::RandGauss::shoot((htime + (dist2-dist_average)/csp) , tres);
20 double tdc2time = _configJSON["TOFtdcConversionFactor"].asDouble();
21
22 // convert to tdc
23
24=== modified file 'tests/integration/test_simulation/test_tof/tof_mc_plots_ref.root'
25Binary 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: