Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:11:12

0001 
0002 #ifndef DIJETHISTOMAKER_H
0003 #define DIJETHISTOMAKER_H
0004 
0005 #include <fun4all/SubsysReco.h>
0006 #include <calotrigger/TriggerAnalyzer.h>
0007 #include <string>
0008 #include <array>
0009 #include "TMath.h"
0010 
0011 class TF1;
0012 
0013 class Fun4AllHistoManager;
0014 class PHCompositeNode;
0015 class TowerInfoContainer;
0016 class JetContainer;
0017 class PHG4TruthInfoContainer;
0018 
0019 struct jetty
0020 {
0021   float pt = 0;
0022   float et = 0;
0023   float eta = 0;
0024   float phi = 0;
0025   float iso = 0;
0026   float emcal = 0;
0027   float ihcal = 0;
0028   float ohcal = 0;
0029   float edep = 0;
0030   float edep_em = 0;
0031   float edep_hd = 0;
0032 };
0033 
0034 class DijetHistoMaker : public SubsysReco
0035 {
0036  public:
0037 
0038   DijetHistoMaker(const std::string &name = "DijetHistoMaker", const std::string &outfilename = "histos.root");
0039 
0040   virtual ~DijetHistoMaker();
0041 
0042   int Init(PHCompositeNode *topNode) override;
0043 
0044   int InitRun(PHCompositeNode *topNode) override;
0045 
0046   int process_event(PHCompositeNode *topNode) override;
0047   
0048   void process_truth_jets(JetContainer *jets);
0049 
0050   void GetNodes (PHCompositeNode *topNode);
0051 
0052   int ResetEvent(PHCompositeNode *topNode) override;
0053 
0054   int EndRun(const int runnumber) override;
0055 
0056   int End(PHCompositeNode *topNode) override;
0057 
0058   int Reset(PHCompositeNode * /*topNode*/) override;
0059 
0060   void SetIsSim(bool use) {isSim = use;}
0061   void SetPtCut(float pt) {pt_cut = pt;}
0062   double get_Dr(struct jetty jet1, struct jetty jet2);
0063  private:
0064 
0065 
0066   TriggerAnalyzer *triggeranalyzer{nullptr};;  
0067 
0068   int _verbosity;
0069 
0070   float pt_cut = 4;
0071   float dphi_cut[3] = {TMath::Pi()/2., 3.*TMath::Pi()/4., 7.*TMath::Pi()/8.};
0072   float eta_cut[3] = {0.7, 0.9, 1.1};
0073   float pt_cut1[3] = {10., 20., 30.};
0074   float pt_cut2[3] = {5., 10., 15.};
0075   std::string _foutname;
0076   std::string _nodename;
0077   std::string m_calo_nodename;
0078   int _i_event;
0079   bool isSim{0};
0080   Fun4AllHistoManager *hm{nullptr};
0081   std::array<std::string, 8> m_jet_triggernames;;
0082 
0083   TF1 *fsmear{nullptr};
0084   double isocut = 1.0;
0085 };
0086 
0087 #endif