ATLAS Offline Software
Loading...
Searching...
No Matches
ISF::DefaultSimSelector Class Referencefinal

This SimlationSelector implementation will select all particles that are handed to it. More...

#include <DefaultSimSelector.h>

Inheritance diagram for ISF::DefaultSimSelector:
Collaboration diagram for ISF::DefaultSimSelector:

Public Member Functions

 DefaultSimSelector (const std::string &t, const std::string &n, const IInterface *p)
 Constructor with parameters.
 ~DefaultSimSelector ()
 Destructor.
StatusCode initialize () override
StatusCode finalize () override
virtual bool passSelectorCuts (const ISFParticle &particle) const override
 check whether given particle passes all cuts -> will be used for routing decision
virtual StatusCode sysInitialize () override
 Gaudi sysInitialize() method.
virtual ServiceHandle< ISimulationSvc > *simulator ATLAS_NOT_THREAD_SAFE () override
 return a handle on the simulator
virtual SimSvcID simSvcID ATLAS_NOT_THREAD_SAFE () override
 return the simulation service ID
virtual void beginEvent ATLAS_NOT_THREAD_SAFE () override
 called at the beginning of each athena event (can be used for eg.
virtual void endEvent ATLAS_NOT_THREAD_SAFE () override
 called at the end of each athena event (can be used for eg.
virtual void update ATLAS_NOT_THREAD_SAFE (const ISFParticle &) override
 update internal event representation
virtual bool isDynamic () override
 return if is this a static or dynamic SimulationSelector (is used by fully dynamic particle routers)
virtual ISF::SimulationFlavor simFlavor () const override
 return the simulation flavor
virtual void initializeSelector () override
 initialize Selector
virtual bool selfSelect (const ISFParticle &particle) const override
 make the routing decision

Private Member Functions

void SimulationFlavorHandler (Gaudi::Details::PropertyBase &)

Private Attributes

ServiceHandle< ISimulationSvcm_simulator {this, "Simulator", "", "simulation service assigned to a single advisor"}
Gaudi::Property< bool > m_isDynamic {this, "IsDynamic", false, "this selector is either dynamic or static"}
Gaudi::Property< bool > m_invertCuts {this, "InvertCuts", false, "invert the result given by passesCuts(..) method"}
Gaudi::CheckedProperty< unsigned short > m_simFlavorProp {this, "SimulationFlavor", 0, "the simulation flavour that this selector will select"}
ISF::SimulationFlavor m_simflavor {ISF::UndefinedSim}
 simulation flavor

Detailed Description

This SimlationSelector implementation will select all particles that are handed to it.

( passFilter() always returns true )

Author
Elmar.Ritsch -at- cern.ch

Definition at line 25 of file DefaultSimSelector.h.

Constructor & Destructor Documentation

◆ DefaultSimSelector()

ISF::DefaultSimSelector::DefaultSimSelector ( const std::string & t,
const std::string & n,
const IInterface * p )

Constructor with parameters.

Constructor.

Definition at line 17 of file DefaultSimSelector.cxx.

19{
20}
BaseSimulationSelector(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.

◆ ~DefaultSimSelector()

ISF::DefaultSimSelector::~DefaultSimSelector ( )

Destructor.

Definition at line 23 of file DefaultSimSelector.cxx.

24{
25}

Member Function Documentation

◆ ATLAS_NOT_THREAD_SAFE() [1/5]

virtual ServiceHandle< ISimulationSvc > *simulator ISF::BaseSimulationSelector::ATLAS_NOT_THREAD_SAFE ( )
overridevirtualinherited

return a handle on the simulator

◆ ATLAS_NOT_THREAD_SAFE() [2/5]

virtual SimSvcID simSvcID ISF::BaseSimulationSelector::ATLAS_NOT_THREAD_SAFE ( )
overridevirtualinherited

return the simulation service ID

◆ ATLAS_NOT_THREAD_SAFE() [3/5]

virtual void beginEvent ISF::BaseSimulationSelector::ATLAS_NOT_THREAD_SAFE ( )
overridevirtualinherited

called at the beginning of each athena event (can be used for eg.

resetting dynamic selectors)

◆ ATLAS_NOT_THREAD_SAFE() [4/5]

virtual void endEvent ISF::BaseSimulationSelector::ATLAS_NOT_THREAD_SAFE ( )
overridevirtualinherited

called at the end of each athena event (can be used for eg.

resetting dynamic selectors)

◆ ATLAS_NOT_THREAD_SAFE() [5/5]

virtual void update ISF::BaseSimulationSelector::ATLAS_NOT_THREAD_SAFE ( const ISFParticle & )
overridevirtualinherited

update internal event representation

◆ finalize()

StatusCode ISF::DefaultSimSelector::finalize ( )
override

Definition at line 34 of file DefaultSimSelector.cxx.

35{
36 ATH_MSG_VERBOSE("Finalizing ...");
37 return StatusCode::SUCCESS;
38}
#define ATH_MSG_VERBOSE(x)

◆ initialize()

StatusCode ISF::DefaultSimSelector::initialize ( )
override

Definition at line 28 of file DefaultSimSelector.cxx.

29{
30 ATH_MSG_VERBOSE("Initializing ...");
31 return StatusCode::SUCCESS;
32}

◆ initializeSelector()

void ISF::BaseSimulationSelector::initializeSelector ( )
overridevirtualinherited

initialize Selector

Definition at line 84 of file BaseSimulationSelector.cxx.

84{ }

◆ isDynamic()

bool ISF::BaseSimulationSelector::isDynamic ( )
overridevirtualinherited

return if is this a static or dynamic SimulationSelector (is used by fully dynamic particle routers)

return if is this a static or dynamic SimulationSelector (is used by fully dynamic partilce routers)

Definition at line 69 of file BaseSimulationSelector.cxx.

69 {
70 return m_isDynamic;
71}
Gaudi::Property< bool > m_isDynamic

◆ passSelectorCuts()

bool ISF::DefaultSimSelector::passSelectorCuts ( const ISFParticle & particle) const
inlineoverridevirtual

check whether given particle passes all cuts -> will be used for routing decision

Definition at line 41 of file DefaultSimSelector.cxx.

42{
43 return true;
44}

◆ selfSelect()

bool ISF::BaseSimulationSelector::selfSelect ( const ISFParticle & particle) const
overridevirtualinherited

make the routing decision

Definition at line 54 of file BaseSimulationSelector.cxx.

55{
56 bool pass = passSelectorCuts(particle);
57 pass = ( m_invertCuts ? (!pass) : pass );
58
59 return pass;
60}
Gaudi::Property< bool > m_invertCuts

◆ simFlavor()

ISF::SimulationFlavor ISF::BaseSimulationSelector::simFlavor ( ) const
overridevirtualinherited

return the simulation flavor

return the simulation service ID

Definition at line 79 of file BaseSimulationSelector.cxx.

79 {
80 return m_simflavor;
81}
ISF::SimulationFlavor m_simflavor
simulation flavor

◆ SimulationFlavorHandler()

void ISF::BaseSimulationSelector::SimulationFlavorHandler ( Gaudi::Details::PropertyBase & )
privateinherited

Definition at line 20 of file BaseSimulationSelector.cxx.

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}
Gaudi::CheckedProperty< unsigned short > m_simFlavorProp
@ FastCaloSimPileup
@ ParticleKiller
@ FastCaloSimV2

◆ sysInitialize()

StatusCode ISF::BaseSimulationSelector::sysInitialize ( )
overridevirtualinherited

Gaudi sysInitialize() method.

Definition at line 37 of file BaseSimulationSelector.cxx.

38{
40
41 if (!m_simulator.empty()) {
42 ATH_CHECK( m_simulator.retrieve() );
43 }
44
45 return StatusCode::SUCCESS;
46}
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual StatusCode sysInitialize() override
ServiceHandle< ISimulationSvc > m_simulator

Member Data Documentation

◆ m_invertCuts

Gaudi::Property<bool> ISF::BaseSimulationSelector::m_invertCuts {this, "InvertCuts", false, "invert the result given by passesCuts(..) method"}
privateinherited

Definition at line 75 of file BaseSimulationSelector.h.

75{this, "InvertCuts", false, "invert the result given by passesCuts(..) method"};

◆ m_isDynamic

Gaudi::Property<bool> ISF::BaseSimulationSelector::m_isDynamic {this, "IsDynamic", false, "this selector is either dynamic or static"}
privateinherited

Definition at line 74 of file BaseSimulationSelector.h.

74{this, "IsDynamic", false, "this selector is either dynamic or static"};

◆ m_simflavor

ISF::SimulationFlavor ISF::BaseSimulationSelector::m_simflavor {ISF::UndefinedSim}
privateinherited

simulation flavor

Definition at line 78 of file BaseSimulationSelector.h.

◆ m_simFlavorProp

Gaudi::CheckedProperty<unsigned short> ISF::BaseSimulationSelector::m_simFlavorProp {this, "SimulationFlavor", 0, "the simulation flavour that this selector will select"}
privateinherited

Definition at line 76 of file BaseSimulationSelector.h.

76{this, "SimulationFlavor", 0, "the simulation flavour that this selector will select"};

◆ m_simulator

ServiceHandle<ISimulationSvc> ISF::BaseSimulationSelector::m_simulator {this, "Simulator", "", "simulation service assigned to a single advisor"}
privateinherited

Definition at line 73 of file BaseSimulationSelector.h.

73{this, "Simulator", "", "simulation service assigned to a single advisor"};

The documentation for this class was generated from the following files: