Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
SimG4Core
Physics
src
ProcessTypeEnumerator.cc
Go to the documentation of this file.
1
#include "
SimG4Core/Physics/interface/ProcessTypeEnumerator.h
"
2
3
4
ProcessTypeEnumerator::ProcessTypeEnumerator
(){
5
mapProcesses
[
"Undefined"
] = 0;
6
mapProcesses
[
"Unknown"
] = 1;
7
mapProcesses
[
"Primary"
] = 2;
8
mapProcesses
[
"Hadronic"
] = 3;
9
mapProcesses
[
"Decay"
] = 4;
10
mapProcesses
[
"Compton"
] = 5;
11
mapProcesses
[
"Annihilation"
] = 6;
12
mapProcesses
[
"EIoni"
] = 7;
13
mapProcesses
[
"HIoni"
] = 8;
14
mapProcesses
[
"MuIoni"
] = 9;
15
mapProcesses
[
"Photon"
] = 10;
16
mapProcesses
[
"MuPairProd"
] = 11;
17
mapProcesses
[
"Conversions"
] = 12;
18
mapProcesses
[
"EBrem"
] = 13;
19
mapProcesses
[
"SynchrotronRadiation"
] = 14;
20
mapProcesses
[
"MuBrem"
] = 15;
21
mapProcesses
[
"MuNucl"
] = 16;
22
23
//
24
//
25
buildReverseMap
();
26
}
27
28
unsigned
int
ProcessTypeEnumerator::processId
(std::string
in
){
29
if
(in ==
"Undefined"
)
return
0;
30
if
(
mapProcesses
[in] == 0)
31
// throw Genexception("ProcessTypeEnumerator: unknown process "+in);
32
;
33
return
mapProcesses
[
in
];
34
}
35
36
std::string
ProcessTypeEnumerator::processName
(
unsigned
int
in
){
37
if
(
reverseMapProcesses
[in] ==
""
)
38
// throw Genexception("ProcessTypeEnumerator: unknown process id "+in);
39
;
40
return
reverseMapProcesses
[
in
];
41
}
42
43
unsigned
int
ProcessTypeEnumerator::numberOfKnownProcesses
(){
44
return
mapProcesses
.size();
45
}
46
47
void
ProcessTypeEnumerator::buildReverseMap
(){
48
for
(MapType::const_iterator it =
mapProcesses
.begin(); it !=
mapProcesses
.end(); it++)
49
reverseMapProcesses
[(*it).second] = (*it).first;
50
}
ProcessTypeEnumerator::processName
std::string processName(unsigned int)
Definition:
ProcessTypeEnumerator.cc:36
ProcessTypeEnumerator::numberOfKnownProcesses
unsigned int numberOfKnownProcesses()
Definition:
ProcessTypeEnumerator.cc:43
recoMuon::in
Definition:
RecoMuonEnumerators.h:6
ProcessTypeEnumerator::buildReverseMap
void buildReverseMap()
Definition:
ProcessTypeEnumerator.cc:47
ProcessTypeEnumerator::mapProcesses
MapType mapProcesses
Definition:
ProcessTypeEnumerator.h:21
ProcessTypeEnumerator::reverseMapProcesses
ReverseMapType reverseMapProcesses
Definition:
ProcessTypeEnumerator.h:22
ProcessTypeEnumerator::processId
unsigned int processId(std::string)
Definition:
ProcessTypeEnumerator.cc:28
ProcessTypeEnumerator.h
ProcessTypeEnumerator::ProcessTypeEnumerator
ProcessTypeEnumerator()
Definition:
ProcessTypeEnumerator.cc:4
Generated for CMSSW Reference Manual by
1.8.5