File indexing completed on 2025-12-17 09:21:21
0001
0002
0003 #ifndef QA_KFPARTICLE_QAKFPARTICLE_H
0004 #define QA_KFPARTICLE_QAKFPARTICLE_H
0005
0006 #include <g4eval/SvtxEvalStack.h>
0007
0008 #include <calotrigger/TriggerAnalyzer.h>
0009
0010 #include <fun4all/SubsysReco.h>
0011
0012 #include <limits>
0013 #include <memory>
0014 #include <string> // for string
0015
0016 #include <KFParticle.h>
0017
0018 #include "QAKFParticleTrackPtAsymmetry.h"
0019
0020 class KFParticle_Container;
0021 class PHCompositeNode;
0022 class SvtxClusterEval;
0023 class SvtxTrackMap;
0024 class SvtxTrack;
0025 class TH1;
0026 class TH2;
0027
0028
0029
0030
0031
0032
0033
0034
0035 class QAKFParticle : public SubsysReco
0036 {
0037 public:
0038 QAKFParticle(const std::string &name, const std::string &mother_name, double min_m, double max_m);
0039
0040 virtual ~QAKFParticle() = default;
0041
0042 int Init(PHCompositeNode *topNode);
0043 int InitRun(PHCompositeNode *topNode);
0044 int process_event(PHCompositeNode *topNode);
0045
0046 std::string get_histo_prefix();
0047
0048 void setTrackMapName(const std::string &name) { m_trackMapName = name; }
0049
0050 void setKFParticleNodeName(const std::string &name) { m_KFParticleNodeName = name; }
0051
0052
0053 void enableTrackPtAsymmetry(bool flag) { m_doTrackPtAsymmetry = flag; }
0054
0055 void setTrackPtAsymmetryMotherEtaBins(const std::vector<double> &bins)
0056 {
0057 m_trackPtAsymEtaBins = bins;
0058 }
0059
0060 void setTrackPtAsymmetryMotherPhiBins(const std::vector<double> &bins)
0061 {
0062 m_trackPtAsymPhiBins = bins;
0063 }
0064
0065 protected:
0066 int load_nodes(PHCompositeNode *);
0067
0068 void initializeTriggerInfo(PHCompositeNode *);
0069
0070
0071 bool doTrackPtAsymmetry() const { return m_doTrackPtAsymmetry; }
0072
0073 int m_mother_id{0};
0074 double m_min_mass{0.};
0075 double m_max_mass{10.};
0076
0077 TH1 *h_mass_KFP{nullptr};
0078 TH2 *h_mass_KFP_eta{nullptr};
0079 TH2 *h_mass_KFP_phi{nullptr};
0080 TH2 *h_mass_KFP_pt{nullptr};
0081 TH2 *h_bunchcrossing_mass_KFP{nullptr};
0082 TH1 *h_mass_KFP_crossing0{nullptr};
0083 TH1 *h_mass_KFP_non_crossing0{nullptr};
0084 TH1 *h_mass_KFP_ZDC_Coincidence{nullptr};
0085 TH1 *h_mass_KFP_MBD_NandS_geq_1_vtx_l_10_cm{nullptr};
0086 TH1 *h_mass_KFP_Jet_6_GeV_MBD_NandS_geq_1_vtx_l_10_cm{nullptr};
0087
0088 TriggerAnalyzer *triggeranalyzer{nullptr};
0089
0090 int m_ZDC_Coincidence_bit{std::numeric_limits<int>::max()};
0091 int m_MBD_NandS_geq_1_vtx_l_10_cm_bit{std::numeric_limits<int>::max()};
0092 int m_Jet_6_GeV_MBD_NandS_geq_1_vtx_l_10_cm_bit{std::numeric_limits<int>::max()};
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102 SvtxTrackMap *m_trackMap{nullptr};
0103
0104 KFParticle_Container *m_kfpContainer{nullptr};
0105 std::map<std::string, std::pair<int, float>> particleMasses;
0106 std::string m_trackMapName{"SvtxTrackMap"};
0107 std::string m_KFParticleNodeName{"reconstructedParticles"};
0108
0109 bool hasTriggerInfo{true};
0110 static constexpr int nTriggerBits{64};
0111 int counter{0};
0112
0113
0114 bool m_doTrackPtAsymmetry{true};
0115 std::vector<double> m_trackPtAsymEtaBins{-2.0, -1.0, -0.5, 0, 0.5, 1.0, 2.0};
0116 std::vector<double> m_trackPtAsymPhiBins{-3.15, -2.5, -2.0, -1.5, -1.0, -0.5, 0.0, 0.5, 1.0, 1.5, 2.0, 2.5, 3.15};
0117
0118 std::unique_ptr<QAKFParticleTrackPtAsymmetry> m_trackPtAsymmetryAnalyzer;
0119 };
0120
0121 #endif