#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 EventContext & | ctx | ) |
const |
|
overridevirtual |
Check that the current event passes this filter.
Definition at line 56 of file TrackMeasurementThinning.cxx.
57{
58
59
60 SG::ThinningHandle<xAOD::TrackMeasurementValidationContainer>
clusters
62
63
64 unsigned int nClusters =
clusters->size();
65 if (nClusters==0) return StatusCode::SUCCESS;
66
67
68 std::vector<bool>
mask;
69 mask.assign(nClusters,
false);
71
72
73 if (m_parser) {
74 std::vector<int>
entries = m_parser->evaluateAsVector();
76
77 if (nClusters != nEntries ) {
78 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your selection string used the same collection as the input collection??");
79 return StatusCode::FAILURE;
80 } else {
81
82 for (
unsigned int i=0;
i<nClusters; ++
i)
if (
entries[i]==1)
mask[
i]=
true;
83 }
84 }
85
86 unsigned int n_pass=0;
87 for (
unsigned int i=0;
i<nClusters; ++
i) {
88 if (mask[i]) ++n_pass;
89 }
91
92
94
95 return StatusCode::SUCCESS;
96}
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 47 of file TrackMeasurementThinning.cxx.
48{
52 return StatusCode::SUCCESS;
53}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
◆ initialize()
| StatusCode DerivationFramework::TrackMeasurementThinning::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 29 of file TrackMeasurementThinning.cxx.
30{
33 ATH_MSG_FATAL(
"No inner detector track selection string provided!");
34 return StatusCode::FAILURE;
36
37
40
41
44 }
45 return StatusCode::SUCCESS;
46}
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: