Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:13

0001 #pragma once
0002 
0003 #include <vector>
0004 
0005 #include "sysrap/sphoton.h"
0006 #include "sysrap/srng.h"
0007 #include "sysrap/storch.h"
0008 
0009 
0010 constexpr storch default_torch{
0011     .gentype = OpticksGenstep_TORCH,
0012     .trackid = 0,
0013     .matline = 0,
0014     .numphoton = 100,
0015     
0016     // Assign default values for position, time, momentum, and other attributes
0017     .pos = {-10.0f, -30.0f, -90.0f},
0018     .time = 0.0f,
0019     
0020     .mom = float3{0.0f, 0.3f, 1.0f},
0021     .weight = 0.0f,
0022     
0023     .pol = {1.0f, 0.0f, 0.0f},
0024     .wavelength = 420.0f,
0025     
0026     .zenith = {0.0f, 1.0f},
0027     .azimuth = {0.0f, 1.0f},
0028     
0029     .radius = 15.0f,
0030     .distance = 0.0f,
0031     .mode = 255,
0032     .type = T_DISC,
0033 };
0034 
0035 
0036 std::vector<sphoton> generate_photons(const storch& torch = default_torch, unsigned int num_photons = 0, unsigned int seed = 0);