-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Realistic BTOF digitization #1635
base: main
Are you sure you want to change the base?
Conversation
Update BTOFHitDigi.cc
Update BTOFHitDigi.h
Update BTOFHitDigi.cc
… distance relative to the center of the center cell. Now it's changed so spread is calculated relative to the true hit location.
…ighbors when cell ID from BitFieldDecoder for cellID is negative.
…ith dead spaces implemented.
…ion-clusterization
The issues with the functionality of the code have not been addressed yet. It might not be a problem for the majority of datasets being processed at the moment but will be a significant bug and may cause unnecessary confusion down the line for any processing of events distributed throughout time. |
I believe the main conflicts lies in the meaning of You proposed that I understand that collision time will not be zero both due to synchronization issue between the global 100 MHz clock and the local EICROC 40 MHz clock and finite size of bunches, if that's what you want me to implement, I can do it by shifting the Another point you raise that I cannot agree is that we cannot discard hit that arrives at t > 25 ns. To the best of my knowledge, that's really how LGAD works in reality where signal that arrives outside beyond the 40 MHz cycle is simply discarded. As a matter of fact, the pulse timing are defined by the 40 MHz clock. It's why I don't believe You also mentioned that I need to deal with start time alignment. That's only an issue if To be fair, none of the people that I talked to at BNL can firmly confirm or correct my understanding. Since the electronics are still in the design phase, anything can change. What I've said (and programmed in this pull request) is my best guess at what should happen. I program my PulseGenerator this way because I believe it reflects how the detector works in reality. I believe we disagree on how EICROC work, and not mistakes on programming. If we can't reach an agreement on how time works, then unfortunately there is no way I can continue the development of this digitization code. Will you be interested in a Skype/Zoom meeting sometime next week so we can resolve our misunderstanding? |
Hi @ssedd1123 and @simonge, I suggest we discuss this digitization issue in the simulation WG meeting on Dec. 17 (Tuesday) at 10 am EST. Would the time work for you? https://indico.bnl.gov/event/23277/ |
That works for me. I will prepare a presentation. |
I'm happy to discuss at the meeting too, hopefully discussing in person and providing some time diagrams will clear things up. I realise you suggested this earlier too. |
Thanks! The dedicated discussion has been scheduled on Dec. 17 (Tuesday) at 10 am EST: https://indico.bnl.gov/event/23277/ |
My takeaway from the meeting is that there were the following concerns raised:
@ssedd1123 @simonge @johnlajoie @wdconinc Please comment to correct if I'm missing anything. We also need to identify what is a minimal viable product to ship this PR and what can go into further iterations. |
My understanding is the same as yours. One more potentially problematic issue is that the PulseGeneration class now only passes a digitized version of the puluse. It would be ideal if I can pass the original pulse and let PulseDigitization class handle the digitization. I can pass Landau parameters, but then we are restricted to using Landau pulse only. In my opinion, the optimum way is to pass the pulse as TF1 or just a functor. The voltage will be calculated from the TF1/functor in PulseDigitization when needed. However, that would require me to pass a generic TObject. @veprbl @wdconinc Do you know if it can be done? If not, passing a digitized pulse is not the end of the world either. We can interpolate between time bins as long as the bins are not too wide. For now, I am just going to save an extra bit of information stating which 40 MHz cycle each pulse belongs to. I will keep the pulse from TOFPulseGenerator digitized the way it is. That is the simplest and cleanest way to extend the pulse classes to record all events in the same signal frame. Once I figure out a way to pass TF1 between analysis classes, I will try to revise these pulse classes further. |
We got a bit carried away into the details of the multiple clocks, synchronization, bunch crossing shapes and even the information provided by the TOF detector for the physics and vertex reconstruction. Fundamentally all I want to see from a minimum viable product is something which addresses your point 1. Ideally the pulse generation wouldn't care which 40MHz clock cycle it occurred in and that everything to do with clocks gets handled by the digitization. I'm not sure your point 2 was discussed or maybe I missed the subtlety of the point until now. Ideally this would always be handled in the MC event sample but having an option to remove potential biases from standard samples would be useful too. If a pulse isn't restricted to the 25ns window and the time is just digitized to 20ps I don't think there should be any bias based on the strobe anyway. If the 140/120ps counters are introduced in the digitization code the precision of the measurement varies over the 25ns period and maybe the deadtime too.
I think as long as the binning of the digitized pulse is equal to or smaller than the precision of the signal, passing a digitized pulse is fine, the ASIC will be sampling the signal anyway. If the pulse shape itself moves away from a purely analytical function at some point to replicate some of the random processes/noise in the detector/sensor, having a workflow with digitized pulses makes more sense to me. |
I was thinking about the same topic. A significant portion of the discussion is about how the signals are sampled, and I get why you would want to pass an analytical signal shape into your digitization routine. However, while the framework technically allows to pass arbitrary C++ types between factories, we chose to only pass immutable PODIO structures. The types for those have to be defined in advance and we require a careful consideration and discussion for each item that we add to our data model https://github.com/eic/EDM4eic/blob/main/edm4eic.yaml. So it would be possible to make a type for a function (e.g. represented as a string + vector of floating point parameters). However, I doubt about universality of such approach, e.g. signals may come as a result of MC simulations and not have a nice analytical expression. Would it make sense to just reuse the waveform type and pass some extra oversampled values instead? |
…com/eic/EICrecon into pr/BTOF-digitization-clusterization
I believe my pull request is now ready. Here's an overview of the changes I made:
I believe these modifications are viable, but there are some edge cases that I should let you know. If a pulse is generated near the edges of bin cycles, and the voltage exceeds the threshold to trigger a TDC in the first EICROC cycle but peaks in the second EICROC cycle, the code will return the correct TDC value but an incorrect ADC value because the peak is being cut off. This leads to information loss. However, I don't see this as an issue because it mirrors a real-world problem that the hardware designers need to deal with. Since the electronics are still in the design phase, there is no definitive answer on how they will behave in this scenario. I propose leaving this issue open and revisiting it once we now how the electronics will behave in the real world. Another known issue is the absence of dead time in the current implementation. Some of my colleagues are trying to find out how much dead time there will be for each cell, but, as mentioned above, the specifics are uncertain and subject to change. Dead time can be added to the implementation later once the behavior of the electronics is better understood. |
Briefly, what does this PR introduce?
It's an attempt to make LGAD sensor response for Barrel TOF more realistic by doing the following,
Noise, edge correction and time talk correction will be developed in the future.
What kind of change does this PR introduce?
Please check if this PR fulfills the following:
Does this PR introduce breaking changes? What changes might users need to make to their code?
Does this PR change default behavior?
It replaces the content of "TOFBarrelRecHit" with results of this new clusterization. It was originally just geant point + random smearing. I have communicated to the reconstruction group and they advise that I submit this pull request so they can study the effect of having this new digitization/clusterization algorithm. They will decide if I should save the data in a new branch or replace the origin content.