Belle II Software prerelease-10-00-00a
VXDTrackCandidatesQualityIndicatorCutterModule.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 "tracking/modules/trackSetEvaluatorVXD/VXDTrackCandidatesQualityIndicatorCutterModule.h"
10#include <vector>
11
12using namespace Belle2;
13
14
15REG_MODULE(VXDTrackCandidatesQualityIndicatorCutter);
16
18{
19 setDescription("Module that selects a subset out of all SpacePointTrackCandidates. Based on qualityIndicator requirement.");
20
21 addParam("NameSpacePointTrackCands", m_nameSpacePointTrackCands, "Name of expected StoreArray.", std::string(""));
22 addParam("minRequiredQuality", m_minRequiredQuality, "Minimum value of qualityIndicator to keep candidate active.", float(0));
23 addParam("SubsetCreation", m_subsetCreation,
24 "If True copy selected SpacePoints to new StoreArray, if False deactivate remaining SpacePoints.", bool(false));
25 addParam("NewNameSpacePointTrackCands", m_newNameSpacePointTrackCands,
26 "Only required if 'CreateNewStoreArray' is true. Name of StoreArray to store the subset. If the target name is equal to the source candidates not matching the selection criteria are deleted.",
27 std::string("BestSpacePointTrackCands"));
28}
29
42
48
50{
52 if (sptc.getQualityIndicator() < m_minRequiredQuality) {
53 sptc.removeRefereeStatus(SpacePointTrackCand::c_isActive);
54 // Note: assignment state of individual hits does not have to be changed here (assignment not set until SPTC2RTConverterModule)
55 }
56 }
57}
58
void setDescription(const std::string &description)
Sets the description of the module.
Definition Module.cc:214
Module()
Constructor.
Definition Module.cc:30
Storage for (VXD) SpacePoint-based track candidates.
double getQualityIndicator() const
returns the current status of the estimated quality of this track candidate.
@ c_isActive
bit 11: SPTC is active (i.e.
std::string m_newNameSpacePointTrackCands
Name of optional output StoreArray containing SpacePointTrackCands.
SelectSubset< SpacePointTrackCand > m_goodCandidates
SubsetSelector operating on a custom selection criteria.
void selectSubset()
Copy or delete candidates to achieve a subset creation.
bool m_subsetCreation
If True copy selected SpacePointTrackCands to new StoreArray, If False deactivate remaining SpacePoin...
StoreArray< SpacePointTrackCand > m_spacePointTrackCands
StoreArray for input SpacePointTrackCands.
void deactivateCandidates()
Don't copy/delete candidates but rather deactivate them by setting a SpacePointTrackCandidate flag.
std::string m_nameSpacePointTrackCands
Name of input StoreArray containing SpacePointTrackCands.
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:559
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition Module.h:649
Abstract base class for different kinds of events.