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