PandaRoot
ChiGenContext.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 /*
14  * @author Alexey Luchinsky
15  * @author Stanislav Poslavsky (stvlpos (at) mail.ru)
16  */
17 
18 #ifndef CHIGENCONTEXT_H
19 #define CHIGENCONTEXT_H
20 
21 #include <iostream>
22 #include <stdio.h>
23 
24 //---------------------------DEBUG--------------------------------------------//
25 
26 #define CHIGEN_LOG_FILE "ChiGen.log"
27 
28 //---------------------------EVTGEN & PYTHIA----------------------------------//
29 #include "ChiGenRandomEngine.h"
30 #include "Pythia.h"
31 #include "EvtGen/EvtGen.hh"
32 #include "EvtGenExternal/EvtExternalGenList.hh"
33 #include "EvtGenBase/EvtAbsRadCorr.hh"
34 #include "EvtGenBase/EvtDecayBase.hh"
35 
36 //---------------------------PARTICLES----------------------------------------//
37 /*
38  * Particles properties
39  */
40 
41 #define PROTON_MASS 1.0
42 #define R20_CHI 0.075
43 #define CHI1_MASS 3.51
44 #define CHI2_MASS 3.556
45 #define X3872_MASS 3.872
46 
47 #define GAMMA_PDG_ID 22
48 #define E_PDG_ID 11
49 #define MU_PDG_ID 13
50 #define PSI_PDG_ID 443
51 
52 #define CHI1_PDG_ID 20443
53 #define CHI1_STRING "chi_c1"
54 
55 #define X3872_PDG_ID 9920443
56 #define X3872_STRING "X_1(3872)"
57 
58 #define CHI2_PDG_ID 445
59 #define CHI2_STRING "chi_c2"
60 
61 namespace chigen {
66 extern double elapsedTimeSeconds();
71 extern long get_seed();
72 
73 namespace random {
81 extern Pythia8::Rndm *pythia_random_engine;
82 } // namespace random
83 
84 namespace evtgen {
88 extern std::string EvtGenPDL;
92 extern std::string EvtGenDecFile;
96 extern std::string EvtGenChiDecFile;
100 extern bool evt_gen_is_loaded;
104 extern EvtGen *evt_gen;
109 extern void read_dec_file(char *dec_file_name);
113 extern void ensure_evt_gen_is_inialized();
117 extern std::string chi_c1_str, chi_c2_str, x3872_str;
122 } // namespace evtgen
123 
129 extern EvtId pdgId2EvtId(int pdgId);
130 
136 extern bool isPWaveCharmonia(int pdgCode);
137 
143 extern bool isCharmonia(int pdgCode);
144 
145 namespace ostreams {
149 extern bool suppress_all_cout;
153 extern bool write_log_file;
157 extern bool suppress_pandaroot;
161 extern bool suppress_pandaroot_cout;
165 extern bool verbose_mode;
166 
170 extern std::ostream *log_file;
174 extern std::ostream *terminal;
178 extern std::ostream *tee_stream;
182 extern std::ostream *chigen_cout;
183 
184 #define __chigen_cout__ (*chigen::ostreams::chigen_cout) << std::fixed << "[" << chigen::elapsedTimeSeconds() << " ChiGen] "
185 #define __chigen_direct_cout__ (*chigen::ostreams::chigen_cout)
186 } // namespace ostreams
187 
188 namespace pythia {
192 extern Pythia8::Pythia *pythia;
196 extern Pythia8::PDF *pdf;
197 } // namespace pythia
198 
202 extern void ensure_chigen_is_initialized();
206 extern void initialize();
212 extern void initialize(long seed);
213 } // namespace chigen
214 
215 #endif /* CHIGENCONTEXT_H */
bool isPWaveCharmonia(int pdgCode)
Pythia8::PDF * pdf
void ensure_chigen_is_initialized()
EvtGen * evt_gen
bool isCharmonia(int pdgCode)
Definition: ChiGen.h:24
Pythia8::Rndm * pythia_random_engine
void ensure_evt_gen_is_inialized()
bool suppress_pandaroot_cout
std::string x3872_str
std::ostream * chigen_cout
std::string EvtGenPDL
EvtId pdgId2EvtId(int pdgId)
void read_dec_file(char *dec_file_name)
void initialize()
std::ostream * tee_stream
std::string chi_c2_str
std::ostream * terminal
double elapsedTimeSeconds()
std::string chi_c1_str
long get_seed()
bool evt_gen_is_loaded
std::string EvtGenChiDecFile
ChiGenRandomEngine * random_engine
std::ostream * log_file
std::string EvtGenDecFile
Pythia8::Pythia * pythia