From 9d5b64a74789572a2b477f2906482b954f0a4bdd Mon Sep 17 00:00:00 2001 From: YonsiG Date: Tue, 9 May 2023 12:04:59 -0700 Subject: [PATCH] put magnetic field into constant.cu file --- SDL/Constants.cu | 1 + SDL/Constants.cuh | 1 + SDL/Quintuplet.cu | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/SDL/Constants.cu b/SDL/Constants.cu index 70323eae..310e7d04 100644 --- a/SDL/Constants.cu +++ b/SDL/Constants.cu @@ -17,3 +17,4 @@ CUDA_CONST_VAR const float SDL::deltaZLum = 15.0; CUDA_CONST_VAR const float SDL::pixelPSZpitch = 0.15; CUDA_CONST_VAR const float SDL::strip2SZpitch = 5.0; CUDA_CONST_VAR const float SDL::pt_betaMax = 7.0f; +CUDA_CONST_VAR const float SDL::magnetic_field = 3.8112; diff --git a/SDL/Constants.cuh b/SDL/Constants.cuh index b926a4b7..4a2ff0b9 100644 --- a/SDL/Constants.cuh +++ b/SDL/Constants.cuh @@ -73,5 +73,6 @@ namespace SDL extern CUDA_CONST_VAR const float pixelPSZpitch; extern CUDA_CONST_VAR const float strip2SZpitch; extern CUDA_CONST_VAR const float pt_betaMax; + extern CUDA_CONST_VAR const float magnetic_field; } #endif diff --git a/SDL/Quintuplet.cu b/SDL/Quintuplet.cu index a9a5a5e0..81d2371f 100644 --- a/SDL/Quintuplet.cu +++ b/SDL/Quintuplet.cu @@ -729,7 +729,7 @@ __device__ bool SDL::passT5RZConstraint(struct SDL::modules& modulesInGPU, struc float Pz=(z_init-z1)/ds*Pt; float p = sqrt(Px*Px+Py*Py+Pz*Pz); - float B = 3.8112; + float B = SDL::magnetic_field; float a = -0.299792*B*charge; float zsi, rtsi;