File indexing completed on 2024-10-17 22:59:02
0001 #ifndef RecoTracker_MkFitCore_interface_Config_h
0002 #define RecoTracker_MkFitCore_interface_Config_h
0003
0004 namespace mkfit {
0005
0006 namespace Const {
0007 constexpr float PI = 3.14159265358979323846;
0008 constexpr float TwoPI = 6.28318530717958647692;
0009 constexpr float PIOver2 = Const::PI / 2.0f;
0010 constexpr float PIOver4 = Const::PI / 4.0f;
0011 constexpr float PI3Over4 = 3.0f * Const::PI / 4.0f;
0012 constexpr float InvPI = 1.0f / Const::PI;
0013 constexpr float sol = 0.299792458;
0014 constexpr float sol_over_100 = 0.299792458e-2;
0015
0016
0017 constexpr bool nan_etc_sigs_enable = false;
0018
0019 constexpr bool nan_n_silly_check_seeds = true;
0020 constexpr bool nan_n_silly_print_bad_seeds = false;
0021 constexpr bool nan_n_silly_fixup_bad_seeds = false;
0022 constexpr bool nan_n_silly_remove_bad_seeds = true;
0023
0024 constexpr bool nan_n_silly_check_cands_every_layer = false;
0025 constexpr bool nan_n_silly_print_bad_cands_every_layer = false;
0026 constexpr bool nan_n_silly_fixup_bad_cands_every_layer = false;
0027
0028 constexpr bool nan_n_silly_check_cands_pre_bkfit = true;
0029 constexpr bool nan_n_silly_check_cands_post_bkfit = true;
0030 constexpr bool nan_n_silly_print_bad_cands_bkfit = false;
0031 }
0032
0033 inline float cdist(float a) { return a > Const::PI ? Const::TwoPI - a : a; }
0034
0035
0036
0037 namespace Config {
0038
0039 constexpr int nLayers = 10;
0040
0041
0042
0043 constexpr int nMaxTrkHits = 64;
0044 constexpr int nAvgSimHits = 32;
0045
0046
0047 static constexpr int m_nphi = 256;
0048
0049
0050 constexpr int Niter = 5;
0051 constexpr bool useTrigApprox = true;
0052
0053
0054
0055
0056 extern bool usePropToPlane;
0057 extern bool usePtMultScat;
0058
0059
0060 constexpr float Bfield = 3.8112;
0061 constexpr float mag_c1 = 3.8114;
0062 constexpr float mag_b0 = -3.94991e-06;
0063 constexpr float mag_b1 = 7.53701e-06;
0064 constexpr float mag_a = 2.43878e-11;
0065
0066
0067
0068
0069
0070
0071
0072
0073 #ifdef CONFIG_PhiQArrays
0074 extern bool usePhiQArrays;
0075 #else
0076 constexpr bool usePhiQArrays = true;
0077 #endif
0078
0079
0080 constexpr float validHitBonus_ = 4;
0081 constexpr float validHitSlope_ = 0.2;
0082 constexpr float overlapHitBonus_ = 0;
0083 constexpr float missingHitPenalty_ = 8;
0084 constexpr float tailMissingHitPenalty_ = 3;
0085
0086
0087 #if defined(MKFIT_STANDALONE)
0088 extern int numThreadsFinder;
0089 extern int numThreadsEvents;
0090 extern int numSeedsPerTask;
0091 #else
0092 constexpr int numThreadsFinder = 1;
0093 constexpr int numThreadsEvents = 1;
0094 constexpr int numSeedsPerTask = 32;
0095 #endif
0096
0097
0098 constexpr float track1GeVradius = 87.6;
0099 constexpr float c_etamax_brl = 0.9;
0100 constexpr float c_dpt_common = 0.25;
0101 constexpr float c_dzmax_brl = 0.005;
0102 constexpr float c_drmax_brl = 0.010;
0103 constexpr float c_ptmin_hpt = 2.0;
0104 constexpr float c_dzmax_hpt = 0.010;
0105 constexpr float c_drmax_hpt = 0.010;
0106 constexpr float c_dzmax_els = 0.015;
0107 constexpr float c_drmax_els = 0.015;
0108
0109
0110 #if defined(MKFIT_STANDALONE)
0111 extern bool useHitsForDuplicates;
0112 extern bool removeDuplicates;
0113 #else
0114 const bool useHitsForDuplicates = true;
0115 #endif
0116 extern const float maxdPhi;
0117 extern const float maxdPt;
0118 extern const float maxdEta;
0119 extern const float minFracHitsShared;
0120 extern const float maxdR;
0121
0122
0123 extern const float maxd1pt;
0124 extern const float maxdphi;
0125 extern const float maxdcth;
0126 extern const float maxcth_ob;
0127 extern const float maxcth_fw;
0128
0129
0130
0131 inline float bFieldFromZR(const float z, const float r) {
0132 return (Config::mag_b0 * z * z + Config::mag_b1 * z + Config::mag_c1) * (Config::mag_a * r * r + 1.f);
0133 }
0134
0135 };
0136
0137
0138
0139 }
0140 #endif