Geant4
10.02.p02
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "PoPs.h"
#include "PoPs_private.h"
Go to the source code of this file.
Classes | |
struct | unitConversions_s |
Macros | |
#define | incrementalSize 1000 |
#define | MeV2eV 1e6 |
#define | MeV2keV 1e3 |
#define | AMU2MeV 931.494028 |
#define | AMU2eV ( MeV2eV * 931.494028 ) |
#define | K2MeV 8.6173856922566752e-11 |
#define | K2eV ( MeV2eV * K2MeV ) |
Typedefs | |
typedef struct unitConversions_s | unitConversions |
Functions | |
static int | PoPs_particleProperIndex (int index) |
static int | PoPs_sortedParticleIndex (char const *name) |
static int | unitsDB_release (void) |
const char * | PoPs_version (void) |
int | PoPs_versionMajor (void) |
int | PoPs_versionMinor (void) |
int | PoPs_versionPatchLevel (void) |
int | PoPs_register (void) |
int | PoPs_readDatabase (statusMessageReporting *smr, char const *fileName) |
int | PoPs_release (statusMessageReporting *smr) |
int | PoPs_releasePrivate (statusMessageReporting *) |
PoP * | PoPs_addParticleIfNeeded (statusMessageReporting *smr, PoP *pop) |
PoP * | PoPs_copyAddParticleIfNeeded (statusMessageReporting *smr, PoP *pop) |
PoP * | PoPs_addAliasIfNeeded (statusMessageReporting *smr, char const *name, char const *alias) |
int | PoPs_numberOfParticle (void) |
int | PoPs_particleIndex (char const *name) |
int | PoPs_particleIndex_smr (statusMessageReporting *smr, char const *name, char const *file, int line, char const *func) |
double | PoPs_getMassInUnitOf (statusMessageReporting *smr, char const *name, char const *unit) |
char const * | PoPs_getName_atIndex (statusMessageReporting *smr, int index) |
double | PoPs_getMassInUnitOf_atIndex (statusMessageReporting *smr, int index, char const *unit) |
enum PoPs_genre | PoPs_getGenre (statusMessageReporting *smr, char const *name) |
enum PoPs_genre | PoPs_getGenre_atIndex (statusMessageReporting *smr, int index) |
int | PoPs_getZ_A_l (statusMessageReporting *smr, char const *name, int *Z, int *A, int *l) |
int | PoPs_getZ_A_l_atIndex (statusMessageReporting *smr, int index, int *Z, int *A, int *l) |
int | PoPs_hasNucleus (statusMessageReporting *smr, char const *name, int protonIsNucleus) |
int | PoPs_hasNucleus_atIndex (statusMessageReporting *smr, int index, int protonIsNucleus) |
char const * | PoPs_getAtomsName (statusMessageReporting *smr, char const *name) |
char const * | PoPs_getAtomsName_atIndex (statusMessageReporting *smr, int index) |
int | PoPs_getAtomsIndex (statusMessageReporting *smr, char const *name) |
int | PoPs_getAtomsIndex_atIndex (statusMessageReporting *smr, int index) |
PoP * | PoPs_getParticle_atIndex (int index) |
char const * | PoPs_genreTokenToString (enum PoPs_genre genre) |
void | PoPs_print (int sorted) |
void | PoPs_write (FILE *f, int sorted) |
PoP * | PoP_new (statusMessageReporting *smr) |
int | PoP_initialize (statusMessageReporting *, PoP *pop) |
int | PoP_release (PoP *pop) |
PoP * | PoP_free (PoP *pop) |
int | PoP_copyParticle (statusMessageReporting *smr, PoP *desc, PoP *src) |
PoP * | PoP_makeParticle (statusMessageReporting *smr, enum PoPs_genre genre, char const *name, double mass, char const *massUnit) |
int | PoP_setZ_A_l (statusMessageReporting *, PoP *pop, int Z, int A, int l) |
int | PoP_getIndex (PoP *pop) |
char const * | PoP_getName (PoP *pop) |
double | PoP_getMassInUnitOf (statusMessageReporting *smr, PoP *pop, char const *unit) |
PoP * | PoP_makeAlias (statusMessageReporting *smr, char const *name, char const *alias) |
char const * | unitsDB_addUnitIfNeeded (statusMessageReporting *smr, char const *unit) |
int | unitsDB_index (statusMessageReporting *, char const *unit) |
char const * | unitsDB_stringFromIndex (statusMessageReporting *smr, int index) |
int | PoPs_unitConversionRatio (char const *_from, char const *_to, double *ratio) |
Variables | |
int | PoPs_smr_ID = smr_unknownID |
static int | referenceCount = 0 |
static char | versionStr [64] = "" |
static unitsDB | unitsRoot = { 0, 0, NULL } |
static PoPs | popsRoot = { 0, 0, NULL, NULL } |
static unitConversions | conversions [] |
static char const * | PoPs_genreStrings [] = { "invalid", "unknown", "alias", "photon", "lepton", "quark", "meson", "baryon", "nucleus", "atom" } |
#define incrementalSize 1000 |
Definition at line 18 of file PoPs.cc.
Referenced by PoPs_addParticleIfNeeded().
typedef struct unitConversions_s unitConversions |
int PoP_copyParticle | ( | statusMessageReporting * | smr, |
PoP * | desc, | ||
PoP * | src | ||
) |
Definition at line 567 of file PoPs.cc.
Referenced by PoPs_copyAddParticleIfNeeded().
PoP* PoP_free | ( | PoP * | pop | ) |
Definition at line 558 of file PoPs.cc.
References PoP_release(), and smr_freeMemory().
Referenced by lPoPs_addParticleIfNeeded(), PoP_makeAlias(), PoP_makeParticle(), PoP_new(), PoPs_addAliasIfNeeded(), PoPs_copyAddParticleIfNeeded(), PoPs_particleCreateLoadInfo(), PoPs_particleReadDatabase(), and PoPs_releasePrivate().
double PoP_getMassInUnitOf | ( | statusMessageReporting * | smr, |
PoP * | pop, | ||
char const * | unit | ||
) |
Definition at line 626 of file PoPs.cc.
References PoPs_unitConversionRatio().
Referenced by PoPs_getMassInUnitOf_atIndex().
int PoP_initialize | ( | statusMessageReporting * | , |
PoP * | pop | ||
) |
Definition at line 533 of file PoPs.cc.
Referenced by PoP_new(), and PoP_release().
PoP* PoP_makeAlias | ( | statusMessageReporting * | smr, |
char const * | name, | ||
char const * | alias | ||
) |
Definition at line 647 of file PoPs.cc.
References PoP_free(), PoP_new(), and PoPs_particleIndex().
Referenced by lPoPs_addParticleIfNeeded(), and PoPs_addAliasIfNeeded().
PoP* PoP_makeParticle | ( | statusMessageReporting * | smr, |
enum PoPs_genre | genre, | ||
char const * | name, | ||
double | mass, | ||
char const * | massUnit | ||
) |
Definition at line 585 of file PoPs.cc.
References PoP_free(), PoP_new(), and unitsDB_addUnitIfNeeded().
PoP* PoP_new | ( | statusMessageReporting * | smr | ) |
Definition at line 522 of file PoPs.cc.
References PoP_free(), and PoP_initialize().
Referenced by PoP_makeAlias(), PoP_makeParticle(), and PoPs_particleCreateLoadInfo().
int PoP_release | ( | PoP * | pop | ) |
Definition at line 549 of file PoPs.cc.
References PoP_initialize(), and smr_freeMemory().
Referenced by PoP_free().
int PoP_setZ_A_l | ( | statusMessageReporting * | , |
PoP * | pop, | ||
int | Z, | ||
int | A, | ||
int | l | ||
) |
PoP* PoPs_addAliasIfNeeded | ( | statusMessageReporting * | smr, |
char const * | name, | ||
char const * | alias | ||
) |
Definition at line 179 of file PoPs.cc.
References PoP_free(), PoP_makeAlias(), and PoPs_addParticleIfNeeded().
Referenced by MCGIDI_map_initialize().
PoP* PoPs_addParticleIfNeeded | ( | statusMessageReporting * | smr, |
PoP * | pop | ||
) |
Definition at line 113 of file PoPs.cc.
References incrementalSize, PoPs_particleProperIndex(), PoPs_sortedParticleIndex(), and smr_freeMemory().
Referenced by lPoPs_addParticleIfNeeded(), PoPs_addAliasIfNeeded(), PoPs_copyAddParticleIfNeeded(), and PoPs_particleReadDatabase().
PoP* PoPs_copyAddParticleIfNeeded | ( | statusMessageReporting * | smr, |
PoP * | pop | ||
) |
Definition at line 153 of file PoPs.cc.
References PoP_copyParticle(), PoP_free(), PoPs_addParticleIfNeeded(), PoPs_particleIndex(), and smr_freeMemory().
char const* PoPs_genreTokenToString | ( | enum PoPs_genre | genre | ) |
Definition at line 446 of file PoPs.cc.
Referenced by PoPs_write().
int PoPs_getAtomsIndex | ( | statusMessageReporting * | smr, |
char const * | name | ||
) |
Definition at line 397 of file PoPs.cc.
References PoPs_getAtomsIndex_atIndex(), and PoPs_particleIndex_smr().
int PoPs_getAtomsIndex_atIndex | ( | statusMessageReporting * | smr, |
int | index | ||
) |
Definition at line 407 of file PoPs.cc.
References PoPs_particleIndex_smr().
Referenced by PoPs_getAtomsIndex(), and PoPs_getAtomsName_atIndex().
char const* PoPs_getAtomsName | ( | statusMessageReporting * | smr, |
char const * | name | ||
) |
Definition at line 377 of file PoPs.cc.
References PoPs_getAtomsName_atIndex(), and PoPs_particleIndex_smr().
char const* PoPs_getAtomsName_atIndex | ( | statusMessageReporting * | smr, |
int | index | ||
) |
Definition at line 387 of file PoPs.cc.
References PoPs_getAtomsIndex_atIndex().
Referenced by PoPs_getAtomsName().
enum PoPs_genre PoPs_getGenre | ( | statusMessageReporting * | smr, |
char const * | name | ||
) |
Definition at line 301 of file PoPs.cc.
References PoPs_particleIndex_smr().
enum PoPs_genre PoPs_getGenre_atIndex | ( | statusMessageReporting * | smr, |
int | index | ||
) |
double PoPs_getMassInUnitOf | ( | statusMessageReporting * | smr, |
char const * | name, | ||
char const * | unit | ||
) |
Definition at line 265 of file PoPs.cc.
References PoPs_getMassInUnitOf_atIndex(), and PoPs_particleIndex_smr().
double PoPs_getMassInUnitOf_atIndex | ( | statusMessageReporting * | smr, |
int | index, | ||
char const * | unit | ||
) |
Definition at line 286 of file PoPs.cc.
References PoP_getMassInUnitOf().
Referenced by PoPs_getMassInUnitOf().
char const* PoPs_getName_atIndex | ( | statusMessageReporting * | smr, |
int | index | ||
) |
Definition at line 275 of file PoPs.cc.
Referenced by MCGIDI_map_findTargetViaPoPIDs().
int PoPs_getZ_A_l | ( | statusMessageReporting * | smr, |
char const * | name, | ||
int * | Z, | ||
int * | A, | ||
int * | l | ||
) |
Definition at line 325 of file PoPs.cc.
References PoPs_getZ_A_l_atIndex(), and PoPs_particleIndex_smr().
int PoPs_getZ_A_l_atIndex | ( | statusMessageReporting * | smr, |
int | index, | ||
int * | Z, | ||
int * | A, | ||
int * | l | ||
) |
Definition at line 335 of file PoPs.cc.
Referenced by PoPs_getZ_A_l().
int PoPs_hasNucleus | ( | statusMessageReporting * | smr, |
char const * | name, | ||
int | protonIsNucleus | ||
) |
Definition at line 349 of file PoPs.cc.
References PoPs_hasNucleus_atIndex(), and PoPs_particleIndex_smr().
Referenced by PoPs_write().
int PoPs_hasNucleus_atIndex | ( | statusMessageReporting * | smr, |
int | index, | ||
int | protonIsNucleus | ||
) |
Definition at line 359 of file PoPs.cc.
Referenced by PoPs_hasNucleus().
int PoPs_particleIndex | ( | char const * | name | ) |
Definition at line 204 of file PoPs.cc.
References PoPs_particleProperIndex(), and PoPs_sortedParticleIndex().
Referenced by lPoPs_addParticleIfNeeded(), MCGIDI_reaction_ParseDetermineReactionProducts(), MCGIDI_reaction_particleChanges(), PoP_makeAlias(), PoPs_copyAddParticleIfNeeded(), and PoPs_particleIndex_smr().
int PoPs_particleIndex_smr | ( | statusMessageReporting * | smr, |
char const * | name, | ||
char const * | file, | ||
int | line, | ||
char const * | func | ||
) |
Definition at line 216 of file PoPs.cc.
References PoPs_particleIndex(), and smr_setReportError().
Referenced by PoPs_getAtomsIndex(), PoPs_getAtomsIndex_atIndex(), PoPs_getAtomsName(), PoPs_getGenre(), PoPs_getMassInUnitOf(), PoPs_getZ_A_l(), and PoPs_hasNucleus().
|
static |
Definition at line 227 of file PoPs.cc.
Referenced by PoPs_addParticleIfNeeded(), PoPs_particleIndex(), and PoPs_write().
void PoPs_print | ( | int | sorted | ) |
Definition at line 455 of file PoPs.cc.
References PoPs_write().
int PoPs_readDatabase | ( | statusMessageReporting * | smr, |
char const * | fileName | ||
) |
Definition at line 81 of file PoPs.cc.
References PoPs_particleReadDatabase().
int PoPs_release | ( | statusMessageReporting * | smr | ) |
Definition at line 88 of file PoPs.cc.
References PoPs_releasePrivate().
int PoPs_releasePrivate | ( | statusMessageReporting * | ) |
Definition at line 98 of file PoPs.cc.
References PoP_free(), smr_freeMemory(), and unitsDB_release().
Referenced by PoPs_release().
|
static |
Definition at line 235 of file PoPs.cc.
Referenced by PoPs_addParticleIfNeeded(), and PoPs_particleIndex().
int PoPs_unitConversionRatio | ( | char const * | _from, |
char const * | _to, | ||
double * | ratio | ||
) |
Definition at line 748 of file PoPs.cc.
References conversions, n, and unitConversions_s::ratio.
Referenced by PoP_getMassInUnitOf().
void PoPs_write | ( | FILE * | f, |
int | sorted | ||
) |
Definition at line 462 of file PoPs.cc.
References PoPs_genreTokenToString(), PoPs_hasNucleus(), and PoPs_particleProperIndex().
Referenced by PoPs_print().
char const* unitsDB_addUnitIfNeeded | ( | statusMessageReporting * | smr, |
char const * | unit | ||
) |
Definition at line 700 of file PoPs.cc.
References smr_freeMemory().
Referenced by PoP_makeParticle(), and PoPs_particleLoadInfo().
int unitsDB_index | ( | statusMessageReporting * | , |
char const * | unit | ||
) |
|
static |
Definition at line 687 of file PoPs.cc.
References smr_freeMemory().
Referenced by PoPs_releasePrivate().
char const* unitsDB_stringFromIndex | ( | statusMessageReporting * | smr, |
int | index | ||
) |
|
static |
|
static |
int PoPs_smr_ID = smr_unknownID |
Definition at line 35 of file PoPs.cc.
Referenced by lPoPs_addParticleIfNeeded().