Belle II Software  release-05-01-25
ARICHHvCablesMapping.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Manca Mrvar *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 
13 #include <vector>
14 #include <tuple>
15 #include <TObject.h>
16 #include <iostream>
17 
18 //number of channels per HAPD
19 #define N_MODULES 420
20 
21 namespace Belle2 {
26 
30  class ARICHHvCablesMapping : public TObject {
31 
32  public:
33 
36 
44  int getModuleID(int sectorID, int cableID, int innerID) const;
45 
51  int getSectorID(int moduleID) const;
52 
58  int getCableID(int moduleID) const;
59 
65  int getInnerID(int moduleID) const;
66 
74  void addMapping(int moduleID, int sectorID, int cableID, int innerID);
75 
79  void print() const;
80 
81  private:
82 
83  std::vector<std::tuple<int, int, int>> m_cable2module;
84  std::map<int, std::vector<int>> m_module2cable;
88  };
89 
91 } // namespace
Belle2::ARICHHvCablesMapping::getModuleID
int getModuleID(int sectorID, int cableID, int innerID) const
Get ID of module connected to cable in sector.
Definition: ARICHHvCablesMapping.cc:23
Belle2::ARICHHvCablesMapping::print
void print() const
Pring mapping.
Definition: ARICHHvCablesMapping.cc:71
Belle2::ARICHHvCablesMapping::m_module2cable
std::map< int, std::vector< int > > m_module2cable
map of modules to cables
Definition: ARICHHvCablesMapping.h:84
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ARICHHvCablesMapping::getSectorID
int getSectorID(int moduleID) const
Get ID of sector of a cable to which module is connected.
Definition: ARICHHvCablesMapping.cc:37
Belle2::ARICHHvCablesMapping::ARICHHvCablesMapping
ARICHHvCablesMapping()
Default constructor.
Definition: ARICHHvCablesMapping.cc:19
Belle2::ARICHHvCablesMapping::m_cable2module
std::vector< std::tuple< int, int, int > > m_cable2module
map of cables to modules
Definition: ARICHHvCablesMapping.h:83
Belle2::ARICHHvCablesMapping::ClassDef
ClassDef(ARICHHvCablesMapping, 1)
ClassDef, must be the last term before the closing {}.
Belle2::ARICHHvCablesMapping
The Class for ARICH mapping of bias cables to modules.
Definition: ARICHHvCablesMapping.h:30
Belle2::ARICHHvCablesMapping::addMapping
void addMapping(int moduleID, int sectorID, int cableID, int innerID)
Add mapping entry.
Definition: ARICHHvCablesMapping.cc:58
Belle2::ARICHHvCablesMapping::getInnerID
int getInnerID(int moduleID) const
Get inner cable ID to which module is connected.
Definition: ARICHHvCablesMapping.cc:51
Belle2::ARICHHvCablesMapping::getCableID
int getCableID(int moduleID) const
Get ID of cable to which module is connected.
Definition: ARICHHvCablesMapping.cc:44