#include <DiTauTrackParticleThinning.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::ReadHandleKey< xAOD::DiTauJetContainer > | m_ditauKey { this, "DiTauKey","",""} |
|
SG::ThinningHandleKey< xAOD::TrackParticleContainer > | m_inDetSGKey { this, "InDetTrackParticlesKey", "InDetTrackParticles", "" } |
|
Gaudi::Property< std::string > | m_selectionString { this, "SelectionString", "", ""} |
|
◆ DiTauTrackParticleThinning()
DerivationFramework::DiTauTrackParticleThinning::DiTauTrackParticleThinning |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~DiTauTrackParticleThinning()
DerivationFramework::DiTauTrackParticleThinning::~DiTauTrackParticleThinning |
( |
| ) |
|
|
virtualdefault |
◆ doThinning()
StatusCode DerivationFramework::DiTauTrackParticleThinning::doThinning |
( |
| ) |
const |
|
overridevirtual |
Definition at line 55 of file DiTauTrackParticleThinning.cxx.
58 const EventContext& ctx = Gaudi::Hive::currentContext();
65 unsigned int nTracks = importedTrackParticles->size();
66 if (nTracks==0)
return StatusCode::SUCCESS;
69 std::vector<bool>
mask;
70 mask.assign(nTracks,
false);
76 if (!importedDiTaus.isValid()) {
78 return StatusCode::FAILURE;
80 unsigned int nDiTaus(importedDiTaus->size());
81 std::vector<const xAOD::DiTauJet*> ditauToCheck; ditauToCheck.clear();
85 std::vector<int>
entries = m_parser->evaluateAsVector();
89 ATH_MSG_ERROR(
"Sizes incompatible! Are you sure your selection string used ditaus??");
90 return StatusCode::FAILURE;
93 for (
unsigned int i=0;
i<nDiTaus; ++
i)
if (
entries[
i]==1) ditauToCheck.push_back((*importedDiTaus)[
i]);
100 for (
const auto *ditauIt : *importedDiTaus) {
101 for (
unsigned int i=0;
i<ditauIt->nTracks(); ++
i) {
102 int index = ditauIt->trackLinks().at(
i).index();
105 for (
unsigned int i=0;
i<ditauIt->nIsoTracks(); ++
i) {
106 int index = ditauIt->isoTrackLinks().at(
i).index();
111 for (
auto & ditauIt : ditauToCheck) {
112 for (
unsigned int i=0;
i<ditauIt->nTracks(); ++
i) {
113 int index = ditauIt->trackLinks().at(
i).index();
116 for (
unsigned int i=0;
i<ditauIt->nIsoTracks(); ++
i) {
117 int index = ditauIt->isoTrackLinks().at(
i).index();
124 unsigned int n_pass=0;
125 for (
unsigned int i=0;
i<nTracks; ++
i) {
126 if (
mask[
i]) ++n_pass;
131 importedTrackParticles.keep (
mask);
133 return StatusCode::SUCCESS;
◆ finalize()
StatusCode DerivationFramework::DiTauTrackParticleThinning::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode DerivationFramework::DiTauTrackParticleThinning::initialize |
( |
| ) |
|
|
overridevirtual |
◆ m_ditauKey
◆ m_inDetSGKey
◆ m_npass
std::atomic<unsigned int> DerivationFramework::DiTauTrackParticleThinning::m_npass {} |
|
mutableprivate |
◆ m_ntot
std::atomic<unsigned int> DerivationFramework::DiTauTrackParticleThinning::m_ntot {} |
|
mutableprivate |
◆ m_selectionString
Gaudi::Property<std::string> DerivationFramework::DiTauTrackParticleThinning::m_selectionString { this, "SelectionString", "", ""} |
|
private |
◆ m_streamName
StringProperty DerivationFramework::DiTauTrackParticleThinning::m_streamName { this, "StreamName", "", "Name of the stream being thinned" } |
|
private |
The documentation for this class was generated from the following files:
SG::ReadHandleKey< xAOD::DiTauJetContainer > m_ditauKey
SG::ThinningHandleKey< xAOD::TrackParticleContainer > m_inDetSGKey
Gaudi::Property< std::string > m_selectionString
std::atomic< unsigned int > m_ntot
std::atomic< unsigned int > m_npass