Project
Loading...
Searching...
No Matches
IDCGroupingParameter.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_TPC_IDCGROUPINGPARAMETER_H_
17#define ALICEO2_TPC_IDCGROUPINGPARAMETER_H_
18
19#include <array>
21#include "TPCBase/Mapper.h"
22
23namespace o2
24{
25namespace tpc
26{
27
29enum class AveragingMethod : char {
30 FAST = 0,
31 SLOW = 1
32};
33
34enum class EdgePadGroupingMethod : char {
35 NO = 0,
36 ROWS = 1
37};
38
40struct ParameterIDCGroup : public o2::conf::ConfigurableParamHelper<ParameterIDCGroup> {
41 unsigned char groupPads[Mapper::NREGIONS]{7, 7, 7, 7, 6, 6, 6, 6, 5, 5};
42 unsigned char groupRows[Mapper::NREGIONS]{5, 5, 5, 5, 4, 4, 4, 4, 3, 3};
43 unsigned char groupLastRowsThreshold[Mapper::NREGIONS]{3, 3, 3, 3, 2, 2, 2, 2, 2, 2};
44 unsigned char groupLastPadsThreshold[Mapper::NREGIONS]{3, 3, 3, 3, 2, 2, 2, 2, 1, 1};
45 unsigned int groupPadsSectorEdges{0};
47 float sigma = 3.f;
48 float minIDC0Median = 8;
49 float maxIDC0Median = 15;
51
57 static void setGroupingParameterFromString(const std::string sgroupPads, const std::string sgroupRows, const std::string sgroupLastRowsThreshold, const std::string sgroupLastPadsThreshold);
58
61 static unsigned int getTotalGroupPadsSectorEdges(unsigned int groupPadsSectorEdges) { return getTotalGroupPadsSectorEdgesHelper(groupPadsSectorEdges / 10); }
62
65 static unsigned int getGroupedPadsSectorEdges(unsigned int groupPadsSectorEdges) { return getGroupedPadsSectorEdgesHelper(groupPadsSectorEdges / 10); }
66
70
74 static unsigned int getPadsInGroupSectorEdges(unsigned int groupPadsSectorEdges, const unsigned int group) { return getPadsInGroupSectorEdgesHelper(groupPadsSectorEdges / 10, group); }
75
76 private:
79 static unsigned int getTotalGroupPadsSectorEdgesHelper(unsigned int groupPadsSectorEdges);
80
83 static unsigned int getGroupedPadsSectorEdgesHelper(unsigned int groupPadsSectorEdges);
84
88 static unsigned int getPadsInGroupSectorEdgesHelper(unsigned int groupPadsSectorEdges, const unsigned int group);
89
90 O2ParamDef(ParameterIDCGroup, "TPCIDCGroupParam");
91};
92
95
102 ParameterIDCGroupCCDB(const std::array<unsigned char, Mapper::NREGIONS>& groupPads, const std::array<unsigned char, Mapper::NREGIONS>& groupRows, const std::array<unsigned char, Mapper::NREGIONS>& groupLastRowsThreshold, const std::array<unsigned char, Mapper::NREGIONS>& groupLastPadsThreshold, const unsigned int groupNotnPadsSectorEdges)
104
106
109 unsigned char getGroupPads(const unsigned int region) const { return groupPads[region]; }
110
113 unsigned char getGroupRows(const unsigned int region) const { return groupRows[region]; }
114
117 unsigned char getGroupLastRowsThreshold(const unsigned int region) const { return groupLastRowsThreshold[region]; }
118
121 unsigned char getGroupLastPadsThreshold(const unsigned int region) const { return groupLastPadsThreshold[region]; }
122
124 unsigned int getGroupPadsSectorEdges() const { return groupPadsSectorEdges; }
125
128
132
134 const std::array<unsigned char, Mapper::NREGIONS>& getGroupPads() const { return groupPads; }
135
137 const std::array<unsigned char, Mapper::NREGIONS>& getGroupRows() const { return groupRows; }
138
140 const std::array<unsigned char, Mapper::NREGIONS>& getGroupLastRowsThreshold() const { return groupLastRowsThreshold; }
141
143 const std::array<unsigned char, Mapper::NREGIONS>& getGroupLastPadsThreshold() const { return groupLastPadsThreshold; }
144
147
150 unsigned int getPadsInGroupSectorEdges(const unsigned indexGroup) const { return ParameterIDCGroup::getPadsInGroupSectorEdges(groupPadsSectorEdges, indexGroup); }
151
152 std::array<unsigned char, Mapper::NREGIONS> groupPads{};
153 std::array<unsigned char, Mapper::NREGIONS> groupRows{};
154 std::array<unsigned char, Mapper::NREGIONS> groupLastRowsThreshold{};
155 std::array<unsigned char, Mapper::NREGIONS> groupLastPadsThreshold{};
156 unsigned int groupPadsSectorEdges{0};
157};
158
159struct ParameterIDCCompression : public o2::conf::ConfigurableParamHelper<ParameterIDCCompression> {
160 float maxIDCDeltaValue = 3.f;
161 float minIDCDeltaValue = -1.f;
162 O2ParamDef(ParameterIDCCompression, "TPCIDCCompressionParam");
163};
164
165} // namespace tpc
166} // namespace o2
167
168#endif // ALICEO2_TPC_ParameterGEM_H_
#define O2ParamDef(classname, key)
static constexpr unsigned int NREGIONS
total number of regions in one sector
Definition Mapper.h:527
GLboolean GLuint group
Definition glcorearb.h:3991
@ ROWS
grouping in row direction
@ NO
no compression using floats
AveragingMethod
averaging methods which is used for averaging IDCs from grouped pads
@ SLOW
Outlier filtering performed. Filtering + averaging.
@ FAST
no outlier filtering performed. Only averaging
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
O2ParamDef(ParameterIDCCompression, "TPCIDCCompressionParam")
struct for storing the parameters for the grouping of IDCs to CCDB
unsigned int getTotalGroupPadsSectorEdges() const
returns total number of pads which are grouped separately: calculate sum of all digits in integer val...
unsigned char getGroupRows(const unsigned int region) const
const std::array< unsigned char, Mapper::NREGIONS > & getGroupPads() const
unsigned char getGroupLastPadsThreshold(const unsigned int region) const
const std::array< unsigned char, Mapper::NREGIONS > & getGroupLastRowsThreshold() const
std::array< unsigned char, Mapper::NREGIONS > groupLastRowsThreshold
if the last group (region edges) consists in row direction less then mGroupLastRowsThreshold pads the...
unsigned int getGroupedPadsSectorEdges() const
EdgePadGroupingMethod getEdgePadGroupingType() const
const std::array< unsigned char, Mapper::NREGIONS > & getGroupRows() const
ParameterIDCGroupCCDB(const std::array< unsigned char, Mapper::NREGIONS > &groupPads, const std::array< unsigned char, Mapper::NREGIONS > &groupRows, const std::array< unsigned char, Mapper::NREGIONS > &groupLastRowsThreshold, const std::array< unsigned char, Mapper::NREGIONS > &groupLastPadsThreshold, const unsigned int groupNotnPadsSectorEdges)
unsigned char getGroupLastRowsThreshold(const unsigned int region) const
std::array< unsigned char, Mapper::NREGIONS > groupRows
grouping parameter in pad direction (how many pads in pad direction are grouped)
unsigned int groupPadsSectorEdges
decoded number of pads at the sector edges which are grouped differently (example: 0: no pads are gro...
std::array< unsigned char, Mapper::NREGIONS > groupLastPadsThreshold
if the last group (sector edges) consists in pad direction less then mGroupLastPadsThreshold pads the...
unsigned int getPadsInGroupSectorEdges(const unsigned indexGroup) const
unsigned char getGroupPads(const unsigned int region) const
unsigned int getGroupPadsSectorEdges() const
std::array< unsigned char, Mapper::NREGIONS > groupPads
grouping parameter in pad direction (how many pads in pad direction are grouped)
const std::array< unsigned char, Mapper::NREGIONS > & getGroupLastPadsThreshold() const
struct for setting the parameters for the grouping of IDCs
AveragingMethod method
method which is used for averaging
float sigma
sigma cut which can be used during the grouping for outlier filtering
unsigned char groupLastPadsThreshold[Mapper::NREGIONS]
if the last group (sector edges) consists in pad direction less then mGroupLastPadsThreshold pads the...
unsigned char groupLastRowsThreshold[Mapper::NREGIONS]
if the last group (region edges) consists in row direction less then mGroupLastRowsThreshold pads the...
float maxIDC0Median
this value is used for identifying outliers (pads with high IDC0 values): "accepted IDC 0 values < me...
static void setGroupingParameterFromString(const std::string sgroupPads, const std::string sgroupRows, const std::string sgroupLastRowsThreshold, const std::string sgroupLastPadsThreshold)
static EdgePadGroupingMethod getEdgePadGroupingType(unsigned int groupPadsSectorEdges)
float minIDC0Median
this value is used for identifying outliers (pads with low IDC0 values): "accepted IDC 0 values > med...
static unsigned int getGroupedPadsSectorEdges(unsigned int groupPadsSectorEdges)
unsigned int groupPadsSectorEdges
decoded number of pads at the sector edges which are grouped differently. First digit specifies the E...
static unsigned int getPadsInGroupSectorEdges(unsigned int groupPadsSectorEdges, const unsigned int group)
static unsigned int getTotalGroupPadsSectorEdges(unsigned int groupPadsSectorEdges)
float minmaxIDC0MedianCentreEdge
this value is used for identifying outliers at the centre of the cross and the edges of the sector i....
unsigned char groupRows[Mapper::NREGIONS]
group parameter in row direction (how many rows are grouped)
unsigned char groupPads[Mapper::NREGIONS]
grouping parameter in pad direction (how many pads are grouped)