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
15
16#ifndef AliceO2_TRD_Constants_H
17#define AliceO2_TRD_Constants_H
18
19namespace o2
20{
21namespace trd
22{
23namespace constants
24{
25constexpr int NSECTOR = 18;
26constexpr int NSTACK = 5;
27constexpr int NLAYER = 6;
28constexpr int NCHAMBERPERSEC = 30;
29constexpr int NHCPERSEC = 60;
30constexpr int MAXCHAMBER = 540;
31constexpr int MAXHALFCHAMBER = 1080;
32constexpr int NCHAMBER = 521;
33constexpr int NHALFCRU = 72;
34constexpr int NLINKSPERHALFCRU = 15;
35constexpr int NLINKSPERCRU = 30;
36constexpr int NCRU = 36;
37constexpr int NFLP = 12;
38constexpr int NCRUPERFLP = 3;
39constexpr int TRDLINKID = 15;
40
41constexpr int NCOLUMN = 144;
42constexpr int NROWC0 = 12;
43constexpr int NROWC1 = 16;
44constexpr int FIRSTROW[NSTACK] = {0, 16, 32, 44, 60};
45
46constexpr int NMCMROB = 16;
47constexpr int NMCMHCMAX = 64;
48constexpr int NMCMROBINROW = 4;
49constexpr int NMCMROBINCOL = 4;
50constexpr int NROBC0 = 6;
51constexpr int NROBC1 = 8;
52constexpr int NADCMCM = 21;
53constexpr int NCOLMCM = 18;
54constexpr int NCHANNELSPERROW = NMCMROBINCOL * 2 * NADCMCM;
60constexpr int NCPU = 4;
61constexpr int NCHARGES = 3;
62
63// the values below should come out of the TRAP config in the future
64constexpr int NBITSTRKLPOS = 11;
65constexpr int NBITSTRKLSLOPE = 8;
66constexpr int ADDBITSHIFTSLOPE = 1 << 3;
67constexpr int PADGRANULARITYTRKLPOS = 40;
68constexpr int PADGRANULARITYTRKLSLOPE = 128;
71constexpr int ADCBASELINE = 10;
72
73// OS: Should this not be flexible for example in case of Kr calib?
74constexpr int TIMEBINS = 30;
75constexpr float MAXIMPACTANGLE = 25.f;
76constexpr int NBINSANGLEDIFF = 25;
77constexpr double VDRIFTDEFAULT = 1.546;
78constexpr double EXBDEFAULT = 0.0;
79constexpr int NBINSGAINCALIB = 320;
80constexpr float MPVDEDXDEFAULT = 42.;
81constexpr float T0DEFAULT = 1.2;
82
83// array size to store incoming half cru payload.
84constexpr int HBFBUFFERMAX = 1048576;
85constexpr unsigned int CRUPADDING32 = 0xeeeeeeee;
86constexpr int CHANNELNRNOTRKLT = 23;
87constexpr int NOTRACKLETFIT = 31;
88constexpr int TRACKLETENDMARKER = 0x10001000;
89constexpr int PADDINGWORD = 0xeeeeeeee;
90constexpr int DIGITENDMARKER = 0x0;
91constexpr int MAXDATAPERLINK32 = 13824;
92constexpr int MAXDATAPERLINK256 = 1728;
93constexpr int MAXEVENTCOUNTERSEPERATION = 200;
94constexpr int MAXMCMCOUNT = 69120;
95constexpr int MAXLINKERRORHISTOGRAMS = 10;
96constexpr int MAXPARSEERRORHISTOGRAMS = 60;
97constexpr unsigned int ETYPEPHYSICSTRIGGER = 0x2;
98constexpr unsigned int ETYPECALIBRATIONTRIGGER = 0x3;
99constexpr int MAXCRUERRORVALUE = 0x2;
100constexpr int INVALIDPRETRIGGERPHASE = 0xf;
101
102} // namespace constants
103} // namespace trd
104} // namespace o2
105
106#endif
constexpr unsigned int CRUPADDING32
padding word used in the cru.
Definition Constants.h:85
constexpr int NBITSTRKLSLOPE
number of bits for slope in tracklet64 word
Definition Constants.h:65
constexpr int NMCMROBINCOL
the number of MCMs per ROB in column direction
Definition Constants.h:49
constexpr int TRACKLETENDMARKER
marker for the end of tracklets in raw data, 2 of these.
Definition Constants.h:88
constexpr int NROBC0
the number of ROBs per C0 chamber
Definition Constants.h:50
constexpr int NFLP
the number of FLP we have.
Definition Constants.h:37
constexpr int FIRSTROW[NSTACK]
first pad row for each stack
Definition Constants.h:44
constexpr int NROBC1
the number of ROBs per C1 chamber
Definition Constants.h:51
constexpr int NCHANNELSC1
the number of readout channels per C1 chamber
Definition Constants.h:56
constexpr int NCRUPERFLP
the number of CRU per FLP
Definition Constants.h:38
constexpr int MAXDATAPERLINK256
max number of linkwords per cru link. (256bit words)
Definition Constants.h:92
constexpr int MAXEVENTCOUNTERSEPERATION
how far apart can subsequent mcmheader event counters be before we flag for concern,...
Definition Constants.h:93
constexpr int DIGITENDMARKER
marker for the end of digits in raw data, 2 of these
Definition Constants.h:90
constexpr int NLAYER
the number of layers
Definition Constants.h:27
constexpr float MPVDEDXDEFAULT
default Most Probable Value of TRD dEdx
Definition Constants.h:80
constexpr int NSECTOR
the number of sectors
Definition Constants.h:25
constexpr float T0DEFAULT
default value for t0
Definition Constants.h:81
constexpr unsigned int ETYPECALIBRATIONTRIGGER
CRU Half Chamber header eventtype definition.
Definition Constants.h:98
constexpr int NHALFCRU
the number of half cru (link bundles)
Definition Constants.h:33
constexpr int TIMEBINS
the number of time bins
Definition Constants.h:74
constexpr int MAXMCMCOUNT
at most mcm count maxchamber x nrobc1 nmcmrob
Definition Constants.h:94
constexpr int NCHANNELSC0
the number of readout channels per C0 chamber
Definition Constants.h:55
constexpr int NCOLUMN
the number of pad columns for each chamber
Definition Constants.h:41
constexpr int ADCBASELINE
baseline in ADC units
Definition Constants.h:71
constexpr int HBFBUFFERMAX
max buffer size for data read from a half cru, (all events)
Definition Constants.h:84
constexpr double EXBDEFAULT
default value for LorentzAngle
Definition Constants.h:78
constexpr int TRDLINKID
hard coded link id, specific to TRD
Definition Constants.h:39
constexpr int NCHANNELSPERSECTOR
then number of readout channels per sector
Definition Constants.h:58
constexpr int NMCMROB
the number of MCMs per ROB
Definition Constants.h:46
constexpr int MAXPARSEERRORHISTOGRAMS
size of the array holding the parsing error plots from the raw reader
Definition Constants.h:96
constexpr float GRANULARITYTRKLSLOPE
granularity of slope in tracklet64 word in pads/timebin
Definition Constants.h:70
constexpr int NCPU
the number of CPUs inside the TRAP chip
Definition Constants.h:60
constexpr int NLINKSPERCRU
the number of links per CRU (two CRUs serve one supermodule)
Definition Constants.h:35
constexpr int MAXLINKERRORHISTOGRAMS
size of the array holding the link error plots from the raw reader
Definition Constants.h:95
constexpr int NOTRACKLETFIT
this value is assigned to the fit pointer in case no tracklet is available
Definition Constants.h:87
constexpr int NBITSTRKLPOS
number of bits for position in tracklet64 word
Definition Constants.h:64
constexpr int PADGRANULARITYTRKLSLOPE
tracklet deflection is stored in units of 1/128 pad per time bin
Definition Constants.h:68
constexpr int NSTACK
the number of stacks per sector
Definition Constants.h:26
constexpr int PADGRANULARITYTRKLPOS
tracklet position is stored in units of 1/40 pad
Definition Constants.h:67
constexpr int NMCMROBINROW
the number of MCMs per ROB in row direction
Definition Constants.h:48
constexpr int NLINKSPERHALFCRU
the number of links per half cru or cru end point.
Definition Constants.h:34
constexpr unsigned int ETYPEPHYSICSTRIGGER
CRU Half Chamber header eventtype definition.
Definition Constants.h:97
constexpr int NROWC0
the number of pad rows for chambers of type C0 (installed in stack 2)
Definition Constants.h:42
constexpr int NADCMCM
the number of ADC channels per MCM
Definition Constants.h:52
constexpr int NHCPERSEC
the number of half-chambers per sector
Definition Constants.h:29
constexpr int NCOLMCM
the number of pads per MCM
Definition Constants.h:53
constexpr int ADDBITSHIFTSLOPE
in the TRAP the slope is shifted by 3 additional bits compared to the position
Definition Constants.h:66
constexpr int PADDINGWORD
half-CRU links will be padded with this words to get an even number of 256bit words
Definition Constants.h:89
constexpr int MAXCHAMBER
the maximum number of installed chambers
Definition Constants.h:30
constexpr int NCHAMBERPERSEC
the number of chambers per sector
Definition Constants.h:28
constexpr int INVALIDPRETRIGGERPHASE
Invalid value for phase, used to signify there is no hcheader.
Definition Constants.h:100
constexpr int NCHAMBER
the number of chambers actually installed
Definition Constants.h:32
constexpr int NCHANNELSTOTAL
the total number of readout channels for TRD
Definition Constants.h:57
constexpr int MAXDATAPERLINK32
max number of 32 bit words per link ((21x12+2+4)*64) 64 mcm, 21 channels, 10 words per channel 2 head...
Definition Constants.h:91
constexpr float GRANULARITYTRKLPOS
granularity of position in tracklet64 word in pad-widths
Definition Constants.h:69
constexpr int MAXHALFCHAMBER
the maximum number of installed half-chambers
Definition Constants.h:31
constexpr double VDRIFTDEFAULT
default value for vDrift
Definition Constants.h:77
constexpr int NROWC1
the number of pad rows for chambers of type C1 (installed in stacks 0, 1, 3 and 4)
Definition Constants.h:43
constexpr int NCHARGES
the number of charges per tracklet (Q0/1/2)
Definition Constants.h:61
constexpr int NCHANNELSPERLAYER
then number of readout channels per layer
Definition Constants.h:59
constexpr int MAXCRUERRORVALUE
Max possible value for a CRU Halfchamber link error. As of may 2022, can only be 0x0,...
Definition Constants.h:99
constexpr int NBINSANGLEDIFF
the number of bins for the track angle used for the vDrift and ExB calibration based on the tracking
Definition Constants.h:76
constexpr float MAXIMPACTANGLE
the maximum impact angle for tracks relative to the TRD detector plane to be considered for vDrift an...
Definition Constants.h:75
constexpr int NMCMHCMAX
the maximum number of MCMs for one half chamber (C1 type)
Definition Constants.h:47
constexpr int NCRU
the number of CRU we have
Definition Constants.h:36
constexpr int NBINSGAINCALIB
number of bins in the charge (Q0+Q1+Q2) histogram for gain calibration
Definition Constants.h:79
constexpr int NCHANNELSPERROW
the number of readout channels per pad row
Definition Constants.h:54
constexpr int CHANNELNRNOTRKLT
this marks channels in the ADC mask which don't contribute to a tracklet
Definition Constants.h:86
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...