Project
Loading...
Searching...
No Matches
SACCCDBHelper.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_SACCCDBHELPER_H_
17#define ALICEO2_TPC_SACCCDBHELPER_H_
18
19#include "DataFormatsTPC/Defs.h"
20#include "TPCBase/Sector.h"
21
22namespace o2::tpc
23{
24
25struct SACZero;
26struct SACOne;
27struct FourierCoeffSAC;
28template <typename DataT>
29struct SACDelta;
30
32template <typename DataT = unsigned short>
34{
35 public:
37 SACCCDBHelper() = default;
38
41
43 void setSACZero(SACZero* SACZero) { mSACZero = SACZero; }
44
46 void setSACOne(SACOne* SACOne) { mSACOne = SACOne; }
47
49 void setFourierCoeffs(FourierCoeffSAC* fourier) { mFourierCoeff = fourier; }
50
52 unsigned int getNIntegrationIntervalsSACDelta(const o2::tpc::Side side) const;
53
55 unsigned int getNIntegrationIntervalsSACOne(const o2::tpc::Side side) const;
56
60 float getSACZeroVal(const unsigned int sector, const unsigned int stack) const;
61
66 float getSACDeltaVal(const unsigned int sector, const unsigned int stack, unsigned int integrationInterval) const;
67
71 float getSACOneVal(const o2::tpc::Side side, const unsigned int integrationInterval) const;
72
77 float getSACVal(const unsigned int sector, const unsigned int stack, unsigned int integrationInterval) const;
78
82 void drawSACZeroSide(const o2::tpc::Side side, const std::string filename = "SACZeroSide.pdf", const float minZ = 0, const float maxZ = -1) const { drawSACZeroHelper(true, side == Side::A ? Sector(0) : Sector(Sector::MAXSECTOR - 1), filename, minZ, maxZ); }
83
88 void drawSACDeltaSide(const o2::tpc::Side side, const unsigned int integrationInterval, const std::string filename = "SACDeltaSide.pdf", const float minZ = 0, const float maxZ = -1) const { drawSACDeltaHelper(true, side == Side::A ? Sector(0) : Sector(Sector::MAXSECTOR - 1), integrationInterval, filename, minZ, maxZ); }
89
94 void drawSACSide(const o2::tpc::Side side, const unsigned int integrationInterval, const std::string filename = "SACSide.pdf", const float minZ = 0, const float maxZ = -1) const { drawSACHelper(true, side == Side::A ? Sector(0) : Sector(Sector::MAXSECTOR - 1), integrationInterval, filename, minZ, maxZ); }
95
99 void drawSACZeroSector(const unsigned int sector, const std::string filename = "SACZeroSector.pdf", const float minZ = 0, const float maxZ = -1) const { drawSACZeroHelper(false, Sector(sector), filename, minZ, maxZ); }
100
105 void drawSACDeltaSector(const unsigned int sector, const unsigned int integrationInterval, const std::string filename = "SACDeltaSector.pdf", const float minZ = 0, const float maxZ = -1) const { drawSACDeltaHelper(false, Sector(sector), integrationInterval, filename, minZ, maxZ); }
106
111 void drawSACSector(const unsigned int sector, const unsigned int integrationInterval, const std::string filename = "SACSector.pdf", const float minZ = 0, const float maxZ = -1) const { drawSACHelper(false, Sector(sector), integrationInterval, filename, minZ, maxZ); }
112
115 void dumpToTree(const char* outFileName = "SACCCDBTree.root") const;
116
119 void dumpToFourierCoeffToTree(const char* outFileName = "FourierCCDBTree.root") const;
120
121 private:
122 SACZero* mSACZero = nullptr;
123 SACDelta<DataT>* mSACDelta = nullptr;
124 SACOne* mSACOne = nullptr;
125 FourierCoeffSAC* mFourierCoeff = nullptr;
126
130 void drawSACZeroHelper(const bool type, const Sector sector, const std::string filename, const float minZ, const float maxZ) const;
131
136 void drawSACDeltaHelper(const bool type, const Sector sector, const unsigned int integrationInterval, const std::string filename, const float minZ, const float maxZ) const;
137
142 void drawSACHelper(const bool type, const Sector sector, const unsigned int integrationInterval, const std::string filename, const float minZ, const float maxZ) const;
143};
144
145} // namespace o2::tpc
146
147#endif
uint32_t side
Definition RawData.h:0
uint32_t stack
Definition RawData.h:1
void drawSACZeroSector(const unsigned int sector, const std::string filename="SACZeroSector.pdf", const float minZ=0, const float maxZ=-1) const
void setSACDelta(SACDelta< DataT > *SACDelta)
setting the SACDelta class member
void drawSACSector(const unsigned int sector, const unsigned int integrationInterval, const std::string filename="SACSector.pdf", const float minZ=0, const float maxZ=-1) const
void drawSACDeltaSide(const o2::tpc::Side side, const unsigned int integrationInterval, const std::string filename="SACDeltaSide.pdf", const float minZ=0, const float maxZ=-1) const
void drawSACZeroSide(const o2::tpc::Side side, const std::string filename="SACZeroSide.pdf", const float minZ=0, const float maxZ=-1) const
void dumpToTree(const char *outFileName="SACCCDBTree.root") const
void drawSACSide(const o2::tpc::Side side, const unsigned int integrationInterval, const std::string filename="SACSide.pdf", const float minZ=0, const float maxZ=-1) const
unsigned int getNIntegrationIntervalsSACDelta(const o2::tpc::Side side) const
float getSACVal(const unsigned int sector, const unsigned int stack, unsigned int integrationInterval) const
SACCCDBHelper()=default
constructor
void setFourierCoeffs(FourierCoeffSAC *fourier)
setting the fourier coefficients
float getSACOneVal(const o2::tpc::Side side, const unsigned int integrationInterval) const
void setSACOne(SACOne *SACOne)
setting the 1D-SACs
void drawSACDeltaSector(const unsigned int sector, const unsigned int integrationInterval, const std::string filename="SACDeltaSector.pdf", const float minZ=0, const float maxZ=-1) const
void dumpToFourierCoeffToTree(const char *outFileName="FourierCCDBTree.root") const
float getSACDeltaVal(const unsigned int sector, const unsigned int stack, unsigned int integrationInterval) const
void setSACZero(SACZero *SACZero)
setting the 0D-SACs
unsigned int getNIntegrationIntervalsSACOne(const o2::tpc::Side side) const
float getSACZeroVal(const unsigned int sector, const unsigned int stack) const
static constexpr int MAXSECTOR
Definition Sector.h:44
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
Side
TPC readout sidE.
Definition Defs.h:35
@ A
Definition Defs.h:35
std::string filename()