File indexing completed on 2024-04-06 12:06:32
0001 #ifndef DPGAnalysis_SiStripTools_OccupancyPlotMacros_h
0002 #define DPGAnalysis_SiStripTools_OccupancyPlotMacros_h
0003
0004 #include <vector>
0005 #include <string>
0006 #include <utility>
0007
0008 class TFile;
0009 class TCanvas;
0010 class TH1D;
0011 class TH1;
0012 class TProfile;
0013 class TText;
0014
0015 struct SubDetParams {
0016 std::string label;
0017 int min;
0018 int max;
0019 };
0020
0021 float linear(float x);
0022 float logarithm(float x);
0023 std::pair<float, float> phase2bin(int i);
0024 void PlotOccupancyMap(TFile* ff,
0025 const char* module,
0026 const float min,
0027 const float max,
0028 const float mmin,
0029 const float mmax,
0030 const int color);
0031 void PlotOccupancyMapPhase1(TFile* ff,
0032 const char* module,
0033 const float min,
0034 const float max,
0035 const float mmin,
0036 const float mmax,
0037 const int color);
0038 void PlotOccupancyMapPhase2(TFile* ff,
0039 const char* module,
0040 const float min,
0041 const float max,
0042 const float mmin,
0043 const float mmax,
0044 const int color);
0045 void PlotOccupancyMapGeneric(TFile* ff,
0046 const char* module,
0047 const float min,
0048 const float max,
0049 const float mmin,
0050 const float mmax,
0051 const int color,
0052 std::pair<float, float> (*size)(int),
0053 const std::vector<SubDetParams>& vsub);
0054 void printFrame(
0055 TCanvas* c, TH1D* h, const char* label, const int frame, const int min, const int max, const bool same = false);
0056 float combinedOccupancy(TFile* ff, const char* module, const int lowerbin, const int upperbin);
0057 void PlotOnTrackOccupancy(
0058 TFile* ff, const char* module, const char* ontrkmod, const float mmin, const float mmax, const int color);
0059 void PlotOnTrackOccupancyPhase1(
0060 TFile* ff, const char* module, const char* ontrkmod, const float mmin, const float mmax, const int color);
0061 void PlotOnTrackOccupancyPhase2(
0062 TFile* ff, const char* module, const char* ontrkmod, const float mmin, const float mmax, const int color);
0063 void PlotOnTrackOccupancyGeneric(TFile* ff,
0064 const char* module,
0065 const char* ontrkmod,
0066 const float mmin,
0067 const float mmax,
0068 const int color,
0069 std::pair<float, float> (*size)(int),
0070 const std::vector<SubDetParams>& vsub);
0071 void PlotDebugFPIX_XYMap(TFile* ff, const char* module, const unsigned int offset, const char* name);
0072 void PlotTrackerXsect(TFile* ff, const char* module);
0073 TCanvas* drawMap(const char* cname,
0074 const TH1* hval,
0075 const TProfile* averadius,
0076 const TProfile* avez,
0077 const float mmin,
0078 const float mmax,
0079 std::pair<float, float> (*size)(int),
0080 float (*scale)(float),
0081 const int color,
0082 const char* ptitle = "");
0083 TH1D* TrendPlotSingleBin(TFile* ff, const char* module, const char* hname, const int bin);
0084
0085 #endif