#ifndef __DMAGNETICFIELDSTEPPER_H__ #define __DMAGNETICFIELDSTEPPER_H__ #include #include "GPUMagneticField.cu" #include "state_t.h" #include "step_t.h" #include "fit_result_t.h" #include "trajectory_t.h" #include "TrajectoryBlock.h" #include "state_delta_t.h" #define qBr2p 0.003 // conversion for converting q*B*r to GeV/c #define one_sixth 0.16666667 // Host routines void GPUInitTracking(vector &mass_hypotheses); TrajectoryBlock* MakeTrajectoryBlock(void); void FreeTrajectoryBlock(TrajectoryBlock *tb); void Swim(float q, float mass, float3 start_pos, float3 start_mom, trajectory_t *&traj); // Host callable device routines __global__ void GPU_Test(void); __global__ void GPU_SwimMultiple(state_t S, trajectory_t *trajectories); __global__ void GPU_SwimSingle(float q, float mass, float3 start_pos, float3 start_mom, trajectory_t *traj); // Device only routines __device__ void GPU_Swim(state_t &Sin, trajectory_t *traj); __device__ float GPU_GetStepSize(step_t &S); __device__ void GPU_Step(step_t &S, step_t &Sprev); __device__ void GPU_TestStep(float h, step_t &Sstart, float4 &B, float3 *delta_pos, float3 *new_mom, float4 *Bmid=NULL, float h_frac=0.5, step_t *Sprev=NULL); #endif // __DMAGNETICFIELDSTEPPER_H__