-
Notifications
You must be signed in to change notification settings - Fork 40
Beam timing integration and optical calibration nutples update #751
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
Changes from all commits
3c0a6d6
47cedd5
fd04971
ba196e3
482e407
801d523
725b0e4
dd75911
8363015
6052cd1
5bc735a
e4f874e
bf36de6
c54d871
5d32430
fdfb1fa
834b07a
ab063f0
529cb66
156c925
1f7dba8
1386b6a
51526b0
9991354
d257a3c
0f471bc
b40bb52
fef1ed5
0462c1a
8193092
141f654
ec95395
b750cd6
f86ac9c
b91cdc3
c4e5070
e95fe59
1973812
efb8796
c66a1ca
b7aba88
fb881ae
ae099a3
6d1ce5c
b46c5ae
016b1d0
17312c2
378a77d
af99a3c
b387b30
806e3a9
50c80ee
ab70fc7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
mvicenzi marked this conversation as resolved.
Show resolved
Hide resolved
PetrilloAtWork marked this conversation as resolved.
Show resolved
Hide resolved
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For sake of complication: have you considered an "error" data field? Data fields can be added at the end of a class with almost no side effect, so it's not a now-or-never thing.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Generally it would be a good idea, but currently I don't see how we would use this information downstream. This is something to keep in mind when we will revisit the time extraction from the rising edge of the signal (which is currently using a very naive algorithm). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| /** | ||
| * @file icaruscode/IcarusObj/PMTBeamSignal.h | ||
| * @brief Holds the event-by-event RWM or EW times | ||
| * @author Matteo Vicenzi (mvicenzi@bnl.gov) | ||
| * @date March 14 2024 | ||
| */ | ||
|
|
||
| #ifndef ICARUSCODE_ICARUSOBJ_PMTBEAMSIGNAL_H | ||
| #define ICARUSCODE_ICARUSOBJ_PMTBEAMSIGNAL_H | ||
|
|
||
| // C/C++ standard libraries | ||
| #include <limits> | ||
mvicenzi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| #include <string> | ||
| #include <cstddef> | ||
|
|
||
| namespace icarus::timing | ||
| { | ||
|
|
||
| /// Special value to denote no special channel information. | ||
| static constexpr auto NoChannel = std::numeric_limits<unsigned int>::max(); | ||
| /// Special value to denote no time channel information. | ||
| static constexpr double NoTime = std::numeric_limits<double>::max(); | ||
| // Special value to denote no sample information. | ||
| static constexpr std::size_t NoSample = 0; | ||
|
|
||
| /** | ||
| * @brief Beam time as seen by a PMT readout board. | ||
| * | ||
| * This could either be an early warning (EW) or a resistive wall monitor (RWM) time. | ||
| * These signals are delivered via fibers and digitized in special PMT channels. | ||
| * | ||
| * Both the time in @ref DetectorClocksElectronicsTime "electronics time scale" | ||
| * and time time relative to the hardware trigger are included. | ||
| * | ||
| * The information in this object may be missing: its validity should | ||
| * always be checked in advance with `isValid()`. | ||
| */ | ||
|
|
||
| struct PMTBeamSignal | ||
| { | ||
|
|
||
| /// Special channel this time was extracted from. | ||
| /// These are defined in `CAEN_V1730_setup_icarus.fcl`. | ||
| unsigned int specialChannel = NoChannel; | ||
|
|
||
| /// Board on which the special channel is on (e.g: WW-TOP-A). | ||
| /// Should match the same format as `icarusDB::PMTChannelInfo_t::digitizerLabel`. | ||
| std::string digitizerLabel = ""; | ||
|
|
||
| /// Crate this time applies to (e.g.: WW-TOP). | ||
| /// Corresponds to the first part of `digitizerLabel`. | ||
| std::string crate = ""; | ||
|
|
||
| /// Sample within the waveform where the reference signal is found. | ||
| std::size_t sample = NoSample; | ||
|
|
||
| /// Start time in electronics time [us]. | ||
| double startTimeAbs = NoTime; | ||
|
|
||
| /// Start time relative to trigger time [us]. | ||
| double startTime = NoTime; | ||
|
|
||
| /// Returns whether the time is valid. | ||
| bool isValid() const { return (sample != NoSample); } | ||
| }; | ||
|
|
||
| } // namespace icarus::timing | ||
|
|
||
| #endif // ICARUSCODE_ICARUSOBJ_PMTBEAMSIGNAL_H | ||
Uh oh!
There was an error while loading. Please reload this page.