Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-12-18 09:20:28

0001 #ifndef G4HISTOS_G4EDEPNTUPLE_H
0002 #define G4HISTOS_G4EDEPNTUPLE_H
0003 
0004 #include <fun4all/SubsysReco.h>
0005 
0006 #include <map>
0007 #include <set>
0008 #include <string>
0009 
0010 // Forward declerations
0011 class Fun4AllHistoManager;
0012 class PHCompositeNode;
0013 class TFile;
0014 class TNtuple;
0015 
0016 class G4EdepNtuple : public SubsysReco
0017 {
0018  public:
0019   //! constructor
0020   G4EdepNtuple(const std::string &name = "G4EdepNtuple", const std::string &filename = "G4EdepNtuple.root");
0021 
0022   //! destructor
0023   ~G4EdepNtuple() override;
0024 
0025   //! full initialization
0026   int Init(PHCompositeNode *) override;
0027 
0028   //! event processing method
0029   int process_event(PHCompositeNode *) override;
0030 
0031   //! end of run method
0032   int End(PHCompositeNode *) override;
0033 
0034   void AddNode(const std::string &name, const int detid = 0);
0035 
0036  private:
0037   Fun4AllHistoManager *hm{nullptr};
0038   std::string _filename;
0039   std::set<std::string> _node_postfix;
0040   std::map<std::string, int> _detid;
0041   TNtuple *ntup{nullptr};
0042   TFile *outfile{nullptr};
0043 };
0044 
0045 #endif