ATLAS Offline Software
Loading...
Searching...
No Matches
BaseSimulationSelector.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
9
10
12ISF::BaseSimulationSelector::BaseSimulationSelector(const std::string& type, const std::string& name, const IInterface* parent) :
13 base_class(type, name, parent)
14{
15 m_simFlavorProp.verifier().setLower(ISF::UndefinedSim+1);
16 m_simFlavorProp.verifier().setUpper(ISF::NFlavors-1);
18}
19
21{
22 // FIXME would probably be better to have this in SimulationFlavor.h
23 switch(m_simFlavorProp.value())
24 {
25 case 1: m_simflavor = ISF::ParticleKiller; break;
26 case 2: m_simflavor = ISF::Fatras; break;
27 case 3: m_simflavor = ISF::Geant4; break;
28 case 4: m_simflavor = ISF::FastCaloSim; break;
29 case 5: m_simflavor = ISF::FastCaloSimV2; break;
30 case 6: m_simflavor = ISF::Parametric; break;
31 case 7: m_simflavor = ISF::FatrasPileup; break;
32 case 8: m_simflavor = ISF::FastCaloSimPileup; break;
33 }
34}
35
38{
40
41 if (!m_simulator.empty()) {
42 ATH_CHECK( m_simulator.retrieve() );
43 }
44
45 return StatusCode::SUCCESS;
46}
47
48
51
53bool
55{
56 bool pass = passSelectorCuts(particle);
57 pass = ( m_invertCuts ? (!pass) : pass );
58
59 return pass;
60}
61
63ServiceHandle<ISF::ISimulationSvc>* ISF::BaseSimulationSelector::simulator ATLAS_NOT_THREAD_SAFE () {
64 return &m_simulator;
65}
66
72
74ISF::SimSvcID ISF::BaseSimulationSelector::simSvcID ATLAS_NOT_THREAD_SAFE () {
75 return m_simulator->simSvcID();
76}
77
82
85
88void ISF::BaseSimulationSelector::beginEvent ATLAS_NOT_THREAD_SAFE () { }
89
92void ISF::BaseSimulationSelector::endEvent ATLAS_NOT_THREAD_SAFE () { }
93
95void ISF::BaseSimulationSelector::update ATLAS_NOT_THREAD_SAFE (const ISFParticle& ) { }
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
virtual StatusCode sysInitialize() override
virtual bool isDynamic() override
return if is this a static or dynamic SimulationSelector (is used by fully dynamic particle routers)
Gaudi::Property< bool > m_invertCuts
Gaudi::CheckedProperty< unsigned short > m_simFlavorProp
ServiceHandle< ISimulationSvc > m_simulator
Gaudi::Property< bool > m_isDynamic
ISF::SimulationFlavor m_simflavor
simulation flavor
virtual bool selfSelect(const ISFParticle &particle) const override
make the routing decision
virtual ISF::SimulationFlavor simFlavor() const override
return the simulation flavor
virtual void initializeSelector() override
initialize Selector
void SimulationFlavorHandler(Gaudi::Details::PropertyBase &)
virtual StatusCode sysInitialize() override
Gaudi sysInitialize() method.
virtual ~BaseSimulationSelector()
virtual destructor
BaseSimulationSelector(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
The generic ISF particle definition,.
Definition ISFParticle.h:42
int SimulationFlavor
Identifier type for simulation flavor.
@ FastCaloSimPileup
@ ParticleKiller
@ FastCaloSimV2
uint8_t SimSvcID
Simulation service ID datatype.
Definition SimSvcID.h:28