Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
caloTreeGen.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file caloTreeGen.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef CALOTREEGEN_H
4 #define CALOTREEGEN_H
5 
6 #include <fun4all/SubsysReco.h>
7 
8 #include <string>
9 #include <vector>
10 #include <TTree.h>
11 
12 class TTree;
13 class PHCompositeNode;
15 class TFile;
16 class RawCluster;
17 class TowerInfoContainer;
18 
19 class caloTreeGen : public SubsysReco
20 {
21  public:
22 
23  caloTreeGen(const std::string &name = "caloTreeGen");
24 
25  ~caloTreeGen() override;
26 
32  int Init(PHCompositeNode *topNode) override;
33 
39  int InitRun(PHCompositeNode *topNode) override;
40 
44  int process_event(PHCompositeNode *topNode) override;
45 
47  int ResetEvent(PHCompositeNode *topNode) override;
48 
50  int EndRun(const int runnumber) override;
51 
53  int End(PHCompositeNode *topNode) override;
54 
56  int Reset(PHCompositeNode * /*topNode*/) override;
57 
58  void Print(const std::string &what = "ALL") const override;
59 
61 
62  void setFineClusters(int fineCluster) {doFineCluster = fineCluster;}
63 
64  private:
65 
66  TTree *T;
67 
68  std::vector<float> m_emcTowPhi;
69  std::vector<float> m_emcTowEta;
70  std::vector<float> m_emcTowE;
71  std::vector<float> m_emcTiming;
72  std::vector<float> m_emciEta;
73  std::vector<float> m_emciPhi;
74 
75  std::vector<float> m_clusterE;
76  std::vector<float> m_clusterPhi;
77  std::vector<float> m_clusterEta;
78  std::vector<float> m_clusterPt;
79  std::vector<float> m_clusterChi;
80  std::vector<float> m_clusterNtow;
81  std::vector<float> m_clusterTowMax;
82  std::vector<float> m_clusterECore;
83 
84  std::vector<std::vector<int> > m_clusTowEta;
85  std::vector<std::vector<int> > m_clusTowPhi;
86  std::vector<std::vector<float> > m_clusTowE;
87 
88 
89  TFile *out;
90  //Fun4AllHistoManager *hm = nullptr;
91  std::string Outfile = "commissioning.root";
92 
93  unsigned int getCaloTowerPhiBin(const unsigned int key);
94  unsigned int getCaloTowerEtaBin(const unsigned int key);
95  float getMaxTowerE(RawCluster *cluster, TowerInfoContainer *towerContainer);
96  std::vector<float> returnClusterTowE(RawCluster *cluster, TowerInfoContainer *towerContainer);
97  std::vector<int> returnClusterTowPhi(RawCluster *cluster, TowerInfoContainer *towerContainer);
98  std::vector<int> returnClusterTowEta(RawCluster *cluster, TowerInfoContainer *towerContainer);
99 
100 ;
101  int doClusters;
102  float totalCaloE;
104 
105 };
106 
107 #endif