Belle II Software development
ARICHBiasCablesMapping.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 <tuple>
13#include <TObject.h>
14#include <iostream>
15
16//number of channels per HAPD
17#define N_MODULES 420
18
19namespace Belle2 {
25
28 class ARICHBiasCablesMapping : public TObject {
29
30 public:
31
34
42 int getModuleID(int sectorID, int cableID, int innerID) const;
43
49 int getSectorID(int moduleID) const;
50
56 int getCableID(int moduleID) const;
57
63 int getInnerID(int moduleID) const;
64
72 void addMapping(int moduleID, int sectorID, int cableID, int innerID);
73
77 void print() const;
78
79 private:
80
81 std::vector<std::tuple<int, int, int>> m_cable2module;
82 std::map<int, std::vector<int>> m_module2cable;
86 };
87
89} // namespace
The Class for ARICH mapping of bias cables to modules.
int getCableID(int moduleID) const
Get ID of cable to which module is connected.
int getSectorID(int moduleID) const
Get ID of sector of a cable to which module is connected.
void addMapping(int moduleID, int sectorID, int cableID, int innerID)
Add mapping entry.
int getModuleID(int sectorID, int cableID, int innerID) const
Get ID of module connected to cable in sector.
ClassDef(ARICHBiasCablesMapping, 1)
ClassDef, must be the last term before the closing {}.
int getInnerID(int moduleID) const
Get inner cable ID to which module is connected.
void print() const
Pring mapping.
std::map< int, std::vector< int > > m_module2cable
map of modules to cables
ARICHBiasCablesMapping()
Default constructor.
std::vector< std::tuple< int, int, int > > m_cable2module
map of cables to modules
Abstract base class for different kinds of events.