Project
Loading...
Searching...
No Matches
IDCAverageGroupBase.cxx
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
13#include "TPCBase/Mapper.h"
15
16void o2::tpc::IDCAverageGroupBase<o2::tpc::IDCAverageGroupCRU>::drawUngroupedIDCs(const unsigned int integrationInterval, const std::string filename) const
17{
18 std::function<float(const unsigned int, const unsigned int, const unsigned int, const unsigned int)> idcFunc = [this, integrationInterval](const unsigned int, const unsigned int region, const unsigned int row, const unsigned int pad) {
19 return this->getUngroupedNormedIDCValLocal(row, pad, integrationInterval);
20 };
21
22 IDCDrawHelper::IDCDraw drawFun;
23 drawFun.mIDCFunc = idcFunc;
24 const std::string zAxisTitle = IDCDrawHelper::getZAxisTitle(IDCType::IDC);
25 IDCDrawHelper::drawSector(drawFun, this->mIDCsGrouped.getRegion(), this->mIDCsGrouped.getRegion() + 1, 0, zAxisTitle, filename);
26}
27
29{
30 mIDCsUngrouped = idcs;
31 mIDCsGrouped.resize(getNIntegrationIntervals());
32}
33
35{
36 mIDCsUngrouped = std::move(idcs);
37 mIDCsGrouped.resize(getNIntegrationIntervals());
38}
39
40void o2::tpc::IDCAverageGroupBase<o2::tpc::IDCAverageGroupTPC>::drawIDCDeltaHelper(const bool type, const Sector sector, const unsigned int integrationInterval, const bool grouped, const std::string filename) const
41{
42 std::function<float(const unsigned int, const unsigned int, const unsigned int, const unsigned int)> idcFunc = [this, integrationInterval, grouped](const unsigned int sector, const unsigned int region, const unsigned int irow, const unsigned int pad) {
43 return grouped ? this->getGroupedIDCDeltaVal(sector, region, irow, pad, integrationInterval) : this->getUngroupedIDCDeltaVal(sector, region, irow, pad, integrationInterval);
44 };
45 IDCDrawHelper::IDCDraw drawFun;
46 drawFun.mIDCFunc = idcFunc;
47 const std::string zAxisTitle = IDCDrawHelper::getZAxisTitle(IDCType::IDCDelta, IDCDeltaCompression::NO);
48 type ? IDCDrawHelper::drawSide(drawFun, sector.side(), zAxisTitle, filename) : IDCDrawHelper::drawSector(drawFun, 0, Mapper::NREGIONS, sector, zAxisTitle, filename);
49}
50
52{
53 const unsigned int nIDCs = mIDCGroupHelperSector.getNIDCsPerSector() * SECTORSPERSIDE * getNIntegrationIntervals();
54 mIDCsGrouped.resize(nIDCs);
55}
56
57void o2::tpc::IDCAverageGroupBase<o2::tpc::IDCAverageGroupTPC>::setIDCs(const IDCDelta<float>& idcs, const Side side)
58{
59 mSide = side;
60 mIDCsUngrouped = idcs;
61 resizeGroupedIDCs();
62}
63
65{
66 mSide = side;
67 mIDCsUngrouped = std::move(idcs);
68 resizeGroupedIDCs();
69}
70
72{
73 std::fill(mIDCsGrouped.getIDCDelta().begin(), mIDCsGrouped.getIDCDelta().end(), 0);
74}
base class for averaging and grouping of IDCs
helper class for drawing IDCs per region/side
uint32_t side
Definition RawData.h:0
Helper class for either perform the grouping or draw the grouping.
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
return * this
constexpr unsigned char SECTORSPERSIDE
Definition Defs.h:40
std::string filename()
std::vector< int > row