Gaudi Framework, version v25r0
Home
Generated: Mon Feb 17 2014
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
GaudiPartProp
src
ParticlePropertySvc.h
Go to the documentation of this file.
1
#ifndef PARTICLEPROPERTYSVC_PARTICLEPROPERTYSVC_H
2
#define PARTICLEPROPERTYSVC_PARTICLEPROPERTYSVC_H
3
// ============================================================================
4
// Include Files
5
// ============================================================================
6
// STD&STL
7
// ============================================================================
8
#include <
map
>
9
#include <
set
>
10
// ============================================================================
11
// GaudiKernel
12
// ============================================================================
13
#include "
GaudiKernel/Service.h
"
14
#include "
GaudiKernel/IParticlePropertySvc.h
"
15
16
class
IFileAccess
;
17
18
namespace
Gaudi
{
19
// ============================================================================
71
class
ParticlePropertySvc
:
public
extends1
<Service,IParticlePropertySvc>
72
{
73
public
:
74
// typedefs for container type
75
typedef
ParticleProperty
*
mapped_type
;
76
typedef
std::map< int, mapped_type >
MapID
;
77
typedef
std::map< std::string, mapped_type >
MapName
;
78
typedef
std::map< int, mapped_type >
MapStdHepID
;
79
typedef
std::map< int, mapped_type >
MapPythiaID
;
80
typedef
IParticlePropertySvc::VectPP
VectPP
;
81
typedef
IParticlePropertySvc::const_iterator
const_iterator
;
82
typedef
IParticlePropertySvc::iterator
iterator
;
83
typedef
std::set<ParticleProperty*>
Set
;
84
// Inherited Service overrides:
85
87
virtual
StatusCode
initialize
();
89
virtual
StatusCode
finalize
();
102
virtual
StatusCode
push_back
103
(
const
std::string
& particle ,
104
int
geantId ,
105
int
jetsetId ,
106
double
charge ,
107
double
mass ,
108
double
tlife ,
109
const
std::string
& evtName ,
110
int
pythiaId ,
111
double
maxWidth ) ;
117
virtual
StatusCode
push_back
(
ParticleProperty
*
pp
);
119
virtual
const_iterator
begin
()
const
{
return
m_vectpp
.
begin
() ; }
121
virtual
const_iterator
end
()
const
{
return
m_vectpp
.
end
() ; }
123
virtual
int
size
()
const
{
return
m_vectpp
.
size
() ; };
125
virtual
ParticleProperty
*
find
(
int
geantId )
126
{
return
m_idmap
[ geantId ] ; }
128
virtual
ParticleProperty
*
find
(
const
std::string
& name )
129
{
return
m_namemap
[ name ] ; }
131
virtual
ParticleProperty
*
findByStdHepID
(
int
stdHepId )
132
{
return
m_stdhepidmap
[ stdHepId ] ; }
134
virtual
ParticleProperty
*
findByPythiaID
(
int
pythiaID )
135
{
return
m_pythiaidmap
[ pythiaID ]; }
137
virtual
StatusCode
erase
(
int
geantId )
138
{
return
erase
(
find
( geantId ) ) ; }
140
virtual
StatusCode
erase
(
const
std::string
& name )
141
{
return
erase
(
find
( name ) ) ; }
143
virtual
StatusCode
eraseByStdHepID
(
int
stdHepId )
144
{
return
erase
(
findByStdHepID
( stdHepId ) ) ; }
149
ParticlePropertySvc
150
(
const
std::string
& name ,
ISvcLocator
* svc );
152
virtual
~
ParticlePropertySvc
();
153
protected
:
159
const
ParticleProperty
* anti
160
(
const
ParticleProperty
*
pp
)
const
;
165
StatusCode
setAntiParticles() ;
167
StatusCode
rebuild() ;
169
StatusCode
erase (
const
ParticleProperty
*
pp
) ;
171
StatusCode
parse
(
const
std::string
&
file
) ;
172
// Text file parsing routine.
173
StatusCode
parse
();
174
// treat additional particles
175
StatusCode
addParticles() ;
176
// compare 2 entries
177
bool
diff
178
(
const
ParticleProperty
* o ,
179
const
ParticleProperty
*
n
,
180
const
MSG::Level
l
=
MSG::DEBUG
)
const
;
181
private
:
182
typedef
std::vector<std::string>
Files
;
183
typedef
std::vector<std::string>
Particles
;
184
185
std::string
m_filename
;
186
Files
m_other
;
187
// properties to be redefined explicitly
188
Particles
m_particles
;
189
190
VectPP
m_vectpp
;
191
MapID
m_idmap
;
192
MapName
m_namemap
;
193
MapStdHepID
m_stdhepidmap
;
194
MapPythiaID
m_pythiaidmap
;
195
196
// local storage of ALL properties
197
Set
m_owned
;
198
std::set<std::string>
m_replaced
;
199
200
IFileAccess
*
m_fileAccess
;
201
};
202
}
// namespace Gaudi
203
// =============================================================================
204
// The END
205
// =============================================================================
206
#endif
207
// =============================================================================
208
209
Generated at Mon Feb 17 2014 14:37:46 for Gaudi Framework, version v25r0 by
Doxygen
version 1.8.2 written by
Dimitri van Heesch
, © 1997-2004