#include <VSITrackParticleThinning.h>
|
| std::atomic< unsigned int > | m_ntot {} |
| std::atomic< unsigned int > | m_npass {} |
| StringProperty | m_streamName { this, "StreamName", "", "Name of the stream being thinned" } |
| SG::ThinningHandleKey< xAOD::TrackParticleContainer > | m_inDetSGKey { this, "InDetTrackParticlesKey", "InDetTrackParticles", "" } |
| StringProperty | m_selectionString { this, "SelectionString", "", "" } |
| StringProperty | m_trackSelectionString { this, "TrackSelectionString", "", "" } |
| StringArrayProperty | m_augVerStrings { this, "AugVerStrings", {""}, "List of augVerStrings to consider" } |
Definition at line 29 of file VSITrackParticleThinning.h.
◆ VSITrackParticleThinning()
| DerivationFramework::VSITrackParticleThinning::VSITrackParticleThinning |
( |
const std::string & | t, |
|
|
const std::string & | n, |
|
|
const IInterface * | p ) |
◆ ~VSITrackParticleThinning()
| DerivationFramework::VSITrackParticleThinning::~VSITrackParticleThinning |
( |
| ) |
|
|
virtual |
◆ doThinning()
| StatusCode DerivationFramework::VSITrackParticleThinning::doThinning |
( |
| ) |
const |
|
overridevirtual |
Definition at line 58 of file VSITrackParticleThinning.cxx.
59{
60
61 const EventContext& ctx = Gaudi::Hive::currentContext();
62
63
64 SG::ThinningHandle<xAOD::TrackParticleContainer> importedTrackParticles
66
67
68 unsigned int nTracks = importedTrackParticles->size();
69 if (nTracks==0) return StatusCode::SUCCESS;
70
71
72 std::vector<bool>
mask;
73 mask.assign(nTracks,
false);
75
76
77 for ( const auto trkIt: *importedTrackParticles ) {
79 SG::ConstAccessor<char>
acc(
"is_svtrk_final" + augVerString);
80 if (
acc.withDefault (*trkIt,
false)) {
81 int index = trkIt->index();
83 }
84 }
85 }
86
87
91
92 if (nTracks != nEntries ) {
93 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your track selection string used tracks??");
94 return StatusCode::FAILURE;
95 }
96 else {
97
99 if (!mask[i]) continue;
101 }
102 }
103 }
104
105
106
107 unsigned int n_pass=0;
108 for (
unsigned int i=0;
i<nTracks; ++
i) {
109 if (mask[i]) ++n_pass;
110 }
112
113
114
115 importedTrackParticles.keep (mask);
116
117
118 return StatusCode::SUCCESS;
119
120}
std::atomic< unsigned int > m_npass
SG::ThinningHandleKey< xAOD::TrackParticleContainer > m_inDetSGKey
StringArrayProperty m_augVerStrings
std::atomic< unsigned int > m_ntot
StringProperty m_trackSelectionString
◆ finalize()
| StatusCode DerivationFramework::VSITrackParticleThinning::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
| StatusCode DerivationFramework::VSITrackParticleThinning::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 34 of file VSITrackParticleThinning.cxx.
35{
36
37
40
41
43
45 }
46
47 return StatusCode::SUCCESS;
48}
#define ATH_CHECK
Evaluate an expression and check for errors.
StringProperty m_selectionString
StringProperty m_streamName
◆ m_augVerStrings
| StringArrayProperty DerivationFramework::VSITrackParticleThinning::m_augVerStrings { this, "AugVerStrings", {""}, "List of augVerStrings to consider" } |
|
private |
◆ m_inDetSGKey
◆ m_npass
| std::atomic<unsigned int> DerivationFramework::VSITrackParticleThinning::m_npass {} |
|
mutableprivate |
◆ m_ntot
| std::atomic<unsigned int> DerivationFramework::VSITrackParticleThinning::m_ntot {} |
|
mutableprivate |
◆ m_selectionString
| StringProperty DerivationFramework::VSITrackParticleThinning::m_selectionString { this, "SelectionString", "", "" } |
|
private |
◆ m_streamName
| StringProperty DerivationFramework::VSITrackParticleThinning::m_streamName { this, "StreamName", "", "Name of the stream being thinned" } |
|
private |
◆ m_trackSelectionString
| StringProperty DerivationFramework::VSITrackParticleThinning::m_trackSelectionString { this, "TrackSelectionString", "", "" } |
|
private |
The documentation for this class was generated from the following files: