Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TimingNtuple.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file TimingNtuple.h
1 #ifndef TimingNtuple_h__
2 #define TimingNtuple_h__
3 
4 #include <fun4all/SubsysReco.h>
5 #include <map>
6 #include <set>
7 #include <string>
8 #include <vector>
9 
10 // Forward declerations
12 class PHCompositeNode;
13 class PHG4Hit;
14 class TFile;
15 class TH1;
16 class TH2;
17 class TNtuple;
18 
19 class TimingNtuple: public SubsysReco
20 {
21  public:
22 
24  TimingNtuple( const std::string &name = "TimingNtuple", const std::string &filename = "TimingNtuple.root" );
25 
27  virtual ~TimingNtuple();
28 
30  int Init(PHCompositeNode *);
31 
34 
36  int End(PHCompositeNode *);
37 
38  void AddNode(const std::string &name, const int detid=0);
39 
40 protected:
41  double get_dtotal(const PHG4Hit *hit, const double phi, const double theta);
42  int nblocks;
44  std::vector<TH1 *> nhits;
45  std::vector<TH1 *> eloss;
46  // std::vector<TH2 *> nhit_edep;
48  std::set<std::string> _node_postfix;
49  std::map<std::string, int> _detid;
50  TNtuple *ntup;
51  TNtuple *ntupt;
52  TFile *outfile;
53 };
54 
55 #endif