laura is hosted by Hepforge, IPPP Durham
Laura++  3.6.0
A maximum likelihood fitting package for performing Dalitz-plot analysis.

Singleton class that provides access to particle property records. More...

#include <LauDatabasePDG.hh>

Static Public Member Functions

static const LauParticlePDGparticle (Int_t code)
 Get particle object based on the PDG code. More...
 
static const LauParticlePDGparticle (const TString &string)
 Get particle object based on the particle name string. More...
 
static Int_t code (const TString &string)
 Method to convert from a particle name string into a PDG code. More...
 
static TString string (Int_t code)
 Method to convert from a PDG code to a particle name string. More...
 

Private Types

typedef std::map< Int_t, const LauParticlePDG * > LauPDGList
 The type to hold the list of wrapped particle objects.
 

Private Member Functions

 LauDatabasePDG ()
 Constructor.
 
virtual ~LauDatabasePDG ()
 Destructor.
 
 LauDatabasePDG (const LauDatabasePDG &other)
 Copy constructor (not inplemented)
 
LauDatabasePDGoperator= (const LauDatabasePDG &other)
 Copy assignment (not implemented)
 
void addMissingParticles ()
 Add particles to the ROOT database that are missing from the default setup.
 
const LauParticlePDGcreateParticle (Int_t theCode)
 Create particle in the database for a given PDG code and return the new particle. More...
 
const LauParticlePDGcreateParticle (const TString &theString)
 Create particle in the database for a given string and return the new particle. More...
 
Int_t pdgCode (const TString &theString)
 Get the associated pdgCode for a given particle name string. More...
 
TString pdgName (Int_t theCode)
 Get the associated name string for a given pdgCode. More...
 

Static Private Member Functions

static LauDatabasePDGget ()
 Get the database instance.
 

Private Attributes

TDatabasePDG * theDatabase_
 The ROOT database.
 
LauPDGList particles_
 The list of particle objects.
 
const Bool_t debug_
 Debug flag - set in constructor.
 

Static Private Attributes

static LauDatabasePDGtheInstance_ = 0
 The singleton instance.
 

Detailed Description

Singleton class that provides access to particle property records.

Singleton class that provides access to particle property records from the ROOT database and adds missing particles to the default setup. Particles may be accessed by both string and PDG code.

Definition at line 47 of file LauDatabasePDG.hh.

Member Function Documentation

◆ code()

Int_t LauDatabasePDG::code ( const TString &  string)
static

Method to convert from a particle name string into a PDG code.

Parameters
[in]stringthe particle name string
Returns
the corresponding PDG code

Definition at line 88 of file LauDatabasePDG.cc.

◆ createParticle() [1/2]

const LauParticlePDG * LauDatabasePDG::createParticle ( const TString &  theString)
private

Create particle in the database for a given string and return the new particle.

Parameters
[in]theStringparticle string to be created
Returns
pointer to the particle record

Definition at line 256 of file LauDatabasePDG.cc.

◆ createParticle() [2/2]

const LauParticlePDG * LauDatabasePDG::createParticle ( Int_t  theCode)
private

Create particle in the database for a given PDG code and return the new particle.

Parameters
[in]theCodePDG code of the associated particle
Returns
pointer to the particle record

Definition at line 188 of file LauDatabasePDG.cc.

◆ particle() [1/2]

const LauParticlePDG * LauDatabasePDG::particle ( const TString &  string)
static

Get particle object based on the particle name string.

Parameters
[in]stringparticle name string
Returns
pointer to the particle record

Definition at line 83 of file LauDatabasePDG.cc.

◆ particle() [2/2]

const LauParticlePDG * LauDatabasePDG::particle ( Int_t  code)
static

Get particle object based on the PDG code.

Parameters
[in]codePDG code
Returns
pointer to the particle record

Definition at line 78 of file LauDatabasePDG.cc.

◆ pdgCode()

Int_t LauDatabasePDG::pdgCode ( const TString &  theString)
private

Get the associated pdgCode for a given particle name string.

Parameters
[in]theStringparticle string to be associated to the pdgCode
Returns
the corresponding PDG code

Definition at line 273 of file LauDatabasePDG.cc.

◆ pdgName()

TString LauDatabasePDG::pdgName ( Int_t  theCode)
private

Get the associated name string for a given pdgCode.

Parameters
[in]theCodeparticle pdgCode
Returns
the corresponding particle name

Definition at line 283 of file LauDatabasePDG.cc.

◆ string()

TString LauDatabasePDG::string ( Int_t  code)
static

Method to convert from a PDG code to a particle name string.

Parameters
[in]codethe particle PDG code
Returns
the corresponding particle name

Definition at line 93 of file LauDatabasePDG.cc.


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