#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 EventContext & | ctx | ) |
const |
|
overridevirtual |
Definition at line 57 of file VSITrackParticleThinning.cxx.
58{
59
60
61
62 SG::ThinningHandle<xAOD::TrackParticleContainer> importedTrackParticles
64
65
66 unsigned int nTracks = importedTrackParticles->size();
67 if (nTracks==0) return StatusCode::SUCCESS;
68
69
70 std::vector<bool>
mask;
71 mask.assign(nTracks,
false);
73
74
75 for ( const auto trkIt: *importedTrackParticles ) {
77 SG::ConstAccessor<char>
acc(
"is_svtrk_final" + augVerString);
78 if (
acc.withDefault (*trkIt,
false)) {
79 int index = trkIt->index();
81 }
82 }
83 }
84
85
89
90 if (nTracks != nEntries ) {
91 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your track selection string used tracks??");
92 return StatusCode::FAILURE;
93 }
94 else {
95
97 if (!mask[i]) continue;
99 }
100 }
101 }
102
103
104
105 unsigned int n_pass=0;
106 for (
unsigned int i=0;
i<nTracks; ++
i) {
107 if (mask[i]) ++n_pass;
108 }
110
111
112
113 importedTrackParticles.keep (mask);
114
115
116 return StatusCode::SUCCESS;
117
118}
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 33 of file VSITrackParticleThinning.cxx.
34{
35
36
39
40
42
44 }
45
46 return StatusCode::SUCCESS;
47}
#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: