#include <TrackMeasurementThinning.h>
- Author
- David Salek -at- cern.ch
Definition at line 32 of file TrackMeasurementThinning.h.
◆ TrackMeasurementThinning()
| DerivationFramework::TrackMeasurementThinning::TrackMeasurementThinning |
( |
const std::string & | t, |
|
|
const std::string & | n, |
|
|
const IInterface * | p ) |
◆ ~TrackMeasurementThinning()
| DerivationFramework::TrackMeasurementThinning::~TrackMeasurementThinning |
( |
| ) |
|
|
virtualdefault |
◆ doThinning()
| StatusCode DerivationFramework::TrackMeasurementThinning::doThinning |
( |
| ) |
const |
|
overridevirtual |
Check that the current event passes this filter.
Definition at line 57 of file TrackMeasurementThinning.cxx.
58{
59 const EventContext& ctx = Gaudi::Hive::currentContext();
60
61
62 SG::ThinningHandle<xAOD::TrackMeasurementValidationContainer>
clusters
64
65
66 unsigned int nClusters =
clusters->size();
67 if (nClusters==0) return StatusCode::SUCCESS;
68
69
70 std::vector<bool>
mask;
71 mask.assign(nClusters,
false);
73
74
75 if (m_parser) {
76 std::vector<int>
entries = m_parser->evaluateAsVector();
78
79 if (nClusters != nEntries ) {
80 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your selection string used the same collection as the input collection??");
81 return StatusCode::FAILURE;
82 } else {
83
84 for (
unsigned int i=0;
i<nClusters; ++
i)
if (
entries[i]==1)
mask[
i]=
true;
85 }
86 }
87
88 unsigned int n_pass=0;
89 for (
unsigned int i=0;
i<nClusters; ++
i) {
90 if (mask[i]) ++n_pass;
91 }
93
94
96
97 return StatusCode::SUCCESS;
98}
std::atomic< unsigned int > m_ntot
std::atomic< unsigned int > m_npass
SG::ThinningHandleKey< xAOD::TrackMeasurementValidationContainer > m_SGKey
◆ finalize()
| StatusCode DerivationFramework::TrackMeasurementThinning::finalize |
( |
| ) |
|
|
overridevirtual |
Definition at line 48 of file TrackMeasurementThinning.cxx.
49{
53 return StatusCode::SUCCESS;
54}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
◆ initialize()
| StatusCode DerivationFramework::TrackMeasurementThinning::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 30 of file TrackMeasurementThinning.cxx.
31{
34 ATH_MSG_FATAL(
"No inner detector track selection string provided!");
35 return StatusCode::FAILURE;
37
38
41
42
45 }
46 return StatusCode::SUCCESS;
47}
StringProperty m_streamName
Gaudi::Property< std::string > m_selectionString
◆ m_npass
| std::atomic<unsigned int> DerivationFramework::TrackMeasurementThinning::m_npass {} |
|
mutableprivate |
◆ m_ntot
| std::atomic<unsigned int> DerivationFramework::TrackMeasurementThinning::m_ntot {} |
|
mutableprivate |
◆ m_selectionString
| Gaudi::Property<std::string> DerivationFramework::TrackMeasurementThinning::m_selectionString { this, "SelectionString", "", ""} |
|
private |
◆ m_SGKey
◆ m_streamName
| StringProperty DerivationFramework::TrackMeasurementThinning::m_streamName { this, "StreamName", "", "Name of the stream being thinned" } |
|
private |
The documentation for this class was generated from the following files: