Belle II Software development
SimClockState.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <framework/datastore/RelationsObject.h>
12
13
14namespace Belle2 {
28
29 public:
30
35 {}
36
41 void setRevo9Count(unsigned count) {m_revo9Count = count;}
42
47 void setBucketNumber(unsigned bucket) {m_bucketNumber = bucket;}
48
53 void setBeamCycleNumber(unsigned beamCycle) {m_beamCycle = beamCycle;}
54
62 void setRelativeBucketNo(int relativeBucket) {m_relativeBucketNo = relativeBucket;}
63
69 unsigned getRevo9Count() const {return m_revo9Count;}
70
75 unsigned getBucketNumber() const {return m_bucketNumber;}
76
81 unsigned getBeamCycleNumber() const {return m_beamCycle;}
82
89 unsigned getSVDTriggerBin(unsigned offset = 2) const {return (m_revo9Count + offset) % 4;}
90
97 unsigned getCDCTriggerBin(unsigned offset = 0) const {return (m_revo9Count + offset) % 4;}
98
106
107 private:
108
111 unsigned m_revo9Count = 0;
112 unsigned m_bucketNumber = 0;
113 unsigned m_beamCycle = 0;
117 };
118
120} //Belle2 namespace
121
Defines interface for accessing relations of objects in StoreArray.
Simulated hardware clock state.
Definition: SimClockState.h:27
unsigned getCDCTriggerBin(unsigned offset=0) const
Returns CDC trigger bin.
Definition: SimClockState.h:97
unsigned getSVDTriggerBin(unsigned offset=2) const
Returns SVD trigger bin.
Definition: SimClockState.h:89
void setBucketNumber(unsigned bucket)
Sets RF bucket number of the collision.
Definition: SimClockState.h:47
unsigned getRevo9Count() const
Returns the number of system clock ticks since last revo9 marker.
Definition: SimClockState.h:69
unsigned getBeamCycleNumber() const
Returs beam revolution count since last revo9 marker.
Definition: SimClockState.h:81
int getRelativeBucketNo() const
Returns the distance (in bucket number) between the collision bunch crossing and the bucket correspon...
void setRevo9Count(unsigned count)
Sets the number of system clock ticks since last revo9 marker.
Definition: SimClockState.h:41
unsigned m_beamCycle
beam revolution count since last revo9 marker
SimClockState()
Default constructor.
Definition: SimClockState.h:34
ClassDef(SimClockState, 2)
ClassDef.
unsigned getBucketNumber() const
Returns RF bucket number of the collision.
Definition: SimClockState.h:75
unsigned m_revo9Count
number of system clock ticks since last revo9 marker
void setBeamCycleNumber(unsigned beamCycle)
Sets beam revolution count since last revo9 marker.
Definition: SimClockState.h:53
unsigned m_bucketNumber
RF bucket number of the collision.
int m_relativeBucketNo
jitter measured in units of number-of-buckets
void setRelativeBucketNo(int relativeBucket)
Sets the relativeBucket number, i.e.
Definition: SimClockState.h:62
Abstract base class for different kinds of events.