CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ProcessTypeEnumerator.cc
Go to the documentation of this file.
2 
3 
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  //
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 
44  return mapProcesses.size();
45 }
46 
48  for (MapType::const_iterator it = mapProcesses.begin(); it != mapProcesses.end(); it++)
49  reverseMapProcesses[(*it).second] = (*it).first;
50 }
std::string processName(unsigned int)
unsigned int numberOfKnownProcesses()
ReverseMapType reverseMapProcesses
unsigned int processId(std::string)