Conversation
…ence finder, changed CRV digitization end, removed temporary implementation for CRV in ArtFragment reader, added double-sided readouts for CRV Wideband simulation
|
Hi @ehrlich-uva,
which require these tests: build. @Mu2e/fnalbuild-users, @Mu2e/write have access to CI actions on main. The following users requested to be notified about changes to these packages: ⌛ The following tests have been triggered for f8375da: build (Build queue is empty) |
|
☀️ The build tests passed at f8375da.
N.B. These results were obtained from a build of this Pull Request at f8375da after being merged into the base branch at fa344e3. For more information, please check the job page here. |
|
How will this PR interact with existing simulated datasets, both onspill and extracted position? |
|
|
Thanks Ralf.
As I understand it we can still get correct results using the existing datasets. The next time we remake the reco datasets the output will change but it will be an improvement.
Ok. So again we can sill use the existing datasets with the understanding that this detail is wrong. The next time we remake digis, the simultated events will improve. Do I understand both correctly? Is there anyone who can meaningfully review the intellectual content of the PR. I will look through it for technical compliance. |
Yes.
I think @oksuzian would be best to review the change. |
brownd1978
left a comment
There was a problem hiding this comment.
Thanks for addressing the large combinatoric problem. I have some questions about the timing change, and request that all the timings be consolidated.
| //note: if measured deviations are used, the cutoffs should be set to the maximum values | ||
| digitizationStart : 400.0 //400ns | ||
| digitizationEnd : 1750.0 //1750ns | ||
| digitizationEnd : 1695.0 //1695ns |
There was a problem hiding this comment.
Is this a hardware number? or is it configurable in the CRV DAQ?
Because of the mismatch in timing between booster and extraction frequencies some events will have length 1705. Does this mean the CRV will be blind to those last 10ns?
There was a problem hiding this comment.
Following up on Dave's comment. Even with the existing simulations, approximately every 5th event is 25 ns shorter than the other 4. There is a data product that gives the duration of the current event. Does your digitization code use this?
There was a problem hiding this comment.
I need to find out more details about how the timing will be handled in the CRV's FEB firmware. Currently, I use the event window length (from EventWindowMarker::eventLength()) only for Offspill. I will change the code for Onspill depending on what answer I get about the firmware.
There was a problem hiding this comment.
What is the range of event lengths we can expect for Onspill? Do you have a doc-db number where it is explained?
There was a problem hiding this comment.
Look at page 8 of Mu2e-doc-19095 .
The bottom line is that onspill events will either by 67 or 68 ticks of the 25 ns DAQ clock, so either 1675 or 1700 ns.
It's Ok to digitize beyond 1700 ns so long as there all code properly understands start times relative to the beam arrival. Averaged over a long time there will be approximately 4 events of 1700 ns for every one event of 1675 ns, averaging to 1695 ns. But true period of the delivery ring is not exactly 1695 ns - I forget if it's a little longer or a little shorter. So the pattern will be approximately a repeating pattern of 4+1 but with some 3+1 or 5+1 mixed in.
This implies that the proton arrival time at the production target moves around within the stable 25 ns clock.
In the present simulation scheme we have:
https://github.com/Mu2e/Offline/blob/main/DataProducts/inc/EventWindowMarker.hh
- This has spill type (on or off spill) and event duration, either 1675 or 1701
https://github.com/Mu2e/Offline/blob/main/MCDataProducts/inc/ProtonBunchTimeMC.hh
- MC truth about the proton arrival time at the production target relative to the DAQ t0
https://github.com/Mu2e/Offline/blob/main/RecoDataProducts/inc/ProtonBunchTime.hh
- Reco value of the proton arrival time at the production target
Richie is the expert on what's in the code now. See his talk at Mu2e-doc-39805.
Richie's model captures the end result well but it will need an evolution to capture what we will really get from the DAQ.
My draft PR #1252 is the first step toward moving us closer to what the actual data will look like. I will send an email to the people on this PR that points to a note in progress that discusses more. I don't want to post the link in the clear.
For now, your code should match Richie's model.
Let me know if you have any questions.
There was a problem hiding this comment.
@bonventre - FYI I mentioned you as the expert in the current model of event timing in a reply to Ralf on this PR.
There was a problem hiding this comment.
@bonventre - FYI I mentioned you as the expert in the current model of event timing in a reply to Ralf on this PR.
There was a problem hiding this comment.
The model as I've implemented is that in OnSpill the digitization window has a fixed width that must be less than 1675 ns (minimum event length), but is delayed by a fixed time after the arrival of the event window start marker from the DAQ so it can extend past 1695 ns. The CRV firmware hopefully is implementing something similar. I also only use the eventLength in OffSpill to determine the digitization end time
There was a problem hiding this comment.
The CRV code has been changed to the following: The on-spill digitization starts at 400ns after the event window start, where the event window starts at the first clock tick after protons (between 0ns and 25ns after protons). The on-spill digitization ends at the end of the event window, where the event window length is either 1675ns or 1700ns.
| crvSiPMChargesModuleLabel : "CrvSiPMCharges" | ||
| digitizationStart : 400.0 //400ns | ||
| digitizationEnd : 1750.0 //1750ns | ||
| digitizationEnd : 1695.0 //1695ns |
There was a problem hiding this comment.
Please consolidate all these numbers to a single fcl block in prolog to avoid replication.
There was a problem hiding this comment.
I like you have units in the comments. Please don't repeat the numerical values in the comments.
| //note: if measured deviations are used, the cutoffs should be set to the maximum values | ||
| digitizationStart : 400.0 //400ns | ||
| digitizationEnd : 1750.0 //1750ns | ||
| digitizationEnd : 1695.0 //1695ns |
There was a problem hiding this comment.
Following up on Dave's comment. Even with the existing simulations, approximately every 5th event is 25 ns shorter than the other 4. There is a data product that gives the duration of the current event. Does your digitization code use this?
| crvSiPMChargesModuleLabel : "CrvSiPMCharges" | ||
| digitizationStart : 400.0 //400ns | ||
| digitizationEnd : 1750.0 //1750ns | ||
| digitizationEnd : 1695.0 //1695ns |
There was a problem hiding this comment.
I like you have units in the comments. Please don't repeat the numerical values in the comments.
|
@rlcee I added you as a review to discuss with Ralf about one file: Is this OK as a file or should it be in the Conditions DB? |
We already have the CRVConditions/data/wideband4modules.txt and CRVConditions/data/wideband1module.txt as txt files and we may get more of them. They are special setups used by only three people. In a discussion we had a while ago, we decided that it was Ok to have them as txt files. |
The critical point is that no data or sim production should use these files. I'd prefer not to commit them at all, but as Ralf says, we agreed to allow them for personal use. |
|
📝 The HEAD of |
|
I made the changes to address the recommendations/requests. |
|
@kutschke I made the requested changes. |
kutschke
left a comment
There was a problem hiding this comment.
Approving from my phone on a plane!
|
@FNALbuild run build test |
|
The final CI did not run because Dave merged 1 minute before I ran it. |
lowered the threshold for the "big cluster" option in the CRV coincidence finder to speed up the process for events that have larger numbers of hits, changed CRV digitization/timing to agree with the new FEB firmware, removed temporary implementation for CRV in ArtFragment reader