Belle II Software development
TimingCutState Class Reference

Helper for TimingCut state. More...

#include <HLTPrefilter.h>

Public Member Functions

bool computeDecision ()
 

Public Attributes

double LERtimeSinceLastInjectionMin = 0.0
 Define thresholds for variables.
 
double LERtimeSinceLastInjectionMax = 0.0
 Maximum threshold of timeSinceLastInjection for LER injection.
 
double HERtimeSinceLastInjectionMin = 0.0
 Minimum threshold of timeSinceLastInjection for HER injection.
 
double HERtimeSinceLastInjectionMax = 0.0
 Maximum threshold of timeSinceLastInjection for HER injection.
 
double LERtimeInBeamCycleMin = 0.0
 Minimum threshold of timeInBeamCycle for LER injection.
 
double LERtimeInBeamCycleMax = 0.0
 Maximum threshold of timeInBeamCycle for LER injection.
 
double HERtimeInBeamCycleMin = 0.0
 Minimum threshold of timeInBeamCycle for HER injection.
 
double HERtimeInBeamCycleMax = 0.0
 Maximum threshold of timeInBeamCycle for LER injection.
 
unsigned int prescale = 1000
 Prescale for accepting HLTPrefilter lines, by default we randomly accept 1 out of every 1000 events.
 

Private Attributes

StoreObjPtr< EventLevelTriggerTimeInfom_TTDInfo
 Store array object for injection time info.
 
DBObjPtr< BunchStructurem_bunchStructure
 Define object for BunchStructure class.
 
DBObjPtr< HardwareClockSettingsm_clockSettings
 Define object for HardwareClockSettings class.
 

Detailed Description

Helper for TimingCut state.

Definition at line 31 of file HLTPrefilter.h.

Member Function Documentation

◆ computeDecision()

bool computeDecision ( )
inline

Calculate revolution time of beam

Fetch global clock

Definition at line 64 of file HLTPrefilter.h.

65 {
66 if (m_TTDInfo.isValid()) {
68 const double revolutionTime = m_bunchStructure->getRFBucketsPerRevolution() * 1e-3 /
69 m_clockSettings->getAcceleratorRF(); // [microsecond]
71 const double globalClock = m_clockSettings->getGlobalClockFrequency() * 1e3; // [microsecond]
72 // Calculate time since last injection
73 const double timeSinceLastInj = m_TTDInfo->getTimeSinceLastInjection() / globalClock; // [microsecond]
74 // Calculate time in beam cycle
75 const double timeInBeamCycle = timeSinceLastInj - (int)(timeSinceLastInj / revolutionTime) * revolutionTime; // [microsecond]
76
77 // Check if events are in injection strip of LER
78 const bool LER_strip = (LERtimeSinceLastInjectionMin < timeSinceLastInj &&
79 timeSinceLastInj < LERtimeSinceLastInjectionMax &&
80 LERtimeInBeamCycleMin < timeInBeamCycle &&
81 timeInBeamCycle < LERtimeInBeamCycleMax);
82
83 // Check if events are in injection strip of HER
84 const bool HER_strip = (HERtimeSinceLastInjectionMin < timeSinceLastInj &&
85 timeSinceLastInj < HERtimeSinceLastInjectionMax &&
86 HERtimeInBeamCycleMin < timeInBeamCycle &&
87 timeInBeamCycle < HERtimeInBeamCycleMax);
88
89 // Tag events inside injection strip with a prescale
90 return (LER_strip || HER_strip) && !SoftwareTrigger::makePreScale(prescale);
91 } else
92 return false;
93 }

Member Data Documentation

◆ HERtimeInBeamCycleMax

double HERtimeInBeamCycleMax = 0.0

Maximum threshold of timeInBeamCycle for LER injection.

Definition at line 60 of file HLTPrefilter.h.

◆ HERtimeInBeamCycleMin

double HERtimeInBeamCycleMin = 0.0

Minimum threshold of timeInBeamCycle for HER injection.

Definition at line 58 of file HLTPrefilter.h.

◆ HERtimeSinceLastInjectionMax

double HERtimeSinceLastInjectionMax = 0.0

Maximum threshold of timeSinceLastInjection for HER injection.

Definition at line 52 of file HLTPrefilter.h.

◆ HERtimeSinceLastInjectionMin

double HERtimeSinceLastInjectionMin = 0.0

Minimum threshold of timeSinceLastInjection for HER injection.

Definition at line 50 of file HLTPrefilter.h.

◆ LERtimeInBeamCycleMax

double LERtimeInBeamCycleMax = 0.0

Maximum threshold of timeInBeamCycle for LER injection.

Definition at line 56 of file HLTPrefilter.h.

◆ LERtimeInBeamCycleMin

double LERtimeInBeamCycleMin = 0.0

Minimum threshold of timeInBeamCycle for LER injection.

Definition at line 54 of file HLTPrefilter.h.

◆ LERtimeSinceLastInjectionMax

double LERtimeSinceLastInjectionMax = 0.0

Maximum threshold of timeSinceLastInjection for LER injection.

Definition at line 48 of file HLTPrefilter.h.

◆ LERtimeSinceLastInjectionMin

double LERtimeSinceLastInjectionMin = 0.0

Define thresholds for variables.

By default, no events are skipped based upon these requirements. Minimum threshold of timeSinceLastInjection for LER injection

Definition at line 46 of file HLTPrefilter.h.

◆ m_bunchStructure

DBObjPtr<BunchStructure> m_bunchStructure
private

Define object for BunchStructure class.

bunch structure (fill pattern)

Definition at line 38 of file HLTPrefilter.h.

◆ m_clockSettings

DBObjPtr<HardwareClockSettings> m_clockSettings
private

Define object for HardwareClockSettings class.

hardware clock settings

Definition at line 41 of file HLTPrefilter.h.

◆ m_TTDInfo

Store array object for injection time info.

Definition at line 35 of file HLTPrefilter.h.

◆ prescale

unsigned int prescale = 1000

Prescale for accepting HLTPrefilter lines, by default we randomly accept 1 out of every 1000 events.

Definition at line 62 of file HLTPrefilter.h.


The documentation for this class was generated from the following file: