Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-23 03:27:20

0001 #include "catch.hpp"
0002 #include <iostream>
0003 #include <numeric>  // std::accumulate
0004 #include "TCanvas.h"
0005 #include "DQM/TrackerRemapper/interface/Phase1PixelSummaryMap.h"
0006 #include "CalibTracker/SiPixelESProducers/interface/SiPixelDetInfoFileReader.h"
0007 
0008 static const std::string k_geo = "SLHCUpgradeSimulations/Geometry/data/PhaseI/PixelSkimmedGeometry_phase1.txt";
0009 
0010 TEST_CASE("Phase1PixelSummaryMap testing", "[Phase1PixelSummaryMap]") {
0011   //_____________________________________________________________
0012   SECTION("Check Phase1Pixel Summary plotting") {
0013     gStyle->SetOptStat(0);
0014     Phase1PixelSummaryMap theMap("colz", "test", "testing");
0015     theMap.createTrackerBaseMap();
0016     SiPixelDetInfoFileReader reader_ = SiPixelDetInfoFileReader(edm::FileInPath(k_geo).fullPath());
0017     const auto& detIds = reader_.getAllDetIds();
0018     int count = 0;
0019     for (const auto& it : detIds) {
0020       count++;
0021       theMap.fillTrackerMap(it, count);
0022     }
0023     TCanvas c = TCanvas("c", "c", 1200, 1200);
0024     theMap.printTrackerMap(c);
0025     c.SaveAs("Phase1PixelSummaryMap.png");
0026     REQUIRE(true);
0027   }
0028 }