Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:21:36

0001 #ifndef CALOANA_H__
0002 #define CALOANA_H__
0003 
0004 #include <fun4all/SubsysReco.h>
0005 
0006 // Forward declarations
0007 class Fun4AllHistoManager;
0008 class PHCompositeNode;
0009 class TFile;
0010 class TNtuple;
0011 
0012 class CaloAna : public SubsysReco
0013 {
0014  public:
0015   //! constructor
0016   CaloAna(const std::string &name = "CaloAna", const std::string &fname = "MyNtuple.root");
0017 
0018   //! destructor
0019   virtual ~CaloAna();
0020 
0021   //! full initialization
0022   int Init(PHCompositeNode *);
0023 
0024   //! event processing method
0025   int process_event(PHCompositeNode *);
0026 
0027   //! end of run method
0028   int End(PHCompositeNode *);
0029 
0030   int process_g4hits(PHCompositeNode *);
0031   int process_g4cells(PHCompositeNode *);
0032   int process_towers(PHCompositeNode *);
0033   int process_clusters(PHCompositeNode *);
0034 
0035   void Detector(const std::string &name) { detector = name; }
0036 
0037  protected:
0038   std::string detector;
0039   std::string outfilename;
0040   Fun4AllHistoManager *hm = nullptr;
0041   TFile *outfile = nullptr;
0042   TNtuple *g4hitntuple = nullptr;
0043   TNtuple *g4cellntuple = nullptr;
0044   TNtuple *towerntuple = nullptr;
0045   TNtuple *clusterntuple = nullptr;
0046 };
0047 
0048 #endif