#include <TauTrackParticleThinning.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", "" } |
|
SG::ReadHandleKey< xAOD::TauJetContainer > | m_tauKey { this, "TauKey", "", ""} |
|
Gaudi::Property< bool > | m_doTauTracksThinning { this, "DoTauTracksThinning", false, "Apply thinning to tau tracks in addition to ID tracks"} |
|
SG::ThinningHandleKey< xAOD::TauTrackContainer > | m_tauTracksSGKey { this, "TauTracksKey", "TauTracks", "StoreGate key of the tau track container" } |
|
Gaudi::Property< std::string > | m_selectionString { this, "SelectionString", "",""} |
|
Gaudi::Property< float > | m_coneSize { this, "ConeSize", -1.0, ""} |
|
Definition at line 29 of file TauTrackParticleThinning.h.
◆ TauTrackParticleThinning()
DerivationFramework::TauTrackParticleThinning::TauTrackParticleThinning |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~TauTrackParticleThinning()
DerivationFramework::TauTrackParticleThinning::~TauTrackParticleThinning |
( |
| ) |
|
|
virtualdefault |
◆ doThinning()
StatusCode DerivationFramework::TauTrackParticleThinning::doThinning |
( |
| ) |
const |
|
overridevirtual |
Definition at line 69 of file TauTrackParticleThinning.cxx.
71 const EventContext& ctx = Gaudi::Hive::currentContext();
78 unsigned int nTracks = importedTrackParticles->size();
79 if (nTracks==0)
return StatusCode::SUCCESS;
82 std::vector<bool>
mask;
83 mask.assign(nTracks,
false);
89 if (!importedTaus.isValid()) {
91 return StatusCode::FAILURE;
93 unsigned int nTaus(importedTaus->size());
94 std::vector<const xAOD::TauJet*> tauToCheck; tauToCheck.clear();
98 std::vector<int>
entries = m_parser->evaluateAsVector();
102 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your selection string used taus??");
103 return StatusCode::FAILURE;
106 for (
unsigned int i=0;
i<nTaus; ++
i)
if (
entries[
i]==1) tauToCheck.push_back((*importedTaus)[
i]);
110 for (
unsigned int i=0;
i<nTaus; ++
i) tauToCheck.push_back((*importedTaus)[
i]);
117 for (
const auto *tauIt : *importedTaus) {
119 for (
unsigned int i=0;
i<tauIt->nTracks(); ++
i) {
125 for (
auto & tauIt : tauToCheck) {
127 for (
unsigned int i=0;
i<tauIt->nTracks(); ++
i) {
135 unsigned int n_pass=0;
136 for (
unsigned int i=0;
i<nTracks; ++
i) {
137 if (
mask[
i]) ++n_pass;
142 importedTrackParticles.keep (
mask);
148 if( importedTauTracks->empty() ) {
149 return StatusCode::SUCCESS;
151 std::vector< bool > mask_tautracks( importedTauTracks->size(),
false );
157 for(
const auto& ttLink : ttLinks ) {
158 if( ! ttLink.isValid() ) {
164 return StatusCode::FAILURE;
167 mask_tautracks.at( ttLink.index() ) =
true;
175 importedTauTracks.keep(mask_tautracks);
179 return StatusCode::SUCCESS;
◆ finalize()
StatusCode DerivationFramework::TauTrackParticleThinning::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode DerivationFramework::TauTrackParticleThinning::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 32 of file TauTrackParticleThinning.cxx.
40 return StatusCode::FAILURE;
41 }
else {
ATH_MSG_INFO(
"Inner detector track particles associated with objects in " <<
m_tauKey.key() <<
" will be retained in this format with the rest being thinned away");}
45 ATH_MSG_FATAL(
"No tau tracks collection provided for thinning, despite this option being requested.");
46 return StatusCode::FAILURE;
57 return StatusCode::SUCCESS;
◆ m_coneSize
Gaudi::Property<float> DerivationFramework::TauTrackParticleThinning::m_coneSize { this, "ConeSize", -1.0, ""} |
|
private |
◆ m_doTauTracksThinning
Gaudi::Property<bool> DerivationFramework::TauTrackParticleThinning::m_doTauTracksThinning { this, "DoTauTracksThinning", false, "Apply thinning to tau tracks in addition to ID tracks"} |
|
private |
◆ m_inDetSGKey
◆ m_npass
std::atomic<unsigned int> DerivationFramework::TauTrackParticleThinning::m_npass {} |
|
mutableprivate |
◆ m_ntot
std::atomic<unsigned int> DerivationFramework::TauTrackParticleThinning::m_ntot {} |
|
mutableprivate |
◆ m_selectionString
Gaudi::Property<std::string> DerivationFramework::TauTrackParticleThinning::m_selectionString { this, "SelectionString", "",""} |
|
private |
◆ m_streamName
StringProperty DerivationFramework::TauTrackParticleThinning::m_streamName { this, "StreamName", "", "Name of the stream being thinned" } |
|
private |
◆ m_tauKey
◆ m_tauTracksSGKey
The documentation for this class was generated from the following files:
SG::ThinningHandleKey< xAOD::TrackParticleContainer > m_inDetSGKey
std::atomic< unsigned int > m_ntot
Gaudi::Property< float > m_coneSize
SG::ReadHandleKey< xAOD::TauJetContainer > m_tauKey
Gaudi::Property< std::string > m_selectionString
Gaudi::Property< bool > m_doTauTracksThinning
SG::ThinningHandleKey< xAOD::TauTrackContainer > m_tauTracksSGKey
std::atomic< unsigned int > m_npass