ATLAS Offline Software
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 
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 #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
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
ISF::TruthPreselectionTool::isPostQuasiStableParticleVertex
bool isPostQuasiStableParticleVertex(HepMC::ConstGenVertexPtr vtx) const
Definition: TruthPreselectionTool.cxx:113
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ISF::TruthPreselectionTool::identifiedQuasiStableParticleForSim
bool identifiedQuasiStableParticleForSim(HepMC::ConstGenParticlePtr part) const
Definition: TruthPreselectionTool.cxx:62
ISF::TruthPreselectionTool::hasQuasiStableAncestorParticle
bool hasQuasiStableAncestorParticle(HepMC::ConstGenParticlePtr part) const
Definition: TruthPreselectionTool.cxx:81
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
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:52
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:133
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h: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:38
AthAlgTool.h
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
ISF::TruthPreselectionTool::m_quasiStableFilter
ToolHandle< IGenParticleFilter > m_quasiStableFilter
Definition: TruthPreselectionTool.h:53
ISF::TruthPreselectionTool::initialize
virtual StatusCode initialize() override final
Athena algorithm's interface method initialize()
Definition: TruthPreselectionTool.cxx:23
ISF::TruthPreselectionTool::TruthPreselectionTool
TruthPreselectionTool(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: TruthPreselectionTool.cxx:16
ISF
ISFParticleOrderedQueue.
Definition: PrimaryParticleInformation.h:13
HepMC
Definition: Barcode.h:14
IGenParticleFilter.h
HepMC::ConstGenVertexPtr
const HepMC::GenVertex * ConstGenVertexPtr
Definition: GenVertex.h:60
ISF::TruthPreselectionTool
Definition: TruthPreselectionTool.h:21
IGenEventFilter.h