35 class SiStripFedCabling_TrackerMap :
public PlotImage<SiStripFedCabling, SINGLE_IOV> {
39 bool fill()
override {
40 auto tag = PlotBase::getTag<0>();
41 auto iov =
tag.iovs.front();
42 std::shared_ptr<SiStripFedCabling>
payload = fetchPayload(std::get<1>(iov));
44 std::unique_ptr<TrackerMap> tmap = std::make_unique<TrackerMap>(
"SiStripFedCabling");
47 tmap->setTitle(titleMap);
51 std::unique_ptr<SiStripDetCabling> detCabling_ = std::make_unique<SiStripDetCabling>(*(
payload.get()), &tTopo);
53 std::vector<uint32_t> activeDetIds;
54 detCabling_->addActiveDetectorsRawIds(activeDetIds);
56 for (
const auto&
detId : activeDetIds) {
58 for (uint32_t connDet_i = 0; connDet_i < detCabling_->getConnections(
detId).size(); connDet_i++) {
59 if (detCabling_->getConnections(
detId)[connDet_i] !=
nullptr &&
60 detCabling_->getConnections(
detId)[connDet_i]->isConnected() != 0)
64 tmap->fill(
detId, n_conn * 2);
78 class SiStripFedCabling_Summary :
public PlotImage<SiStripFedCabling, SINGLE_IOV> {
82 bool fill()
override {
83 auto tag = PlotBase::getTag<0>();
84 auto iov =
tag.iovs.front();
85 std::shared_ptr<SiStripFedCabling>
payload = fetchPayload(std::get<1>(iov));
86 int IOV = std::get<0>(iov);
87 std::vector<uint32_t> activeDetIds;
91 std::unique_ptr<SiStripDetCabling> detCabling_ = std::make_unique<SiStripDetCabling>(*(
payload.get()), &tTopo);
93 detCabling_->addActiveDetectorsRawIds(activeDetIds);
100 for (
const auto& it : detInfo.getAllData()) {
102 if (it.first == 0 || it.first == 0xFFFFFFFF) {
104 <<
"Wrong det id: " << it.first <<
" ... neglecting!" << std::endl;
107 updateCounters(it.first, allCounts, tTopo);
110 for (
const auto&
detId : activeDetIds) {
111 updateCounters(
detId, myCont, tTopo);
114 TH2D*
ME =
new TH2D(
"SummaryOfCabling",
"SummaryOfCabling", 6, 0.5, 6.5, 9, 0.5, 9.5);
115 ME->GetXaxis()->SetTitle(
"Sub Det");
116 ME->GetYaxis()->SetTitle(
"Layer");
120 ME->GetXaxis()->SetBinLabel(1,
"TIB");
121 ME->GetXaxis()->SetBinLabel(2,
"TID F");
122 ME->GetXaxis()->SetBinLabel(3,
"TID B");
123 ME->GetXaxis()->SetBinLabel(4,
"TOB");
124 ME->GetXaxis()->SetBinLabel(5,
"TEC F");
125 ME->GetXaxis()->SetBinLabel(6,
"TEC B");
127 for (
int i = 0;
i < 4;
i++) {
128 ME->Fill(1,
i + 1,
float(myCont.counterTIB[
i]) / allCounts.counterTIB[
i]);
131 for (
int i = 0;
i < 2;
i++) {
132 for (
int j = 0;
j < 3;
j++) {
133 ME->Fill(
i + 2,
j + 1,
float(myCont.counterTID[
i][
j]) / allCounts.counterTID[
i][
j]);
137 for (
int i = 0;
i < 6;
i++) {
138 ME->Fill(4,
i + 1,
float(myCont.counterTOB[
i]) / allCounts.counterTOB[
i]);
141 for (
int i = 0;
i < 2;
i++) {
142 for (
int j = 0;
j < 9;
j++) {
143 ME->Fill(
i + 5,
j + 1,
float(myCont.counterTEC[
i][
j]) / allCounts.counterTEC[
i][
j]);
147 TCanvas
c1(
"SiStrip FED cabling summary",
"SiStrip FED cabling summary", 800, 600);
148 c1.SetTopMargin(0.07);
149 c1.SetBottomMargin(0.10);
150 c1.SetLeftMargin(0.07);
151 c1.SetRightMargin(0.10);
154 ME->Draw(
"TEXTsame");
155 ME->SetStats(kFALSE);
160 t1.SetTextSize(0.05);
161 t1.DrawLatex(0.5, 0.96, Form(
"SiStrip FedCabling, IOV %i", IOV));
172 int counterTIB[4] = {0};
173 int counterTID[2][3] = {{0}};
174 int counterTOB[6] = {0};
175 int counterTEC[2][9] = {{0}};
181 switch (subdet.subdetId()) {
184 cont.counterTIB[
i]++;
191 cont.counterTID[0][
j]++;
192 }
else if (side == 1) {
193 cont.counterTID[1][
j]++;
199 cont.counterTOB[
i]++;
206 cont.counterTEC[0][
j]++;
207 }
else if (side == 1) {
208 cont.counterTEC[1][
j]++;
static constexpr auto TEC
unsigned int tobLayer(const DetId &id) const
unsigned int tidSide(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int tecWheel(const DetId &id) const
Log< level::Error, false > LogError
static std::string to_string(const XMLCh *ch)
#define PAYLOAD_INSPECTOR_CLASS(CLASS_NAME)
unsigned int tecSide(const DetId &id) const
SiStripDetInfo read(std::string filePath)
static constexpr auto TOB
#define PAYLOAD_INSPECTOR_MODULE(PAYLOAD_TYPENAME)
static constexpr auto TIB
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
TrackerTopology fromTrackerParametersXMLFile(const std::string &xmlFileName)
static constexpr char const *const kDefaultFile
unsigned int tibLayer(const DetId &id) const
static constexpr auto TID
cont
load Luminosity info ##