Belle II Software
release-05-01-25
TOPAsicMask.cc
1
/**************************************************************************
2
* BASF2 (Belle Analysis Framework 2) *
3
* Copyright(C) 2019 - Belle II Collaboration *
4
* *
5
* Author: The Belle II Collaboration *
6
* Contributors: Marko Staric *
7
* *
8
* This software is provided "as is" without any warranty. *
9
**************************************************************************/
10
11
#include <top/dataobjects/TOPAsicMask.h>
12
13
namespace
Belle2
{
19
bool
TOPAsicMask::isActive
(
int
moduleID,
unsigned
channel)
const
20
{
21
if
(
m_masks
.empty())
return
true
;
22
23
unsigned
asic = channel / 8;
24
unsigned
bs = (moduleID - 1) * 4 + asic / 16;
25
if
(bs >=
m_masks
.size())
return
true
;
26
27
unsigned
word =
m_masks
[bs];
28
unsigned
bit = asic % 16;
29
return
((word >> bit) & 0x1) == 0;
30
}
31
33
}
// end namespace Belle2
34
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::TOPAsicMask::m_masks
std::vector< unsigned short > m_masks
bit fields of masked ASIC's (one per BS)
Definition:
TOPAsicMask.h:64
Belle2::TOPAsicMask::isActive
bool isActive(int moduleID, unsigned channel) const
Returns true if channel is not explicitely labeled as masked.
Definition:
TOPAsicMask.cc:27
top
dataobjects
src
TOPAsicMask.cc
Generated on Fri Nov 5 2021 03:58:58 for Belle II Software by
1.8.17