Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:14:13

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef JETANALYSIS_H
0004 #define JETANALYSIS_H
0005 
0006 
0007 #include <string>
0008 #include <vector>
0009 
0010 #include <TTreeReader.h>
0011 #include <TTreeReaderValue.h>
0012 #include <TTreeReaderArray.h>
0013 #include <THn.h>
0014 
0015 #include "fulljetfinder/FullJetFinder.h"
0016 
0017 class TFile;
0018  
0019 
0020 
0021 class JetAnalysis{
0022  public:
0023 
0024 struct Flavour{
0025   bool isC, isB, isLF;
0026 };
0027 
0028   JetAnalysis(){};
0029 
0030   ~JetAnalysis(){};
0031 
0032   bool processCondor(const std::string &dataFiles = "/sphenix/tg/tg01/hf/jkvapil/JET30_r11_30GeV/condorJob/myTestJets/outputData_000*.root");
0033   std::set<int> findDuplicates(std::vector<int> vec);
0034   Flavour getFlavour(FullJetFinder::TruthJets truth_jet);
0035   bool CheckValue(ROOT::Internal::TTreeReaderValueBase& value);
0036   void printProgress(int cur, int total);
0037   //bool scanPurityEfficiency();
0038   void setWorkDir(const std::string &workdir){work_dir_ = workdir;};
0039   void printHiisto(TH1* h);
0040 
0041 
0042 
0043    /*class MatchedJetContainer: public PHObject
0044   {
0045     public: 
0046     MatchedJetContainer()=default;
0047     void Reset();
0048     GlobalVertex::VTXTYPE vtxtype;
0049     float reco_pt;
0050     float reco_jet_nChConstituents;
0051     float reco_jet_nConstituents;
0052     std::vector<float> reco_constituents_Sdxy;
0053     float reco_jet_Sdxy_1N;
0054     float reco_jet_Sdxy_2N;
0055     float reco_jet_Sdxy_3N;
0056     float reco_jet_Sdxy_4N;
0057     Flavour truth_jet_flavour;
0058     float truth_pt;
0059     float truth_jet_nChConstituents;
0060     float truth_jet_nConstituents;
0061     ClassDef(MatchedJetContainer,1)
0062   };*/
0063 
0064   private:
0065   std::string work_dir_;
0066   
0067   TTree *ttree_;
0068   TTreeReaderValue<FullJetFinder::Container> *jet_container_= nullptr;
0069   
0070   TTree *ttree_out_;
0071 
0072   //! reconstructed jets
0073   float m_reco_jet_pt;
0074   int m_reco_jet_nConstituents;
0075   int m_reco_jet_nChConstituents;
0076   float reco_sdxy_1N;
0077   float reco_sdxy_2N;
0078   float reco_sdxy_3N;
0079   float m_truth_jet_pt;
0080   int m_truth_jet_nConstituents;
0081   int m_truth_jet_nChConstituents;
0082   int m_truth_jet_flavour;
0083 
0084 
0085   //TH1I *matching;
0086 
0087 
0088 
0089 
0090 };
0091 
0092 #endif // JETANALYSIS_H