Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CaloWaveFormSim.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CaloWaveFormSim.h
1 #ifndef CALOWAVEFORMSIM_H__
2 #define CALOWAVEFORMSIM_H__
3 
4 #include <fun4all/SubsysReco.h>
5 #include <TTree.h>
6 #include <TRandom3.h>
7 #include <caloreco/CaloWaveformProcessing.h>
10 // Forward declarations
12 class PHCompositeNode;
13 class TFile;
14 class TNtuple;
15 class TTree;
16 
18 {
19  public:
21  CaloWaveFormSim(const std::string &name = "CaloWaveFormSim", const std::string &fname = "MyNtuple.root");
22 
24  virtual ~CaloWaveFormSim();
25 
27  int Init(PHCompositeNode *);
28 
31 
33  int End(PHCompositeNode *);
34 
39  static double template_function(double *x, double *par);
40  static double template_function_ihcal(double *x, double *par);
41  static double template_function_ohcal(double *x, double *par);
42 
43  void Detector(const std::string &name) { detector = name; }
44 
45  protected:
49  TFile *outfile;
50  /* TNtuple *g4hitntuple; */
51  std::vector<float> m_t0;
52  std::vector<float> m_edep;
53  std::vector<float> m_nhits;
54  std::vector<float> m_z0;
55  std::vector<float> m_x0;
56  std::vector<float> m_y0;
57  std::vector<float> m_eta;
58  std::vector<float> m_phi;
59  std::vector<float> m_primid;
60  std::vector<float> m_primpt;
61  std::vector<float> m_primeta;
62  std::vector<float> m_primphi;
63 
64  std::vector<float> m_primtrkid;
65  std::vector<float> m_g4primtrkid;
66  std::vector<float> m_g4primpt;
67  std::vector<float> m_etabin;
68  std::vector<float> m_phibin;
69 
70  std::vector<float> m_geoetabin;
71  std::vector<float> m_geophibin;
72 
73  int m_waveform[24576][16];
74  int m_waveform_ihcal[1536][16];
75  int m_waveform_ohcal[1536][16];
76  int m_ndep[24576];
77  float m_tedep[24576];
78  float m_tedep_ihcal[1536];
79  float m_tedep_ohcal[1536];
80 
81  float m_extractedadc[24576];
82  float m_extractedtime[24576];
83 
84  float m_extractedadc_ihcal[1536];
85  float m_extractedtime_ihcal[1536];
86 
87  float m_extractedadc_ohcal[1536];
88  float m_extractedtime_ohcal[1536];
89 
90  float m_toweradc[24576];
91  float m_toweradc_ihcal[1536];
92  float m_toweradc_ohcal[1536];
93 
94  int m_npeaks_ihcal[1536];
95  int m_npeaks_ohcal[1536];
96 
97 
98  TTree *g4hitntuple;
99  /* TNtuple *g4cellntuple; */
100  /* TNtuple *towerntuple; */
101  /* TNtuple *clusterntuple; */
102 
106 
107  PHG4FullProjSpacalCellReco::LightCollectionModel light_collection_model;
108  TTree* noise_midrad;
109  TTree* noise_lowrad;
110  TTree* noise_norad;
111  float noise_val_midrad[31];
112  float noise_val_lowrad[31];
113  float noise_val_norad[31];
114  TRandom3* rnd;
115 
116 };
117 
118 #endif