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 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
Interface definition for HepMC::GenParticle filter, these filters should be primarily be used in the ...
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 hasQuasiStableAncestorParticle(HepMC::ConstGenParticlePtr &part) const
virtual StatusCode initialize() override final
Athena algorithm's interface method initialize().
bool passesFilters(HepMC::ConstGenParticlePtr &part, const ToolHandleArray< IGenParticleFilter > &filters) const
check if the given particle passes all filters
bool identifiedQuasiStableParticleForSim(HepMC::ConstGenParticlePtr &part) const
bool isPostQuasiStableParticleVertex(HepMC::ConstGenVertexPtr &vtx) const
STL class.
ISFParticleOrderedQueue.
STL namespace.
#define private
Definition testRead.cxx:27