Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef THIRDJETSPECTRA_H
0004 #define THIRDJETSPECTRA_H
0005 #pragma GCC diagnostic push
0006 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
0007 
0008 #include <fun4all/SubsysReco.h>
0009 #include <fun4all/Fun4AllBase.h>
0010 #include <fun4all/SubsysReco.h>
0011 #include <fun4all/Fun4AllReturnCodes.h>
0012 #include <ffaobjects/EventHeaderv1.h>
0013 #include <Event/Event.h>
0014 #include <Event/EventTypes.h>
0015 #include <phool/phool.h>
0016 #include <phool/getClass.h>
0017 #include <phool/PHCompositeNode.h>
0018 #include <phool/PHObject.h>
0019 
0020 //pythia 
0021 #include <phpythia8/PHPythia8.h>
0022 #include <phpythia8/PHPy8JetTrigger.h>
0023 
0024 //HEPMC nneded files
0025 #include <phhepmc/PHHepMCGenEvent.h>
0026 #include <phhepmc/PHHepMCGenEventMap.h>
0027 #include <HepMC/GenEvent.h>
0028 
0029 //g4 packages 
0030 #include <g4main/PHG4VtxPoint.h>
0031 #include <g4main/PHG4TruthInfoContainer.h>
0032 #include <g4main/PHG4Particle.h>
0033 #include <g4main/PHG4Hit.h>
0034 #include <g4main/PHG4HitContainer.h>
0035 //
0036 //fastJet 
0037 #include <jetbase/JetContainer.h>
0038 #include <jetbase/Jet.h>
0039 #include <jetbase/JetAlgo.h>
0040 #include <jetbase/FastJetAlgo.h>
0041 #include <fastjet/JetDefinition.hh>
0042 #include <fastjet/PseudoJet.hh>
0043 
0044 ////c++
0045 #include <string>
0046 #include <vector>
0047 #include <map>
0048 #include <math.h>
0049 #include <algorithm>
0050 
0051 //Root
0052 #include <TH1.h>
0053 #include <TH2.h>
0054 #include <TH3.h>
0055 #include <TFile.h>
0056 //homebrew 
0057 #include <largerlenc/DijetEventCuts.h> //prebuilt dijet cut object 
0058 
0059 //#define PI 3.14159265; //defined this in the dijet event cuts
0060 class PHCompositeNode;
0061 class Jet;
0062 class JetContainer;
0063 
0064 class ThirdJetSpectra : public SubsysReco
0065 {
0066    public:
0067 
0068     ThirdJetSpectra(std::string numb = "0", const std::string &name = "ThirdJetSpectra");
0069     ~ThirdJetSpectra() override;
0070 
0071     /** Called during initialization.
0072     Typically this is where you can book histograms, and e.g.
0073     register them to Fun4AllServer (so they can be output to file
0074     using Fun4AllServer::dumpHistos() method).
0075     */
0076     int Init(PHCompositeNode *topNode) override;
0077 
0078     /** Called for first event when run number is known.
0079     Typically this is where you may want to fetch data from
0080     database, because you know the run number. A place
0081     to book histograms which have to know the run number.
0082     */
0083     int InitRun(PHCompositeNode *topNode) override;
0084 
0085     /** Called for each event.
0086     This is where you do the real work.
0087     */
0088     int process_event(PHCompositeNode *topNode) override;
0089 
0090     /// Clean up internals after each event.
0091     int ResetEvent(PHCompositeNode *topNode) override;
0092 
0093     /// Called at the end of each run.
0094     int EndRun(const int runnumber) override;
0095 
0096     /// Called at the end of all processing.
0097     int End(PHCompositeNode *topNode) override;
0098 
0099     /// Reset
0100     int Reset(PHCompositeNode * /*topNode*/) override;
0101 
0102     void Print(const std::string &what = "ALL") const override;
0103 
0104    private:
0105     std::vector<fastjet::PseudoJet> findAllJets(HepMC::GenEvent* e1);
0106     void getJetTripplet(JetContainerv1*, std::vector<Jetv2*>*, bool);
0107     void getJetPair(JetContainerv1*, std::vector<Jetv2*>*, bool);
0108     
0109     TH1F* xj, *xj_strict, *xj_onl, *xj_strict_onl;
0110     TH1F* first_jet_pt, *second_jet_pt, *third_jet_pt;
0111     TH1F* first_jet_phi, *second_jet_phi, *third_jet_phi;
0112     TH1F* first_jet_eta, *second_jet_eta, *third_jet_eta;
0113     TH1F* first_jet_E, *second_jet_E, *third_jet_E;
0114     TH1F* dphi_12, *dphi_13, *dphi_23;
0115     TH1F* xj_12, *xj_13, *xj_23;
0116     TH1F* xj_strict_12, *xj_strict_13, *xj_strict_23;
0117     TH1F* third_jet_pt_dec, *third_jet_pt_dec_strict;
0118     TH1F* decorr, *decorr_strict;
0119     TH2F* third_jet_pt_dec_n, *third_jet_pt_dec_strict_n;
0120     TH3F* dphi_123, *pt_123;
0121     DijetEventCuts* DiJEC, *DiJEC_strict; 
0122     int n_evts=0, n_three=0, n_try=0;
0123     std::string segment_numb;
0124 };
0125 
0126     #endif // THIRDJETSPECTRA_H