ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Generators
GeneratorModules
GeneratorModules
GenData.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef GENERATORMODULES_GENDATA_H
6
#define GENERATORMODULES_GENDATA_H
7
8
#include "GaudiKernel/ServiceHandle.h"
9
#include "GaudiKernel/IPartPropSvc.h"
10
#include "
CxxUtils/checker_macros.h
"
11
12
#include <atomic>
13
#include <optional>
14
#include <string>
15
17
18
class
GenData
{
19
public
:
20
21
GenData
();
22
23
GenData
(
const
std::string& sname,
const
std::string& name);
24
25
virtual
~GenData
() =
default
;
26
28
std::optional<double>
particleMass
(
int
pdgId)
const
;
29
31
std::optional<double>
particleLifetime
(
int
pdgId)
const
;
32
34
std::optional<std::string>
particleName
(
int
pdgId)
const
;
35
36
private
:
37
38
struct
ParticleInfo
{
39
std::optional<double>
mass
;
40
std::optional<double>
lifetime
;
41
std::optional<std::string>
name
;
42
};
43
ParticleInfo
particleInfo
(
int
absPid)
const
;
44
46
std::string
m_service_name
{
"PartPropSvc"
};
47
std::string
m_name
{
"GenData"
};
48
ServiceHandle<IPartPropSvc>
m_ppSvc
;
49
mutable
std::atomic<bool>
m_initialized
{
false
};
50
51
};
52
53
#endif
checker_macros.h
Define macros for attributes used to control the static checker.
GenData::m_name
std::string m_name
Definition
GenData.h:47
GenData::particleInfo
ParticleInfo particleInfo(int absPid) const
Definition
GenData.cxx:19
GenData::particleName
std::optional< std::string > particleName(int pdgId) const
Get the name of a particle by PDG ID.
Definition
GenData.cxx:46
GenData::GenData
GenData()
Definition
GenData.cxx:15
GenData::particleMass
std::optional< double > particleMass(int pdgId) const
Get the mass of a particle by PDG ID.
Definition
GenData.cxx:38
GenData::m_ppSvc
ServiceHandle< IPartPropSvc > m_ppSvc
Definition
GenData.h:48
GenData::particleLifetime
std::optional< double > particleLifetime(int pdgId) const
Get the lifetime of a particle by PDG ID.
Definition
GenData.cxx:42
GenData::m_service_name
std::string m_service_name
Handle on the particle property service.
Definition
GenData.h:46
GenData::m_initialized
std::atomic< bool > m_initialized
Definition
GenData.h:49
GenData::~GenData
virtual ~GenData()=default
ServiceHandle
Definition
ClusterMakerTool.h:36
GenData::ParticleInfo
Definition
GenData.h:38
GenData::ParticleInfo::lifetime
std::optional< double > lifetime
Definition
GenData.h:40
GenData::ParticleInfo::mass
std::optional< double > mass
Definition
GenData.h:39
GenData::ParticleInfo::name
std::optional< std::string > name
Definition
GenData.h:41
Generated on
for ATLAS Offline Software by
1.17.0