Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:11:06

0001 #ifndef TimingNtuple_h__
0002 #define TimingNtuple_h__
0003 
0004 #include <fun4all/SubsysReco.h>
0005 #include <map>
0006 #include <set>
0007 #include <string>
0008 #include <vector>
0009 
0010 // Forward declerations
0011 class Fun4AllHistoManager;
0012 class PHCompositeNode;
0013 class PHG4Hit;
0014 class TFile;
0015 class TH1;
0016 class TH2;
0017 class TNtuple;
0018 
0019 class TimingNtuple: public SubsysReco
0020 {
0021  public:
0022 
0023   //! constructor
0024   TimingNtuple( const std::string &name = "TimingNtuple", const std::string &filename = "TimingNtuple.root" );
0025 
0026   //! destructor
0027   virtual ~TimingNtuple();
0028 
0029   //! full initialization
0030   int Init(PHCompositeNode *);
0031 
0032   //! event processing method
0033   int process_event(PHCompositeNode *);
0034 
0035   //! end of run method
0036   int End(PHCompositeNode *);
0037 
0038   void AddNode(const std::string &name, const int detid=0);
0039 
0040 protected:
0041   double get_dtotal(const PHG4Hit *hit, const double phi, const double theta);
0042   int nblocks;
0043   Fun4AllHistoManager *hm;
0044   std::vector<TH1 *> nhits;
0045   std::vector<TH1 *> eloss;
0046   //  std::vector<TH2 *> nhit_edep;
0047   std::string _filename;
0048   std::set<std::string> _node_postfix;
0049   std::map<std::string, int> _detid;
0050   TNtuple *ntup;
0051   TNtuple *ntupt;
0052   TFile *outfile;
0053 };
0054 
0055 #endif