Belle II Software prerelease-11-00-00a
TimingCutState Class Reference

Helper for TimingCut state. More...

#include <HLTPrefilter.h>

Collaboration diagram for TimingCutState:

Public Member Functions

bool computeDecision ()
 

Private Attributes

StoreObjPtr< TRGSummarym_l1Trigger
 Store Object with the trigger result.
 
DBObjPtr< HLTPrefilterParametersm_hltPrefilterParameters
 HLTprefilterParameters Database OjbPtr.
 
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 35 of file HLTPrefilter.h.

Member Function Documentation

◆ computeDecision()

bool computeDecision ( )
inline

Minimum threshold of timeSinceLastInjection for LER injection

Maximum threshold of timeSinceLastInjection for LER injection

Minimum threshold of timeSinceLastInjection for HER injection

Maximum threshold of timeSinceLastInjection for HER injection

Minimum threshold of timeInBeamCycle for LER injection

Maximum threshold of timeInBeamCycle for LER injection

Minimum threshold of timeInBeamCycle for HER injection

Maximum threshold of timeInBeamCycle for LER injection

Calculate revolution time of beam

Fetch global clock

Definition at line 55 of file HLTPrefilter.h.

56 {
57 if (m_TTDInfo.isValid() && m_hltPrefilterParameters.isValid() && m_l1Trigger.isValid()) {
58
59 // Injection Timing mode thresholds
61 const double LERtimeSinceLastInjectionMin = m_hltPrefilterParameters->getLERtimeSinceLastInjectionMin();
63 const double LERtimeSinceLastInjectionMax = m_hltPrefilterParameters->getLERtimeSinceLastInjectionMax();
65 const double HERtimeSinceLastInjectionMin = m_hltPrefilterParameters->getHERtimeSinceLastInjectionMin();
67 const double HERtimeSinceLastInjectionMax = m_hltPrefilterParameters->getHERtimeSinceLastInjectionMax();
69 const double LERtimeInBeamCycleMin = m_hltPrefilterParameters->getLERtimeInBeamCycleMin();
71 const double LERtimeInBeamCycleMax = m_hltPrefilterParameters->getLERtimeInBeamCycleMax();
73 const double HERtimeInBeamCycleMin = m_hltPrefilterParameters->getHERtimeInBeamCycleMin();
75 const double HERtimeInBeamCycleMax = m_hltPrefilterParameters->getHERtimeInBeamCycleMax();
76
78 const double revolutionTime = m_bunchStructure->getRFBucketsPerRevolution() * 1e-3 /
79 m_clockSettings->getAcceleratorRF(); // [microsecond]
81 const double globalClock = m_clockSettings->getGlobalClockFrequency() * 1e3; // [microsecond]
82 // Calculate time since last injection
83 const double timeSinceLastInj = m_TTDInfo->getTimeSinceLastInjection() / globalClock; // [microsecond]
84 // Calculate time in beam cycle
85 const double timeInBeamCycle = timeSinceLastInj - (int)(timeSinceLastInj / revolutionTime) * revolutionTime; // [microsecond]
86
87 // Check if events are in injection strip of LER
88 const bool LER_strip = (LERtimeSinceLastInjectionMin < timeSinceLastInj &&
89 timeSinceLastInj < LERtimeSinceLastInjectionMax &&
90 LERtimeInBeamCycleMin < timeInBeamCycle &&
91 timeInBeamCycle < LERtimeInBeamCycleMax);
92
93 // Check if events are in injection strip of HER
94 const bool HER_strip = (HERtimeSinceLastInjectionMin < timeSinceLastInj &&
95 timeSinceLastInj < HERtimeSinceLastInjectionMax &&
96 HERtimeInBeamCycleMin < timeInBeamCycle &&
97 timeInBeamCycle < HERtimeInBeamCycleMax);
98
99 //find out if we are in the passive veto or in the active veto window
100 bool inActiveInjectionVeto = false; //events accepted in the passive veto window but not in the active
101 try {
102 if (m_l1Trigger->testInput("passive_veto") == 1 && m_l1Trigger->testInput("cdcecl_veto") == 0)
103 inActiveInjectionVeto = true; //events in active veto
104 } catch (const std::exception&) {
105 }
106
107 if (inActiveInjectionVeto && (LER_strip || HER_strip))
108 B2WARNING("Skip event if HLTPrefilter On --> Event tagged by HLTPrefilter as injection background");
109
110 // Tag events from active veto inside injection strip with a prescale
111 return inActiveInjectionVeto && (LER_strip || HER_strip);
112 } else
113 return false;
114 }

Member Data Documentation

◆ m_bunchStructure

DBObjPtr<BunchStructure> m_bunchStructure
private

Define object for BunchStructure class.

bunch structure (fill pattern)

Definition at line 48 of file HLTPrefilter.h.

◆ m_clockSettings

DBObjPtr<HardwareClockSettings> m_clockSettings
private

Define object for HardwareClockSettings class.

hardware clock settings

Definition at line 51 of file HLTPrefilter.h.

◆ m_hltPrefilterParameters

DBObjPtr<HLTPrefilterParameters> m_hltPrefilterParameters
private

HLTprefilterParameters Database OjbPtr.

HLT prefilter parameters

Definition at line 42 of file HLTPrefilter.h.

◆ m_l1Trigger

StoreObjPtr<TRGSummary> m_l1Trigger
private

Store Object with the trigger result.

Definition at line 39 of file HLTPrefilter.h.

◆ m_TTDInfo

Store array object for injection time info.

Definition at line 45 of file HLTPrefilter.h.


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