Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // ----------------------------------------------------------------------------
0002 // 'TrksInJetQAJetManager.h'
0003 // Derek Anderson
0004 // 03.26.2024
0005 //
0006 // A submodule for the TrksInJetQA module
0007 // to generate QA plots for jets
0008 // ----------------------------------------------------------------------------
0009 
0010 #ifndef TRACKSINJETSQAMAKER_JETQAHISTMANAGER_H
0011 #define TRACKSINJETSQAMAKER_JETQAHISTMANAGER_H
0012 
0013 // c++ utilities
0014 #include <limits>
0015 #include <vector>
0016 #include <utility>
0017 #include <optional>
0018 // root libraries
0019 #include <TH1.h>
0020 #include <TH2.h>
0021 // jet libraries
0022 #include <jetbase/Jet.h>
0023 // tracking libraries
0024 #include <trackbase_historic/SvtxTrack.h>
0025 // submodule definitions
0026 #include "TrksInJetQABaseManager.h"
0027 
0028 
0029 
0030 // TrksInJetQAJetManager definition -------------------------------------------
0031 
0032 class TrksInJetQAJetManager : public TrksInJetQABaseManager {
0033 
0034   public:
0035 
0036     // histogram accessors
0037     enum Type {All};
0038     enum H1D  {Eta, Phi, Pt, NTrk, PtSum};
0039     enum H2D  {PtVsEta, PtSumVsPt};
0040 
0041     // histogram content
0042     struct JetQAContent {
0043       double eta   = std::numeric_limits<double>::max();
0044       double phi   = std::numeric_limits<double>::max();
0045       double pt    = std::numeric_limits<double>::max();
0046       double nTrk  = std::numeric_limits<double>::max();
0047       double ptSum = std::numeric_limits<double>::max();
0048     };
0049 
0050     // ctor/dtor
0051     using TrksInJetQABaseManager::TrksInJetQABaseManager;
0052     ~TrksInJetQAJetManager() {};
0053 
0054     // public methods
0055     void GetInfo(Jet* jet, std::optional<std::vector<SvtxTrack*>> tracks = std::nullopt);
0056 
0057   private:
0058 
0059     // private methods
0060     void FillHistograms(const int type, JetQAContent& content);
0061 
0062     // inherited interal methods
0063     void DefineHistograms() override;
0064 
0065 };  // end TrksInJetQAJetManager
0066 
0067 #endif
0068 
0069 // end ------------------------------------------------------------------------