Project
Loading...
Searching...
No Matches
Constants.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11#ifndef ALICEO2_EMCAL_CONSTANTS_H_
12#define ALICEO2_EMCAL_CONSTANTS_H_
13
14#include <Rtypes.h>
15#include <iosfwd>
16#include <exception>
17#include <cstdint>
18
19namespace o2
20{
21namespace emcal
22{
23enum {
29};
30
39
42class InvalidChanneltypeException final : public std::exception
43{
44 public:
47 InvalidChanneltypeException(int caloflag) : std::exception(),
48 mCaloFlag(caloflag),
49 mMessage("Wrong channel type value found (" + std::to_string(caloflag) + ")! Should be 0 ,1, 2 or 3 !")
50 {
51 }
53 ~InvalidChanneltypeException() noexcept final = default;
54
57 const char* what() const noexcept final { return "Invalid caloflag, no channel type matching"; }
58
61 int getCaloflag() const noexcept { return mCaloFlag; }
62
63 private:
64 int mCaloFlag;
65 std::string mMessage;
66};
67
71std::string channelTypeToString(ChannelType_t chantype);
72
77
83
88std::ostream& operator<<(std::ostream& stream, ChannelType_t chantype);
89
90namespace constants
91{
92
93constexpr int OVERFLOWCUT = 950;
94constexpr int LG_SUPPRESSION_CUT = 880;
95constexpr int ORDER = 2;
96constexpr double TAU = 2.35;
97constexpr Double_t EMCAL_TIMESAMPLE = 100.;
98constexpr Double_t EMCAL_ADCENERGY = 0.0162;
99constexpr Int_t EMCAL_HGLGFACTOR = 16;
100constexpr Int_t EMCAL_HGLGTRANSITION = 1024;
101constexpr Int_t EMCAL_MAXTIMEBINS = 15;
102constexpr int MAX_RANGE_ADC = 0x3FF;
103constexpr double EMCAL_TRU_ADCENERGY = 0.0786;
104} // namespace constants
105
106namespace triggerbits
107{
108constexpr uint32_t Inc = 0x1 << 20;
109}
110
117
119 ESTU = 0,
120 DSTU = 1
122
123namespace STUparam //[0]->EMCAL STU, [1]->DCAL STU
124{
125constexpr int FeeID[2] = {44, 45};
126constexpr int NTRU[2] = {32, 14};
127constexpr int CFG_nWords[2] = {17, 17};
128constexpr int L1JetIndex_nWords[2] = {11, 11};
129constexpr int L0index_nWords[2] = {96, 42};
130constexpr int L1GammaIndex_nWords[2] = {128, 56};
131constexpr int Raw_nWords[2] = {1536, 672};
132constexpr int SubregionsEta[2] = {12, 12};
133constexpr int SubregionsPhi[2] = {16, 10};
134constexpr int PaloadSizeFull[2] = {1928, 866};
135constexpr int PaloadSizeShort[2] = {391, 193};
136} // namespace STUparam
137
138namespace TRUparam
139{
140constexpr int Nchannels = 96;
141constexpr int NchannelsOverEta = 8;
142constexpr int NchannelsOverPhi = 12;
143constexpr int NchannelsOverEta_long = 24;
144constexpr int NchannelsOverPhi_long = 4;
145} // namespace TRUparam
146
147} // namespace emcal
148} // namespace o2
149#endif
Error handling invalid channel types.
Definition Constants.h:43
int getCaloflag() const noexcept
Access to calo flag responsible for the exception.
Definition Constants.h:61
~InvalidChanneltypeException() noexcept final=default
Destructor.
const char * what() const noexcept final
Access to error message of the exception.
Definition Constants.h:57
InvalidChanneltypeException(int caloflag)
Constructor initializing the exception.
Definition Constants.h:47
GLuint GLuint stream
Definition glcorearb.h:1806
constexpr int SubregionsEta[2]
number of subregions over eta
Definition Constants.h:132
constexpr int PaloadSizeFull[2]
number of words in full payload = 1944/882-16
Definition Constants.h:134
constexpr int Raw_nWords[2]
number of words with ADC
Definition Constants.h:131
constexpr int NTRU[2]
number of TRUs
Definition Constants.h:126
constexpr int L1JetIndex_nWords[2]
number of words with Jet indices
Definition Constants.h:128
constexpr int FeeID[2]
FEE_ID in RDH.
Definition Constants.h:125
constexpr int PaloadSizeShort[2]
number of words in shorts payload = 407/209-16
Definition Constants.h:135
constexpr int SubregionsPhi[2]
number of subregions over phi
Definition Constants.h:133
constexpr int L0index_nWords[2]
number of words with null data
Definition Constants.h:129
constexpr int L1GammaIndex_nWords[2]
number of words with Gamma indices
Definition Constants.h:130
constexpr int CFG_nWords[2]
number of configuration words
Definition Constants.h:127
constexpr int NchannelsOverEta
number of FastORs over Eta for full- and 2/3-size SMs
Definition Constants.h:141
constexpr int Nchannels
number of FastORs per TRU
Definition Constants.h:140
constexpr int NchannelsOverEta_long
number of FastORs over Eta for 1/3-size SMs
Definition Constants.h:143
constexpr int NchannelsOverPhi_long
number of FastORs over Phi for 1/3-size SMs
Definition Constants.h:144
constexpr int NchannelsOverPhi
number of FastORs over Phi for full- and 2/3-size SMs
Definition Constants.h:142
@ Gamma2
Gamma2 raw fitter.
Definition Constants.h:113
@ NeuralNet
Neural net raw fitter.
Definition Constants.h:114
@ Standard
Standard raw fitter.
Definition Constants.h:112
std::ostream & operator<<(std::ostream &stream, const Cell &cell)
Stream operator for EMCAL cell.
Definition Cell.cxx:355
@ EMCAL_LEDREFS
Number of LEDs (reference/monitors) per module for EMCAL; one per StripModule.
Definition Constants.h:27
@ EMCAL_MODULES
Number of modules, 12 for EMCal + 8 for DCAL.
Definition Constants.h:24
@ EMCAL_TEMPSENSORS
Number Temperature sensors per module for EMCAL.
Definition Constants.h:28
@ EMCAL_ROWS
Number of rows per module for EMCAL.
Definition Constants.h:25
@ EMCAL_COLS
Number of columns per module for EMCAL.
Definition Constants.h:26
std::string channelTypeToString(ChannelType_t chantype)
Create string representation of the channel type object.
Definition Constants.cxx:20
ChannelType_t intToChannelType(int chantype)
Convert integer number to channel type object.
Definition Constants.cxx:55
@ DSTU
DCAL STU.
Definition Constants.h:120
@ ESTU
EMCAL STU.
Definition Constants.h:119
ChannelType_t
Type of a raw data channel.
Definition Constants.h:33
@ TRU
TRU channel.
Definition Constants.h:36
@ HIGH_GAIN
High gain channel.
Definition Constants.h:35
@ LOW_GAIN
Low gain channel.
Definition Constants.h:34
@ LEDMON
LED monitor channel.
Definition Constants.h:37
int channelTypeToInt(ChannelType_t chantype)
integer representation of the channel type object
Definition Constants.cxx:40
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.
std::string to_string(gsl::span< T, Size > span)
Definition common.h:52