Project
Loading...
Searching...
No Matches
Constants.h File Reference
#include "CommonConstants/PhysicsConstants.h"
#include "CommonConstants/LHCConstants.h"
#include "CommonConstants/ZDCConstants.h"
#include <cstdint>
#include <cstdlib>
#include <array>
#include <string_view>
#include <string>
#include <type_traits>
#include <limits>

Go to the source code of this file.

Namespaces

namespace  o2
 a couple of static helper functions to create timestamp values for CCDB queries or override obsolete objects
 
namespace  o2::zdc
 

Typedefs

using o2::zdc::zdcBaseline_t = int16_t
 

Enumerations

enum  o2::zdc::DetectorID {
  o2::zdc::DetIDOffs = 1 , o2::zdc::ZNA = 1 , o2::zdc::ZPA = 2 , o2::zdc::ZEM = 3 ,
  o2::zdc::ZNC = 4 , o2::zdc::ZPC = 5 , o2::zdc::MinDetID = DetIDOffs , o2::zdc::MaxDetID = 5
}
 
enum  o2::zdc::ChannelTypeZNP {
  o2::zdc::Common , o2::zdc::Ch1 , o2::zdc::Ch2 , o2::zdc::Ch3 ,
  o2::zdc::Ch4 , o2::zdc::Sum
}
 
enum  o2::zdc::ChannelTypeZEM { o2::zdc::ZEMCh1 , o2::zdc::ZEMCh2 }
 
enum  o2::zdc::TDCChannelID {
  o2::zdc::TDCZNAC , o2::zdc::TDCZNAS , o2::zdc::TDCZPAC , o2::zdc::TDCZPAS ,
  o2::zdc::TDCZEM1 , o2::zdc::TDCZEM2 , o2::zdc::TDCZNCC , o2::zdc::TDCZNCS ,
  o2::zdc::TDCZPCC , o2::zdc::TDCZPCS
}
 
enum  o2::zdc::Ped {
  o2::zdc::PedND = 0 , o2::zdc::PedEv = 1 , o2::zdc::PedOr = 2 , o2::zdc::PedQC = 3 ,
  o2::zdc::PedMissing = 4
}
 
enum  o2::zdc::Msg {
  o2::zdc::MsgGeneric = 0 , o2::zdc::MsgTDCPedQC = 1 , o2::zdc::MsgTDCPedMissing = 2 , o2::zdc::MsgADCPedOr = 3 ,
  o2::zdc::MsgADCPedQC = 4 , o2::zdc::MsgADCPedMissing = 5 , o2::zdc::MsgOffPed = 6 , o2::zdc::MsgPilePed = 7 ,
  o2::zdc::MsgPileTM = 8 , o2::zdc::MsgADCMissingwTDC = 9 , o2::zdc::MsgTDCPileEvC = 10 , o2::zdc::MsgTDCPileEvE = 11 ,
  o2::zdc::MsgTDCPileM1C = 12 , o2::zdc::MsgTDCPileM1E = 13 , o2::zdc::MsgTDCPileM2C = 14 , o2::zdc::MsgTDCPileM2E = 15 ,
  o2::zdc::MsgTDCPileM3C = 16 , o2::zdc::MsgTDCPileM3E = 17 , o2::zdc::MsgTDCSigE = 18 , o2::zdc::MsgEnd
}
 

Functions

constexpr float o2::zdc::getTOFCorrection (int det)
 
constexpr int o2::zdc::toChannel (int det, int tower)
 
constexpr const charo2::zdc::channelName (int channel)
 
constexpr int o2::zdc::toDet (int channel, int &tower)
 

Variables

constexpr int o2::zdc::NTimeBinsPerBC = 12
 
constexpr int o2::zdc::NBCReadOut = 4
 
constexpr int o2::zdc::NTimeBinsReadout = NTimeBinsPerBC * NBCReadOut
 
constexpr int16_t o2::zdc::Int16MaxVal = 0x7fff
 
constexpr int o2::zdc::NChannelsZN = 6
 
constexpr int o2::zdc::NChannelsZP = 6
 
constexpr int o2::zdc::NChannelsZEM = 2
 
constexpr float o2::zdc::ChannelTimeBinNS = 2.
 
constexpr float o2::zdc::SampleLenghtNS = NTimeBinsPerBC * ChannelTimeBinNS
 
constexpr int o2::zdc::NChannels = 2 * (NChannelsZN + NChannelsZP) + NChannelsZEM
 
constexpr uint8_t o2::zdc::ALICETriggerMask = 0x1
 
constexpr int o2::zdc::NModules = 8
 
constexpr int o2::zdc::NChPerModule = 4
 
constexpr int o2::zdc::NLinks = NModules * 2
 
constexpr int o2::zdc::NDigiChannels = NModules * NChPerModule
 
constexpr int o2::zdc::NWPerBc = 3
 
constexpr int o2::zdc::MaxTriggerChannels = NChannels
 
constexpr int o2::zdc::ADCMin = -2048
 
constexpr int o2::zdc::ADCMax = 2047
 
constexpr int o2::zdc::ADCRange = 4096
 
constexpr float o2::zdc::FInfty = std::numeric_limits<float>::infinity()
 
constexpr float o2::zdc::DInfty = std::numeric_limits<double>::infinity()
 
constexpr float o2::zdc::EnergyOffset = 10000
 
constexpr float o2::zdc::EnergyUnit = 0.01
 
constexpr uint32_t o2::zdc::EnergyMask = 0x07ffffff
 
constexpr uint32_t o2::zdc::EnergyChMask = 0xf8000000
 
constexpr int o2::zdc::MaxTDCValues = 5
 
constexpr int o2::zdc::NTDCChannels = 10
 
constexpr uint32_t o2::zdc::ZDCRefInitVal = 0xffffffff
 
constexpr int o2::zdc::TSL = 6
 
constexpr int o2::zdc::TSN = 200
 
constexpr int o2::zdc::TSNH = TSN / 2
 
constexpr int o2::zdc::NTS = 2 * TSL * TSN + 1
 
constexpr int o2::zdc::NIS = NTimeBinsPerBC * TSN
 
constexpr float o2::zdc::FTDCVal = o2::constants::lhc::LHCBunchSpacingNS / NTimeBinsPerBC / TSN
 
constexpr float o2::zdc::FOffset = 8.
 
constexpr int o2::zdc::NBucket = 10
 
constexpr int o2::zdc::NBKZero = 5
 
constexpr int o2::zdc::NFParA = 3
 
constexpr int o2::zdc::NFParT = 3
 
constexpr int o2::zdc::NBCAn = 3
 
constexpr uint32_t o2::zdc::MaskZNA = 0x0000001f
 
constexpr uint32_t o2::zdc::MaskAllZNA = 0x0000003f
 
constexpr uint32_t o2::zdc::MaskZPA = 0x000007c0
 
constexpr uint32_t o2::zdc::MaskAllZPA = 0x00000fc0
 
constexpr uint32_t o2::zdc::MaskZEM = 0x00003000
 
constexpr uint32_t o2::zdc::MaskZNC = 0x000fc000
 
constexpr uint32_t o2::zdc::MaskAllZNC = 0x0007f000
 
constexpr uint32_t o2::zdc::MaskZPC = 0x01f00000
 
constexpr uint32_t o2::zdc::MaskAllZPC = 0x03f00000
 
constexpr std::string_view o2::zdc::ChannelNames []
 
const int o2::zdc::TDCSignal [NTDCChannels]
 
const int o2::zdc::SignalTDC [NChannels]
 
constexpr int o2::zdc::DbgZero = 0
 
constexpr int o2::zdc::DbgMinimal = 1
 
constexpr int o2::zdc::DbgMedium = 2
 
constexpr int o2::zdc::DbgFull = 3
 
constexpr int o2::zdc::DbgExtra = 4
 
const std::string o2::zdc::CCDBPathConfigSim = "ZDC/Config/Sim"
 
const std::string o2::zdc::CCDBPathConfigModule = "ZDC/Config/Module"
 
const std::string o2::zdc::CCDBPathRecoConfigZDC = "ZDC/Calib/RecoConfigZDC"
 
const std::string o2::zdc::CCDBPathTDCCalib = "ZDC/Calib/TDCCalib"
 
const std::string o2::zdc::CCDBPathTDCCalibConfig = "ZDC/Calib/TDCCalibConfig"
 
const std::string o2::zdc::CCDBPathTDCCorr = "ZDC/Calib/TDCCorr"
 
const std::string o2::zdc::CCDBPathEnergyCalib = "ZDC/Calib/EnergyCalib"
 
const std::string o2::zdc::CCDBPathTowerCalib = "ZDC/Calib/TowerCalib"
 
const std::string o2::zdc::CCDBPathInterCalibConfig = "ZDC/Calib/InterCalibConfig"
 
const std::string o2::zdc::CCDBPathWaveformCalib = "ZDC/Calib/WaveformCalib"
 
const std::string o2::zdc::CCDBPathWaveformCalibConfig = "ZDC/Calib/WaveformCalibConfig"
 
const std::string o2::zdc::CCDBPathBaselineCalib = "ZDC/Calib/BaselineCalib"
 
const std::string o2::zdc::CCDBPathBaselineCalibConfig = "ZDC/Calib/BaselineCalibConfig"
 
const std::string o2::zdc::CCDBPathNoiseCalib = "ZDC/Calib/NoiseCalib"
 
constexpr std::string_view o2::zdc::MsgText []
 
constexpr std::array< int, 10 > o2::zdc::ChEnergyCalib
 
constexpr std::array< int, 17 > o2::zdc::ChTowerCalib
 
constexpr std::array< int, NChannelso2::zdc::CaloCommonPM
 
constexpr int o2::zdc::DummyIntRange = -NTimeBinsPerBC - 1
 
constexpr std::string_view o2::zdc::DummyName = "Dumm"
 
constexpr std::string_view o2::zdc::VoidName = " NA "
 
constexpr int o2::zdc::WaveformCalib_NBB = 3
 
constexpr int o2::zdc::WaveformCalib_NBA = 6
 
constexpr int o2::zdc::WaveformCalib_NBT = WaveformCalib_NBB + WaveformCalib_NBA + 1
 
constexpr int o2::zdc::WaveformCalib_NW = WaveformCalib_NBT * NIS
 
constexpr int o2::zdc::BaselineMin = -32768
 
constexpr int o2::zdc::BaselineMax = 32767
 
constexpr int o2::zdc::BaselineRange = 65536