Belle II Software development
PixelMasks.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#include <top/reconstruction_cpp/PixelMasks.h>
10#include <top/geometry/TOPGeometryPar.h>
11#include <framework/logging/Logger.h>
12
13namespace Belle2 {
18 namespace TOP {
19
20 PixelMasks::PixelMasks(int moduleID): m_moduleID(moduleID)
21 {
22 const auto* geo = TOPGeometryPar::Instance()->getGeometry();
23 if (not geo->isModuleIDValid(moduleID)) {
24 B2FATAL("TOP::PixelMasks: invalid slot number, moduleID = " << moduleID);
25 return;
26 }
27 int numPixels = geo->getModule(m_moduleID).getPMTArray().getNumPixels();
28 m_masks.resize(numPixels, true);
29 }
30
31
32 } // TOP
34} // Belle2
35
36
PixelMasks(int moduleID)
Constructor: all pixels are turned on (active)
Definition: PixelMasks.cc:20
std::vector< bool > m_masks
pixel masks (true for active), index = pixelID -1
Definition: PixelMasks.h:73
const TOPGeometry * getGeometry() const
Returns pointer to geometry object using basf2 units.
static TOPGeometryPar * Instance()
Static method to obtain the pointer to its instance.
Abstract base class for different kinds of events.