Project
Loading...
Searching...
No Matches
TPCPadGainCalib.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
14
15
#include "
TPCPadGainCalib.h
"
16
17
#include "
GPUTPCGeometry.h
"
18
#include "
DataFormatsTPC/Constants.h
"
19
20
using namespace
o2::gpu
;
21
22
TPCPadGainCalib::TPCPadGainCalib
()
23
{
24
GPUTPCGeometry
geo{};
25
int32_t
offset
= 0;
26
for
(int32_t
r
= 0;
r
<
GPUCA_ROW_COUNT
;
r
++) {
27
mPadOffsetPerRow[
r
] =
offset
;
28
offset
+= geo.NPads(
r
);
29
}
30
}
31
32
#ifndef GPUCA_STANDALONE
33
#include "
TPCBase/CalDet.h
"
34
35
TPCPadGainCalib::TPCPadGainCalib
(
const
o2::tpc::CalDet<float>
& gainMap) :
TPCPadGainCalib
()
36
{
37
setFromMap
(gainMap);
38
}
39
40
TPCPadGainCalib::TPCPadGainCalib
(
const
o2::tpc::CalDet<float>
& gainMap,
const
float
minValue,
const
float
maxValue,
const
bool
inv) :
TPCPadGainCalib
()
41
{
42
setMinCorrectionFactor(minValue);
43
setMaxCorrectionFactor(maxValue);
44
setFromMap
(gainMap, inv);
45
}
46
47
void
TPCPadGainCalib::setFromMap
(
const
o2::tpc::CalDet<float>
& gainMap,
const
bool
inv)
48
{
49
for
(int32_t sector = 0; sector <
o2::tpc::constants::MAXSECTOR
; sector++) {
50
for
(int32_t p = 0; p <
TPC_PADS_IN_SECTOR
; p++) {
51
const
float
gainVal = gainMap.
getValue
(sector, p);
52
inv ? mGainCorrection[sector].set(p, (gainVal > 1.e-5f) ? 1.f / gainVal : 1.f) : mGainCorrection[sector].set(p, gainVal);
53
}
54
}
55
}
56
#endif
CalDet.h
Constants.h
GPUTPCGeometry.h
GPUCA_ROW_COUNT
#define GPUCA_ROW_COUNT
Definition
GPUTPCGeometry.h:23
TPCPadGainCalib.h
o2::gpu::GPUTPCGeometry
Definition
GPUTPCGeometry.h:34
o2::tpc::CalDet
Definition
CalDet.h:41
o2::tpc::CalDet::getValue
const T getValue(const int sec, const int globalPadInSector) const
Definition
CalDet.h:154
TPC_PADS_IN_SECTOR
#define TPC_PADS_IN_SECTOR
Definition
clusterFinderDefs.h:43
offset
GLintptr offset
Definition
glcorearb.h:660
r
GLboolean r
Definition
glcorearb.h:1233
o2::gpu
Definition
TrackTRD.h:35
o2::tpc::constants::MAXSECTOR
constexpr int MAXSECTOR
Definition
Constants.h:28
o2::gpu::TPCPadGainCalib
Definition
TPCPadGainCalib.h:44
o2::gpu::TPCPadGainCalib::setFromMap
void setFromMap(const o2::tpc::CalDet< float > &, const bool inv=true)
Definition
TPCPadGainCalib.cxx:47
o2::gpu::TPCPadGainCalib::TPCPadGainCalib
TPCPadGainCalib()
Definition
TPCPadGainCalib.cxx:22
GPU
GPUTracking
DataTypes
TPCPadGainCalib.cxx
Generated on Tue Feb 25 2025 17:03:25 for Project by
1.9.8