ATLAS Offline Software
BaseSimulationSelector.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef ISF_SIMULATIONSELECTORS_BASESIMULATIONSELECTOR_H
6 #define ISF_SIMULATIONSELECTORS_BASESIMULATIONSELECTOR_H 1
7 
8 // ISF includes
12 
13 
14 // Gaudi & Athena basics
15 #include "GaudiKernel/ServiceHandle.h"
17 
19 
20 
21 namespace ISF {
22 
23 class ISFParticle;
24 
31 class BaseSimulationSelector : public extends<AthAlgTool, ISimulationSelector> {
32  public:
34  BaseSimulationSelector( const std::string& t, const std::string& n, const IInterface* p );
35 
37  virtual ~BaseSimulationSelector();
38 
40  virtual StatusCode sysInitialize() override;
41 
43  virtual ServiceHandle<ISimulationSvc>* simulator ATLAS_NOT_THREAD_SAFE () override;
44 
47  virtual bool isDynamic() override;
48 
50  virtual SimSvcID simSvcID ATLAS_NOT_THREAD_SAFE () override;
51 
53  virtual ISF::SimulationFlavor simFlavor() const override;
54 
56  virtual void initializeSelector() override;
57 
60  virtual void beginEvent ATLAS_NOT_THREAD_SAFE () override;
61 
64  virtual void endEvent ATLAS_NOT_THREAD_SAFE () override;
65 
67  virtual void update ATLAS_NOT_THREAD_SAFE (const ISFParticle& ) override;
68 
70  virtual bool selfSelect(const ISFParticle& particle) const override;
71 
72  private:
74  bool m_isDynamic;
75  bool m_invertCuts;
76  Gaudi::CheckedProperty<unsigned short> m_simFlavorProp{0};
77  void SimulationFlavorHandler(Gaudi::Details::PropertyBase&);
79 };
80 
81 
82 } // end of namespace
83 
84 
85 #endif // ISF_SIMULATIONSELECTORS_BASESIMULATIONSELECTOR_H
ISF::BaseSimulationSelector::initializeSelector
virtual void initializeSelector() override
initialize Selector
Definition: BaseSimulationSelector.cxx:91
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
ISF::BaseSimulationSelector::m_simflavor
ISF::SimulationFlavor m_simflavor
simulation flavor
Definition: BaseSimulationSelector.h:78
ISF::BaseSimulationSelector::sysInitialize
virtual StatusCode sysInitialize() override
Gaudi sysInitialize() method.
Definition: BaseSimulationSelector.cxx:44
ISF::BaseSimulationSelector::ATLAS_NOT_THREAD_SAFE
virtual void update ATLAS_NOT_THREAD_SAFE(const ISFParticle &) override
update internal event representation
ISF::ISFParticle
Definition: ISFParticle.h:42
ISF::BaseSimulationSelector::m_simulator
ServiceHandle< ISimulationSvc > m_simulator
simulation service assigned to a single advisor
Definition: BaseSimulationSelector.h:73
ISF::BaseSimulationSelector::m_simFlavorProp
Gaudi::CheckedProperty< unsigned short > m_simFlavorProp
the simulation flavour that this selector will select
Definition: BaseSimulationSelector.h:76
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ISF::BaseSimulationSelector::SimulationFlavorHandler
void SimulationFlavorHandler(Gaudi::Details::PropertyBase &)
Definition: BaseSimulationSelector.cxx:27
ISF::BaseSimulationSelector::ATLAS_NOT_THREAD_SAFE
virtual void endEvent ATLAS_NOT_THREAD_SAFE() override
called at the end of each athena event (can be used for eg.
ISF::BaseSimulationSelector
Definition: BaseSimulationSelector.h:31
ISF::BaseSimulationSelector::ATLAS_NOT_THREAD_SAFE
virtual void beginEvent ATLAS_NOT_THREAD_SAFE() override
called at the beginning of each athena event (can be used for eg.
ISF::BaseSimulationSelector::ATLAS_NOT_THREAD_SAFE
virtual ServiceHandle< ISimulationSvc > *simulator ATLAS_NOT_THREAD_SAFE() override
return a handle on the simulator
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ISF::BaseSimulationSelector::simFlavor
virtual ISF::SimulationFlavor simFlavor() const override
return the simulation flavor
Definition: BaseSimulationSelector.cxx:86
ISF::BaseSimulationSelector::selfSelect
virtual bool selfSelect(const ISFParticle &particle) const override
make the routing decision
Definition: BaseSimulationSelector.cxx:61
beamspotman.n
n
Definition: beamspotman.py:731
ISimulationSelector.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ISF::BaseSimulationSelector::m_invertCuts
bool m_invertCuts
invert the result given by passesCuts(..) method
Definition: BaseSimulationSelector.h:75
AthAlgTool.h
ISF::UndefinedSim
@ UndefinedSim
Definition: SimulationFlavor.h:20
ISF::BaseSimulationSelector::ATLAS_NOT_THREAD_SAFE
virtual SimSvcID simSvcID ATLAS_NOT_THREAD_SAFE() override
return the simulation service ID
ISF::BaseSimulationSelector::~BaseSimulationSelector
virtual ~BaseSimulationSelector()
virtual destructor
Definition: BaseSimulationSelector.cxx:57
ISF::SimSvcID
uint8_t SimSvcID
Simulation service ID datatype.
Definition: SimSvcID.h:28
ISF::BaseSimulationSelector::m_isDynamic
bool m_isDynamic
this selector is either dynamic or static
Definition: BaseSimulationSelector.h:74
ISF
ISFParticleOrderedQueue.
Definition: PrimaryParticleInformation.h:13
ISF::BaseSimulationSelector::BaseSimulationSelector
BaseSimulationSelector(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: BaseSimulationSelector.cxx:12
ISimulationSvc.h
ISF::BaseSimulationSelector::isDynamic
virtual bool isDynamic() override
return if is this a static or dynamic SimulationSelector (is used by fully dynamic particle routers)
Definition: BaseSimulationSelector.cxx:76
checker_macros.h
Define macros for attributes used to control the static checker.
ISF::SimulationFlavor
int SimulationFlavor
Identifier type for simulation flavor.
Definition: SimulationFlavor.h:16
WriteBchToCool.update
update
Definition: WriteBchToCool.py:67
SimulationFlavor.h
ServiceHandle
Definition: ClusterMakerTool.h:37