File indexing completed on 2025-08-06 08:14:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef TRKSINJETQA_H
0011 #define TRKSINJETQA_H
0012
0013
0014 #include <string>
0015 #include <vector>
0016 #include <cassert>
0017 #include <utility>
0018 #include <optional>
0019
0020 #include <TFile.h>
0021
0022 #include <fun4all/SubsysReco.h>
0023 #include <fun4all/Fun4AllReturnCodes.h>
0024 #include <fun4all/Fun4AllHistoManager.h>
0025
0026 #include <phool/phool.h>
0027 #include <phool/PHCompositeNode.h>
0028
0029 #include <qautils/QAHistManagerDef.h>
0030
0031 #include "TrksInJetQAHist.h"
0032 #include "TrksInJetQAConfig.h"
0033
0034 #include "TrksInJetQAInJetFiller.h"
0035 #include "TrksInJetQAInclusiveFiller.h"
0036
0037
0038
0039
0040
0041 class TrksInJetQA : public SubsysReco {
0042
0043 public:
0044
0045
0046 enum OutMode {File, QA};
0047
0048
0049 TrksInJetQA(const std::string& name);
0050 ~TrksInJetQA() override;
0051
0052
0053 void SetOutFileName(const std::string& name) {m_outFileName = name;}
0054 void SetHistSuffix(const std::string& suffix) {m_histSuffix = suffix;}
0055
0056
0057 void Configure(
0058 TrksInJetQAConfig config,
0059 std::optional<TrksInJetQAHist> hist = std::nullopt
0060 );
0061
0062
0063
0064 int Init(PHCompositeNode* ) override;
0065 int process_event(PHCompositeNode* topNode) override;
0066 int End(PHCompositeNode* ) override;
0067
0068 private:
0069
0070
0071 void InitOutput();
0072 void InitHistograms();
0073 void RegisterHistograms();
0074
0075
0076
0077 TFile* m_outFile = NULL;
0078 std::string m_outFileName = "tracksInJetsQA.root";
0079 Fun4AllHistoManager* m_manager = NULL;
0080
0081
0082 std::optional<std::string> m_histSuffix = std::nullopt;
0083
0084
0085 std::unique_ptr<TrksInJetQAInJetFiller> m_inJet;
0086 std::unique_ptr<TrksInJetQAInclusiveFiller> m_inclusive;
0087
0088
0089 TrksInJetQAConfig m_config;
0090 TrksInJetQAHist m_hist;
0091
0092 };
0093
0094 #endif
0095
0096