Belle II Software development
SVDStripMaskingModule.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 <svd/modules/svdReconstruction/SVDStripMaskingModule.h>
10
11using namespace Belle2;
12using namespace std;
13
14//-----------------------------------------------------------------
15// Register the Module
16//-----------------------------------------------------------------
17REG_MODULE(SVDStripMasking);
18
19//-----------------------------------------------------------------
20// Implementation
21//-----------------------------------------------------------------
22
24{
25 setDescription("Remove from the SVDShaperDigit list the hot strips read in the SVDHotStripsCalibrations from the DB.");
27
28 addParam("ShaperDigits", m_storeShaperDigitsName,
29 "ShaperDigits collection name", string(""));
30 addParam("ShaperDigitsUnmasked", m_SVDShaperDigitsUnmasked,
31 "Good ShaperDigits collection name, kept", string(""));
32 addParam("ShaperDigitsMasked", m_SVDShaperDigitsMasked,
33 "ShaperDigits collection name", string(""));
34 addParam("createHotStripsList", m_createOutside,
35 "create the StoreArray of hot strips", bool(false));
36
37}
38
39
40SVDStripMaskingModule::~SVDStripMaskingModule()
41{
42}
43
44
46{
48
50 // m_selectorIN.inheritAllRelations();
51
52 if (m_createOutside) {
54 // m_selectorOUT.inheritAllRelations();
55 }
56
57}
58
59
61{
62
63 // If no digits, nothing to do
64 if (!m_storeShaper || !m_storeShaper.getEntries()) return;
65
66 m_selectorIN.select([&](const SVDShaperDigit * shaper) { return ! m_HotStripsCalib.isHot(shaper->getSensorID(), shaper->isUStrip(), shaper->getCellID());});
67
69 m_selectorOUT.select([&](const SVDShaperDigit * shaper) { return m_HotStripsCalib.isHot(shaper->getSensorID(), shaper->isUStrip(), shaper->getCellID());});
70
71 B2DEBUG(27, " shaper digits = " << m_storeShaper.getEntries() <<
72 ", shaper digits Unmasked = " << (((StoreArray<SVDShaperDigit>*)(m_selectorIN.getSubSet()))->getEntries()));
73
75 B2DEBUG(27, " shaper digits = " << m_storeShaper.getEntries() <<
76 ", shaper digits Unmasked = " << (((StoreArray<SVDShaperDigit>*)(m_selectorIN.getSubSet()))->getEntries()) <<
77 ", shaper digits Masked = " << (((StoreArray<SVDShaperDigit>*)(m_selectorOUT.getSubSet()))->getEntries()));
78
79}
80
81
82
Base class for Modules.
Definition: Module.h:72
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition: Module.cc:208
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition: Module.h:80
float isHot(const VxdID &sensorID, const bool &isU, const unsigned short &strip) const
This is the method for getting the offline list of bad strips to be masked.
The SVD ShaperDigit class.
VxdID getSensorID() const
Get the sensor ID.
short int getCellID() const
Get strip ID.
bool isUStrip() const
Get strip direction.
std::string m_SVDShaperDigitsMasked
masked SVDShaperDigits name
SelectSubset< SVDShaperDigit > m_selectorIN
selector of the subset of the good SVDShaperDigit
virtual void initialize() override
Initialize the SVDStripMasking.
std::string m_storeShaperDigitsName
Name of the collections to use for the SVDShaperDigits.
virtual void event() override
This method is the core of the SVDStripMasking.
SelectSubset< SVDShaperDigit > m_selectorOUT
selector of the subset of the hot SVDShaperDigit
SVDHotStripsCalibrations m_HotStripsCalib
SVDHotStrips calibration db object.
std::string m_SVDShaperDigitsUnmasked
unmasked (good) SVDShaperDigits name
bool m_createOutside
if true a StoreArray of Hot Strips is created
StoreArray< SVDShaperDigit > m_storeShaper
store arrays
SVDStripMaskingModule()
Constructor defining the parameters.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:560
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
Abstract base class for different kinds of events.
STL namespace.