File indexing completed on 2025-08-03 08:15:32
0001 #ifndef CALOANA_H__
0002 #define CALOANA_H__
0003
0004 #include <fun4all/SubsysReco.h>
0005 #include <vector>
0006
0007 class Fun4AllHistoManager;
0008 class PHCompositeNode;
0009 class TFile;
0010 class TNtuple;
0011 class TTree;
0012 class TH2F;
0013
0014 class CaloAna : public SubsysReco
0015 {
0016 public:
0017
0018 CaloAna(const std::string &name = "CaloAna", const std::string &fname = "MyNtuple.root", float zero_sup = 2);
0019
0020
0021 virtual ~CaloAna();
0022
0023
0024 int Init(PHCompositeNode *);
0025
0026
0027 int process_event(PHCompositeNode *);
0028
0029
0030 int End(PHCompositeNode *);
0031
0032 int process_g4hits(PHCompositeNode *);
0033 int process_g4cells(PHCompositeNode *);
0034 int process_towers(PHCompositeNode *);
0035 int process_clusters(PHCompositeNode *);
0036
0037
0038 void Detector(const std::string &name) { detector = name; }
0039
0040 protected:
0041 std::string detector;
0042 std::string m_outputFileName;
0043 std::string m_histoFileName;
0044 Fun4AllHistoManager *hm = nullptr;
0045 TFile *outfile = nullptr;
0046 TNtuple *g4hitntuple = nullptr;
0047 TNtuple *g4cellntuple = nullptr;
0048 TTree *towerntuple = nullptr;
0049 TNtuple *clusterntuple = nullptr;
0050 std::vector<float> m_energy;
0051 std::vector<int> m_etabin;
0052 std::vector<int> m_phibin;
0053 std::vector<float> m_waveform[31];
0054
0055 float min_energy;
0056 int num_channels;
0057 int m_event;
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075 };
0076
0077 #endif