ATLAS Offline Software
Loading...
Searching...
No Matches
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"
14
15// ISF_Interfaces includes
18
19namespace 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#ifdef HEPMC3
37 bool passesFilters(HepMC::ConstGenParticlePtr& part, const ToolHandleArray<IGenParticleFilter>& filters) const;
41#else
42 bool passesFilters(HepMC::ConstGenParticlePtr part, const ToolHandleArray<IGenParticleFilter>& filters) const;
46#endif
47
52 ToolHandleArray<IGenParticleFilter> m_genParticleFilters{this, "GenParticleFilters", {}, "Tools for filtering out GenParticles"};
53 ToolHandle<IGenParticleFilter> m_quasiStableFilter{this, "QuasiStableParticleFilter", "", "Tools for finding quasi-stable particles"};
54 };
55}
56
57#endif //> !ISF_ALGORITHMS_DROPQSPARTICLEDAUGHTERSTOOL_H
TruthPreselectionTool(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
ToolHandleArray< IGenParticleFilter > m_genParticleFilters
Filter passes if a difference between the decision of m_genParticleOldFilters and m_genParticleNewFil...
ToolHandle< IGenParticleFilter > m_quasiStableFilter
virtual ~TruthPreselectionTool()=default
Destructor.
virtual std::unique_ptr< HepMC::GenEvent > filterGenEvent(const HepMC::GenEvent &inputEvent) const override final
IGenEventFilter interface.
bool identifiedQuasiStableParticleForSim(HepMC::ConstGenParticlePtr part) const
bool hasQuasiStableAncestorParticle(HepMC::ConstGenParticlePtr part) const
virtual StatusCode initialize() override final
Athena algorithm's interface method initialize()
bool isPostQuasiStableParticleVertex(HepMC::ConstGenVertexPtr vtx) const
bool passesFilters(HepMC::ConstGenParticlePtr part, const ToolHandleArray< IGenParticleFilter > &filters) const
check if the given particle passes all filters
STL class.
const GenParticle * ConstGenParticlePtr
Definition GenParticle.h:38
const HepMC::GenVertex * ConstGenVertexPtr
Definition GenVertex.h:60
ISFParticleOrderedQueue.
STL namespace.
#define private