ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
G4EMProcessesPhysicsTool Class Reference

#include <G4EMProcessesPhysicsTool.h>

Inheritance diagram for G4EMProcessesPhysicsTool:
Collaboration diagram for G4EMProcessesPhysicsTool:

Public Member Functions

 G4EMProcessesPhysicsTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor. More...
 
virtual ~G4EMProcessesPhysicsTool ()
 
virtual StatusCode initialize () override final
 Destructor. More...
 
virtual void ConstructParticle () override final
 
virtual void ConstructProcess () override final
 
virtual G4EMProcessesPhysicsToolGetPhysicsOption () override final
 Implements. More...
 

Protected Attributes

std::vector< int > m_particleList
 list of particles to apply the em processes to More...
 

Detailed Description

"G4ExtraProcesses/G4EMProcessesPhysicsTool.h"

Tool for the concrete implementation of a Physics List selection class

Author
Miha Muskinja
Date
August-2020

Definition at line 21 of file G4EMProcessesPhysicsTool.h.

Constructor & Destructor Documentation

◆ G4EMProcessesPhysicsTool()

G4EMProcessesPhysicsTool::G4EMProcessesPhysicsTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Standard constructor.

Definition at line 26 of file G4EMProcessesPhysicsTool.cxx.

29  : base_class(type, name, parent)
30 {
31  m_physicsOptionType = G4AtlasPhysicsOption::Type::QS_ExtraProc;
32 
33  declareProperty("ParticleList", m_particleList);
34 }

◆ ~G4EMProcessesPhysicsTool()

virtual G4EMProcessesPhysicsTool::~G4EMProcessesPhysicsTool ( )
inlinevirtual

Definition at line 30 of file G4EMProcessesPhysicsTool.h.

30 {};

Member Function Documentation

◆ ConstructParticle()

void G4EMProcessesPhysicsTool::ConstructParticle ( )
finaloverridevirtual

Definition at line 57 of file G4EMProcessesPhysicsTool.cxx.

57 {}

◆ ConstructProcess()

void G4EMProcessesPhysicsTool::ConstructProcess ( )
finaloverridevirtual

Definition at line 62 of file G4EMProcessesPhysicsTool.cxx.

63 {
64  ATH_MSG_DEBUG("G4EMProcessesPhysicsTool::ConstructProcess() - start");
65  ATH_MSG_DEBUG("G4EMProcessesPhysicsTool::ConstructProcess() - m_particleList = " << m_particleList);
66  G4ParticleTable::G4PTblDicIterator *particleIterator = G4ParticleTable::GetParticleTable()->GetIterator();
67  particleIterator->reset();
68 
69  while ((*particleIterator)())
70  {
71  G4ParticleDefinition *particle = particleIterator->value();
72  if (std::find(m_particleList.begin(), m_particleList.end(), std::abs(particle->GetPDGEncoding())) != m_particleList.end())
73  {
74  ATH_MSG_DEBUG("Adding EM processes for "
75  << particle->GetParticleName());
76  G4ProcessManager *proc = particle->GetProcessManager();
77  proc->AddProcess(new G4hMultipleScattering, -1, 1, 1);
78  proc->AddProcess(new G4hIonisation, -1, 2, 2);
79  }
80  } // End of the particle iterator
81  ATH_MSG_DEBUG("G4EMProcessesPhysicsTool::ConstructProcess() - end");
82 }

◆ GetPhysicsOption()

G4EMProcessesPhysicsTool * G4EMProcessesPhysicsTool::GetPhysicsOption ( )
finaloverridevirtual

Implements.

Definition at line 49 of file G4EMProcessesPhysicsTool.cxx.

50 {
51  return this;
52 }

◆ initialize()

StatusCode G4EMProcessesPhysicsTool::initialize ( )
finaloverridevirtual

Destructor.

Initialize method

Definition at line 39 of file G4EMProcessesPhysicsTool.cxx.

40 {
41  ATH_MSG_DEBUG("initializing...");
42  this->SetPhysicsName(this->name());
43  return StatusCode::SUCCESS;
44 }

Member Data Documentation

◆ m_particleList

std::vector<int> G4EMProcessesPhysicsTool::m_particleList
protected

list of particles to apply the em processes to

Definition at line 42 of file G4EMProcessesPhysicsTool.h.


The documentation for this class was generated from the following files:
G4AtlasPhysicsOption::QS_ExtraProc
@ QS_ExtraProc
Definition: IPhysicsOptionTool.h:24
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
G4EMProcessesPhysicsTool::m_particleList
std::vector< int > m_particleList
list of particles to apply the em processes to
Definition: G4EMProcessesPhysicsTool.h:42
mc.proc
proc
Definition: mc.PhPy8EG_A14NNPDF23_gg4l_example.py:22
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78