Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HCalCalibTree.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file HCalCalibTree.h
1 // Tell emacs that this is a C++ source
2 // -*- C++ -*-.
3 #ifndef HCALCALIBTREE_H
4 #define HCALCALIBTREE_H
5 
6 #include <fun4all/SubsysReco.h>
7 #include <vector>
8 #include <array>
9 #include "TH2F.h"
10 
11 // Forward declarations
13 class PHCompositeNode;
14 class TFile;
15 class TH1F;
16 
17 class HCalCalibTree : public SubsysReco
18 {
19 public:
21  HCalCalibTree(const std::string &name = "HCalCalibTree", const std::string &fname = "HCalCalibtuple.root", const std::string &prefix = "TOWERSV2_");
23  virtual ~HCalCalibTree();
24 
26  int Init(PHCompositeNode *) override;
27  int process_event(PHCompositeNode *) override;
29  int ResetEvent(PHCompositeNode *topNode) override;
30  int End(PHCompositeNode *) override;
31 
32  void Detector(const std::string &name) { detector = name; }
33  void TowerPrefix(const std::string &name) { prefix = name; }
34 
35 protected:
38 
39  Fun4AllHistoManager *hm = nullptr;
40 
41  // HCal geometry
42  static const int n_etabin = 24;
43  static const int n_phibin = 64;
44 
45  // Cut threshold
47 
48  const float tower_threshold_data = 500;
49  const float vert_threshold_data = 1500;
50  const float veto_threshold_data = 350;
51 
52  const float tower_threshold_sim = 0.001767; //283 ADC/MeV
53  const float vert_threshold_sim = 0.0053;
54  const float veto_threshold_sim = 0.001237;
55 
56  TH1F* h_channel_hist[n_etabin][n_phibin] = {{nullptr}};
57  TH2F* h_waveformchi2 = nullptr;
58  TH1F* h_check = nullptr;
60 
62 
63  int event;
64  int goodevent;
66 
69 
70  TFile *outfile;
71 };
72 
73 #endif // HCALCALIBTREE_H