File indexing completed on 2026-10-15 08:17:08
0001 #ifndef TPCCALIB_TpcCentralMembranePlotter_H
0002 #define TPCCALIB_TpcCentralMembranePlotter_H
0003
0004 #include <tpc/TpcDistortionCorrection.h>
0005 #include <tpc/TpcDistortionCorrectionContainer.h>
0006
0007 #include <tpc/LaserClusterHelper.h>
0008
0009 #include <trackbase/TrkrClusterContainer.h>
0010 #include <trackbase/TrkrDefs.h>
0011
0012 #include <fun4all/SubsysReco.h>
0013
0014 class PHCompositeNode;
0015
0016 class LaserClusterContainer;
0017 class EventHeader;
0018 class LaserEventInfo;
0019 class PHG4TpcGeom;
0020 class PHG4TpcGeomContainer;
0021 class ActsGeometry;
0022 class TrkrHitTruthAssoc;
0023 class TrkrHitSetContainer;
0024
0025 class TF1;
0026 class TFile;
0027 class TH1;
0028 class TH2;
0029 class TH3;
0030 class TGraph;
0031 class TNtuple;
0032 class TTree;
0033 class TVector3;
0034
0035 class TpcCentralMembranePlotter : public SubsysReco
0036 {
0037 public:
0038 TpcCentralMembranePlotter(const std::string &name = "TpcCentralMembranePlotter");
0039 ~TpcCentralMembranePlotter() override = default;
0040
0041
0042 void setOutputfile(const std::string &outputfile);
0043
0044 void set_event_sequence(int seq)
0045 {
0046 m_event_sequence = seq;
0047 m_event_index = 100 * seq;
0048 }
0049
0050 void set_QAFileName(const std::string &QAFileName)
0051 {
0052 m_QAFileName = QAFileName;
0053 }
0054
0055 void set_ppMode(bool mode){ ppMode = mode; }
0056
0057 void set_phiHistInRad(bool rad){ m_phiHist_in_rad = rad; }
0058
0059 void set_fieldOff(bool fieldOff){ m_fieldOff = fieldOff; }
0060
0061 void set_nLayerCut(unsigned int cut) { m_nLayerCut = cut; }
0062
0063 int InitRun(PHCompositeNode *topNode) override;
0064
0065 int process_event(PHCompositeNode *topNode) override;
0066
0067 int End(PHCompositeNode *topNode) override;
0068
0069 private:
0070 EventHeader *eventHeader{nullptr};
0071
0072 int GetNodes(PHCompositeNode *topNode);
0073
0074 TpcDistortionCorrection m_distortionCorrection;
0075
0076 LaserClusterContainer *m_correctedCMcluster_map{nullptr};
0077
0078 TpcDistortionCorrectionContainer *m_dcc_in_module_edge{nullptr};
0079 TpcDistortionCorrectionContainer *m_dcc_in_static{nullptr};
0080
0081 TpcDistortionCorrectionContainer *m_dcc_out{nullptr};
0082
0083 PHG4TpcGeomContainer *m_geom_container {nullptr};
0084 ActsGeometry *m_tGeometry {nullptr};
0085 LaserEventInfo *m_laserEventInfo {nullptr};
0086
0087
0088 TrkrHitTruthAssoc *m_hitTruthAssoc {nullptr};
0089 TrkrHitSetContainer *m_hits {nullptr};
0090
0091 std::string m_outputfile{"CMDistortionCorrections.root"};
0092 std::string m_QAFileName{""};
0093
0094
0095
0096
0097
0098
0099 TH2 *m_clusters_r_vs_phi[2]{nullptr};
0100 TH2 *m_clusters_z_vs_phi[2]{nullptr};
0101 TH2 *m_clusters_z_vs_r[2]{nullptr};
0102
0103 TH2 *m_hits_r_vs_phi[2]{nullptr};
0104 TH2 *m_hits_z_vs_phi[2]{nullptr};
0105 TH2 *m_hits_z_vs_r[2]{nullptr};
0106
0107 TH2 *m_hits_hardware_layervsphibin[2]{nullptr};
0108 TH2 *m_hits_hardware_timebinvsphibin[2]{nullptr};
0109 TH2 *m_hits_hardware_timebinvslayer[2]{nullptr};
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122 TH2 *phiDistortionLamination[2]{nullptr};
0123
0124
0125 unsigned int m_nLayerCut{1};
0126
0127 bool m_useHeader{true};
0128
0129 int m_event_index{0};
0130 int m_event_sequence{0};
0131
0132 double m_nClusters{0};
0133 int m_nEvents{0};
0134 int m_runnumber{};
0135
0136 bool ppMode{false};
0137
0138 bool m_phiHist_in_rad{true};
0139
0140 std::string m_stripePatternFile = "/sphenix/u/bkimelman/CMStripePattern.root";
0141
0142 bool m_fieldOff{false};
0143
0144 LaserClusterHelper m_laserClusterHelper;
0145
0146 };
0147
0148 #endif