Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:28:23

0001 #ifndef _PlotsFromDump_
0002 #define _PlotsFromDump_
0003 
0004 #include "Common.hh"
0005 
0006 struct TestOpts {
0007   TestOpts() {}
0008   TestOpts(const TString& arch, const TString& suffix, const Color_t color, const Marker_t marker)
0009       : arch(arch), suffix(suffix), color(color), marker(marker) {}
0010 
0011   TString arch;
0012   TString suffix;
0013   Color_t color;
0014   Marker_t marker;
0015 };
0016 typedef std::vector<TestOpts> TOVec;
0017 
0018 namespace {
0019   TOVec tests;
0020   UInt_t ntests;
0021   void setupTests(const int useARCH) {
0022     // N.B.: Consult ./xeon_scripts/benchmark-cmssw-ttbar-fulldet-build.sh for info on which VU and TH tests were used for making text dumps
0023 
0024     if (useARCH == 0 or useARCH == 2 or useARCH == 3 or useARCH == 4) {
0025       tests.emplace_back("SKL-SP", "NVU1_NTH1", kRed + 1, kOpenTriangleUp);
0026       tests.emplace_back("SKL-SP", "NVU16int_NTH64", kMagenta + 1, kOpenTriangleDown);
0027     }
0028     if (useARCH == 3 or useARCH == 4) {
0029       tests.emplace_back("SNB", "NVU1_NTH1", kBlue, kOpenDiamond);
0030       tests.emplace_back("SNB", "NVU8int_NTH24", kBlack, kOpenCross);
0031       tests.emplace_back("KNL", "NVU1_NTH1", kGreen + 1, kOpenTriangleUp);
0032       tests.emplace_back("KNL", "NVU16int_NTH256", kOrange + 1, kOpenTriangleDown);
0033     }
0034     if (useARCH == 1 or useARCH == 2 or useARCH == 4) {
0035       tests.emplace_back("LNX-G", "NVU1_NTH1", 7, 40);
0036       tests.emplace_back("LNX-G", "NVU16int_NTH64", 8, 42);
0037       tests.emplace_back("LNX-S", "NVU1_NTH1", 46, 49);
0038       tests.emplace_back("LNX-S", "NVU16int_NTH64", 30, 48);
0039     }
0040     // set ntests after tests is set up
0041     ntests = tests.size();
0042   }
0043 };  // namespace
0044 
0045 struct PlotOpts {
0046   PlotOpts() {}
0047   PlotOpts(const TString& name, const TString& xtitle, const TString& ytitle, const TString& outname)
0048       : name(name), xtitle(xtitle), ytitle(ytitle), outname(outname) {}
0049 
0050   TString name;
0051   TString xtitle;
0052   TString ytitle;
0053   TString outname;
0054 };
0055 typedef std::vector<PlotOpts> POVec;
0056 
0057 namespace {
0058   POVec plots;
0059   UInt_t nplots;
0060   void setupPlots() {
0061     // N.B. Consult plotting/makePlotsFromDump.py for info on hist names
0062 
0063     plots.emplace_back("h_MXNH", "Number of Hits Found", "Fraction of Tracks", "nHits");
0064     plots.emplace_back("h_MXPT", "p_{T}^{mkFit}", "Fraction of Tracks", "pt");
0065     plots.emplace_back("h_MXPHI", "#phi^{mkFit}", "Fraction of Tracks", "phi");
0066     plots.emplace_back("h_MXETA", "#eta^{mkFit}", "Fraction of Tracks", "eta");
0067 
0068     plots.emplace_back("h_DCNH", "nHits^{mkFit}-nHits^{CMSSW}", "Fraction of Tracks", "dnHits");
0069     plots.emplace_back("h_DCPT", "p_{T}^{mkFit}-p_{T}^{CMSSW}", "Fraction of Tracks", "dpt");
0070     plots.emplace_back("h_DCPHI", "#phi^{mkFit}-#phi^{CMSSW}", "Fraction of Tracks", "dphi");
0071     plots.emplace_back("h_DCETA", "#eta^{mkFit}-#eta^{CMSSW}", "Fraction of Tracks", "deta");
0072 
0073     // set nplots after plots are set
0074     nplots = plots.size();
0075   }
0076 };  // namespace
0077 
0078 class PlotsFromDump {
0079 public:
0080   PlotsFromDump(const TString& sample, const TString& build, const TString& suite, const int useARCH);
0081   ~PlotsFromDump();
0082   void RunPlotsFromDump();
0083 
0084 private:
0085   const TString sample;
0086   const TString build;
0087   const TString suite;
0088   const int useARCH;
0089 
0090   TString label;
0091 };
0092 
0093 #endif