ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
ISF::KinematicSimSelector Class Referencefinal

#include <KinematicSimSelector.h>

Inheritance diagram for ISF::KinematicSimSelector:
Collaboration diagram for ISF::KinematicSimSelector:

Public Member Functions

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

Protected Attributes

float m_cut_minPosEta
 minimum pseudorapidity of particle position More...
 
float m_cut_maxPosEta
 maximum pseudorapidity of particle position More...
 
float m_cut_minMomEta
 minimum pseudorapidity of particle momentum More...
 
float m_cut_maxMomEta
 maximum pseudorapidity of particle momentum More...
 
double m_cut_minMom2
 minimum squarde particle momentum magnitude More...
 
double m_cut_maxMom2
 maximum squared particle momentum magnitude More...
 
double m_cut_maxEkin
 maximum particle kinetic energy More...
 
float m_cut_charge
 particle charge More...
 
int m_cut_pdg
 particle PDG code More...
 

Private Member Functions

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

Private Attributes

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

Detailed Description

Simplistic kinematic filter on energy and pseudorapidity.

Author
Elmar.Ritsch -at- cern.ch

Definition at line 28 of file KinematicSimSelector.h.

Constructor & Destructor Documentation

◆ KinematicSimSelector()

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

Constructor with parameters.

Constructor.

Definition at line 17 of file KinematicSimSelector.cxx.

20  , m_partPropSvc("PartPropSvc", name())
21 {
22  declareProperty("MinPosEta", m_cut_minPosEta , "Minimum Position Pseudorapidity" );
23  declareProperty("MaxPosEta", m_cut_maxPosEta , "Maximum Position Pseudorapidity" );
24  declareProperty("MinMomEta", m_cut_minMomEta , "Minimum Momentum Pseudorapidity" );
25  declareProperty("MaxMomEta", m_cut_maxMomEta , "Maximum Momentum Pseudorapidity" );
26  declareProperty("MinMom", m_cut_minMom2 , "Minimum Particle Momentum" );
27  declareProperty("MaxMom", m_cut_maxMom2 , "Maximum Particle Momentum" );
28  declareProperty("MaxEkin", m_cut_maxEkin , "Maximum Particle Kinetic Energy" );
29  declareProperty("Charge", m_cut_charge , "Particle Charge" );
30  declareProperty("ParticlePDG", m_cut_pdg , "Particle PDG Code" );
31 }

◆ ~KinematicSimSelector()

ISF::KinematicSimSelector::~KinematicSimSelector ( )

Destructor.

Definition at line 34 of file KinematicSimSelector.cxx.

35 {
36 }

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::KinematicSimSelector::finalize ( )
overridevirtual

Definition at line 70 of file KinematicSimSelector.cxx.

71 {
72  ATH_MSG_VERBOSE("Finalizing ...");
73  return StatusCode::SUCCESS;
74 }

◆ initialize()

StatusCode ISF::KinematicSimSelector::initialize ( )
overridevirtual

Definition at line 39 of file KinematicSimSelector.cxx.

40 {
41  ATH_MSG_VERBOSE("Initializing ...");
42  ATH_CHECK(m_partPropSvc.retrieve());
43 
44  HepPDT::ParticleDataTable* particleDataTable;
45  particleDataTable = (HepPDT::ParticleDataTable*) m_partPropSvc->PDT();
46 
47  if(particleDataTable == 0)
48  {
49  ATH_MSG_ERROR("PDG table not found");
50  return StatusCode::FAILURE;
51  }
52 
53  const HepPDT::ParticleData* data = particleDataTable->particle(HepPDT::ParticleID(abs(m_cut_pdg)));
54 
55  double mass = 0;
56  if(data) mass = data->mass().value();
57 
58 
59  // compute and store the square of the momentum cuts (faster comparisons)
62 
63  // if use kinetic energy
65 
66  return StatusCode::SUCCESS;
67 }

◆ initializeSelector()

void ISF::BaseSimulationSelector::initializeSelector ( )
overridevirtualinherited

initialize Selector

Definition at line 91 of file BaseSimulationSelector.cxx.

91 { }

◆ 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 76 of file BaseSimulationSelector.cxx.

76  {
77  return m_isDynamic;
78 }

◆ pass()

bool ISF::KinematicParticleCuts::pass ( const ISFParticle particle) const
inlineinherited

check whether the given particle passes all cuts

◆ passSelectorCuts()

bool ISF::KinematicSimSelector::passSelectorCuts ( const ISFParticle particle) const
overridevirtual

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

Definition at line 76 of file KinematicSimSelector.cxx.

77 {
79 }

◆ selfSelect()

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

make the routing decision

Definition at line 61 of file BaseSimulationSelector.cxx.

62 {
63  bool pass = passSelectorCuts(particle);
64  pass = ( m_invertCuts ? (!pass) : pass );
65 
66  return pass;
67 }

◆ simFlavor()

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

return the simulation flavor

return the simulation service ID

Definition at line 86 of file BaseSimulationSelector.cxx.

86  {
87  return m_simflavor;
88 }

◆ SimulationFlavorHandler()

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

Definition at line 27 of file BaseSimulationSelector.cxx.

28 {
29  // FIXME would probably be better to have this in SimulationFlavor.h
30  switch(m_simFlavorProp.value())
31  {
32  case 1: m_simflavor = ISF::ParticleKiller; break;
33  case 2: m_simflavor = ISF::Fatras; break;
34  case 3: m_simflavor = ISF::Geant4; break;
35  case 4: m_simflavor = ISF::FastCaloSim; break;
36  case 5: m_simflavor = ISF::FastCaloSimV2; break;
37  case 6: m_simflavor = ISF::Parametric; break;
38  case 7: m_simflavor = ISF::FatrasPileup; break;
39  case 8: m_simflavor = ISF::FastCaloSimPileup; break;
40  }
41 }

◆ sysInitialize()

StatusCode ISF::BaseSimulationSelector::sysInitialize ( )
overridevirtualinherited

Gaudi sysInitialize() method.

Definition at line 44 of file BaseSimulationSelector.cxx.

45 {
47 
48  if (!m_simulator.empty()) {
49  ATH_CHECK( m_simulator.retrieve() );
50  }
51 
52  return StatusCode::SUCCESS;
53 }

Member Data Documentation

◆ m_cut_charge

float ISF::KinematicParticleCuts::m_cut_charge
protectedinherited

particle charge

Definition at line 43 of file KinematicParticleCuts.h.

◆ m_cut_maxEkin

double ISF::KinematicParticleCuts::m_cut_maxEkin
protectedinherited

maximum particle kinetic energy

Definition at line 42 of file KinematicParticleCuts.h.

◆ m_cut_maxMom2

double ISF::KinematicParticleCuts::m_cut_maxMom2
protectedinherited

maximum squared particle momentum magnitude

Definition at line 41 of file KinematicParticleCuts.h.

◆ m_cut_maxMomEta

float ISF::KinematicParticleCuts::m_cut_maxMomEta
protectedinherited

maximum pseudorapidity of particle momentum

Definition at line 39 of file KinematicParticleCuts.h.

◆ m_cut_maxPosEta

float ISF::KinematicParticleCuts::m_cut_maxPosEta
protectedinherited

maximum pseudorapidity of particle position

Definition at line 37 of file KinematicParticleCuts.h.

◆ m_cut_minMom2

double ISF::KinematicParticleCuts::m_cut_minMom2
protectedinherited

minimum squarde particle momentum magnitude

Definition at line 40 of file KinematicParticleCuts.h.

◆ m_cut_minMomEta

float ISF::KinematicParticleCuts::m_cut_minMomEta
protectedinherited

minimum pseudorapidity of particle momentum

Definition at line 38 of file KinematicParticleCuts.h.

◆ m_cut_minPosEta

float ISF::KinematicParticleCuts::m_cut_minPosEta
protectedinherited

minimum pseudorapidity of particle position

Definition at line 36 of file KinematicParticleCuts.h.

◆ m_cut_pdg

int ISF::KinematicParticleCuts::m_cut_pdg
protectedinherited

particle PDG code

Definition at line 44 of file KinematicParticleCuts.h.

◆ m_invertCuts

bool ISF::BaseSimulationSelector::m_invertCuts
privateinherited

invert the result given by passesCuts(..) method

Definition at line 75 of file BaseSimulationSelector.h.

◆ m_isDynamic

bool ISF::BaseSimulationSelector::m_isDynamic
privateinherited

this selector is either dynamic or static

Definition at line 74 of file BaseSimulationSelector.h.

◆ m_partPropSvc

ServiceHandle<IPartPropSvc> ISF::KinematicSimSelector::m_partPropSvc
private

Definition at line 31 of file KinematicSimSelector.h.

◆ 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 {0}
privateinherited

the simulation flavour that this selector will select

Definition at line 76 of file BaseSimulationSelector.h.

◆ m_simulator

ServiceHandle<ISimulationSvc> ISF::BaseSimulationSelector::m_simulator
privateinherited

simulation service assigned to a single advisor

Definition at line 73 of file BaseSimulationSelector.h.


The documentation for this class was generated from the following files:
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
ISF::BaseSimulationSelector::m_simflavor
ISF::SimulationFlavor m_simflavor
simulation flavor
Definition: BaseSimulationSelector.h:78
ISF::KinematicParticleCuts::KinematicParticleCuts
KinematicParticleCuts()
Constructor.
ISF::ParticleKiller
@ ParticleKiller
Definition: SimulationFlavor.h:21
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
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ISF::KinematicSimSelector::m_partPropSvc
ServiceHandle< IPartPropSvc > m_partPropSvc
Definition: KinematicSimSelector.h:31
ISF::KinematicParticleCuts::m_cut_charge
float m_cut_charge
particle charge
Definition: KinematicParticleCuts.h:43
ISF::KinematicParticleCuts::m_cut_maxMomEta
float m_cut_maxMomEta
maximum pseudorapidity of particle momentum
Definition: KinematicParticleCuts.h:39
ISF::FastCaloSimV2
@ FastCaloSimV2
Definition: SimulationFlavor.h:25
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
ISF::FatrasPileup
@ FatrasPileup
Definition: SimulationFlavor.h:27
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ISF::KinematicParticleCuts::m_cut_minMomEta
float m_cut_minMomEta
minimum pseudorapidity of particle momentum
Definition: KinematicParticleCuts.h:38
ISF::KinematicParticleCuts::pass
bool pass(const ISFParticle &particle) const
check whether the given particle passes all cuts
ISF::Geant4
@ Geant4
Definition: SimulationFlavor.h:23
beamspotman.n
n
Definition: beamspotman.py:731
ISF::BaseSimulationSelector::m_invertCuts
bool m_invertCuts
invert the result given by passesCuts(..) method
Definition: BaseSimulationSelector.h:75
jobOptions.ParticleID
ParticleID
Definition: jobOptions.decayer.py:85
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
ISF::KinematicParticleCuts::m_cut_maxEkin
double m_cut_maxEkin
maximum particle kinetic energy
Definition: KinematicParticleCuts.h:42
ISF::FastCaloSimPileup
@ FastCaloSimPileup
Definition: SimulationFlavor.h:28
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize
virtual StatusCode sysInitialize() override
Perform system initialization for an algorithm.
ISF::Fatras
@ Fatras
Definition: SimulationFlavor.h:22
ISF::BaseSimulationSelector::m_isDynamic
bool m_isDynamic
this selector is either dynamic or static
Definition: BaseSimulationSelector.h:74
ISF::BaseSimulationSelector::BaseSimulationSelector
BaseSimulationSelector(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: BaseSimulationSelector.cxx:12
ISF::KinematicParticleCuts::m_cut_pdg
int m_cut_pdg
particle PDG code
Definition: KinematicParticleCuts.h:44
ISF::KinematicParticleCuts::m_cut_maxPosEta
float m_cut_maxPosEta
maximum pseudorapidity of particle position
Definition: KinematicParticleCuts.h:37
ISF::KinematicParticleCuts::m_cut_minMom2
double m_cut_minMom2
minimum squarde particle momentum magnitude
Definition: KinematicParticleCuts.h:40
ISF::KinematicParticleCuts::m_cut_maxMom2
double m_cut_maxMom2
maximum squared particle momentum magnitude
Definition: KinematicParticleCuts.h:41
ISF::KinematicParticleCuts::m_cut_minPosEta
float m_cut_minPosEta
minimum pseudorapidity of particle position
Definition: KinematicParticleCuts.h:36
ISF::Parametric
@ Parametric
Definition: SimulationFlavor.h:26
ISF::FastCaloSim
@ FastCaloSim
Definition: SimulationFlavor.h:24