Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-10 07:49:39

0001 #pragma once
0002 
0003 #include <string>
0004 #include "QUDARAP_API_EXPORT.hh"
0005 #include "plog/Severity.h"
0006 
0007 struct float4 ; 
0008 struct NP ; 
0009 template <typename T> struct QCK ; 
0010 
0011 
0012 /**
0013 QCerenkovIntegral : creates set of ICDF for many different BetaInverse values
0014 ================================================================================
0015 
0016 TODO : this integration is not using CUDA at all...  so  this and QCK needs to be moved elsewhere, maybe SCerenkovIntegral, SCK ?
0017 That will enable Cerenkov ICDF creation pre-cache in CSG_GGeo
0018 
0019 Prototyping/experimentation done in ana/rindex.py 
0020 **/
0021 
0022 struct QUDARAP_API QCerenkovIntegral
0023 {
0024     static const plog::Severity LEVEL ; 
0025     static const char* DEFAULT_PATH ; 
0026     static const double FINE_STRUCTURE_OVER_HBARC_EVMM ; 
0027 
0028     static const unsigned UPPERCUT_PAYLOAD_SIZE ; 
0029     static const unsigned SPLITBIN_PAYLOAD_SIZE ; 
0030 
0031     enum { NONE, UNCUT, CUT, SUB, FULL, PART, ERR };  
0032 
0033     static const char* NONE_ ; 
0034     static const char* UNCUT_ ; 
0035     static const char* CUT_ ; 
0036     static const char* SUB_ ; 
0037     static const char* FULL_ ; 
0038     static const char* PART_ ; 
0039     static const char* ERR_ ; 
0040 
0041     static const char* State(int state); 
0042 
0043 
0044     const char*             path ; 
0045     NP*                     dsrc ;  // RINDEX array 
0046     NP*                     src ; 
0047 
0048     double                  emn ; 
0049     double                  emx ; 
0050     double                  rmn ; 
0051     double                  rmx ; 
0052 
0053 
0054     QCerenkovIntegral(const char* rindex_path=nullptr); 
0055     void init(); 
0056 
0057 
0058     std::string desc() const ; 
0059     template <typename T> NP* GetAverageNumberOfPhotons_s2_(T& emin,  T& emax, const T BetaInverse, const T  charge ) const ; 
0060     template <typename T> T   GetAverageNumberOfPhotons_s2(T& emin,  T& emax, const T BetaInverse, const T  charge ) const ; 
0061     template <typename T> NP* getAverageNumberOfPhotons_s2( const NP* bis ) const ; 
0062 
0063     // fixed bin subdiv, wastes bins but its simpler and should avoid slight non-monotonic issue
0064     template<typename T> unsigned getNumEdges_SplitBin(unsigned mul ) const ;
0065     template <typename T> NP* getS2Integral_SplitBin( const NP* bis, unsigned mul, bool dump ) const ; 
0066     template <typename T> NP* getS2Integral_SplitBin(const T BetaInverse, unsigned mul, bool dump ) const ; 
0067     template <typename T> QCK<T> makeICDF_SplitBin( unsigned ny, unsigned mul, bool dump ) const ; 
0068 
0069 
0070     template <typename T> T   getS2Integral_WithCut(  T& emin, T& emax, T BetaInverse, T en_a, T en_b, bool dump ) const  ; 
0071     template <typename T> NP* getS2Integral_WithCut_( T& emin, T& emax, T BetaInverse, T en_a, T en_b, bool dump ) const  ; 
0072     template <typename T> static T GetS2Integral_WithCut( T& emin, T& emax,  T BetaInverse,  T en_0,  T en_1 ,  T ri_0,  T ri_1, T en_a, T ri_a, T en_b, T ri_b, bool dump ) ; 
0073 
0074     template <typename T> T getS2( const T BetaInverse, const T en ) const ; 
0075 
0076     template <typename T> NP* getS2Integral_UpperCut( const T BetaInverse, unsigned nx ) const ; 
0077     template <typename T> NP* getS2Integral_UpperCut( const NP* bis, unsigned nx ) const  ; 
0078     template <typename T> QCK<T> makeICDF_UpperCut( unsigned ny, unsigned nx, bool dump ) const ; 
0079 
0080 };
0081 
0082