-
Notifications
You must be signed in to change notification settings - Fork 34
Digitization algorithm that reproduces the HGCROC measurement #2169
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
base: main
Are you sure you want to change the base?
Conversation
veprbl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some early comments.
|
|
||
| #include <algorithms/algorithm.h> | ||
| #include <edm4eic/SimPulseCollection.h> | ||
| #include <edm4eic/RawHGCROCHitCollection.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will need to require EDM4eic 8.3.0 to use your code. Basically, see some of older changes removed in https://github.com/eic/EICrecon/pull/2121/files for inspiration.
|
|
||
| namespace eicrecon { | ||
|
|
||
| class PulseDigi_factory : public JOmniFactory<PulseDigi_factory, PulseDigiConfig> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please come up with a more descriptive name than PulseDigi.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This algorithm needs a use somewhere. We don't add dead code. Either make a unit test or include this in the analysis chain.
| ParameterRef<double> m_time_window{this, "time_window", config().time_window}; | ||
| ParameterRef<double> m_adc_phase{this, "adc_phase", config().adc_phase}; | ||
| ParameterRef<double> m_toa_thres{this, "toa_thres", config().toa_thres}; | ||
| ParameterRef<double> m_tot_thres{this, "tot_thres", config().tot_thres}; | ||
| ParameterRef<unsigned int> m_capADC{this, "capADC", config().capADC}; | ||
| ParameterRef<double> m_dyRangeADC{this, "dyRangeADC", config().dyRangeADC}; | ||
| ParameterRef<unsigned int> m_capTOA{this, "capTOA", config().capTOA}; | ||
| ParameterRef<double> m_dyRangeTOA{this, "dyRangeTOA", config().dyRangeTOA}; | ||
| ParameterRef<unsigned int> m_capTOT{this, "capTOT", config().capTOT}; | ||
| ParameterRef<double> m_dyRangeTOT{this, "dyRangeTOT", config().dyRangeTOT}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ParameterRef<double> m_time_window{this, "time_window", config().time_window}; | |
| ParameterRef<double> m_adc_phase{this, "adc_phase", config().adc_phase}; | |
| ParameterRef<double> m_toa_thres{this, "toa_thres", config().toa_thres}; | |
| ParameterRef<double> m_tot_thres{this, "tot_thres", config().tot_thres}; | |
| ParameterRef<unsigned int> m_capADC{this, "capADC", config().capADC}; | |
| ParameterRef<double> m_dyRangeADC{this, "dyRangeADC", config().dyRangeADC}; | |
| ParameterRef<unsigned int> m_capTOA{this, "capTOA", config().capTOA}; | |
| ParameterRef<double> m_dyRangeTOA{this, "dyRangeTOA", config().dyRangeTOA}; | |
| ParameterRef<unsigned int> m_capTOT{this, "capTOT", config().capTOT}; | |
| ParameterRef<double> m_dyRangeTOT{this, "dyRangeTOT", config().dyRangeTOT}; | |
| ParameterRef<double> m_time_window{this, "timeWindow", config().time_window}; | |
| ParameterRef<double> m_adc_phase{this, "adcPhase", config().adc_phase}; | |
| ParameterRef<double> m_toa_thres{this, "toaThres", config().toa_thres}; | |
| ParameterRef<double> m_tot_thres{this, "totThres", config().tot_thres}; | |
| ParameterRef<unsigned int> m_capADC{this, "capADC", config().capADC}; | |
| ParameterRef<double> m_dyRangeADC{this, "dyRangeADC", config().dyRangeADC}; | |
| ParameterRef<unsigned int> m_capTOA{this, "capTOA", config().capTOA}; | |
| ParameterRef<double> m_dyRangeTOA{this, "dyRangeTOA", config().dyRangeTOA}; | |
| ParameterRef<unsigned int> m_capTOT{this, "capTOT", config().capTOT}; | |
| ParameterRef<double> m_dyRangeTOT{this, "dyRangeTOT", config().dyRangeTOT}; |
camelCase for JANA2 parameter names, and underscores for config names. Bonus points for making variable names consistent with what is used elsewhere.
Briefly, what does this PR introduce?
This PR is to reproduce the HGCROC measurement and store the corresponding data types,
RawHGCROCHitandHGCROCSample, from pulse. When HGCROC measures the TOT, it is stored in the same sample where the TOA is measured even though it is measured during a sample that is different from the TOA one. This means we should not finalize/output the sample immediately after scanning a time window in the code. Rather, we need to temporarily store the samples somewhere (like a buffer) until the TOT is measured or all the amplitudes are scanned. For this purpose, a class,HGCROCRawSamplewas used in this algorithm.More details will be presented at the next BIC simulation meeting.
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?
No
Does this PR change default behavior?
No