#include <MuonTrackParticleThinning.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::MuonContainer > | m_muonKey { this, "MuonKey", "",""} |
|
Gaudi::Property< std::string > | m_selectionString { this, "SelectionString","",""} |
|
Gaudi::Property< float > | m_coneSize { this, "ConeSize", -1.0, ""} |
|
Definition at line 27 of file MuonTrackParticleThinning.h.
◆ MuonTrackParticleThinning()
DerivationFramework::MuonTrackParticleThinning::MuonTrackParticleThinning |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~MuonTrackParticleThinning()
DerivationFramework::MuonTrackParticleThinning::~MuonTrackParticleThinning |
( |
| ) |
|
|
virtualdefault |
◆ doThinning()
StatusCode DerivationFramework::MuonTrackParticleThinning::doThinning |
( |
| ) |
const |
|
overridevirtual |
Definition at line 60 of file MuonTrackParticleThinning.cxx.
62 const EventContext& ctx = Gaudi::Hive::currentContext();
69 unsigned int nTracks = importedTrackParticles->size();
70 if (nTracks==0)
return StatusCode::SUCCESS;
73 std::vector<bool>
mask;
74 mask.assign(nTracks,
false);
80 if (!importedMuons.isValid()) {
82 return StatusCode::FAILURE;
84 unsigned int nMuons(importedMuons->size());
85 std::vector<const xAOD::Muon*> muToCheck; muToCheck.clear();
88 std::vector<int>
entries = m_parser->evaluateAsVector();
92 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your selection string used muons??");
93 return StatusCode::FAILURE;
96 for (
unsigned int i=0;
i<nMuons; ++
i)
if (
entries[
i]==1) muToCheck.push_back((*importedMuons)[
i]);
102 for (
const auto *muIt : *importedMuons) {
103 if (muIt->inDetTrackParticleLink().isValid()) {
106 if (muIt->muonType()==xAOD::Muon::SiliconAssociatedForwardMuon &&
m_inDetSGKey.key() !=
"InDetForwardTrackParticles")
108 ATH_MSG_DEBUG(
"Skipping Forward Muon since we are not skimming InDetForwardParticles");
112 int index = muIt->inDetTrackParticleLink().index();
119 for (
auto & muIt : muToCheck) {
120 if (muIt->inDetTrackParticleLink().isValid()) {
122 if (muIt->muonType()==xAOD::Muon::SiliconAssociatedForwardMuon &&
m_inDetSGKey.key() !=
"InDetForwardTrackParticles")
124 ATH_MSG_DEBUG(
"Skipping Forward Muon since we are not skimming InDetForwardParticles");
128 int index = muIt->inDetTrackParticleLink().index();
137 unsigned int n_pass=0;
138 for (
unsigned int i=0;
i<nTracks; ++
i) {
139 if (
mask[
i]) ++n_pass;
143 importedTrackParticles.keep (
mask);
145 return StatusCode::SUCCESS;
◆ finalize()
StatusCode DerivationFramework::MuonTrackParticleThinning::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode DerivationFramework::MuonTrackParticleThinning::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 33 of file MuonTrackParticleThinning.cxx.
41 return StatusCode::FAILURE;
42 }
else {
ATH_MSG_INFO(
"Inner detector track particles associated with objects in " <<
m_muonKey.key() <<
" will be retained in this format with the rest being thinned away");}
48 return StatusCode::SUCCESS;
◆ m_coneSize
Gaudi::Property<float> DerivationFramework::MuonTrackParticleThinning::m_coneSize { this, "ConeSize", -1.0, ""} |
|
private |
◆ m_inDetSGKey
◆ m_muonKey
◆ m_npass
std::atomic<unsigned int> DerivationFramework::MuonTrackParticleThinning::m_npass {} |
|
mutableprivate |
◆ m_ntot
std::atomic<unsigned int> DerivationFramework::MuonTrackParticleThinning::m_ntot {} |
|
mutableprivate |
◆ m_selectionString
Gaudi::Property<std::string> DerivationFramework::MuonTrackParticleThinning::m_selectionString { this, "SelectionString","",""} |
|
private |
◆ m_streamName
StringProperty DerivationFramework::MuonTrackParticleThinning::m_streamName { this, "StreamName", "", "Name of the stream being thinned" } |
|
private |
The documentation for this class was generated from the following files:
std::atomic< unsigned int > m_ntot
SG::ReadHandleKey< xAOD::MuonContainer > m_muonKey
SG::ThinningHandleKey< xAOD::TrackParticleContainer > m_inDetSGKey
std::atomic< unsigned int > m_npass
Gaudi::Property< float > m_coneSize
Gaudi::Property< std::string > m_selectionString