#include "SiStripQualityHistoryPlots.h"
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include "TPad.h"
#include "TFile.h"
#include "TH2F.h"
#include "TH1F.h"
#include "TProfile.h"
#include "TGraph.h"
#include "DPGAnalysis/SiStripTools/interface/CommonAnalyzer.h"
#include "TCanvas.h"
#include "TStyle.h"
Go to the source code of this file.
|
TH1D * | AverageRunBadChannels (TFile &ff, const char *module, const char *histo, const bool excludeLastBins) |
|
TCanvas * | StripCompletePlot (TFile &ff, const char *module, const bool excludeLastBins) |
|
◆ AverageRunBadChannels()
TH1D* AverageRunBadChannels |
( |
TFile & |
ff, |
|
|
const char * |
module, |
|
|
const char * |
histo, |
|
|
const bool |
excludeLastBins |
|
) |
| |
Definition at line 17 of file SiStripQualityHistoryPlots.cc.
20 TH1D* badchannels =
new TH1D(
"badchannels",
"Average Number of Bad Channels vs run", 10, 0., 10.);
21 badchannels->SetCanExtend(TH1::kXaxis);
23 std::vector<unsigned int>
runs = camult.getRunList();
27 for (
unsigned int i = 0;
i <
runs.size(); ++
i) {
29 sprintf(runlabel,
"%d",
runs[
i]);
31 sprintf(runpath,
"run_%d",
runs[
i]);
32 camult.setPath(runpath);
34 TProfile* multvstime =
nullptr;
35 if (multvstime ==
nullptr)
36 multvstime = (TProfile*)camult.getObject(
histo);
40 if (excludeLastBins) {
41 int lastbin = multvstime->GetNbinsX() + 1;
43 for (
int ibin = multvstime->GetNbinsX() + 1; ibin > 0; --ibin) {
44 if (multvstime->GetBinEntries(ibin) != 0) {
50 std::cout <<
"Restricted range: " << firstbin <<
" " << lastbin << std::endl;
51 multvstime->GetXaxis()->SetRangeUser(multvstime->GetBinLowEdge(firstbin),
52 multvstime->GetBinLowEdge(lastbin - 2));
55 badchannels->Fill(runlabel, multvstime->GetMean(2));
References gather_cfg::cout, alignCSCRings::ff, CommonAnalyzer::getObject(), CommonAnalyzer::getRunList(), timingPdfMaker::histo, mps_fire::i, writedatasetfile::runs, and CommonAnalyzer::setPath().
Referenced by StripCompletePlot().
◆ StripCompletePlot()
TCanvas* StripCompletePlot |
( |
TFile & |
ff, |
|
|
const char * |
module, |
|
|
const bool |
excludeLastBins |
|
) |
| |
Definition at line 62 of file SiStripQualityHistoryPlots.cc.
63 TCanvas*
cc =
new TCanvas();
71 cabling->SetLineColor(kRed);
72 runinfo->SetLineColor(kMagenta);
73 badchannel->SetLineColor(kCyan);
74 dcs->SetLineColor(kGreen);
75 badfiber->SetLineColor(kBlue);
79 badchannel->Draw(
"same");
80 runinfo->Draw(
"same");
81 cabling->Draw(
"same");
References AverageRunBadChannels(), and alignCSCRings::ff.
TH1D * AverageRunBadChannels(TFile &ff, const char *module, const char *histo, const bool excludeLastBins)