Belle II Software development
ARICHChannelMapping.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <vector>
12#include <TObject.h>
13
14//number of channels per HAPD
15#define N_XCHANNELS 12
16#define N_YCHANNELS 12
17
18namespace Belle2 {
25
28 class ARICHChannelMapping : public TObject {
29
30 public:
31
34
41 bool getXYFromAsic(unsigned asicChn, int& xChn, int& yChn) const;
42
49 int getAsicFromXY(unsigned xChn, unsigned yChn) const;
50
57 void mapXY2Asic(unsigned xChn, unsigned yChn, unsigned asicChn);
58
62 void print() const;
63
64 private:
65
66 std::vector<uint8_t> m_xy2asic;
67 std::vector<uint8_t> m_asic2xy;
71 };
72
74} // namespace
The Class for ARICH HAPD channel mapping.
int getAsicFromXY(unsigned xChn, unsigned yChn) const
Get asic channel number from HAPD channel X,Y numbers.
ARICHChannelMapping()
Default constructor.
ClassDef(ARICHChannelMapping, 1)
ClassDef, must be the last term before the closing {}.
std::vector< uint8_t > m_xy2asic
map of X,Y to asic channels numbers
bool getXYFromAsic(unsigned asicChn, int &xChn, int &yChn) const
Get HAPD channel X,Y numbers from asic channel number.
std::vector< uint8_t > m_asic2xy
map of asic to X,Y channel numbers
void print() const
Print mapping parameters.
void mapXY2Asic(unsigned xChn, unsigned yChn, unsigned asicChn)
Add entry to channel map.
Abstract base class for different kinds of events.