ATLAS Offline Software
Loading...
Searching...
No Matches
Simulation
ISF
ISF_HepMC
ISF_HepMC_Tools
src
TruthPreselectionTool.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ISF_ALGORITHMS_DROPQSPARTICLEDAUGHTERSTOOL_H
6
#define ISF_ALGORITHMS_DROPQSPARTICLEDAUGHTERSTOOL_H 1
7
8
// STL includes
9
#include <string>
10
11
// FrameWork includes
12
#include "GaudiKernel/ToolHandle.h"
13
#include "
AthenaBaseComps/AthAlgTool.h
"
14
15
// ISF_Interfaces includes
16
#include "
ISF_HepMC_Interfaces/IGenParticleFilter.h
"
17
#include "
ISF_Interfaces/IGenEventFilter.h
"
18
19
namespace
ISF
{
20
21
class
TruthPreselectionTool
:
public
extends<AthAlgTool, IGenEventFilter> {
22
23
public
:
25
TruthPreselectionTool
(
const
std::string& t,
const
std::string& n,
const
IInterface* p );
26
28
virtual
~TruthPreselectionTool
() =
default
;
29
31
virtual
StatusCode
initialize
() override final;
33
virtual
std
::
unique_ptr
<
HepMC
::GenEvent>
filterGenEvent
(
const
HepMC
::GenEvent& inputEvent)
const
override final;
34
35
private
:
36
bool
passesFilters
(
HepMC
::ConstGenParticlePtr& part,
const
ToolHandleArray<
IGenParticleFilter
>& filters)
const
;
37
bool
identifiedQuasiStableParticleForSim
(
HepMC
::ConstGenParticlePtr& part)
const
;
38
bool
hasQuasiStableAncestorParticle
(
HepMC
::ConstGenParticlePtr& part)
const
;
39
bool
isPostQuasiStableParticleVertex
(
HepMC
::ConstGenVertexPtr& vtx)
const
;
44
ToolHandleArray<
IGenParticleFilter
>
m_genParticleFilters
{
this
,
"GenParticleFilters"
, {},
"Tools for filtering out GenParticles"
};
45
ToolHandle<IGenParticleFilter>
m_quasiStableFilter
{
this
,
"QuasiStableParticleFilter"
,
""
,
"Tools for finding quasi-stable particles"
};
46
};
47
}
48
49
#endif
//> !ISF_ALGORITHMS_DROPQSPARTICLEDAUGHTERSTOOL_H
AthAlgTool.h
IGenEventFilter.h
IGenParticleFilter.h
ISF::IGenParticleFilter
Interface definition for HepMC::GenParticle filter, these filters should be primarily be used in the ...
Definition
IGenParticleFilter.h:27
ISF::TruthPreselectionTool::TruthPreselectionTool
TruthPreselectionTool(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition
TruthPreselectionTool.cxx:15
ISF::TruthPreselectionTool::m_genParticleFilters
ToolHandleArray< IGenParticleFilter > m_genParticleFilters
Filter passes if a difference between the decision of m_genParticleOldFilters and m_genParticleNewFil...
Definition
TruthPreselectionTool.h:44
ISF::TruthPreselectionTool::m_quasiStableFilter
ToolHandle< IGenParticleFilter > m_quasiStableFilter
Definition
TruthPreselectionTool.h:45
ISF::TruthPreselectionTool::~TruthPreselectionTool
virtual ~TruthPreselectionTool()=default
Destructor.
ISF::TruthPreselectionTool::filterGenEvent
virtual std::unique_ptr< HepMC::GenEvent > filterGenEvent(const HepMC::GenEvent &inputEvent) const override final
IGenEventFilter interface.
Definition
TruthPreselectionTool.cxx:79
ISF::TruthPreselectionTool::hasQuasiStableAncestorParticle
bool hasQuasiStableAncestorParticle(HepMC::ConstGenParticlePtr &part) const
Definition
TruthPreselectionTool.cxx:59
ISF::TruthPreselectionTool::initialize
virtual StatusCode initialize() override final
Athena algorithm's interface method initialize().
Definition
TruthPreselectionTool.cxx:22
ISF::TruthPreselectionTool::passesFilters
bool passesFilters(HepMC::ConstGenParticlePtr &part, const ToolHandleArray< IGenParticleFilter > &filters) const
check if the given particle passes all filters
Definition
TruthPreselectionTool.cxx:34
ISF::TruthPreselectionTool::identifiedQuasiStableParticleForSim
bool identifiedQuasiStableParticleForSim(HepMC::ConstGenParticlePtr &part) const
Definition
TruthPreselectionTool.cxx:50
ISF::TruthPreselectionTool::isPostQuasiStableParticleVertex
bool isPostQuasiStableParticleVertex(HepMC::ConstGenVertexPtr &vtx) const
Definition
TruthPreselectionTool.cxx:72
unique_ptr
STL class.
const
HepMC
Definition
Barcode.h:13
ISF
ISFParticleOrderedQueue.
Definition
PrimaryParticleInformation.h:13
std
STL namespace.
private
#define private
Definition
testRead.cxx:27
Generated on
for ATLAS Offline Software by
1.16.1