Project
Loading...
Searching...
No Matches
AngularResidHistos.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
14
15#ifndef ALICEO2_ANGRESIDHISTOS_H
16#define ALICEO2_ANGRESIDHISTOS_H
17
19#include "Rtypes.h"
20#include <array>
21#include <gsl/span>
22
23namespace o2
24{
25namespace trd
26{
27
29{
30 public:
31 AngularResidHistos() = default;
34 void reset();
35 bool addEntry(float deltaAlpha, float impactAngle, int chamberId);
36 float getHistogramEntry(int index) const { return mHistogramEntries[index]; }
37 int getBinCount(int index) const { return mNEntriesPerBin[index]; }
38 size_t getNEntries() const { return mNEntriesTotal; }
39
40 void fill(const AngularResidHistos& input);
41 void merge(const AngularResidHistos* prev);
42 void print();
43
44 private:
45 // TODO use NCHAMBER instead of MAXCHAMBER and indirection array?
46 static constexpr float INVBINWIDTH = constants::NBINSANGLEDIFF / (2.f * constants::MAXIMPACTANGLE);
47 std::array<float, constants::MAXCHAMBER * constants::NBINSANGLEDIFF> mHistogramEntries{};
48 std::array<int, constants::MAXCHAMBER * constants::NBINSANGLEDIFF> mNEntriesPerBin{};
49 size_t mNEntriesTotal{0};
50
51 ClassDefNV(AngularResidHistos, 1);
52};
53
54} // namespace trd
55} // namespace o2
56
57#endif // ALICEO2_ANGRESIDHISTOS_H
Global TRD definitions and constants.
AngularResidHistos(const AngularResidHistos &)=default
int getBinCount(int index) const
void merge(const AngularResidHistos *prev)
bool addEntry(float deltaAlpha, float impactAngle, int chamberId)
void fill(const AngularResidHistos &input)
float getHistogramEntry(int index) const
GLuint index
Definition glcorearb.h:781
constexpr int NBINSANGLEDIFF
the number of bins for the track angle used for the vDrift and ExB calibration based on the tracking
Definition Constants.h:76
constexpr float MAXIMPACTANGLE
the maximum impact angle for tracks relative to the TRD detector plane to be considered for vDrift an...
Definition Constants.h:75
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...