Belle II Software  release-08-01-10
PixelEfficiencies.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/PixelEfficiencies.h>
10 #include <top/geometry/TOPGeometryPar.h>
11 #include <framework/logging/Logger.h>
12 
13 namespace Belle2 {
18  namespace TOP {
19 
20  PixelEfficiencies::PixelEfficiencies(int moduleID): m_moduleID(moduleID)
21  {
22  const auto* geo = TOPGeometryPar::Instance()->getGeometry();
23  if (not geo->isModuleIDValid(moduleID)) {
24  B2FATAL("TOP::PixelEfficiencies: invalid slot number, moduleID = " << moduleID);
25  return;
26  }
27  int numPixels = geo->getModule(moduleID).getPMTArray().getNumPixels();
28  m_efficiencies.resize(numPixels, 1.0);
29  }
30 
31  } // TOP
33 } // Belle2
34 
35 
36 
PixelEfficiencies(int moduleID)
Constructor: all relative efficiencies are set to 1.
std::vector< double > m_efficiencies
pixel relative efficiencies, index = pixelID - 1
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.