Belle II Software light-2406-ragdoll
BunchStructure.h
1
2/**************************************************************************
3 * basf2 (Belle II Analysis Software Framework) *
4 * Author: The Belle II Collaboration *
5 * *
6 * See git log for contributors and copyright holders. *
7 * This file is licensed under LGPL-3.0, see LICENSE.md. *
8 **************************************************************************/
9
10#pragma once
11
12#include <TObject.h>
13#include <vector>
14
15namespace Belle2 {
26 class BunchStructure: public TObject {
27
28 public:
29
34 {}
35
40 void setBucket(unsigned i);
41
46 unsigned getRFBucketsPerRevolution() const {return c_RFBuckets;}
47
52 const std::vector<bool>& getFillPattern() const {return m_fillPattern;}
53
59 bool getBucket(int i) const;
60
65 bool isSet() const {return (not m_fillPattern.empty());}
66
71 unsigned getNumOfFilledBuckets() const;
72
77 unsigned generateBucketNumber() const;
78
79
80 private:
81
85 enum {c_RFBuckets = 5120};
86
87 std::vector<bool> m_fillPattern;
90 mutable std::vector<unsigned> m_filledBuckets;
91
94 };
95
97} //Belle2 namespace
98
Class to store the fill pattern of colliding bunches.
const std::vector< bool > & getFillPattern() const
Returns fill pattern.
BunchStructure()
Default constructor.
unsigned getRFBucketsPerRevolution() const
Returns the number of RF buckets per beam revolution.
bool isSet() const
Checks if the fill pattern is really set.
std::vector< unsigned > m_filledBuckets
cache for the filled bucket numbers
ClassDef(BunchStructure, 1)
dont't write out
std::vector< bool > m_fillPattern
fill pattern, true means the bucket is filled
unsigned getNumOfFilledBuckets() const
Returns the number of filled buckets.
void setBucket(unsigned i)
Sets the fill status of RF bucket to true.
bool getBucket(int i) const
Returns the fill status of RF bucket.
unsigned generateBucketNumber() const
Generates RF bucket number according to the fill pattern.
Abstract base class for different kinds of events.
Definition: ClusterUtils.h:24