CGEM BOSS 6.6.5.h
BESIII Offline Software System
Loading...
Searching...
No Matches
GeneratorName.h File Reference
#include <iosfwd>
#include <string>

Go to the source code of this file.

Enumerations

enum  GeneratorName {
  PYTHIA = 1000000 , HERWIG = 2000000 , ISAJET = 3000000 , SINGLE = 4000000 ,
  HIJING = 5000000 , PHOJET = 6000000 , COMPHEP = 100000 , USER = 200000 ,
  ACERMC = 300000 , ALPGEN = 400000 , TAUOLA = 10000 , PHOTOS = 20000 ,
  TAUOLA_PHOTOS = 30000 , UNKNOWN = -999
}
 

Functions

GeneratorName generator_name (const int &index)
 
GeneratorName first_generator (int &index)
 
GeneratorName second_generator (int &index)
 
GeneratorName third_generator (int &index)
 
int generator_process (int &index)
 
void GeneratorName_print (int &id)
 
std::string generator_string (const int &index)
 
std::ostream & operator<< (std::ostream &lhs, GeneratorName rhs)
 

Enumeration Type Documentation

◆ GeneratorName

Enumerator
PYTHIA 
HERWIG 
ISAJET 
SINGLE 
HIJING 
PHOJET 
COMPHEP 
USER 
ACERMC 
ALPGEN 
TAUOLA 
PHOTOS 
TAUOLA_PHOTOS 
UNKNOWN 

Definition at line 7 of file GeneratorName.h.

8{
9 PYTHIA = 1000000,
10 HERWIG = 2000000,
11 ISAJET = 3000000,
12 SINGLE = 4000000,
13 HIJING = 5000000,
14 PHOJET = 6000000,
15 COMPHEP = 100000,
16 USER = 200000,
17 ACERMC = 300000,
18 ALPGEN = 400000,
19 TAUOLA = 10000,
20 PHOTOS = 20000,
21 TAUOLA_PHOTOS = 30000,
22 UNKNOWN = -999
23};
@ TAUOLA_PHOTOS
@ SINGLE
@ ALPGEN
@ PYTHIA
@ UNKNOWN
@ PHOJET
@ ACERMC
@ PHOTOS
@ HIJING
@ TAUOLA
@ HERWIG
@ USER
@ COMPHEP
@ ISAJET

Function Documentation

◆ first_generator()

GeneratorName first_generator ( int & index)

Definition at line 26 of file GeneratorName.cxx.

27{
28 int gen1 = 1000000*(index/1000000);
29 return generator_name(gen1);
30}
GeneratorName generator_name(const int &index)

Referenced by GeneratorName_print().

◆ generator_name()

GeneratorName generator_name ( const int & index)

Definition at line 5 of file GeneratorName.cxx.

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}
#define PHOTOS(IP)
Definition KKMC.cxx:71

Referenced by first_generator(), second_generator(), and third_generator().

◆ generator_process()

int generator_process ( int & index)

Definition at line 53 of file GeneratorName.cxx.

54{ return index%10000; }

Referenced by GeneratorName_print().

◆ generator_string()

std::string generator_string ( const int & index)

Definition at line 67 of file GeneratorName.cxx.

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}

Referenced by operator<<().

◆ GeneratorName_print()

void GeneratorName_print ( int & id)

Definition at line 57 of file GeneratorName.cxx.

58{
59 std::cout << first_generator(id) << " "
60 << second_generator(id) << " "
61 << third_generator(id) << " + "
62 << generator_process(id);
63}
GeneratorName first_generator(int &index)
GeneratorName second_generator(int &index)
GeneratorName third_generator(int &index)
int generator_process(int &index)

◆ operator<<()

std::ostream & operator<< ( std::ostream & lhs,
GeneratorName rhs )

Definition at line 87 of file GeneratorName.cxx.

87 {
88 lhs << generator_string(rhs);
89 return lhs;
90}
std::string generator_string(const int &index)

◆ second_generator()

GeneratorName second_generator ( int & index)

Definition at line 33 of file GeneratorName.cxx.

34{
35 int gen1 = 1000000*(index/1000000);
36 int gen2 = index - gen1;
37 gen2 = 100000*(gen2/100000);
38 return generator_name(gen2);
39}

Referenced by GeneratorName_print().

◆ third_generator()

GeneratorName third_generator ( int & index)

Definition at line 42 of file GeneratorName.cxx.

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}

Referenced by GeneratorName_print().