ATLAS Offline Software
Reconstruction
tauRecTools
Root
TauAODSelector.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
// local include(s)
6
#include "
tauRecTools/TauAODSelector.h
"
7
8
9
TauAODSelector::TauAODSelector
(
const
std::string&
name
)
10
:
TauRecToolBase
(
name
) {
11
declareProperty
(
"Min0pTauPt"
,
m_min0pTauPt
= 0.);
12
declareProperty
(
"MinTauPt"
,
m_minTauPt
= 0.);
13
declareProperty
(
"doEarlyStopping"
,
m_doEarlyStopping
=
true
);
14
}
15
16
17
StatusCode
TauAODSelector::execute
(
xAOD::TauJet
& tau)
const
{
18
19
bool
passThinning =
true
;
20
21
// selection criteria that taus must pass in order to be written to AOD
22
if
(tau.
nTracks
()==0) {
23
if
(tau.
pt
() <
m_min0pTauPt
) passThinning =
false
;
24
}
25
else
{
26
if
(tau.
pt
() <
m_minTauPt
) passThinning =
false
;
27
}
28
29
static
const
SG::Accessor<char>
acc_passThinning(
"passThinning"
);
30
acc_passThinning(tau) = passThinning;
31
32
if
(
m_doEarlyStopping
&& !passThinning)
return
StatusCode::FAILURE;
33
34
return
StatusCode::SUCCESS;
35
}
SG::Accessor< char >
TauAODSelector.h
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition:
AthCommonDataStore.h:145
xAOD::TauJet_v3::nTracks
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Definition:
TauJet_v3.cxx:526
TauRecToolBase
The base class for all tau tools.
Definition:
TauRecToolBase.h:21
TauAODSelector::m_doEarlyStopping
bool m_doEarlyStopping
Definition:
TauAODSelector.h:27
TauAODSelector::m_minTauPt
double m_minTauPt
Definition:
TauAODSelector.h:26
xAOD::TauJet_v3::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition:
PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::TauJet_v3
Class describing a tau jet.
Definition:
TauJet_v3.h:41
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
TauAODSelector::TauAODSelector
TauAODSelector(const std::string &name="TauAODSelector")
Definition:
TauAODSelector.cxx:9
TauAODSelector::execute
virtual StatusCode execute(xAOD::TauJet &tau) const override
Execute - called for each tau candidate.
Definition:
TauAODSelector.cxx:17
TauAODSelector::m_min0pTauPt
double m_min0pTauPt
Definition:
TauAODSelector.h:25
Generated on Fri Jan 10 2025 21:18:21 for ATLAS Offline Software by
1.8.18