File indexing completed on 2025-12-17 09:21:22
0001
0002
0003 #ifndef QAG4SIMULATIONDISTORTIONS_H
0004 #define QAG4SIMULATIONDISTORTIONS_H
0005
0006 #include <tpc/TpcGlobalPositionWrapper.h>
0007
0008 #include <trackbase/TrkrDefs.h>
0009
0010 #include <fun4all/SubsysReco.h>
0011
0012 #include <limits>
0013 #include <string>
0014 #include <vector>
0015
0016 class ActsGeometry;
0017 class PHCompositeNode;
0018 class PHG4TpcGeomContainer;
0019 class SvtxTrack;
0020 class SvtxTrackMap;
0021 class TH1;
0022 class TH2;
0023 class TrkrClusterContainer;
0024 class TTree;
0025
0026 class QAG4SimulationDistortions : public SubsysReco
0027 {
0028 public:
0029 QAG4SimulationDistortions(const std::string &name = "QAG4SimulationDistortions");
0030
0031 ~QAG4SimulationDistortions() override = default;
0032
0033 int Init(PHCompositeNode *) override;
0034 int InitRun(PHCompositeNode *topNode) override;
0035 int process_event(PHCompositeNode *) override;
0036 int End(PHCompositeNode *) override;
0037
0038
0039 void set_trackmap_name(const std::string &value)
0040 {
0041 m_trackmapname = value;
0042 }
0043
0044 void disableModuleEdgeCorr() { m_disable_module_edge_corr = true; }
0045 void disableStaticCorr() { m_disable_static_corr = true; }
0046 void disableAverageCorr() { m_disable_average_corr = true; }
0047 void disableFluctuationCorr() { m_disable_fluctuation_corr = true; }
0048
0049
0050 void setUseMicromegas(bool value)
0051 {
0052 m_useMicromegas = value;
0053 }
0054
0055
0056 void setMinpT(double value)
0057 {
0058 m_minPT = value;
0059 }
0060
0061 private:
0062
0063 std::string m_trackmapname = "SvtxSiliconMMTrackMap";
0064
0065 std::string get_histo_prefix()
0066 {
0067 return std::string("h_") + Name() + std::string("_");
0068 }
0069
0070 std::vector<TrkrDefs::cluskey> get_cluster_keys(SvtxTrack *track);
0071 std::vector<TrkrDefs::cluskey> get_state_keys(SvtxTrack *track);
0072 bool checkTrack(SvtxTrack *track);
0073 bool checkTPOTResidual(SvtxTrack *track);
0074
0075 TH2 *h_beta{nullptr};
0076 TH2 *h_alpha{nullptr};
0077 TH2 *h_rphiResid{nullptr};
0078 TH2 *h_zResid{nullptr};
0079 TH2 *h_etaResid{nullptr};
0080 TH2 *h_etaResidLayer{nullptr};
0081 TH2 *h_zResidLayer{nullptr};
0082 TH2 *h_deltarphi_layer{nullptr};
0083 TH2 *h_deltaz_layer{nullptr};
0084 TH2 *h_statez_pulls{nullptr};
0085 TH2 *h_staterphi_pulls{nullptr};
0086 TH2 *h_clusz_pulls{nullptr};
0087 TH2 *h_clusrphi_pulls{nullptr};
0088 TH2 *h_nstates_vs_nclus{nullptr};
0089
0090 TH1 *h_tpot_deltarphi{nullptr};
0091 TH1 *h_tpot_deltaz{nullptr};
0092
0093 TTree *t_tree{nullptr};
0094
0095 SvtxTrackMap *m_trackMap{nullptr};
0096 TrkrClusterContainer *m_clusterContainer{nullptr};
0097 ActsGeometry *m_tGeometry{nullptr};
0098 PHG4TpcGeomContainer *m_tpcGeom{nullptr};
0099
0100
0101 TpcGlobalPositionWrapper m_globalPositionWrapper;
0102
0103 int m_event{0};
0104 float m_tanAlpha{std::numeric_limits<float>::quiet_NaN()};
0105 float m_tanBeta{std::numeric_limits<float>::quiet_NaN()};
0106 float m_drphi{std::numeric_limits<float>::quiet_NaN()};
0107 float m_dz{std::numeric_limits<float>::quiet_NaN()};
0108 float m_clusR{std::numeric_limits<float>::quiet_NaN()};
0109 float m_clusPhi{std::numeric_limits<float>::quiet_NaN()};
0110 float m_clusZ{std::numeric_limits<float>::quiet_NaN()};
0111 float m_clusEta{std::numeric_limits<float>::quiet_NaN()};
0112 float m_stateR{std::numeric_limits<float>::quiet_NaN()};
0113 float m_statePhi{std::numeric_limits<float>::quiet_NaN()};
0114 float m_stateZ{std::numeric_limits<float>::quiet_NaN()};
0115 float m_stateEta{std::numeric_limits<float>::quiet_NaN()};
0116 float m_stateRPhiErr{std::numeric_limits<float>::quiet_NaN()};
0117 float m_stateZErr{std::numeric_limits<float>::quiet_NaN()};
0118 float m_clusRPhiErr{std::numeric_limits<float>::quiet_NaN()};
0119 float m_clusZErr{std::numeric_limits<float>::quiet_NaN()};
0120
0121 int m_layer{-1};
0122 float m_statePt{std::numeric_limits<float>::quiet_NaN()};
0123 float m_statePz{std::numeric_limits<float>::quiet_NaN()};
0124 float m_trackPt{std::numeric_limits<float>::quiet_NaN()};
0125 float m_trackdEdx{std::numeric_limits<float>::quiet_NaN()};
0126 int m_charge{-10};
0127 int m_crossing{-10};
0128
0129 TrkrDefs::cluskey m_cluskey{TrkrDefs::CLUSKEYMAX};
0130
0131
0132 bool m_disable_module_edge_corr{false};
0133 bool m_disable_static_corr{false};
0134 bool m_disable_average_corr{false};
0135 bool m_disable_fluctuation_corr{false};
0136
0137
0138
0139 int m_total_tracks{0};
0140 int m_accepted_tracks{0};
0141
0142 int m_total_states{0};
0143 int m_accepted_states{0};
0144
0145
0146 bool m_useMicromegas{true};
0147 double m_minPT{0.5};
0148 };
0149
0150 #endif