File indexing completed on 2025-12-18 09:22:18
0001 #ifndef MACRO_GLOBALVARIABLES_C
0002 #define MACRO_GLOBALVARIABLES_C
0003
0004 #include <g4decayer/EDecayType.hh>
0005
0006 #include <cstdint>
0007 #include <limits>
0008 #include <set>
0009 #include <sstream>
0010 #include <string>
0011
0012 double no_overlapp = 0.0001;
0013
0014
0015
0016 namespace Input
0017 {
0018 bool HEPMC = false;
0019 bool EMBED = false;
0020 bool READEIC = false;
0021
0022 bool UPSILON = false;
0023 std::set<int> UPSILON_EmbedIds;
0024
0025
0026 enum BeamConfiguration
0027 {
0028 AA_COLLISION = 0,
0029 pA_COLLISION = 1,
0030 pp_COLLISION = 2,
0031 pp_ZEROANGLE = 3,
0032 ppg02 = 4
0033 };
0034
0035 BeamConfiguration BEAM_CONFIGURATION = AA_COLLISION;
0036 }
0037
0038 namespace DstOut
0039 {
0040 std::string OutputDir = ".";
0041 std::string OutputFile = "test.root";
0042 }
0043
0044
0045 namespace Enable
0046 {
0047 bool ABSORBER = false;
0048 bool CDB = false;
0049 bool DSTOUT = false;
0050 bool DSTOUT_COMPRESS = false;
0051 bool OVERLAPCHECK = false;
0052 bool SUPPORT = false;
0053 int VERBOSITY = 0;
0054 }
0055
0056
0057
0058
0059 namespace BlackHoleGeometry
0060 {
0061 double max_radius = 0.;
0062 double min_z = 0.;
0063 double max_z = 0.;
0064 double gap = no_overlapp;
0065 bool visible = false;
0066 };
0067
0068 namespace G4P6DECAYER
0069 {
0070 EDecayType decayType = EDecayType::kAll;
0071 }
0072
0073
0074 namespace TRACKING
0075 {
0076 std::string TrackNodeName = "SvtxTrackMap";
0077 bool pp_mode = false;
0078 double pp_extended_readout_time = 24900.0;
0079 bool reco_tpc_is_configured = false;
0080 int reco_tpc_maxtime_sample = 425;
0081 int reco_tpc_time_presample = 40;
0082 int reco_t0 = 0;
0083 bool tpc_zero_supp = false;
0084 bool tpc_baseline_corr = true;
0085
0086 }
0087
0088 namespace G4MAGNET
0089 {
0090
0091
0092
0093 double magfield_rescale = std::numeric_limits<double>::quiet_NaN();
0094 std::string magfield;
0095 std::string magfield_OHCAL_steel;
0096 std::string magfield_tracking;
0097 }
0098
0099 namespace Enable
0100 {
0101 bool MICROMEGAS = false;
0102 }
0103
0104 namespace G4MICROMEGAS
0105 {
0106
0107 int n_micromegas_layer = 2;
0108 }
0109
0110 namespace G4TPC
0111 {
0112 double tpc_drift_velocity_reco = 7.55 / 1000.0;
0113 double tpc_tzero_reco = 0.0;
0114 }
0115
0116 namespace G4TRACKING
0117 {
0118 bool init_acts_magfield = true;
0119 }
0120
0121 namespace EVTGENDECAYER
0122 {
0123 std::string DecayFile;
0124
0125 }
0126
0127 namespace CDB
0128 {
0129 std::string global_tag = "MDC2";
0130 uint64_t timestamp = 6;
0131 }
0132
0133
0134
0135 bool isRootFile(const std::string &fname)
0136 {
0137 size_t i = fname.rfind('.', fname.length());
0138 if (i != std::string::npos)
0139 {
0140 if (fname.substr(i + 1, fname.length() - i) == "root")
0141 {
0142 return true;
0143 }
0144 }
0145 return false;
0146 }
0147
0148 bool isConstantField(const std::string & , double &fieldstrength)
0149 {
0150 std::istringstream stringline(G4MAGNET::magfield_tracking);
0151 stringline >> fieldstrength;
0152 if (stringline.fail())
0153 {
0154 fieldstrength = std::numeric_limits<double>::quiet_NaN();
0155 return false;
0156 }
0157
0158 return true;
0159 }
0160
0161 #endif