ATLAS Offline Software
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  */
13 #ifndef LUMIBLOCKDATA_BUNCHCROSSINGINTENSITYCONDDATA_H
14 #define LUMIBLOCKDATA_BUNCHCROSSINGINTENSITYCONDDATA_H
15 
16 
17 #include "AthenaKernel/CondCont.h"
18 #include "AthenaKernel/CLASS_DEF.h"
19 #include <vector>
20 #include <bitset>
21 
22 
24 
25 public:
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,
64  FirstEmpty = 1,
66  Single = 100,
67  Front = 200,
68  Middle = 201,
69  Tail = 202,
70  Unpaired = 300
71  };
72 
74 
84  };
85 
86 private:
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 };
108 CLASS_DEF( BunchCrossingIntensityCondData , 185321563 , 1 )
110 
111 
112 
113 #endif // not COOLLUMIUTILITIES_FILLPARAMSCONDDATA_H
BunchCrossingIntensityCondData::m_beam2Intensity
std::vector< float > m_beam2Intensity
Definition: BunchCrossingIntensityCondData.h:94
BunchCrossingIntensityCondData::setBeam2IntensityPerBCIDVector
void setBeam2IntensityPerBCIDVector(std::vector< float > &&val, int channel)
Definition: BunchCrossingIntensityCondData.cxx:94
BunchCrossingIntensityCondData::GetBeam2IntensityPerBCIDVector
const std::vector< float > & GetBeam2IntensityPerBCIDVector(int channel) const
Definition: BunchCrossingIntensityCondData.cxx:43
BunchCrossingIntensityCondData::m_beam1Intensity
std::vector< float > m_beam1Intensity
Definition: BunchCrossingIntensityCondData.h:93
BunchCrossingIntensityCondData::BunchDistanceType
BunchDistanceType
Enumeration specifying the units in which to expect the bunch distance type.
Definition: BunchCrossingIntensityCondData.h:79
CondCont.h
Hold mappings of ranges to condition objects.
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
BunchCrossingIntensityCondData::GetBeam1IntensityBCID
float GetBeam1IntensityBCID(const bcid_type bcid, int channel) const
Definition: BunchCrossingIntensityCondData.cxx:7
BunchCrossingIntensityCondData::m_BUNCH_SPACING
static constexpr int m_BUNCH_SPACING
Definition: BunchCrossingIntensityCondData.h:29
BunchCrossingIntensityCondData::m_beam1IntensityAll
float m_beam1IntensityAll
Definition: BunchCrossingIntensityCondData.h:99
BunchCrossingIntensityCondData::m_beam2IntensityAll_fBCT
float m_beam2IntensityAll_fBCT
Definition: BunchCrossingIntensityCondData.h:102
BunchCrossingIntensityCondAlg
Conditions algorithm to unpack fill parameters from COOL.
Definition: BunchCrossingIntensityCondAlg.h:30
BunchCrossingIntensityCondData::BunchCrossingType
BunchCrossingType
Enumeration type for a given bunch crossing.
Definition: BunchCrossingIntensityCondData.h:62
BunchCrossingIntensityCondData::GetBeam2IntensityAll
float GetBeam2IntensityAll(int channel) const
Definition: BunchCrossingIntensityCondData.cxx:64
BunchCrossingIntensityCondData::m_beam1IntensityAll_fBCT
float m_beam1IntensityAll_fBCT
Definition: BunchCrossingIntensityCondData.h:101
BunchCrossingIntensityCondData::m_beam2IntensityAll
float m_beam2IntensityAll
Definition: BunchCrossingIntensityCondData.h:100
BunchCrossingIntensityCondData::Unpaired
@ Unpaired
This is an unpaired bunch (either beam1 or beam2)
Definition: BunchCrossingIntensityCondData.h:70
BunchCrossingIntensityCondData::SetRunLB
void SetRunLB(unsigned long long RunLB)
Definition: BunchCrossingIntensityCondData.cxx:118
BunchCrossingIntensityCondData::m_RunLB
unsigned long long m_RunLB
Definition: BunchCrossingIntensityCondData.h:104
BunchCrossingIntensityCondData::bcid_type
unsigned int bcid_type
Definition: BunchCrossingIntensityCondData.h:27
BunchCrossingIntensityCondData::BunchCrossings
@ BunchCrossings
Distance in units of 25 nanoseconds.
Definition: BunchCrossingIntensityCondData.h:81
BunchCrossingIntensityCondData::SetBeam1IntensityAll
void SetBeam1IntensityAll(float Beam1IntensityAll, int channel)
Definition: BunchCrossingIntensityCondData.cxx:102
BunchCrossingIntensityCondData::FirstEmpty
@ FirstEmpty
The first empty bunch after a train.
Definition: BunchCrossingIntensityCondData.h:64
BunchCrossingIntensityCondData::Single
@ Single
This is a filled, single bunch (not in a train)
Definition: BunchCrossingIntensityCondData.h:66
BunchCrossingIntensityCondData::Middle
@ Middle
The BCID belongs to the middle bunches in a train.
Definition: BunchCrossingIntensityCondData.h:68
BunchCrossingIntensityCondData::GetRunLB
unsigned long long GetRunLB() const
Definition: BunchCrossingIntensityCondData.cxx:75
BunchCrossingIntensityCondData::Tail
@ Tail
The BCID belongs to the last few bunces in a train.
Definition: BunchCrossingIntensityCondData.h:69
BunchCrossingIntensityCondData::MiddleEmpty
@ MiddleEmpty
An empty BCID in the middle of a train.
Definition: BunchCrossingIntensityCondData.h:65
BunchCrossingIntensityCondData::m_beam1Intensity_fBCT
std::vector< float > m_beam1Intensity_fBCT
Definition: BunchCrossingIntensityCondData.h:96
BunchCrossingIntensityCondData::Front
@ Front
The BCID belongs to the first few bunches in a train.
Definition: BunchCrossingIntensityCondData.h:67
BunchCrossingIntensityCondData::m_headTailLength
static const int m_headTailLength
Definition: BunchCrossingIntensityCondData.h:105
BunchCrossingIntensityCondData::setBeam1IntensityPerBCIDVector
void setBeam1IntensityPerBCIDVector(std::vector< float > &&val, int channel)
Definition: BunchCrossingIntensityCondData.cxx:86
CONDCONT_MIXED_DEF
CONDCONT_MIXED_DEF(BunchCrossingIntensityCondData, 97829245)
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
BunchCrossingIntensityCondData::NanoSec
@ NanoSec
Distance in nanoseconds.
Definition: BunchCrossingIntensityCondData.h:80
BunchCrossingIntensityCondData
Definition: BunchCrossingIntensityCondData.h:23
BunchCrossingIntensityCondData::FilledBunches
@ FilledBunches
Distance in units of filled bunches (depends on filling scheme)
Definition: BunchCrossingIntensityCondData.h:83
BunchCrossingIntensityCondData::GetBeam1IntensityAll
float GetBeam1IntensityAll(int channel) const
Definition: BunchCrossingIntensityCondData.cxx:53
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition: Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:64
BunchCrossingIntensityCondData::Empty
@ Empty
An empty bunch far away from filled bunches.
Definition: BunchCrossingIntensityCondData.h:63
BunchCrossingIntensityCondData::m_beam2Intensity_fBCT
std::vector< float > m_beam2Intensity_fBCT
Definition: BunchCrossingIntensityCondData.h:97
BunchCrossingIntensityCondData::SetBeam2IntensityAll
void SetBeam2IntensityAll(float Beam2IntensityAll, int channel)
Definition: BunchCrossingIntensityCondData.cxx:110
BunchCrossingIntensityCondData::m_MAX_BCID
static constexpr int m_MAX_BCID
Definition: BunchCrossingIntensityCondData.h:28
BunchCrossingIntensityCondData::GetBeam2IntensityBCID
float GetBeam2IntensityBCID(const bcid_type bcid, int channel) const
Definition: BunchCrossingIntensityCondData.cxx:18
CLASS_DEF.h
macros to associate a CLID to a type
BunchCrossingIntensityCondData::GetBeam1IntensityPerBCIDVector
const std::vector< float > & GetBeam1IntensityPerBCIDVector(int channel) const
Definition: BunchCrossingIntensityCondData.cxx:32