Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #pragma once
0002 /**
0003   QMultiFilm.hh
0004   ===============
0005 
0006   For the 3 PMT Types : boundary * resolution * wavelength * aoi * payload 
0007 
0008  **/
0009 
0010 #include <string>
0011 #include <vector>
0012 #include "QUDARAP_API_EXPORT.hh"
0013 #include "plog/Severity.h"
0014 
0015 union quad;
0016 struct quad2;
0017 struct dim3 ; 
0018 struct NP ; 
0019 struct float4;
0020 struct qmultifilm ;
0021 template <typename T> struct QTex ; 
0022 
0023 struct QUDARAP_API QMultiFilm
0024 {
0025     static const plog::Severity LEVEL ; 
0026     static const QMultiFilm*        INSTANCE ; 
0027     static const QMultiFilm*        Get(); 
0028 
0029     const NP*      dsrc ; 
0030     const NP*      src ; 
0031     QTex<float4>* tex_nnvt_normal[2];
0032     QTex<float4>* tex_nnvt_highqe[2];
0033     QTex<float4>* tex_hama[2];
0034 
0035     qmultifilm*   multifilm ;
0036     qmultifilm*   d_multifilm ;
0037 
0038     /* 2: resolution dimension (normal fine)    */
0039 
0040     void makeMultiFilmAllTex();
0041     void makeMultiFilmOnePMTTex(int pmtcatIdx , QTex<float4> ** tex_pmt);
0042     QTex<float4>* makeMultiFilmOneTex(int pmtcatIdx , int resIdx);
0043 
0044 
0045     QMultiFilm(const NP* lut ); 
0046 
0047     void init(); 
0048     void uploadMultifilmlut();
0049     qmultifilm* getDevicePtr() const;
0050     std::string desc() const ; 
0051 
0052     void configureLaunch( dim3& numBlocks, dim3& threadsPerBlock, unsigned width, unsigned height );
0053 
0054     void check();
0055     void check(QTex<float4>* tex);
0056     NP*  lookup(int pmtcatIdx ,int resIdx);
0057     NP*  lookup(QTex<float4>* tex);
0058 
0059     void lookup( QTex<float4>* tex, float4* lookup, unsigned num_lookup, unsigned width, unsigned height); 
0060     void dump(   float4* lookup, unsigned num_lookup, unsigned edgeitems=10 ); 
0061 
0062     //float4 multifilm_lookup( unsigned pmtType, unsigned boundary, float nm, float aoi );
0063     QTex<float4> ** choose_tex(int pmtcatIdx);
0064 
0065     NP* mock_lookup(NP* input_arr);
0066     void mock_lookup(quad2* d_input, float4* d_out, unsigned num_lookup, unsigned width, unsigned height);
0067 };
0068 
0069