Project
Loading...
Searching...
No Matches
CompressedHeader.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
12//#include "TRDBase/TRDGeometryBase.h"
13//#include "DetectorsCommonDataFormats/DetMatrixCache.h"
14//#include "DetectorsCommonDataFormats/DetID.h"
15
16#ifndef O2_TRD_COMPRESSEDHEADER_H
17#define O2_TRD_COMPRESSEDHEADER_H
18
20// //
21// TRD Compressed Header //
22// struct to hold the header for the raw compressed data of tracklet64
23// when compression happens on the flp
24// Authors //
25// Sean Murray (murrays@cern.ch) //
26//
28#include "Rtypes.h" // for ClassDef
29#include "fairlogger/Logger.h"
30
31namespace o2
32{
33namespace trd
34{
35/* |63|62|61|60|59|58|57|56|55|54|53|52|51|50|49|48|47|46|45|44|43|42|41|40|39|38|37|36|35|34|33|32|
36 -------------------------------------------------------------------------------------------------
37Word 0 | Format | time since frame start |
38 -------------------------------------------------------------------------------------------------
39 |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00|
40 -------------------------------------------------------------------------------------------------
41Word 0 | length of data block |
42 -------------------------------------------------------------------------------------------------
43This is chosen to be a 64 bit word as this is essentially a fake tracklet64 posing as a header.
44This then explains the sizes.
45Format is 4 bits, we only need 3 formats for now.
46*/
48 union {
50 struct {
51 uint64_t size : 32; // size of curent block, including this header in 64bit words.
52 uint64_t eventtime : 28; // time from beginning of the time frame
53 uint8_t format : 4; // format of data 1=tracklets,2=digits, 3=config.
54 } __attribute__((__packed__));
55 uint64_t word1; // stores the information that will end up in the triggerrecord.
56 struct {
57 uint16_t bc : 16; // bunch crossing coming from rdh
58 uint32_t orbit : 32; // orbit of lhc
59 uint16_t padding : 16; // 0xeeee
60 } __attribute__((__packed__));
61 };
62};
63//This is simply 64bits of e to mark the end and enable some form of error checking.
64//this appears at the end of tracklets.
65//i.e. start pointer + header.size -1 == Compressed Trailer position.
67 union {
68 uint64_t word; //0xeeeeeexxxxeeeeeeLL where xxxx is the number of digits to follow, max digits on a link is 15*8*16*21 (links*rob*mcm*adc)
69 //TODO I think is off by a factor of 2 but does not matter, the first 'x' is padded in anycase, so would not save in the hex definition above.
70 struct {
71 uint32_t pad2 : 24; // padding e as a marker
72 uint16_t digitcount : 16; // count of digits to come
73 uint32_t pad1 : 24; // padding e as marker
74 } __attribute__((__packed__));
75 };
76};
77
78/* |31|30|29|28|27|26|25|24|23|22|21|20|19|18|17|16|15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00|
79 -------------------------------------------------------------------------------------------------
80Word | detector | rob | mcm | ???????????? |
81 -------------------------------------------------------------------------------------------------
82time is supplied by the compressedrawheader of the tracklets which is always there.
83detector [0-540] 9 bits , rob [0-8] 3 bits , mcm [0-16] 4
84= 15 bits ... what to do with the other 17 bits ?
85Word of caution, tracklets word size is 64 bit digit word size is 32.
86So the raw data has 2 *different* word sizes!
87TODO ignoring config data of course.
88digits are padded at end with a digit end marker (32 bits of 0xe) and then padded to 64 bits.
89i.e. possibly 64 bits of 0xe
90TODO in real data are the digits sent in zero suppresed?
91*/
92
94 union {
96 struct {
97 uint32_t padding : 16; // padding e as a marker
98 uint16_t mcm : 4; // count of digits to come
99 uint16_t rob : 3; // count of digits to come
100 uint32_t dector : 9; // detector number
101 } __attribute__((__packed__));
102 };
103};
104
106 uint32_t word; // 0xeeeeeeee can be doubled up to pad to 64bit wide data.
107};
108
109//For now we ignore config data.
110//TODO add config data ....
111//
112} //namespace trd
113} //namespace o2
114#endif
unsigned short int uint16_t
Timeframe settings Average distance in cm of events merged into Randomize distance around average distance of merged events Simulate correct bunch interactions instead of placing only the average number of events A value[n] sets TFlen for[n] collisions in Number of bunches per trainsort Number of bunch trains Instantaneous interaction rate Do not simulate border Total number of collisions to be placed in the interior of all time Do not select random but walk over array of events in stride steps h Event generator settings h configStandalone Use CPU for GPU Force usage of the specified GPU device no CPU fallback Continue processing after an error First event to Number of events to Number of iterations to Number of iterations to Number of initial iterations excluded from const char Directory with events to Events directory is and not inside events Show standalone event Run event generator maximum time bin of continuous for triggered for automatic continuous for automatic continuous triggered uint64_t
configStandalone Reconstruction rec_tpc multiplier for the combined cluster track error during track following area in cm for the search of for z only used if decrease removal by when above this local occupancy rowx Shift of TPC revert cluster flag edge bit distance to edge exceeds this ZOffset for secondary multiple of radius max P of electron K BB bands crossing max P of electron p BB bands crossing max P of electron d BB bands crossing max P of electron t BB bands crossing min accepted dEdxMaxTPC of the track Additive extra cluster error for Y2 if edge flag set Additive extra cluster error for Y2 if single set Additive extra cluster error for Y2 if or single set Additive extra cluster error for Z2 if or single set Extra errors to add to track when crossing depending on addErrorsCECrossing Inner portion of y range in sector that is not used in searching for extrapolated track candidates factor2YS for track merging factor2K for track merging Margin in cm of Y position when rejecting edge clusters based on uncorrected track Y Max fraction of shared clusters for tracklet Except pad from cluster finding if total number of charges in a fragment is above this Except pad from cluster finding if number of consecutive charges in a fragment is above this Threshold where a timebin is considered disabling the noisy pad check for that pad Treat signal above this minimum as saturated Smoothing factor for the exponential Highly Ionising Particle tail filter Number of timebins to use for the averaging Add additional custom track errors when crossing relative as fraction of Do N fit passes in final fit of< 0:reject at max -n hits") AddOptionRTC(rejectIFCLowRadiusCluster, uint8_t, 1, "", 0, "Reject clusters that get the IFC mask error during refit") AddOptionRTC(dEdxTruncLow, uint8_t, 2, "", 0, "Low truncation threshold, fraction of 128") AddOptionRTC(dEdxTruncHigh, uint8_t, 77, "", 0, "High truncation threshold, fraction of 128") AddOptionRTC(extrapolationTracking, int8_t, 1, "", 0, "Enable Extrapolation Tracking(prolong tracks to adjacent sectors to find short segments)") AddOptionRTC(disableRefitAttachment, uint8_t, 0, "", 0, "Bitmask to disable certain attachment steps during refit(1:attachment, 2:propagation, 4:loop following, 8:mirroring)") AddOptionRTC(rejectionStrategy, uint8_t, o2::gpu::GPUSettings::RejectionStrategyA, "", 0, "Enable rejection of TPC clusters for compression(0=no, 1=strategy A, 2=strategy B)") AddOptionRTC(mergeLoopersAfterburner, uint8_t, 1, "", 0, "Run afterburner for additional looper merging") AddOptionRTC(compressionTypeMask, uint8_t, o2::gpu::GPUSettings::CompressionFull, "", 0, "TPC Compression mode bits(1=truncate charge/width LSB, 2=differences, 4=track-model)") AddOptionRTC(compressionSortOrder, uint8_t, o2::gpu::GPUSettings::SortTime, "", 0, "Sort order of TPC compression(0=time, 1=pad, 2=Z-time-pad, 3=Z-pad-time, 4=no sorting(use incoming order))") AddOptionRTC(sigBitsCharge, uint8_t, 4, "", 0, "Number of significant bits for TPC cluster charge in compression mode 1") AddOptionRTC(sigBitsWidth, uint8_t, 3, "", 0, "Number of significant bits for TPC cluster width in compression mode 1") AddOptionRTC(dropLoopers, uint8_t, 0, "", 0, "Drop looping tracks starting from second loop") AddOptionRTC(mergerInterpolateErrors, uint8_t, 1, "", 0, "Use interpolation instead of extrapolation for chi2 based cluster rejection") AddOptionRTC(mergerInterpolateRejectAlsoOnCurrentPosition, uint8_t, 1, "", 0, "When using mergerInterpolateErrors, reject based on chi2 twice computed with interpolated and current track position starting from NDF > mergerNonInterpolateRejectMinNDF Merge tracks accross the central electrode Enable PID response Add sub threshold clusters in TPC dEdx computation OR mask of TPC flags that will reject the cluster in alternative dEdx Reject edge clusters based on uncorrected track Y during track fit Increase decrease removal by when on this number of pads from the edge h trd
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
union o2::trd::CompressedRawDigitHeader::@113 __attribute__
union o2::trd::CompressedRawTrackletDigitSeperator::@111 __attribute__