Belle II Software  release-05-01-25
ARICHCopperMapping.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 <TObject.h>
14 #include <map>
15 #include <vector>
16 
17 #define N_COPPERS 18
18 
19 namespace Belle2 {
24 
30  class ARICHCopperMapping : public TObject {
31 
32  public:
33 
36 
42  unsigned getCopperID(unsigned mergerID) const;
43 
49  unsigned getFinesse(unsigned mergerID) const;
50 
51 
58  void addMapping(unsigned mergerID, unsigned copperID, unsigned finesse);
59 
66  unsigned getMergerID(unsigned copperID, unsigned finesse) const;
67 
72  const std::vector<uint16_t>& getCopperIDs() const { return m_copperIDs;}
73 
77  void print() const;
78 
79  private:
80 
81  std::vector<std::pair<uint16_t, uint16_t>> m_merger2copper;
83  std::map<uint16_t, std::vector<uint16_t>> m_copper2merger;
85  std::vector<uint16_t> m_copperIDs;
89  };
90 
92 } // namespace
Belle2::ARICHCopperMapping::getCopperIDs
const std::vector< uint16_t > & getCopperIDs() const
Get vector of IDs of copper boards.
Definition: ARICHCopperMapping.h:72
Belle2::ARICHCopperMapping::m_copperIDs
std::vector< uint16_t > m_copperIDs
vector of IDs of used copper boards
Definition: ARICHCopperMapping.h:85
Belle2::ARICHCopperMapping::getCopperID
unsigned getCopperID(unsigned mergerID) const
Get copper board to which merger is connected.
Definition: ARICHCopperMapping.cc:28
Belle2::ARICHCopperMapping::ClassDef
ClassDef(ARICHCopperMapping, 1)
ClassDef, must be the last term before the closing {}.
Belle2::ARICHCopperMapping::print
void print() const
Print mapping parameters.
Definition: ARICHCopperMapping.cc:68
Belle2::ARICHCopperMapping::ARICHCopperMapping
ARICHCopperMapping()
Default constructor.
Definition: ARICHCopperMapping.cc:23
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ARICHCopperMapping::m_merger2copper
std::vector< std::pair< uint16_t, uint16_t > > m_merger2copper
map of mergers to copper boards
Definition: ARICHCopperMapping.h:81
Belle2::ARICHCopperMapping::m_copper2merger
std::map< uint16_t, std::vector< uint16_t > > m_copper2merger
map coppers to mergers
Definition: ARICHCopperMapping.h:83
Belle2::ARICHCopperMapping::getFinesse
unsigned getFinesse(unsigned mergerID) const
Get finesse of copper board to which merger is connected.
Definition: ARICHCopperMapping.cc:34
Belle2::ARICHCopperMapping::getMergerID
unsigned getMergerID(unsigned copperID, unsigned finesse) const
Get ID of merger connected to the given finesse of copper board.
Definition: ARICHCopperMapping.cc:60
Belle2::ARICHCopperMapping::addMapping
void addMapping(unsigned mergerID, unsigned copperID, unsigned finesse)
Add new entry to the mapping table.
Definition: ARICHCopperMapping.cc:40
Belle2::ARICHCopperMapping
The Class for ARICH mapping of merger to copper boards.
Definition: ARICHCopperMapping.h:30