BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
GeneratorName.cxx
Go to the documentation of this file.
2#include <iostream>
3
5generator_name (const int& index)
6{
7 switch (index) {
8 case 1000000 : return PYTHIA;
9 case 2000000 : return HERWIG;
10 case 3000000 : return ISAJET;
11 case 4000000 : return SINGLE;
12 case 5000000 : return HIJING;
13 case 6000000 : return PHOJET;
14 case 100000 : return COMPHEP;
15 case 200000 : return USER;
16 case 300000 : return ACERMC;
17 case 400000 : return ALPGEN;
18 case 10000 : return TAUOLA;
19 case 20000 : return PHOTOS;
20 case 30000 : return TAUOLA_PHOTOS;
21 }
22 return UNKNOWN;
23}
24
26first_generator (int& index)
27{
28 int gen1 = 1000000*(index/1000000);
29 return generator_name(gen1);
30}
31
33second_generator (int& index)
34{
35 int gen1 = 1000000*(index/1000000);
36 int gen2 = index - gen1;
37 gen2 = 100000*(gen2/100000);
38 return generator_name(gen2);
39}
40
42third_generator (int& index)
43{
44 int gen1 = 1000000*(index/1000000);
45 int gen2 = index - gen1;
46 gen2 = 100000*(gen2/100000);
47 int gen3 = index - gen1 - gen2;
48 gen3 = 10000*(gen3/10000);
49 return generator_name(gen3);
50}
51
52int
54{ return index%10000; }
55
56void
58{
59 std::cout << first_generator(id) << " "
60 << second_generator(id) << " "
61 << third_generator(id) << " + "
62 << generator_process(id);
63}
64
65
66std::string
67generator_string (const int& index)
68{
69 switch (index) {
70 case 1000000 : return "PYTHIA";
71 case 2000000 : return "HERWIG";
72 case 3000000 : return "ISAJET";
73 case 4000000 : return "SINGLE";
74 case 5000000 : return "HIJING";
75 case 6000000 : return "PHOJET";
76 case 100000 : return "COMPHEP";
77 case 200000 : return "USER";
78 case 300000 : return "ACERMC";
79 case 400000 : return "ALPGEN";
80 case 10000 : return "TAUOLA";
81 case 20000 : return "PHOTOS";
82 case 30000 : return "TAUOLA_PHOTOS";
83 }
84 return " ";
85}
86
87std::ostream& operator<<(std::ostream& lhs, GeneratorName rhs) {
88 lhs << generator_string(rhs);
89 return lhs;
90}
GeneratorName first_generator(int &index)
GeneratorName second_generator(int &index)
std::ostream & operator<<(std::ostream &lhs, GeneratorName rhs)
GeneratorName generator_name(const int &index)
GeneratorName third_generator(int &index)
std::string generator_string(const int &index)
void GeneratorName_print(int &id)
int generator_process(int &index)
GeneratorName
Definition: GeneratorName.h:8
@ TAUOLA_PHOTOS
Definition: GeneratorName.h:21
@ SINGLE
Definition: GeneratorName.h:12
@ ALPGEN
Definition: GeneratorName.h:18
@ PYTHIA
Definition: GeneratorName.h:9
@ UNKNOWN
Definition: GeneratorName.h:22
@ PHOJET
Definition: GeneratorName.h:14
@ ACERMC
Definition: GeneratorName.h:17
@ HIJING
Definition: GeneratorName.h:13
@ TAUOLA
Definition: GeneratorName.h:19
@ HERWIG
Definition: GeneratorName.h:10
@ USER
Definition: GeneratorName.h:16
@ COMPHEP
Definition: GeneratorName.h:15
@ ISAJET
Definition: GeneratorName.h:11
#define PHOTOS(IP)
Definition: KKMC.cxx:71