11 #include <framework/logging/Logger.h>
20 ECL_BARREL_SHAPERS_IN_CRATE = 12,
21 ECL_FWD_SHAPERS_IN_CRATE = 10,
22 ECL_BKW_SHAPERS_IN_CRATE = 8,
23 ECL_TOTAL_SHAPERS = 576,
24 ECL_FINESSES_IN_COPPER = 2,
25 ECL_CHANNELS_IN_SHAPER = 16,
27 ECL_BARREL_CRATES = 36,
31 ECL_BARREL_COPPERS = 18,
32 ECL_ENDCAP_COPPERS = 8,
33 ECL_TOTAL_CHANNELS = 8736,
34 ECL_BARREL_CHANNELS = 6624,
35 ECL_FWD_CHANNELS = 1152,
36 ECL_BKW_CHANNELS = 960
59 int get(
int crate,
int shaper,
int channel)
const
64 if (crate <= ECL_BARREL_CRATES) {
65 id = (crate - 1) * ECL_BARREL_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER
66 + (shaper - 1) * ECL_CHANNELS_IN_SHAPER + (channel - 1);
69 crate -= ECL_BARREL_CRATES;
71 if (crate <= ECL_FWD_CRATES) {
72 id = (crate - 1) * ECL_FWD_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER
73 + (shaper - 1) * ECL_CHANNELS_IN_SHAPER + (channel - 1);
76 crate -= ECL_FWD_CRATES;
78 if (crate <= ECL_BKW_CRATES) {
79 id = (crate - 1) * ECL_BKW_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER
80 + (shaper - 1) * ECL_CHANNELS_IN_SHAPER + (channel - 1);
94 const std::vector<int>& mappingFWD,
95 const std::vector<int>& mappingBWD)
99 const unsigned int mappingBAR_size = ECL_BARREL_CRATES * ECL_BARREL_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER;
100 const unsigned int mappingFWD_size = ECL_FWD_CRATES * ECL_FWD_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER;
101 const unsigned int mappingBWD_size = ECL_BKW_CRATES * ECL_BKW_SHAPERS_IN_CRATE * ECL_CHANNELS_IN_SHAPER;
103 if (mappingBAR.size() != mappingBAR_size ||
104 mappingFWD.size() != mappingFWD_size ||
105 mappingBWD.size() != mappingBWD_size) {
106 B2FATAL(
"ECLChannelMap: wrong sizes for mapping vectors. Got ("
107 << mappingBAR.size() <<
","
108 << mappingFWD.size() <<
","
109 << mappingBWD.size() <<
"), "
111 << mappingBAR_size <<
","
112 << mappingFWD_size <<
","
113 << mappingBWD_size <<
")");
DB object to store correspondence table of type (Crate id, ShaperDSP id, Channel id) <-> (ECL CellID)
std::vector< int > m_MappingBWD
Map entries for ECL backward endcap.
int get(int crate, int shaper, int channel) const
Get value for specific (crate, shaper, channel)
void setMappingVectors(const std::vector< int > &mappingBAR, const std::vector< int > &mappingFWD, const std::vector< int > &mappingBWD)
Set three vectors of map entries.
ECLChannelMap()
Constructor.
ClassDef(ECLChannelMap, 1)
ClassDef.
const std::vector< int > & getMappingBAR() const
Get vector of map entries for ECL barrel.
const std::vector< int > & getMappingBWD() const
Get vector of map entries for ECL backward endcap.
const std::vector< int > & getMappingFWD() const
Get vector of map entries for ECL forward endcap.
std::vector< int > m_MappingFWD
Map entries for ECL forward endcap.
std::vector< int > m_MappingBAR
Map entries for ECL barrel.
Abstract base class for different kinds of events.