Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HitCountNtuple.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file HitCountNtuple.h
1 #ifndef HitCountNtuple_h__
2 #define HitCountNtuple_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 TFile;
14 class TH1;
15 class TH2;
16 class TNtuple;
17 
19 {
20  public:
21 
23  HitCountNtuple( const std::string &name = "HitCountNtuple", const std::string &filename = "HitCountNtuple.root" );
24 
26  virtual ~HitCountNtuple();
27 
29  int Init(PHCompositeNode *);
30 
33 
35  int End(PHCompositeNode *);
36 
37  void AddNode(const std::string &name, const int detid=0);
38 
39 protected:
40  int nblocks;
42  std::vector<TH1 *> nhits;
43  std::vector<TH1 *> eloss;
44  // std::vector<TH2 *> nhit_edep;
46  std::set<std::string> _node_postfix;
47  std::map<std::string, int> _detid;
48  TNtuple *ntup;
49  TNtuple *ntupe;
50  TFile *outfile;
51 };
52 
53 #endif