Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:48:55

0001 #pragma once
0002 /**
0003 CSGDebug_Cylinder.hh
0004 ======================
0005 
0006 See notes/issues/ct_scan_nmskTailInner.rst
0007 
0008 ::
0009 
0010     c   # compile with DEBUG_CYLINDER macro 
0011     ./ct.sh 
0012 
0013     In [1]: d = s.CSGDebug_Cylinder     
0014 
0015     In [2]: d.shape
0016     Out[2]: (376, 8, 4)
0017 
0018     In [3]: d[0]
0019     Out[3]: 
0020     array([[  -264.   ,      0.   ,   -237.6  ,  69696.   ],
0021            [    -0.001,      0.   ,      1.   ,  56382.508],
0022            [  -264.   ,      0.   ,   -237.45 , 126078.51 ],
0023            [    -0.001,      0.   ,      1.   ,      1.   ],
0024            [     0.   ,      0.   ,      0.3  ,      0.09 ],
0025            [     0.3  ,    -71.235,   -237.277,     -0.323],
0026            [     0.   ,      0.016,     -0.   ,      0.   ],
0027            [    -0.   ,     -0.   ,     -1.   ,    237.277]], dtype=float32)
0028 
0029 **/
0030 
0031 #ifdef DEBUG_CYLINDER
0032 
0033 #include "scuda.h"
0034 #include "plog/Severity.h"
0035 #include <vector>
0036 #include "CSG_API_EXPORT.hh"
0037 
0038 struct CSG_API CSGDebug_Cylinder
0039 {
0040     static constexpr const unsigned NUM_QUAD = 8u ; 
0041     static constexpr const char* NAME = "CSGDebug_Cylinder.npy" ; 
0042 
0043     static const plog::Severity LEVEL ; 
0044     static std::vector<CSGDebug_Cylinder> record ;     
0045     static void Save(const char* dir); 
0046 
0047 
0048     float3 ray_origin ;   // 0 
0049     float rr ; 
0050 
0051     float3 ray_direction ;  // 1 
0052     float k ; 
0053 
0054     float3 m ;             // 2 
0055     float mm ; 
0056 
0057     float3 n ;             // 3 
0058     float nn ;                    // d[:,3,3] all 1, when ray_direction normalized 
0059 
0060     float3 d ;             // 4 
0061     float dd ; 
0062 
0063     float nd ;             // 5        d[:,5,0]    sizeZ or -sizeZ (eg 0.3/-0.3 for the hz 0.15 thin one)    
0064     float md ; 
0065     float mn ;             //          d[:,5,2]
0066     float checkz ;         //          d[:,5,3]
0067  
0068     float a ;              // 6 
0069     float b ; 
0070     float c ;                           
0071     float disc ; 
0072 
0073     float4 isect ;         // 7
0074 };
0075 
0076 #endif