ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
DerivationFramework
DerivationFrameworkExamples
src
ThinningToolExample.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef DERIVATIONFRAMEWORK_THINNINGTOOLEXAMPLE_H
6
#define DERIVATIONFRAMEWORK_THINNINGTOOLEXAMPLE_H
7
8
#include <string>
9
#include <atomic>
10
11
// Gaudi & Athena basics
12
#include "
AthenaBaseComps/AthAlgTool.h
"
13
#include "
xAODTracking/TrackParticleContainer.h
"
14
#include "
StoreGate/ThinningHandleKey.h
"
15
16
// DerivationFramework includes
17
#include "
DerivationFrameworkInterfaces/IThinningTool.h
"
18
19
20
namespace
DerivationFramework
{
21
26
class
ThinningToolExample
:
public
extends<AthAlgTool, IThinningTool> {
27
28
public
:
30
using
base_class::base_class;
31
33
virtual
~ThinningToolExample
();
34
35
// Athena algtool's Hooks
36
virtual
StatusCode
initialize
()
override
;
37
virtual
StatusCode
finalize
()
override
;
38
40
virtual
StatusCode
doThinning
(
const
EventContext& ctx)
const override
;
41
42
private
:
43
Gaudi::Property<std::string>
m_streamName
44
{
this
,
"StreamName"
,
""
,
"Name of the stream being thinned"
};
45
46
Gaudi::Property<double>
m_trackPtCut
47
{
this
,
"TrackPtCut"
, 20.0,
"Track p_T cut in GeV"
};
48
49
SG::ThinningHandleKey<xAOD::TrackParticleContainer>
m_inDetSGKey
50
{
this
,
"InDetTrackParticlesKey"
,
"InDetTrackParticles"
,
"Key for track particle container"
};
51
52
mutable
std::atomic<unsigned int>
m_ntot
{0};
53
mutable
std::atomic<unsigned int>
m_npass
{0};
54
55
};
56
57
}
58
59
#endif
AthAlgTool.h
TrackParticleContainer.h
IThinningTool.h
ThinningHandleKey.h
HandleKey object for adding thinning to an object.
DerivationFramework::ThinningToolExample
Definition
ThinningToolExample.h:26
DerivationFramework::ThinningToolExample::m_streamName
Gaudi::Property< std::string > m_streamName
Definition
ThinningToolExample.h:44
DerivationFramework::ThinningToolExample::m_ntot
std::atomic< unsigned int > m_ntot
Definition
ThinningToolExample.h:52
DerivationFramework::ThinningToolExample::~ThinningToolExample
virtual ~ThinningToolExample()
Destructor.
Definition
ThinningToolExample.cxx:20
DerivationFramework::ThinningToolExample::initialize
virtual StatusCode initialize() override
Definition
ThinningToolExample.cxx:25
DerivationFramework::ThinningToolExample::m_inDetSGKey
SG::ThinningHandleKey< xAOD::TrackParticleContainer > m_inDetSGKey
Definition
ThinningToolExample.h:50
DerivationFramework::ThinningToolExample::finalize
virtual StatusCode finalize() override
Definition
ThinningToolExample.cxx:32
DerivationFramework::ThinningToolExample::m_trackPtCut
Gaudi::Property< double > m_trackPtCut
Definition
ThinningToolExample.h:47
DerivationFramework::ThinningToolExample::doThinning
virtual StatusCode doThinning(const EventContext &ctx) const override
Check that the current event passes this filter.
Definition
ThinningToolExample.cxx:40
DerivationFramework::ThinningToolExample::m_npass
std::atomic< unsigned int > m_npass
Definition
ThinningToolExample.h:53
SG::ThinningHandleKey
HandleKey object for adding thinning to an object.
Definition
ThinningHandleKey.h:39
DerivationFramework
THE reconstruction tool.
Definition
CascadeTools.h:16
Generated on
for ATLAS Offline Software by
1.17.0