Back to home page

sPhenix code displayed by LXR

 
 

    


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

0001 // ----------------------------------------------------------------------------
0002 // 'TrksInJetQABaseManager.h'
0003 // Derek Anderson
0004 // 04.03.2024
0005 //
0006 // Base hist manager submodule for the TrksInJetQA module which
0007 // consolidates methods/data common to all of the hist managers
0008 // ----------------------------------------------------------------------------
0009 
0010 #ifndef TRKSINJETQABASEMANAGER_H
0011 #define TRKSINJETQABASEMANAGER_H
0012 
0013 // c++ utilities
0014 #include <string>
0015 #include <vector>
0016 #include <utility>
0017 #include <iostream>
0018 // root libraries
0019 #include <TH1.h>
0020 #include <TH2.h>
0021 #include <TDirectory.h>
0022 // phool libraries
0023 #include <phool/phool.h>
0024 // module utilities
0025 #include "TrksInJetQAHist.h"
0026 #include "TrksInJetQATypes.h"
0027 #include "TrksInJetQAConfig.h"
0028 
0029 
0030 
0031 // TrksInJetQABaseManager definition ------------------------------------------
0032 
0033 class TrksInJetQABaseManager {
0034 
0035   public:
0036 
0037     // ctor/dtor
0038     TrksInJetQABaseManager(TrksInJetQAConfig& config, TrksInJetQAHist& hist);
0039     ~TrksInJetQABaseManager();
0040 
0041     // public methods
0042     void MakeHistograms(std::string label = "");
0043     void SaveHistograms(TDirectory* outFile, std::string outDirName);
0044     void GrabHistograms(std::vector<TH1D*>& vecOutHist1D, std::vector<TH2D*>& vecOutHist2D);
0045 
0046   protected:
0047 
0048     // private methods
0049     void BuildHistograms(std::string label = "");
0050     void ResetVectors();
0051 
0052     // private helper methods
0053     bool IsInMvtx(const uint16_t layer);
0054     bool IsInIntt(const uint16_t layer);
0055     bool IsInTpc(const uint16_t layer);
0056 
0057     // virtual private methods
0058     virtual void DefineHistograms() = 0;
0059 
0060     // histograms
0061     VecHist1D m_vecHist1D;
0062     VecHist2D m_vecHist2D;
0063 
0064     // histogram definitions
0065     VecHistTypes m_vecHistTypes;
0066     VecHistDef1D m_vecHistDef1D;
0067     VecHistDef2D m_vecHistDef2D;
0068 
0069     // module utilities
0070     TrksInJetQAConfig m_config;
0071     TrksInJetQAHist   m_hist;
0072 
0073 };  // end TrksInJetQABaseManager
0074 
0075 
0076 #endif
0077 
0078 // end ------------------------------------------------------------------------