1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include "catch.hpp"
#include <iostream>
#include <numeric> // std::accumulate
#include "TCanvas.h"
#include "DQM/TrackerRemapper/interface/Phase1PixelSummaryMap.h"
#include "CalibTracker/SiPixelESProducers/interface/SiPixelDetInfoFileReader.h"
static const std::string k_geo = "SLHCUpgradeSimulations/Geometry/data/PhaseI/PixelSkimmedGeometry_phase1.txt";
TEST_CASE("Phase1PixelSummaryMap testing", "[Phase1PixelSummaryMap]") {
//_____________________________________________________________
SECTION("Check Phase1Pixel Summary plotting") {
gStyle->SetOptStat(0);
Phase1PixelSummaryMap theMap("colz", "test", "testing");
theMap.createTrackerBaseMap();
SiPixelDetInfoFileReader reader_ = SiPixelDetInfoFileReader(edm::FileInPath(k_geo).fullPath());
const auto& detIds = reader_.getAllDetIds();
int count = 0;
for (const auto& it : detIds) {
count++;
theMap.fillTrackerMap(it, count);
}
TCanvas c = TCanvas("c", "c", 1200, 1200);
theMap.printTrackerMap(c);
c.SaveAs("Phase1PixelSummaryMap.png");
REQUIRE(true);
}
}
|