Project
Loading...
Searching...
No Matches
TDCCalibConfig.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
12#include "Framework/Logger.h"
14
15using namespace o2::zdc;
16
18{
19 const char* hn[NTDCChannels] = {"ZNAC", "ZNAS", "ZPAC", "ZPAS", "ZEM1", "ZEM2", "ZNCC", "ZNCS", "ZPCC", "ZPCS"};
20 for (Int_t ih = 0; ih < NTDCChannels; ih++) {
21 LOG(info) << hn[ih] << " limits = (" << cutLow[ih] << " : " << cutHigh[ih] << ")";
22 }
23 for (Int_t ih = 0; ih < NTDCChannels; ih++) {
24 LOG(info) << hn[ih] << " booking 1D = (" << nb1[ih] << ", " << amin1[ih] << ", " << amax1[ih] << ")";
25 }
26 for (Int_t ih = 0; ih < NTDCChannels; ih++) {
27 LOG(info) << hn[ih] << " booking 2D = (" << nb2[ih] << ", " << amin2[ih] << ", " << amax2[ih] << ")";
28 }
29}
30
32{
33 for (int32_t ih = 0; ih < NTDCChannels; ih++) {
34 min_e[ih] = val;
35 }
36}
37
39{
40 min_e[ih] = val;
41}
42
44{
45 for (int32_t ih = 0; ih < NTDCChannels; ih++) {
46 cutLow[ih] = -std::numeric_limits<float>::infinity();
47 cutHigh[ih] = std::numeric_limits<float>::infinity();
48 }
49}
50
52{
53 for (int32_t ih = 0; ih < NTDCChannels; ih++) {
54 cutLow[ih] = -std::numeric_limits<float>::infinity();
55 }
56}
57
59{
60 for (int32_t ih = 0; ih < NTDCChannels; ih++) {
61 cutHigh[ih] = std::numeric_limits<float>::infinity();
62 }
63}
64
66{
67 cutLow[ih] = -std::numeric_limits<float>::infinity();
68}
69
71{
72 cutHigh[ih] = std::numeric_limits<float>::infinity();
73}
74
76{
77 for (int32_t ih = 0; ih < NTDCChannels; ih++) {
78 cutLow[ih] = val;
79 }
80}
81
83{
84 for (int32_t ih = 0; ih < NTDCChannels; ih++) {
85 cutHigh[ih] = val;
86 }
87}
88
89void TDCCalibConfig::setCutLow(int ih, double val)
90{
91 cutLow[ih] = val;
92}
93
94void TDCCalibConfig::setCutHigh(int ih, double val)
95{
96 cutHigh[ih] = val;
97}
98
99void TDCCalibConfig::setCuts(double low, double high)
100{
101 for (int32_t ih = 0; ih < NTDCChannels; ih++) {
102 cutLow[ih] = low;
103 cutHigh[ih] = high;
104 }
105}
106
107void TDCCalibConfig::setCuts(int ih, double low, double high)
108{
109 cutLow[ih] = low;
110 cutHigh[ih] = high;
111}
112
113void TDCCalibConfig::setBinning1D(int nb, double amin, double amax)
114{
115 for (int32_t ih = 0; ih < NTDCChannels; ih++) {
116 nb1[ih] = nb;
117 amin1[ih] = amin;
118 amax1[ih] = amax;
119 }
120}
121
122void TDCCalibConfig::setBinning2D(int nb, double amin, double amax)
123{
124 for (int32_t ih = 0; ih < NTDCChannels; ih++) {
125 nb2[ih] = nb;
126 amin2[ih] = amin;
127 amax2[ih] = amax;
128 }
129}
130
131void TDCCalibConfig::setBinning1D(int ih, int nb, double amin, double amax)
132{
133 nb1[ih] = nb;
134 amin1[ih] = amin;
135 amax1[ih] = amax;
136}
137
138void TDCCalibConfig::setBinning2D(int ih, int nb, double amin, double amax)
139{
140 nb2[ih] = nb;
141 amin2[ih] = amin;
142 amax2[ih] = amax;
143}
Configuration of ZDC TDC calibration procedure.
GLuint GLfloat * val
Definition glcorearb.h:1582
int nb2[NTDCChannels]
maximum
void setCutHigh(double val)
void setCuts(double low, double high)
double amax1[NTDCChannels]
minimum
void setCutLow(double val)
double min_e[NTDCChannels]
double cutLow[NTDCChannels]
void setBinning1D(int nb, double amin, double amax)
static constexpr int NTDCChannels
void setMinEntries(double val)
void setBinning2D(int nb, double amin, double amax)
double amax2[NTDCChannels]
minimum
double amin2[NTDCChannels]
2D histogram: number of bins
double amin1[NTDCChannels]
1D histogram: number of bins
int nb1[NTDCChannels]
double cutHigh[NTDCChannels]
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"