pflib v3.9.5-18-g30f792c
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
SingleECONDRocErxMapping.h
1#pragma once
2#ifndef PFLIB_PACKING_ROCERXMAPPING_H
3#define PFLIB_PACKING_ROCERXMAPPING_H
4
5#include <vector>
6
7namespace pflib::packing {
8
44
51
61
62 public:
79 const std::vector<std::pair<int, int>>& roc_half_to_erx,
80 const std::vector<int>& active_rocs);
81
89 std::pair<int, int> toROCHalf(int i_erx) const;
90
101 std::pair<int, int> toROCChannel(int i_erx, int channel) const;
102
110 int toErx(int i_roc, int half) const;
111
121 std::pair<int, int> toErxChannel(int i_roc, int channel) const;
122};
123
124} // namespace pflib::packing
125
126#endif
Mapping for link/channel IDs for single ECON-D collection.
Definition SingleECONDRocErxMapping.h:35
std::vector< std::pair< int, int > > roc_half_to_erx_
mapping from ROC-half to eRx input to ECON-D
Definition SingleECONDRocErxMapping.h:37
std::vector< int > i_erx_to_erx_
map from i_erx index in decoding to eRx ID input to ECON
Definition SingleECONDRocErxMapping.h:43
std::vector< std::pair< int, int > > erx_to_roc_half_
map from eRx ID input to ECON to ROC-half
Definition SingleECONDRocErxMapping.h:60
std::vector< int > erx_to_i_erx_
Map from eRx ID input to ECON to i_erx index in decoding.
Definition SingleECONDRocErxMapping.h:50
SingleECONDRocErxMapping(const std::vector< std::pair< int, int > > &roc_half_to_erx, const std::vector< int > &active_rocs)
Construct the mapping.
Definition SingleECONDRocErxMapping.cxx:7
std::pair< int, int > toROCHalf(int i_erx) const
Get which ROC-half the input i_erx corresponds to.
Definition SingleECONDRocErxMapping.cxx:36
int toErx(int i_roc, int half) const
Get the i_erx the input ROC-half corresponds to.
Definition SingleECONDRocErxMapping.cxx:54
std::pair< int, int > toROCChannel(int i_erx, int channel) const
Convert the input (i_erx, channel) index to the (i_roc, channel) index using the RocErxMapping define...
Definition SingleECONDRocErxMapping.cxx:40
std::pair< int, int > toErxChannel(int i_roc, int channel) const
Convert the input (i_roc, channel) index to the (i_erx, channel) index.
Definition SingleECONDRocErxMapping.cxx:64