Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef JETKINEMATICCHECK_H
0004 #define JETKINEMATICCHECK_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <string>
0009 
0010 // New headers
0011 
0012 
0013 #include <vector>
0014 
0015 class TH1;
0016 class TH2;
0017 class TH3;
0018 
0019 class PHCompositeNode;
0020 
0021 class JetKinematicCheck : public SubsysReco
0022 {
0023  public:
0024 
0025   JetKinematicCheck(const std::string &recojetnameR02 = "AntiKt_Tower_r02",
0026             const std::string &recojetnameR03 = "AntiKt_Tower_r03",
0027             const std::string &recojetnameR04 = "AntiKt_Tower_r04",
0028             const std::string &outputfilename = "JetKinematicCheck");
0029 
0030   ~JetKinematicCheck() override;
0031 
0032   // set eta range
0033   void setEtaRange(double low, double high)
0034   {
0035     m_etaRange.first = low;
0036     m_etaRange.second = high;
0037   }
0038 
0039   // set pt range
0040   void setPtRange(double low, double high)
0041   {
0042     m_ptRange.first = low;
0043     m_ptRange.second = high;
0044   }
0045 
0046 
0047 
0048   // std::vector<std::string>GetCentLabels();
0049   //std::vector<int>GetMarkerColors();
0050 
0051 
0052 
0053 
0054   /** Called during initialization.
0055       Typically this is where you can book histograms, and e.g.
0056       register them to Fun4AllServer (so they can be output to file
0057       using Fun4AllServer::dumpHistos() method).
0058    */
0059   int Init(PHCompositeNode *topNode) override;
0060 
0061   /** Called for first event when run number is known.
0062       Typically this is where you may want to fetch data from
0063       database, because you know the run number. A place
0064       to book histograms which have to know the run number.
0065    */
0066   int InitRun(PHCompositeNode *topNode) override;
0067 
0068   /** Called for each event.
0069       This is where you do the real work.
0070    */
0071   int process_event(PHCompositeNode *topNode) override;
0072 
0073   /// Clean up internals after each event.
0074   int ResetEvent(PHCompositeNode *topNode) override;
0075 
0076   /// Called at the end of each run.
0077   int EndRun(const int runnumber) override;
0078 
0079   /// Called at the end of all processing.
0080   int End(PHCompositeNode *topNode) override;
0081 
0082   /// Reset
0083   int Reset(PHCompositeNode * /*topNode*/) override;
0084 
0085   void Print(const std::string &what = "ALL") const override;
0086 
0087  private:
0088 
0089 
0090   std::string m_recoJetNameR02;
0091   std::string m_recoJetNameR03;
0092   std::string m_recoJetNameR04;
0093   std::string m_outputFileName;
0094   std::pair<double, double> m_etaRange;
0095   std::pair<double, double> m_ptRange;
0096 
0097   // reconstructed jets
0098   std::vector<float> m_eta;
0099   std::vector<float> m_phi;
0100   std::vector<float> m_pt;
0101   std::vector<float> m_radii;
0102 
0103   // output histograms
0104   TH1 *jet_spectra_r02 = nullptr;
0105   TH1 *jet_spectra_r03 = nullptr;
0106   TH1 *jet_spectra_r04 = nullptr;
0107   TH2 *jet_eta_phi_r02 = nullptr;
0108   TH2 *jet_eta_phi_r03 = nullptr;
0109   TH2 *jet_eta_phi_r04 = nullptr;
0110   TH2 *jet_mass_pt_r02 = nullptr;
0111   TH1 *jet_mass_pt_1D_r02 = nullptr;
0112   TH2 *jet_mass_pt_r03 = nullptr;
0113   TH1 *jet_mass_pt_1D_r03 = nullptr;
0114   TH2 *jet_mass_pt_r04 = nullptr;
0115   TH1 *jet_mass_pt_1D_r04 = nullptr;
0116   TH2 *jet_mass_eta_r02 = nullptr;
0117   TH1 *jet_mass_eta_1D_r02 = nullptr;
0118   TH2 *jet_mass_eta_r03 = nullptr;
0119   TH1 *jet_mass_eta_1D_r03 = nullptr;
0120   TH2 *jet_mass_eta_r04 = nullptr;
0121   TH1 *jet_mass_eta_1D_r04 = nullptr;
0122 
0123 };
0124 
0125 #endif // JETKINEMATICCHECK_H