Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef JETVALIDATIONv2_H
0004 #define JETVALIDATIONv2_H
0005 
0006 #include <fun4all/SubsysReco.h>
0007 
0008 #include <string>
0009 #include <vector>
0010 
0011 #include <TH2.h>
0012 #include <TH3.h>
0013 
0014 #include <calotrigger/TriggerAnalyzer.h>
0015 
0016 class PHCompositeNode;
0017 class TFile;
0018 
0019 class JetValidationv2 : public SubsysReco
0020 {
0021  public:
0022   JetValidationv2();
0023 
0024   ~JetValidationv2() override;
0025 
0026   /** Called during initialization.
0027       Typically this is where you can book histograms, and e.g.
0028       register them to Fun4AllServer (so they can be output to file
0029       using Fun4AllServer::dumpHistos() method).
0030    */
0031   Int_t Init(PHCompositeNode *topNode) override;
0032 
0033   /** Called for each event.
0034       This is where you do the real work.
0035    */
0036   Int_t process_event(PHCompositeNode *topNode) override;
0037 
0038   /// Clean up internals after each event.
0039   Int_t ResetEvent(PHCompositeNode *topNode) override;
0040 
0041   /// Called at the end of all processing.
0042   Int_t End(PHCompositeNode *topNode) override;
0043 
0044   void set_outputFile(const std::string &m_outputFile) {
0045     this->m_outputFile = m_outputFile;
0046   }
0047 
0048   void set_zvtx_max(Float_t m_zvtx_max) {
0049     this->m_zvtx_max = m_zvtx_max;
0050   }
0051 
0052   void set_trigger(Int_t m_triggerBit) {
0053     this->m_triggerBit = m_triggerBit;
0054   }
0055 
0056   void set_pt_background(Float_t m_pt_background) {
0057     this->m_pt_background = m_pt_background;
0058   }
0059 
0060  private:
0061   std::string m_recoJetName_r04;
0062 
0063   std::string m_emcTowerBaseNode;
0064   std::string m_emcTowerNode;
0065   std::string m_ihcalTowerNode;
0066   std::string m_ohcalTowerNode;
0067 
0068   std::string m_outputFile;
0069 
0070   Int_t m_triggerBit;
0071   Int_t m_triggerBits;
0072   Float_t m_zvtx_max;
0073 
0074   UInt_t  m_bins_phi;
0075   UInt_t  m_bins_phi_cemc;
0076   Float_t m_phi_low;
0077   Float_t m_phi_high;
0078 
0079   UInt_t  m_bins_eta;
0080   UInt_t  m_bins_eta_cemc;
0081   Float_t m_eta_low;
0082   Float_t m_eta_high;
0083 
0084   UInt_t  m_bins_pt;
0085   Float_t m_pt_low;
0086   Float_t m_pt_high;
0087   Float_t m_pt_background;
0088 
0089   UInt_t  m_bins_zvtx;
0090   Float_t m_zvtx_low;
0091   Float_t m_zvtx_high;
0092 
0093   UInt_t m_bins_frac;
0094   Float_t m_frac_low;
0095   Float_t m_frac_high;
0096 
0097   UInt_t m_bins_ET;
0098   Float_t m_ET_low;
0099   Float_t m_ET_high;
0100 
0101   UInt_t m_bins_constituents;
0102   Float_t m_constituents_low;
0103   Float_t m_constituents_high;
0104 
0105   UInt_t m_bins_nJets;
0106   Float_t m_nJets_low;
0107   Float_t m_nJets_high;
0108 
0109   UInt_t  m_event;
0110   Float_t m_R;
0111 
0112   Int_t m_nJets_min;
0113   Int_t m_nJets_max;
0114 
0115   Int_t m_constituents_min;
0116   Int_t m_constituents_max;
0117 
0118   Int_t m_pt_min;
0119   Int_t m_pt_max;
0120 
0121   enum m_status {ALL, ZVTX30, ZVTX30_BKG
0122                             , ZVTX30_BKG_failsLoEmJetCut
0123                             , ZVTX30_BKG_failsHiEmJetCut
0124                             , ZVTX30_BKG_failsIhJetCut
0125                             , ZVTX30_BKG_failsNoneJetCut
0126                 };
0127 
0128   std::vector<std::string> m_eventStatus = {"All", "|z| < 30 cm"
0129                                                  , "|z| < 30 cm and Bkg"
0130                                                  , "|z| < 30 cm and Bkg and failsLoEmJetCut"
0131                                                  , "|z| < 30 cm and Bkg and failsHiEmJetCut"
0132                                                  , "|z| < 30 cm and Bkg and failsIhJetCut"
0133                                                  , "|z| < 30 cm and Bkg and failsNoneJetCut"
0134                                            };
0135 
0136   TriggerAnalyzer* m_triggeranalyzer = nullptr;
0137 
0138   TH1* hEvents = nullptr;
0139   TH1* hzvtxAll = nullptr;
0140   TH3* hjetPhiEtaPt = nullptr;
0141   TH2* hjetConstituentsVsPt = nullptr;
0142   TH2* hNJetsVsLeadPt = nullptr;
0143   TH2* h2ETVsFracCEMC = nullptr;
0144   TH2* h2FracOHCalVsFracCEMC = nullptr;
0145   TH2* h2ETVsFracCEMC_miss = nullptr;
0146   TH2* h2FracOHCalVsFracCEMC_miss = nullptr;
0147   std::vector<TH2*> hCEMCBase;
0148   std::vector<TH2*> hCEMC;
0149   std::vector<TH2*> hIHCal;
0150   std::vector<TH2*> hOHCal;
0151 };
0152 
0153 #endif  // JETVALIDATIONv2_H