Belle II Software  release-05-01-25
ARICHChannelMapping.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Luka Santelj *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <vector>
14 #include <TObject.h>
15 
16 //number of channels per HAPD
17 #define N_XCHANNELS 12
18 #define N_YCHANNELS 12
19 
20 namespace Belle2 {
26 
30  class ARICHChannelMapping : public TObject {
31 
32  public:
33 
36 
43  bool getXYFromAsic(unsigned asicChn, int& xChn, int& yChn) const;
44 
51  int getAsicFromXY(unsigned xChn, unsigned yChn) const;
52 
59  void mapXY2Asic(unsigned xChn, unsigned yChn, unsigned asicChn);
60 
64  void print() const;
65 
66  private:
67 
68  std::vector<uint8_t> m_xy2asic;
69  std::vector<uint8_t> m_asic2xy;
73  };
74 
76 } // namespace
Belle2::ARICHChannelMapping::getXYFromAsic
bool getXYFromAsic(unsigned asicChn, int &xChn, int &yChn) const
Get HAPD channel X,Y numbers from asic channel number.
Definition: ARICHChannelMapping.cc:26
Belle2::ARICHChannelMapping::ClassDef
ClassDef(ARICHChannelMapping, 1)
ClassDef, must be the last term before the closing {}.
Belle2::ARICHChannelMapping::m_asic2xy
std::vector< uint8_t > m_asic2xy
map of asic to X,Y channel numbers
Definition: ARICHChannelMapping.h:69
Belle2::ARICHChannelMapping::m_xy2asic
std::vector< uint8_t > m_xy2asic
map of X,Y to asic channels numbers
Definition: ARICHChannelMapping.h:68
Belle2::ARICHChannelMapping::ARICHChannelMapping
ARICHChannelMapping()
Default constructor.
Definition: ARICHChannelMapping.cc:20
Belle2::ARICHChannelMapping
The Class for ARICH HAPD channel mapping.
Definition: ARICHChannelMapping.h:30
Belle2::ARICHChannelMapping::mapXY2Asic
void mapXY2Asic(unsigned xChn, unsigned yChn, unsigned asicChn)
Add entry to channel map.
Definition: ARICHChannelMapping.cc:46
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ARICHChannelMapping::getAsicFromXY
int getAsicFromXY(unsigned xChn, unsigned yChn) const
Get asic channel number from HAPD channel X,Y numbers.
Definition: ARICHChannelMapping.cc:39
Belle2::ARICHChannelMapping::print
void print() const
Print mapping parameters.
Definition: ARICHChannelMapping.cc:55