#include <TauThinningTool.h>
|
std::atomic< unsigned int > | m_ntot = 0 |
|
std::atomic< unsigned int > | m_npass = 0 |
|
StringProperty | m_streamName { this, "StreamName", "", "Name of the stream being thinned" } |
|
Gaudi::Property< std::string > | m_selectionString { this, "SelectionString", "", "" } |
|
SG::ThinningHandleKey< xAOD::TauJetContainer > | m_taus { this, "Taus", "TauJets", "" } |
|
SG::ThinningHandleKey< xAOD::TauTrackContainer > | m_tauTracks { this, "TauTracks", "TauTracks", "" } |
|
SG::ThinningHandleKey< xAOD::TrackParticleContainer > | m_trackParticles { this, "TrackParticles", "InDetTrackParticles", "" } |
|
SG::ThinningHandleKey< xAOD::PFOContainer > | m_neutralPFOs { this, "TauNeutralPFOs", "TauNeutralParticleFlowObjects", "" } |
|
SG::ThinningHandleKey< xAOD::VertexContainer > | m_secondaryVertices { this, "TauSecondaryVertices", "TauSecondaryVertices", "" } |
|
Definition at line 25 of file TauThinningTool.h.
◆ TauThinningTool()
DerivationFramework::TauThinningTool::TauThinningTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~TauThinningTool()
virtual DerivationFramework::TauThinningTool::~TauThinningTool |
( |
| ) |
|
|
virtualdefault |
◆ doThinning()
StatusCode DerivationFramework::TauThinningTool::doThinning |
( |
| ) |
const |
|
overridevirtual |
Definition at line 45 of file TauThinningTool.cxx.
47 const EventContext& ctx = Gaudi::Hive::currentContext();
52 size_t nTaus = taus->size();
58 trackParticles.thinAll();
61 neutralPFOs.thinAll();
64 secondaryVertices.thinAll();
67 std::vector<const xAOD::TauJet*> tausToKeep;
71 std::vector<int>
entries = m_parser->evaluateAsVector();
74 ATH_MSG_ERROR(
"Incompatible sizes: " << nTaus <<
" vs " <<
nEntries <<
"! Please check your selection string uses the appropriate tau container.");
75 return StatusCode::FAILURE;
78 for (
size_t i=0;
i<nTaus; ++
i)
if (
entries[
i]==1) tausToKeep.push_back(taus->at(
i));
82 for (
size_t i=0;
i<nTaus; ++
i) tausToKeep.push_back(taus->at(
i));
86 if(tausToKeep.size() >0) {
87 for(
size_t i=0;
i < tausToKeep.size()-1;
i++){
88 for (
size_t j=
i+1; j < tausToKeep.size(); j++){
89 if( (tausToKeep.at(
i)->p4().DeltaR(tausToKeep.at(j)->p4())) < 0.01){
90 ATH_MSG_WARNING(
"Found duplicated tau with eta " << tausToKeep.at(j)->eta() <<
" phi " << tausToKeep.at(j)->phi() <<
" pt " << tausToKeep.at(j)->pt() <<
". Removing it ...");
91 tausToKeep.erase( tausToKeep.begin()+j);
99 for (
const auto* tau : tausToKeep) {
101 taus.keep(tau->index());
105 tauTracks.keep(
track->index());
108 trackParticles.keep(
track->track()->index());
112 for (
size_t i=0;
i<tau->nNeutralPFOs();
i++) {
113 neutralPFOs.keep(tau->neutralPFO(
i)->index());
117 if (tau->secondaryVertex() !=
nullptr) {
118 secondaryVertices.keep(tau->secondaryVertex()->index());
126 return StatusCode::SUCCESS;
◆ finalize()
StatusCode DerivationFramework::TauThinningTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode DerivationFramework::TauThinningTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ m_neutralPFOs
◆ m_npass
std::atomic<unsigned int> DerivationFramework::TauThinningTool::m_npass = 0 |
|
mutableprivate |
◆ m_ntot
std::atomic<unsigned int> DerivationFramework::TauThinningTool::m_ntot = 0 |
|
mutableprivate |
◆ m_secondaryVertices
◆ m_selectionString
Gaudi::Property<std::string> DerivationFramework::TauThinningTool::m_selectionString { this, "SelectionString", "", "" } |
|
private |
◆ m_streamName
StringProperty DerivationFramework::TauThinningTool::m_streamName { this, "StreamName", "", "Name of the stream being thinned" } |
|
private |
◆ m_taus
◆ m_tauTracks
◆ m_trackParticles
The documentation for this class was generated from the following files: