ATLAS Offline Software
GenParticleSimAcceptList.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_HEPMC_GENPARTICLESIMACCEPTLIST_H
6 #define ISF_HEPMC_GENPARTICLESIMACCEPTLIST_H 1
7 
8 // FrameWork includes
9 #include "GaudiKernel/ToolHandle.h"
10 #include "GaudiKernel/SystemOfUnits.h"
12 // ISF includes
14 
15 // STL includes
16 #include <string>
17 #include <vector>
18 
19 #include "AtlasHepMC/GenParticle.h"
20 namespace ISF {
21 
22  class ISFParticle;
23 
31  class GenParticleSimAcceptList : public extends<AthAlgTool, IGenParticleFilter> {
32 
33  public:
34  //** Constructor with parameters */
35  GenParticleSimAcceptList( const std::string& t, const std::string& n, const IInterface* p );
36 
39 
41  virtual StatusCode initialize() override final;
42  virtual StatusCode finalize() override final;
43 
45 #ifdef HEPMC3
46  virtual bool pass(const HepMC::ConstGenParticlePtr& particle ) const override;
47 #else
48  virtual bool pass(const HepMC::GenParticle& particle ) const override;
49 #endif
50 
51  private:
53 #ifdef HEPMC3
54  bool pass(const HepMC::ConstGenParticlePtr& particle , std::vector<int> & used_vertices ) const;
55 #else
56  bool pass(const HepMC::GenParticle& particle , std::vector<int> & used_vertices ) const;
57 #endif
58  StringArrayProperty m_acceptLists{this, "AcceptLists", {"G4particle_acceptlist.txt"} };
59  std::vector<long int> m_pdgId;
60  BooleanProperty m_qs{this, "QuasiStableSim", true};
61  BooleanProperty m_useShadowEvent{this, "UseShadowEvent", false, "New approach to selecting particles for simulation" };
62  DoubleProperty m_minDecayRadiusQS{this, "MinimumDecayRadiusQS", 30.19*Gaudi::Units::mm};
63  };
64 
65 }
66 
67 
68 #endif //> !ISF_HEPMC_GENPARTICLESIMACCEPTLIST_H
ISF::GenParticleSimAcceptList::m_minDecayRadiusQS
DoubleProperty m_minDecayRadiusQS
Decay radius below which QS particles should be ignored.
Definition: GenParticleSimAcceptList.h:62
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ISF::GenParticleSimAcceptList::~GenParticleSimAcceptList
~GenParticleSimAcceptList()
Destructor.
Definition: GenParticleSimAcceptList.h:38
ISF::GenParticleSimAcceptList::m_pdgId
std::vector< long int > m_pdgId
Allowed PDG IDs.
Definition: GenParticleSimAcceptList.h:59
ISF::GenParticleSimAcceptList::finalize
virtual StatusCode finalize() override final
Definition: GenParticleSimAcceptList.cxx:212
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ISF::GenParticleSimAcceptList::m_useShadowEvent
BooleanProperty m_useShadowEvent
Definition: GenParticleSimAcceptList.h:61
ISF::GenParticleSimAcceptList::pass
virtual bool pass(const HepMC::GenParticle &particle) const override
passes through to the private version
Definition: GenParticleSimAcceptList.cxx:97
GenParticle.h
ISF::GenParticleSimAcceptList::GenParticleSimAcceptList
GenParticleSimAcceptList(const std::string &t, const std::string &n, const IInterface *p)
Constructor.
Definition: GenParticleSimAcceptList.cxx:23
ISF::GenParticleSimAcceptList::m_qs
BooleanProperty m_qs
Switch for quasi-stable particle simulation.
Definition: GenParticleSimAcceptList.h:60
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
ISF::GenParticleSimAcceptList
Definition: GenParticleSimAcceptList.h:31
ISF::GenParticleSimAcceptList::m_acceptLists
StringArrayProperty m_acceptLists
The location of the accept lists.
Definition: GenParticleSimAcceptList.h:58
ISF::GenParticleSimAcceptList::initialize
virtual StatusCode initialize() override final
Athena algtool's Hooks.
Definition: GenParticleSimAcceptList.cxx:31
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
ISF
ISFParticleOrderedQueue.
Definition: PrimaryParticleInformation.h:13
IGenParticleFilter.h
GenParticle
@ GenParticle
Definition: TruthClasses.h:30