ATLAS Offline Software
LuminosityCondData.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_LUMINOSITYCONDDATA_H
14 #define LUMIBLOCKDATA_LUMINOSITYCONDDATA_H
15 
16 
17 #include "AthenaKernel/CondCont.h"
18 #include "AthenaKernel/CLASS_DEF.h"
19 #include <vector>
20 
21 
23 {
24 public:
25  // Total number of BCIDs in one turn - this must match value used
26  // in /TDAQ/OLC/BUNCHLUMIS for storage mode 1
27  static constexpr unsigned int TOTAL_LHC_BCIDS = 3564;
28 
29  // Instantaneous luminosity information from /TRIGGER/LUMI/LBLESTONL or LBLESTOFL
30  // In ub-1 s-1 => 10^30 cm-2 s-1
31  float lbAverageLuminosity() const;
33  unsigned int lbAverageValid() const; // Validity flag from COOL
34 
35  // Instantaneous luminosity per BCID
36  // Non-zero values only filled for BCIDs in the physics bunch group, or found to have collisions by the bunch currents
37 
38  // Return vector with all BCIDs indexed by bcid number
39  const std::vector<float>& lbLuminosityPerBCIDVector() const; // In ub-1 s-1 => 10^30 cm-2 s-1
40 
41  // Conversion factor from OLC. lumiPerBCID/muToLumi = interactionsPerCrossingPerBCID
42  float muToLumi() const;
43 
44 
45  // Setter methods.
46  void setLbAverageLuminosity (float val);
49  void setLbLuminosityPerBCIDVector (std::vector<float>&& val);
50  void setMuToLumi (float val);
51 
52 
53 private:
54  // Data from LBLESTOFL
55  float m_LBAvInstLumi = 0; // in ub-1 s-1 => 10^30 cm-2 s-1
56  float m_LBAvEvtsPerBX = 0;
57  uint32_t m_Valid = 0xffffffff;
58 
59  // Luminosity per beam crossing (for a specific BCID)
60  std::vector<float> m_LBInstLumi = std::vector<float> (TOTAL_LHC_BCIDS);
61 
62  // Conversion factor from calibrations
63  float m_MuToLumi = 0;
64 };
65 
66 
67 CLASS_DEF (LuminosityCondData, 222148049, 0)
69 
70 
71 #endif // not LUMIBLOCKDATA_LUMINOSITYCONDDATA_H
LuminosityCondData::lbLuminosityPerBCIDVector
const std::vector< float > & lbLuminosityPerBCIDVector() const
Definition: LuminosityCondData.cxx:46
LuminosityCondData::muToLumi
float muToLumi() const
Definition: LuminosityCondData.cxx:56
LuminosityCondData::setLbAverageLuminosity
void setLbAverageLuminosity(float val)
Definition: LuminosityCondData.cxx:21
CondCont.h
Hold mappings of ranges to condition objects.
LuminosityCondData::setMuToLumi
void setMuToLumi(float val)
Definition: LuminosityCondData.cxx:61
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
LuminosityCondData::TOTAL_LHC_BCIDS
static constexpr unsigned int TOTAL_LHC_BCIDS
Definition: LuminosityCondData.h:27
LuminosityCondData::lbAverageLuminosity
float lbAverageLuminosity() const
Definition: LuminosityCondData.cxx:16
CONDCONT_MIXED_DEF
CONDCONT_MIXED_DEF(LuminosityCondData, 180584023)
LuminosityCondData::m_LBAvEvtsPerBX
float m_LBAvEvtsPerBX
Definition: LuminosityCondData.h:56
LuminosityCondData::m_LBAvInstLumi
float m_LBAvInstLumi
Definition: LuminosityCondData.h:55
LuminosityCondData::lbAverageValid
unsigned int lbAverageValid() const
Definition: LuminosityCondData.cxx:36
LuminosityCondData::m_MuToLumi
float m_MuToLumi
Definition: LuminosityCondData.h:63
LuminosityCondData
Definition: LuminosityCondData.h:23
LuminosityCondData::m_LBInstLumi
std::vector< float > m_LBInstLumi
Definition: LuminosityCondData.h:60
LuminosityCondData::setLbAverageValid
void setLbAverageValid(uint32_t val)
Definition: LuminosityCondData.cxx:41
LuminosityCondData::lbAverageInteractionsPerCrossing
float lbAverageInteractionsPerCrossing() const
Definition: LuminosityCondData.cxx:26
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
LuminosityCondData::setLbAverageInteractionsPerCrossing
void setLbAverageInteractionsPerCrossing(float val)
Definition: LuminosityCondData.cxx:31
LuminosityCondData::m_Valid
uint32_t m_Valid
Definition: LuminosityCondData.h:57
CLASS_DEF.h
macros to associate a CLID to a type
LuminosityCondData::setLbLuminosityPerBCIDVector
void setLbLuminosityPerBCIDVector(std::vector< float > &&val)
Definition: LuminosityCondData.cxx:51