DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq
sourcecode
triggeralgs
src
ProtoDUNEBSMWindow
PDVDEffectiveChannelMap.cpp
Go to the documentation of this file.
1
#include "
triggeralgs/ProtoDUNEBSMWindow/PDVDEffectiveChannelMap.hpp
"
2
3
namespace
triggeralgs
{
4
5
PDVDEffectiveChannelMap::PDVDEffectiveChannelMap
(
unsigned
int
first_channel,
unsigned
int
n_channels) :
6
m_first_channel(first_channel), m_n_channels(n_channels) {
7
8
m_n_channels_crp_block
=
m_n_channels
/ 4;
// four crps in a plane, should = 292
9
m_n_effective_channels
=
m_n_channels
/ 2;
// # effective channels half # true channels, should = 584
10
}
11
12
unsigned
int
PDVDEffectiveChannelMap::remapCollectionPlaneChannel
(
unsigned
int
original_channel) {
13
// subtract first channel on CRP from original_channel
14
// add first channel back at the end
15
unsigned
int
sub_original_channel = original_channel -
m_first_channel
;
16
17
const
unsigned
int
crp_block = sub_original_channel /
m_n_channels_crp_block
;
// 0..3
18
19
const
unsigned
int
local_channel = sub_original_channel %
m_n_channels_crp_block
;
// 0..291
20
21
// get the base channel based on which CRP block the originial channel is in
22
const
unsigned
int
base_channel = (crp_block >= 2) ?
m_n_channels_crp_block
: 0;
23
24
// remapped channel is the base plus the local channel in the block
25
// and plus the first channel in the CRP plane
26
return
base_channel + local_channel +
m_first_channel
;
27
}
28
29
}
// triggeralgs
PDVDEffectiveChannelMap.hpp
triggeralgs::PDVDEffectiveChannelMap::m_n_channels_crp_block
unsigned int m_n_channels_crp_block
Definition
PDVDEffectiveChannelMap.hpp:25
triggeralgs::PDVDEffectiveChannelMap::PDVDEffectiveChannelMap
PDVDEffectiveChannelMap(unsigned int first_channel, unsigned int n_channels)
Definition
PDVDEffectiveChannelMap.cpp:5
triggeralgs::PDVDEffectiveChannelMap::m_first_channel
unsigned int m_first_channel
Definition
PDVDEffectiveChannelMap.hpp:23
triggeralgs::PDVDEffectiveChannelMap::m_n_effective_channels
unsigned int m_n_effective_channels
Definition
PDVDEffectiveChannelMap.hpp:26
triggeralgs::PDVDEffectiveChannelMap::remapCollectionPlaneChannel
unsigned int remapCollectionPlaneChannel(unsigned int original_channel)
Definition
PDVDEffectiveChannelMap.cpp:12
triggeralgs::PDVDEffectiveChannelMap::m_n_channels
unsigned int m_n_channels
Definition
PDVDEffectiveChannelMap.hpp:24
triggeralgs
Definition
AbstractFactory.hpp:18
Generated on Sat Apr 4 2026 for DUNE-DAQ by
1.12.0