ATLAS Offline Software
Loading...
Searching...
No Matches
TauAODSelector.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5// local include(s)
7
8
9TauAODSelector::TauAODSelector(const std::string& name)
10 : TauRecToolBase(name) {
11}
12
13
14StatusCode TauAODSelector::execute(xAOD::TauJet& tau) const {
15
16 bool passThinning = true;
17
18 // selection criteria that taus must pass in order to be written to AOD
19 if (tau.nTracks()==0) {
20 if (tau.pt() < m_min0pTauPt) passThinning = false;
21 }
22 else {
23 if (tau.pt() < m_minTauPt) passThinning = false;
24 }
25
26 static const SG::Accessor<char> acc_passThinning("passThinning");
27 acc_passThinning(tau) = passThinning;
28
29 if (m_doEarlyStopping && !passThinning) return StatusCode::FAILURE;
30
31 return StatusCode::SUCCESS;
32}
Helper class to provide type-safe access to aux data.
virtual StatusCode execute(xAOD::TauJet &tau) const override
Execute - called for each tau candidate.
Gaudi::Property< double > m_minTauPt
Gaudi::Property< bool > m_doEarlyStopping
TauAODSelector(const std::string &name="TauAODSelector")
Gaudi::Property< double > m_min0pTauPt
TauRecToolBase(const std::string &name)
virtual double pt() const
The transverse momentum ( ) of the particle.
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
TauJet_v3 TauJet
Definition of the current "tau version".