Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:13:05

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef ISOCLUSTER_H
0004 #define ISOCLUSTER_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <string>
0009 
0010 #include <vector>
0011 
0012 class PHCompositeNode;
0013 class TFile;
0014 class TTree;
0015 
0016 class isoCluster : public SubsysReco
0017 {
0018  public:
0019 
0020   isoCluster(const std::string &name = "isoCluster");
0021 
0022   ~isoCluster() override;
0023 
0024   /** Called during initialization.
0025       Typically this is where you can book histograms, and e.g.
0026       register them to Fun4AllServer (so they can be output to file
0027       using Fun4AllServer::dumpHistos() method).
0028    */
0029   int Init(PHCompositeNode *topNode) override;
0030 
0031   /** Called for first event when run number is known.
0032       Typically this is where you may want to fetch data from
0033       database, because you know the run number. A place
0034       to book histograms which have to know the run number.
0035    */
0036   int InitRun(PHCompositeNode *topNode) override;
0037 
0038   /** Called for each event.
0039       This is where you do the real work.
0040    */
0041   int process_event(PHCompositeNode *topNode) override;
0042 
0043   /// Clean up internals after each event.
0044   int ResetEvent(PHCompositeNode *topNode) override;
0045 
0046   /// Called at the end of each run.
0047   int EndRun(const int runnumber) override;
0048 
0049   /// Called at the end of all processing.
0050   int End(PHCompositeNode *topNode) override;
0051 
0052   /// Reset
0053   int Reset(PHCompositeNode * /*topNode*/) override;
0054 
0055   void Print(const std::string &what = "ALL") const override;
0056 
0057   void setGenEvent(int eventGet)     {getEvent = eventGet;}
0058 
0059  private:
0060 
0061   TTree *T;
0062   //cluster information
0063   std::vector<float> m_clusterPhi;
0064   std::vector<float> m_clusterEta;
0065   std::vector<float> m_clusterE;
0066   std::vector<float> m_clusterPt;
0067   std::vector<float> m_clusterEtIso;
0068   std::vector<float> m_clusterChisq;
0069   
0070   //truth particle information
0071   std::vector<float> m_photonPhi;
0072   std::vector<float> m_photonEta;
0073   std::vector<float> m_photonE;
0074   std::vector<float> m_photonPt;
0075 
0076   TFile *fout;
0077   std::string outname;
0078   int getEvent;
0079 };
0080 
0081 #endif // ISOCLUSTER_H