Project
Loading...
Searching...
No Matches
IDCDrawHelper.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_IDCDRAWHELPER_H_
17#define ALICEO2_TPC_IDCDRAWHELPER_H_
18
19#include "DataFormatsTPC/Defs.h"
20#include "functional"
22
23class TH2Poly;
24class TCanvas;
25class TH1F;
26class TH2F;
27
28namespace o2::tpc
29{
30
32{
33
34 public:
40 struct IDCDraw {
41 float getIDC(const unsigned int sector, const unsigned int region, const unsigned int row, const unsigned int pad) const { return mIDCFunc(sector, region, row, pad); }
42 std::function<float(const unsigned int, const unsigned int, const unsigned int, const unsigned int)> mIDCFunc;
43 };
44
54 static void drawSector(const IDCDraw& idc, const unsigned int startRegion, const unsigned int endRegion, const unsigned int sector, const std::string zAxisTitle, const std::string filename, const float minZ = 0, const float maxZ = -1);
55
63 static void drawSide(const IDCDraw& idc, const o2::tpc::Side side, const std::string zAxisTitle, const std::string filename, const float minZ = 0, const float maxZ = -1);
64 static TH2Poly* drawSide(const IDCDraw& idc, const o2::tpc::Side side, const std::string zAxisTitle);
65 static TH1F* drawSide(const IDCDraw& idc, std::string_view type, const o2::tpc::Side side, const int nbins1D, const float xMin1D, const float xMax1D);
66 static void drawRadialProfile(const IDCDraw& idc, TH2F& hist, const o2::tpc::Side side);
67 static void drawIDCZeroStackCanvas(const IDCDraw& idc, const o2::tpc::Side side, const std::string_view type, const int nbins1D, const float xMin1D, const float xMax1D, TCanvas& outputCanvas, int integrationInterval);
68
69 struct IDCDrawGIF {
70 std::function<float(const unsigned int, const unsigned int, const unsigned int, const unsigned int, const unsigned int)> mIDCFunc;
71 std::function<float(const o2::tpc::Side side, const unsigned int)> mIDCOneFunc;
72 };
73
81 static void drawSideGIF(const IDCDrawGIF& idcs, const unsigned int slices, const std::string zAxisTitle, const std::string filename = "IDCs", const float minZ = 0, const float maxZ = -1, const int run = -1);
82
86 static std::string getZAxisTitle(const IDCType type, const IDCDeltaCompression compression = IDCDeltaCompression::NO);
87
88 private:
89 static unsigned int getPad(const unsigned int pad, const unsigned int region, const unsigned int row, const Side side);
90};
91
92} // namespace o2::tpc
93
94#endif
This file provides the structs for storing the factorized IDC values and fourier coefficients to be s...
uint32_t side
Definition RawData.h:0
static void drawIDCZeroStackCanvas(const IDCDraw &idc, const o2::tpc::Side side, const std::string_view type, const int nbins1D, const float xMin1D, const float xMax1D, TCanvas &outputCanvas, int integrationInterval)
static void drawSideGIF(const IDCDrawGIF &idcs, const unsigned int slices, const std::string zAxisTitle, const std::string filename="IDCs", const float minZ=0, const float maxZ=-1, const int run=-1)
make a GIF of IDCs for A and C side and the 1D IDCs
static std::string getZAxisTitle(const IDCType type, const IDCDeltaCompression compression=IDCDeltaCompression::NO)
static void drawRadialProfile(const IDCDraw &idc, TH2F &hist, const o2::tpc::Side side)
static void drawSector(const IDCDraw &idc, const unsigned int startRegion, const unsigned int endRegion, const unsigned int sector, const std::string zAxisTitle, const std::string filename, const float minZ=0, const float maxZ=-1)
static void drawSide(const IDCDraw &idc, const o2::tpc::Side side, const std::string zAxisTitle, const std::string filename, const float minZ=0, const float maxZ=-1)
GLint GLint GLsizei GLint GLenum GLenum type
Definition glcorearb.h:275
GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat maxZ
Definition glcorearb.h:2910
GLfloat GLfloat minZ
Definition glcorearb.h:2910
Global TPC definitions and constants.
Definition SimTraits.h:167
IDCType
IDC types.
Side
TPC readout sidE.
Definition Defs.h:35
IDCDeltaCompression
IDC Delta IDC Compression types.
@ NO
no compression using floats
std::string filename()
std::function< float(const o2::tpc::Side side, const unsigned int)> mIDCOneFunc
function returning the value which will be drawn for side, slice
std::function< float(const unsigned int, const unsigned int, const unsigned int, const unsigned int, const unsigned int)> mIDCFunc
function returning the value which will be drawn for sector, region, row, pad
std::function< float(const unsigned int, const unsigned int, const unsigned int, const unsigned int)> mIDCFunc
function returning the value which will be drawn for sector, region, row, pad
float getIDC(const unsigned int sector, const unsigned int region, const unsigned int row, const unsigned int pad) const
std::vector< int > row