Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CaloWaveformProcessing.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CaloWaveformProcessing.h
1 #ifndef CALORECO_CALOWAVEFORMPROCESSING_H
2 #define CALORECO_CALOWAVEFORMPROCESSING_H
3 
4 #include <fun4all/SubsysReco.h>
5 
6 #include <string>
7 #include <vector>
8 
10 
12 {
13  public:
14  enum process
15  {
16  NONE = 0,
17  TEMPLATE = 1,
18  ONNX = 2,
19  FAST = 3,
20  };
21 
22  CaloWaveformProcessing() = default;
23  ~CaloWaveformProcessing() override;
24 
26  {
27  m_processingtype = modelno;
28  return;
29  }
30 
32  {
33  return m_processingtype;
34  }
35 
36  void set_template_file(const std::string &template_input_file)
37  {
38  m_template_input_file = template_input_file;
39  return;
40  }
41 
42  void set_template_name(const std::string &template_name)
43  {
44  m_template_name = template_name;
45  return;
46  }
47  void set_model_file(const std::string &model_name)
48  {
49  m_model_name = model_name;
50  return;
51  }
52 
53  void set_nthreads(int nthreads);
54 
55  int get_nthreads();
56 
57  void set_softwarezerosuppression(bool usezerosuppression,int softwarezerosuppression)
58  {
59  _nsoftwarezerosuppression = softwarezerosuppression;
60  _bdosoftwarezerosuppression = usezerosuppression;
61  }
62 
63 
64  std::vector<std::vector<float>> process_waveform(std::vector<std::vector<float>> waveformvector);
65  std::vector<std::vector<float>> calo_processing_ONNX(std::vector<std::vector<float>> chnlvector);
66 
67  void initialize_processing();
68 
69  private:
71 
73  int _nthreads = 1;
76 
80 
82  std::string m_model_name = "CEMC_ONNX";
83 };
84 #endif