ATLAS Offline Software
Loading...
Searching...
No Matches
BunchCrossingIntensityCondData.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2/*
3 * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration.
4 */
11
12
13#ifndef LUMIBLOCKDATA_BUNCHCROSSINGINTENSITYCONDDATA_H
14#define LUMIBLOCKDATA_BUNCHCROSSINGINTENSITYCONDDATA_H
15
16
19#include <vector>
20#include <bitset>
21
22
24
25public:
26
27 typedef unsigned int bcid_type;
28 static constexpr int m_MAX_BCID=3564;
29 static constexpr int m_BUNCH_SPACING = 25;
30
31 // channel =0 -> BPTX. channel = 1 -> fBCT
32
33 // Retrieve beam intensitity of specific BCID. Only paired BCID.
34 float GetBeam1IntensityBCID(const bcid_type bcid, int channel ) const;
35 float GetBeam2IntensityBCID(const bcid_type bcid, int channel ) const;
36
37 // Retrieve the whole per-BCID beam intensitity vector. Only paired BCID
38 const std::vector<float>& GetBeam1IntensityPerBCIDVector(int channel) const; // In 10^10
39 const std::vector<float>& GetBeam2IntensityPerBCIDVector(int channel) const; // In 10^10
40
41 // Retrieve total beam intensitity. Paired and unpaired BCID
42 float GetBeam1IntensityAll(int channel ) const;
43 float GetBeam2IntensityAll(int channel ) const;
44 unsigned long long GetRunLB( ) const;
45
46 // Set total beam intensitity. Paired and unpaired BCID
47 void SetBeam1IntensityAll( float Beam1IntensityAll,int channel) ;
48 void SetBeam2IntensityAll( float Beam2IntensityAll,int channel) ;
49
50 // Set the whole per-BCID beam intensitity vector. Only paired BCID
51 void setBeam1IntensityPerBCIDVector (std::vector<float>&& val,int channel);
52 void setBeam2IntensityPerBCIDVector (std::vector<float>&& val,int channel);
53
54 void SetRunLB( unsigned long long RunLB) ;
55
57
62 {
63 Empty = 0,
66 Single = 100,
67 Front = 200,
68 Middle = 201,
69 Tail = 202,
70 Unpaired = 300
71 };
72
74
85
86private:
87
88 friend class BunchCrossingIntensityCondAlg;// The cond-alg filling this class
89
90
91 // Data
92
93 std::vector<float> m_beam1Intensity = std::vector<float> (m_MAX_BCID);
94 std::vector<float> m_beam2Intensity = std::vector<float> (m_MAX_BCID);
95
96 std::vector<float> m_beam1Intensity_fBCT = std::vector<float> (m_MAX_BCID);
97 std::vector<float> m_beam2Intensity_fBCT = std::vector<float> (m_MAX_BCID);
98
103
104 unsigned long long m_RunLB;
105 const static int m_headTailLength = 300; // magic number 300 ns from Run 2 tool
106
107};
110
111
112
113#endif // not COOLLUMIUTILITIES_FILLPARAMSCONDDATA_H
Hold mappings of ranges to condition objects.
#define CONDCONT_MIXED_DEF(...)
Definition CondCont.h:1446
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
const std::vector< float > & GetBeam1IntensityPerBCIDVector(int channel) const
BunchDistanceType
Enumeration specifying the units in which to expect the bunch distance type.
@ FilledBunches
Distance in units of filled bunches (depends on filling scheme)
@ BunchCrossings
Distance in units of 25 nanoseconds.
float GetBeam2IntensityBCID(const bcid_type bcid, int channel) const
void setBeam1IntensityPerBCIDVector(std::vector< float > &&val, int channel)
void SetBeam1IntensityAll(float Beam1IntensityAll, int channel)
const std::vector< float > & GetBeam2IntensityPerBCIDVector(int channel) const
BunchCrossingType
Enumeration type for a given bunch crossing.
@ Single
This is a filled, single bunch (not in a train)
@ Front
The BCID belongs to the first few bunches in a train.
@ Tail
The BCID belongs to the last few bunces in a train.
@ Middle
The BCID belongs to the middle bunches in a train.
@ MiddleEmpty
An empty BCID in the middle of a train.
@ Empty
An empty bunch far away from filled bunches.
@ FirstEmpty
The first empty bunch after a train.
@ Unpaired
This is an unpaired bunch (either beam1 or beam2)
float GetBeam1IntensityBCID(const bcid_type bcid, int channel) const
void SetBeam2IntensityAll(float Beam2IntensityAll, int channel)
void setBeam2IntensityPerBCIDVector(std::vector< float > &&val, int channel)