![]() |
Belle II Software development
|
Storage element for information from the Trigger Timing Distribution (TTD) and EventT0-related information. More...
#include <EventLevelTriggerTimeInfo.h>
Public Types | |
enum | EventT0Source : unsigned int { c_fromSVD = (1 << 0) , c_fromCDC = (1 << 1) , c_fromECL = (1 << 2) } |
Flags for the EventT0 source. More... | |
Public Member Functions | |
EventLevelTriggerTimeInfo (bool isValid=false, bool isHER=false, bool revo2=false, unsigned int timeSinceLastInjection=c_flagNoInjection, unsigned int timeSincePrevTrigger=0, unsigned int bunchNumber=0) | |
Constructor. | |
~EventLevelTriggerTimeInfo () | |
Destructor. | |
bool | isValid () const |
get if stored information is valid | |
bool | isHER () const |
get if last injection was in HER/LER | |
bool | isRevo2 () const |
get lowest bit of revolution counter | |
unsigned int | getTimeSinceLastInjection () const |
get time since the last injection (i.e. the injection-pre-kick signal) in clock ticks (FTSW clock) | |
unsigned int | getTimeSincePrevTrigger () const |
get time since the previous trigger in clock ticks (FTSW clock) | |
unsigned int | getBunchNumber () const |
get number of triggered bunch as provided by TTD | |
bool | hasInjection () const |
get if an injection happened recently (and the corresponding stored data is actually valid) | |
void | setValid () |
set that stored information is valid | |
void | setInvalid () |
set that stored information is valid | |
void | setIsHER (bool isHER) |
set if injection in HER/LER | |
void | setRevo2 (bool revo2) |
set lowest bit of revolution counter | |
void | setTimeSinceLastInjection (unsigned int timeSinceLastInjection) |
set time since the last injection (i.e. the injection-pre-kick signal) in clock ticks (FTSW clock) | |
void | setTimeSincePrevTrigger (unsigned int timeSincePrevTrigger) |
set time since the previous trigger in clock ticks (FTSW clock) | |
void | setBunchNumber (unsigned int bunchNumber) |
set number of triggered bunch | |
void | setNoInjection () |
set that no injection happened recently (and the corresponding stored data is actually invalid) | |
double | getTimeSinceLastInjectionInMicroSeconds () const |
get time since the last injection (i.e. the injection-pre-kick signal) in microseconds | |
double | getTimeSincePrevTriggerInMicroSeconds () const |
get time since the previous trigger in microseconds | |
int | getTimeSinceInjectedBunch () const |
get time since the injected bunch passed the detector in clock ticks (FTSW clock) | |
double | getTimeSinceInjectedBunchInMicroSeconds () const |
get time since the injected bunch passed the detector in microseconds | |
int | getTriggeredBunchNumberGlobal () const |
get the actual (=global) number of the triggered bunch | |
void | addEventT0SourceFromSVD () |
Add the flag c_fromSVD to the EventT0 source mask. | |
void | unsetEventT0SourceFromSVD () |
Remove the flag c_fromSVD from the EventT0 source mask. | |
bool | hasEventT0SourceFromSVD () const |
Return if the c_fromSVD flag is set in the EventT0 source mask. | |
void | addEventT0SourceFromCDC () |
Add the flag c_fromCDC to the EventT0 source mask. | |
void | unsetEventT0SourceFromCDC () |
Remove the flag c_fromCDC from the EventT0 source mask. | |
bool | hasEventT0SourceFromCDC () const |
Return if the c_fromCDC flag is set in the EventT0 source mask. | |
void | addEventT0SourceFromECL () |
Add the flag c_fromECL to the EventT0 source mask. | |
void | unsetEventT0SourceFromECL () |
Remove the flag c_fromECL from the EventT0 source mask. | |
bool | hasEventT0SourceFromECL () const |
Return if the c_fromECL flag is set in the EventT0 source mask. | |
void | addEventT0Sources (EventT0Source sources) |
Add a specific flag (or combination of flags) to the EventT0 source mask. | |
void | unsetEventT0Sources (EventT0Source sources) |
Unset a specific flag (or combination of flags) from the EventT0 source mask. | |
bool | hasEventT0Sources (EventT0Source sources) const |
Return if the specific flag is set in the EventT0 source mask. | |
void | resetEventT0Sources () |
Reset all the flags from the EventT0 source mask (aka: set the "total" mask to 0) | |
bool | hasAnyEventT0Sources () const |
Return if at least one flag is set in the EventT0 source mask. | |
const EventT0Source & | getEventT0Sources () const |
Return the EventT0 source mask. | |
Private Member Functions | |
template<EventT0Source source> | |
void | setSources (bool setTo) |
Generic setter for the EventT0Source flags. | |
Private Attributes | |
bool | m_isValid |
Data stored in this TTD info object is actually valid. | |
bool | m_isHER |
Injection is in HER/LER. | |
bool | m_revo2 |
Lowest bit of revolution counter (PXD needs ~2 revolutions to readout one frame) | |
EventT0Source | m_eventT0Source |
Mask for storing which subdetectors contributed to the EventT0. | |
unsigned int | m_timeSinceLastInjection |
Time since the last injection in clock ticks (127MHz=RF/4 clock) Note: A value of 0x7FFFFFFF (see c_flagNoInjection ) means no injection took place recently (value is defined by the RawFTSW) Note: This is actually the time since the injection-pre-kick signal was received so there is some offset (different for HER/LER) that will be handled by the analysis variable. | |
unsigned int | m_timeSincePrevTrigger |
Time since the previous trigger in clock ticks (127MHz=RF/4 clock) | |
unsigned int | m_bunchNumber |
Number of triggered bunch, ranging from 0-1279 (in 127MHz clock ticks) Note: There are a maximum of 5120 buckets, which could each carry one bunch of e+/e-, but we only have 1280 clock ticks (=5120/4) to identify the bunches Note: This is the bunch number as given by the TTD. | |
Static Private Attributes | |
static const unsigned int | c_flagNoInjection = 0x7FFFFFFF |
This number is defined by the FTSW to indicate no injection happened recently. | |
static constexpr EventT0Source | c_fromAllSubdetectors |
tells ROOT not to write it to file (transient) | |
Storage element for information from the Trigger Timing Distribution (TTD) and EventT0-related information.
Data is required to study injections and injection backgrounds, as well as for the analysis and simulation of PXD Gated Mode.
Definition at line 24 of file EventLevelTriggerTimeInfo.h.
enum EventT0Source : unsigned int |
Flags for the EventT0 source.
Definition at line 29 of file EventLevelTriggerTimeInfo.h.
|
inlineexplicit |
Constructor.
isValid | The information stored in this object is valid |
isHER | Injection in HER/LER |
revo2 | Lowest bit of the revolution counter |
timeSinceLastInjection | Time since the last injection in clock ticks (127MHz=RF/4 clock) |
timeSincePrevTrigger | Time since the previous trigger in clock ticks (127MHz=RF/4 clock) |
bunchNumber | Number of the triggered bunch (ranging from 0-1279) |
Definition at line 46 of file EventLevelTriggerTimeInfo.h.
|
inline |
|
inline |
Add the flag c_fromCDC to the EventT0 source mask.
Definition at line 114 of file EventLevelTriggerTimeInfo.h.
|
inline |
Add the flag c_fromECL to the EventT0 source mask.
Definition at line 123 of file EventLevelTriggerTimeInfo.h.
|
inline |
Add the flag c_fromSVD to the EventT0 source mask.
Definition at line 105 of file EventLevelTriggerTimeInfo.h.
|
inline |
Add a specific flag (or combination of flags) to the EventT0 source mask.
Definition at line 132 of file EventLevelTriggerTimeInfo.h.
|
inline |
get number of triggered bunch as provided by TTD
Definition at line 69 of file EventLevelTriggerTimeInfo.h.
|
inline |
Return the EventT0 source mask.
Definition at line 147 of file EventLevelTriggerTimeInfo.h.
int getTimeSinceInjectedBunch | ( | ) | const |
get time since the injected bunch passed the detector in clock ticks (FTSW clock)
Definition at line 35 of file EventLevelTriggerTimeInfo.cc.
double getTimeSinceInjectedBunchInMicroSeconds | ( | ) | const |
get time since the injected bunch passed the detector in microseconds
Definition at line 50 of file EventLevelTriggerTimeInfo.cc.
|
inline |
get time since the last injection (i.e. the injection-pre-kick signal) in clock ticks (FTSW clock)
Definition at line 65 of file EventLevelTriggerTimeInfo.h.
double getTimeSinceLastInjectionInMicroSeconds | ( | ) | const |
get time since the last injection (i.e. the injection-pre-kick signal) in microseconds
Definition at line 17 of file EventLevelTriggerTimeInfo.cc.
|
inline |
get time since the previous trigger in clock ticks (FTSW clock)
Definition at line 67 of file EventLevelTriggerTimeInfo.h.
double getTimeSincePrevTriggerInMicroSeconds | ( | ) | const |
get time since the previous trigger in microseconds
Definition at line 26 of file EventLevelTriggerTimeInfo.cc.
int getTriggeredBunchNumberGlobal | ( | ) | const |
get the actual (=global) number of the triggered bunch
Definition at line 59 of file EventLevelTriggerTimeInfo.cc.
|
inline |
Return if at least one flag is set in the EventT0 source mask.
Definition at line 144 of file EventLevelTriggerTimeInfo.h.
|
inline |
Return if the c_fromCDC flag is set in the EventT0 source mask.
Definition at line 120 of file EventLevelTriggerTimeInfo.h.
|
inline |
Return if the c_fromECL flag is set in the EventT0 source mask.
Definition at line 129 of file EventLevelTriggerTimeInfo.h.
|
inline |
Return if the c_fromSVD flag is set in the EventT0 source mask.
Definition at line 111 of file EventLevelTriggerTimeInfo.h.
|
inline |
Return if the specific flag is set in the EventT0 source mask.
Definition at line 138 of file EventLevelTriggerTimeInfo.h.
|
inline |
get if an injection happened recently (and the corresponding stored data is actually valid)
Definition at line 71 of file EventLevelTriggerTimeInfo.h.
|
inline |
get if last injection was in HER/LER
Definition at line 61 of file EventLevelTriggerTimeInfo.h.
|
inline |
get lowest bit of revolution counter
Definition at line 63 of file EventLevelTriggerTimeInfo.h.
|
inline |
get if stored information is valid
Definition at line 59 of file EventLevelTriggerTimeInfo.h.
|
inline |
Reset all the flags from the EventT0 source mask (aka: set the "total" mask to 0)
Definition at line 141 of file EventLevelTriggerTimeInfo.h.
|
inline |
set number of triggered bunch
Definition at line 87 of file EventLevelTriggerTimeInfo.h.
|
inline |
set that stored information is valid
Definition at line 77 of file EventLevelTriggerTimeInfo.h.
|
inline |
set if injection in HER/LER
Definition at line 79 of file EventLevelTriggerTimeInfo.h.
|
inline |
set that no injection happened recently (and the corresponding stored data is actually invalid)
Definition at line 89 of file EventLevelTriggerTimeInfo.h.
|
inline |
set lowest bit of revolution counter
Definition at line 81 of file EventLevelTriggerTimeInfo.h.
|
inlineprivate |
Generic setter for the EventT0Source flags.
Used only internally.
Definition at line 155 of file EventLevelTriggerTimeInfo.h.
|
inline |
set time since the last injection (i.e. the injection-pre-kick signal) in clock ticks (FTSW clock)
Definition at line 83 of file EventLevelTriggerTimeInfo.h.
|
inline |
set time since the previous trigger in clock ticks (FTSW clock)
Definition at line 85 of file EventLevelTriggerTimeInfo.h.
|
inline |
set that stored information is valid
Definition at line 75 of file EventLevelTriggerTimeInfo.h.
|
inline |
Remove the flag c_fromCDC from the EventT0 source mask.
Definition at line 117 of file EventLevelTriggerTimeInfo.h.
|
inline |
Remove the flag c_fromECL from the EventT0 source mask.
Definition at line 126 of file EventLevelTriggerTimeInfo.h.
|
inline |
Remove the flag c_fromSVD from the EventT0 source mask.
Definition at line 108 of file EventLevelTriggerTimeInfo.h.
|
inline |
Unset a specific flag (or combination of flags) from the EventT0 source mask.
Definition at line 135 of file EventLevelTriggerTimeInfo.h.
|
staticprivate |
This number is defined by the FTSW to indicate no injection happened recently.
Definition at line 203 of file EventLevelTriggerTimeInfo.h.
|
staticconstexprprivate |
tells ROOT not to write it to file (transient)
Definition at line 205 of file EventLevelTriggerTimeInfo.h.
|
private |
Number of triggered bunch, ranging from 0-1279 (in 127MHz clock ticks) Note: There are a maximum of 5120 buckets, which could each carry one bunch of e+/e-, but we only have 1280 clock ticks (=5120/4) to identify the bunches Note: This is the bunch number as given by the TTD.
This might not be the 'global' bunch number, but the offset is taken into account by the method getTriggeredBunchNumberGlobal()
.
Definition at line 200 of file EventLevelTriggerTimeInfo.h.
|
private |
Mask for storing which subdetectors contributed to the EventT0.
Definition at line 180 of file EventLevelTriggerTimeInfo.h.
|
private |
Injection is in HER/LER.
Definition at line 171 of file EventLevelTriggerTimeInfo.h.
|
private |
Data stored in this TTD info object is actually valid.
Definition at line 167 of file EventLevelTriggerTimeInfo.h.
|
private |
Lowest bit of revolution counter (PXD needs ~2 revolutions to readout one frame)
Definition at line 176 of file EventLevelTriggerTimeInfo.h.
|
private |
Time since the last injection in clock ticks (127MHz=RF/4 clock) Note: A value of 0x7FFFFFFF (see c_flagNoInjection
) means no injection took place recently (value is defined by the RawFTSW) Note: This is actually the time since the injection-pre-kick signal was received so there is some offset (different for HER/LER) that will be handled by the analysis variable.
Definition at line 188 of file EventLevelTriggerTimeInfo.h.
|
private |
Time since the previous trigger in clock ticks (127MHz=RF/4 clock)
Definition at line 192 of file EventLevelTriggerTimeInfo.h.