Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LEDTowerBuilder.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file LEDTowerBuilder.h
1 // -*- C++ -*-.
2 #ifndef LEDTOWERBUILDER_H
3 #define LEDTOWERBUILDER_H
4 
5 #include <fun4all/SubsysReco.h>
7 
8 #include <caloreco/CaloWaveformProcessing.h>
9 
10 #include <phool/PHCompositeNode.h>
11 #include <phool/getClass.h>
12 
13 #include <Event/Event.h>
14 #include <Event/packet.h>
15 
16 #include <TTree.h>
17 #include <TFile.h>
18 
19 #include <iostream>
20 #include <string>
21 
22 class LEDTowerBuilder : public SubsysReco {
23  public:
24 
25  LEDTowerBuilder(const std::string &name = "LEDTowerBuilder");
26  ~LEDTowerBuilder() override;
27 
28  int InitRun(PHCompositeNode *topNode) override;
29  int process_event(PHCompositeNode *topNode) override;
30  int End(PHCompositeNode *topNode) override;
31 
33  CEMC = 0,
34  HCALIN = 1,
35  HCALOUT = 2,
36  EPD = 3
37  };
38 
40  m_dettype = dettype;
41  return;
42  }
43 
44  void set_nsamples(int _nsamples) {
45  m_nsamples = _nsamples;
46  return;
47  }
48  void set_dataflag(bool flag) {
49  m_isdata = flag;
50  return;
51  }
52 
53  private:
54 
62  bool m_isdata;
63  int m_event;
64 
65  TTree *tOut;
66  std::vector<float> m_adc;
67  std::vector<float> m_ped;
68  std::vector<float> m_time;
69  std::vector<int> m_chan;
70  std::vector<std::vector<float>> m_waveforms;
72 };
73 
74 #endif // LEDTOWERBUILDER_H