Geant4
11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
GIDI_settings.cc
Go to the documentation of this file.
1
/*
2
# <<BEGIN-copyright>>
3
# <<END-copyright>>
4
*/
5
6
#include <iostream>
7
#include <stdlib.h>
8
9
#include "
GIDI_settings.hh
"
10
11
/*
12
=========================================================
13
*/
14
/**
15
This is the top settings class used when a GND file is read.
16
*/
17
GIDI_settings::GIDI_settings
( ) {
18
19
}
20
/*
21
=========================================================
22
*/
23
GIDI_settings::~GIDI_settings
( ) {
24
25
}
26
/*
27
=========================================================
28
*/
29
int
GIDI_settings::addParticle
(
GIDI_settings_particle
const
&particle ) {
30
31
int
PoPId = particle.
getPoPId
( );
32
33
if
( mParticles.find( PoPId ) != mParticles.end( ) )
return
( 1 );
34
mParticles.insert( std::pair<int, GIDI_settings_particle>( PoPId,
GIDI_settings_particle
( particle ) ) );
35
return
( 0 );
36
}
37
/*
38
=========================================================
39
*/
40
GIDI_settings_particle
const
*
GIDI_settings::getParticle
(
int
PoPId )
const
{
41
42
std::map<int, GIDI_settings_particle>::const_iterator particle = mParticles.find( PoPId );
43
44
if
( particle == mParticles.end( ) )
return
( NULL );
45
return
( &(particle->second) );
46
}
47
/*
48
=========================================================
49
*/
50
int
GIDI_settings::eraseParticle
(
int
PoPId ) {
51
52
std::map<int, GIDI_settings_particle>::iterator particle = mParticles.find( PoPId );
53
54
if
( particle == mParticles.end( ) )
return
( 1 );
55
mParticles.erase( PoPId );
56
return
( 0 );
57
}
GIDI_settings.hh
GIDI_settings_particle
Definition
GIDI_settings.hh:188
GIDI_settings_particle::getPoPId
int getPoPId(void) const
Definition
GIDI_settings.hh:208
GIDI_settings::getParticle
GIDI_settings_particle const * getParticle(int PoPId) const
Definition
GIDI_settings.cc:40
GIDI_settings::eraseParticle
int eraseParticle(int PoPId)
Definition
GIDI_settings.cc:50
GIDI_settings::GIDI_settings
GIDI_settings()
Definition
GIDI_settings.cc:17
GIDI_settings::addParticle
int addParticle(GIDI_settings_particle const &particle)
Definition
GIDI_settings.cc:29
GIDI_settings::~GIDI_settings
~GIDI_settings()
Definition
GIDI_settings.cc:23
geant4-v11.2.2
source
processes
hadronic
models
lend
src
GIDI_settings.cc
Generated by
1.12.0