FairRoot/PandaRoot
ChiGenContext.h
Go to the documentation of this file.
1 /*
2  * @author Alexey Luchinsky
3  * @author Stanislav Poslavsky (stvlpos (at) mail.ru)
4  */
5 
6 #ifndef CHIGENCONTEXT_H
7 #define CHIGENCONTEXT_H
8 
9 #include <iostream>
10 #include <stdio.h>
11 
12 
13 //---------------------------DEBUG--------------------------------------------//
14 
15 #define CHIGEN_LOG_FILE "ChiGen.log"
16 
17 //---------------------------EVTGEN & PYTHIA----------------------------------//
18 #include "ChiGenRandomEngine.h"
19 #include "Pythia.h"
20 #include "EvtGen/EvtGen.hh"
21 #include "EvtGenExternal/EvtExternalGenList.hh"
22 #include "EvtGenBase/EvtAbsRadCorr.hh"
23 #include "EvtGenBase/EvtDecayBase.hh"
24 
25 
26 //---------------------------PARTICLES----------------------------------------//
27 /*
28  * Particles properties
29  */
30 
31 #define PROTON_MASS 1.0
32 #define R20_CHI 0.075
33 #define CHI1_MASS 3.51
34 #define CHI2_MASS 3.556
35 #define X3872_MASS 3.872
36 
37 
38 #define GAMMA_PDG_ID 22
39 #define E_PDG_ID 11
40 #define MU_PDG_ID 13
41 #define PSI_PDG_ID 443
42 
43 #define CHI1_PDG_ID 20443
44 #define CHI1_STRING "chi_c1"
45 
46 #define X3872_PDG_ID 9920443
47 #define X3872_STRING "X_1(3872)"
48 
49 #define CHI2_PDG_ID 445
50 #define CHI2_STRING "chi_c2"
51 
52 namespace chigen {
57  extern double elapsedTimeSeconds();
62  extern long get_seed();
63 
64  namespace random {
68  extern ChiGenRandomEngine* random_engine;
72  extern Pythia8::Rndm* pythia_random_engine;
73  }
74 
75  namespace evtgen {
79  extern std::string EvtGenPDL;
83  extern std::string EvtGenDecFile;
87  extern std::string EvtGenChiDecFile;
91  extern bool evt_gen_is_loaded;
95  extern EvtGen* evt_gen;
100  extern void read_dec_file(char* dec_file_name);
104  extern void ensure_evt_gen_is_inialized();
108  extern std::string chi_c1_str, chi_c2_str, x3872_str;
113  }
114 
120  extern EvtId pdgId2EvtId(int pdgId);
121 
127  extern bool isPWaveCharmonia(int pdgCode);
128 
134  extern bool isCharmonia(int pdgCode);
135 
136  namespace ostreams {
140  extern bool suppress_all_cout;
144  extern bool write_log_file;
148  extern bool suppress_pandaroot;
152  extern bool suppress_pandaroot_cout;
156  extern bool verbose_mode;
157 
161  extern std::ostream* log_file;
165  extern std::ostream* terminal;
169  extern std::ostream* tee_stream;
173  extern std::ostream* chigen_cout;
174 
175 #define __chigen_cout__ (*chigen::ostreams::chigen_cout)<<std::fixed<<"["<<chigen::elapsedTimeSeconds()<<" ChiGen] "
176 #define __chigen_direct_cout__ (*chigen::ostreams::chigen_cout)
177  }
178 
179  namespace pythia {
183  extern Pythia8::Pythia* pythia;
187  extern Pythia8::PDF* pdf;
188  }
189 
193  extern void ensure_chigen_is_initialized();
197  extern void initialize();
203  extern void initialize(long seed);
204 }
205 
206 #endif /* CHIGENCONTEXT_H */
bool isPWaveCharmonia(int pdgCode)
void ensure_chigen_is_initialized()
bool isCharmonia(int pdgCode)
void ensure_evt_gen_is_inialized()
std::string x3872_str
std::ostream * terminal
std::ostream * chigen_cout
std::string EvtGenPDL
Pythia8::Rndm * pythia_random_engine
EvtId pdgId2EvtId(int pdgId)
void read_dec_file(char *dec_file_name)
void initialize()
unsigned int seed
std::ostream * tee_stream
std::string chi_c2_str
double elapsedTimeSeconds()
std::string chi_c1_str
long get_seed()
Pythia8::PDF * pdf
Pythia8::Pythia * pythia
ChiGenRandomEngine * random_engine
std::string EvtGenChiDecFile
std::ostream * log_file
std::string EvtGenDecFile