SimChannel TDC should be signed short, not unsigned short
The TDC stored with simchannel should be stored with a signed value. It's very common for cosmic simulations to have negative time cosmics that come before the start of the readout window. The TDC is computed for these, however it gets wrapped around to an extremely large value (near the maximum of unsigned short).
It is non nonsensical to talk about the TDC value of 64,535 ticks, rather, we should be talking about a TDC of -1000.
I have wasted 2 days tracking down this issue in SBND and I understand this change was proposed years ago. I would like to reopen it now since I think this is a clear bug.
#4 Updated by Paul Russo about 2 years ago
I have contacted:
and explained the changes that need to be made to sbndcode/Utilities/detectorclocks_sbnd.fcl to resolve the issue.
Very briefly the fcl parameter:
needs to be changed to a negative time offset so that the TDC values will always be positive, this is a design requirement of the system.
More than likely this will also require changes to:
which should be a positive number large enough to cancel the G4RefTime that is chosen (assuming the experiment wishes simulated beam data to start at time offset 0).
In addition I note that:
may also need to be changed since the current value is suspect (has nothing to do with the issue though).
The relevant document explaining what the values of these parameters should be is:
For reference the SBND settings are:
$ cat ./sbndcode/Utilities/detectorclocks_sbnd.fcl #include "detectorclocks.fcl" BEGIN_PROLOG sbnd_detectorclocks: @local::standard_detectorclocks sbnd_detectorclocks.TrigModuleName: "triggersim" sbnd_detectorclocks.InheritClockConfig: true sbnd_detectorclocks.G4RefTime: 0 # G4 time [us] where electronics clock counting start sbnd_detectorclocks.TriggerOffsetTPC: 0 # Time [us] for TPC readout start w.r.t. trigger time sbnd_detectorclocks.FramePeriod: 1.25e3 # Frame period [us] sbnd_detectorclocks.ClockSpeedTPC: 2. # TPC clock speed in MHz sbnd_detectorclocks.ClockSpeedOptical: 64. # Optical clock speed in MHz sbnd_detectorclocks.ClockSpeedTrigger: 16. # Trigger clock speed in MHz sbnd_detectorclocks.DefaultTrigTime: 0. # Default trigger time [us]. sbnd_detectorclocks.DefaultBeamTime: 0. # Default beam time [us]. END_PROLOG
and the MicroBooNE settings are:
$ cat ./uboonecode/uboone/Utilities/detectorclocks_microboone.fcl #include "detectorclocks.fcl" BEGIN_PROLOG microboone_detectorclocks: @local::standard_detectorclocks microboone_detectorclocks.TrigModuleName: "triggersim" microboone_detectorclocks.InheritClockConfig: true microboone_detectorclocks.G4RefTime: -4.05e3 # G4 time [us] where electronics clock counting start microboone_detectorclocks.TriggerOffsetTPC: -1.6e3 # Time [us] for TPC readout start w.r.t. trigger time microboone_detectorclocks.FramePeriod: 1.6e3 # Frame period [us] microboone_detectorclocks.ClockSpeedTPC: 2. # TPC clock speed in MHz microboone_detectorclocks.ClockSpeedOptical: 64. # Optical clock speed in MHz microboone_detectorclocks.ClockSpeedTrigger: 16. # Trigger clock speed in MHz microboone_detectorclocks.DefaultTrigTime: 4050. # Default trigger time [us]. microboone_detectorclocks.DefaultBeamTime: 4050. # Default beam time [us]. microboone_detectorclocks_1window: @local::microboone_detectorclocks microboone_detectorclocks_1window.G4RefTime: 0 microboone_detectorclocks_1window.TriggerOffset: 0 microboone_detectorclocks_1window.DefaultTrigTime: 0 microboone_detectorclocks_1window.DefaultBeamTime: 0 END_PROLOG
#5 Updated by Katherine Lato over 1 year ago
The original complaint was about getting negative time was due to an incorrect parameter (of zero). The technical leads have been notified that they need to set it a negative number (large enough to cover all times for Monte Carlo.)
This item is being marked resolved.