31 std::cout <<
"found " <<
mes.size() <<
" monitoring elements!" << std::endl;
37 bhPixelAlive =
fs_->
make<TH1F>(
"bpixAlive",
"PixelAliveSummary_mean_Barrel", 11520, 0., 11520.);
39 fs_->
make<TH1F>(
"bpixAliveDist",
"Mean PixelAliveSummary_mean_Barrel Disbribution", 110, 0., 1.1);
45 fs_->
make<TH1F>(
"bthreshMeanDist",
"Mean ScurveThresholdSummary_mean_Barrel Distribution", 600, 0., 150.);
46 bhThresholdRMS =
fs_->
make<TH1F>(
"bthreshRMS",
"ScurveThresholdSummary_RMS_Barrel", 11520, 0., 11520.);
48 fs_->
make<TH1F>(
"bthreshRMSDist",
"Mean ScurveThresholdSummary_RMS_Barrel Distribution", 800, 0., 80.);
52 bhNoiseMean =
fs_->
make<TH1F>(
"bnoiseMean",
"ScurveSigmasSummary_mean_Barrel", 11520, 0., 11520.);
54 fs_->
make<TH1F>(
"bnoiseMeanDist",
"Mean ScurveSigmasSummary_mean_Barrel Distribution", 256, -2., 6.);
55 bhNoiseRMS =
fs_->
make<TH1F>(
"bnoiseRMS",
"ScurveSigmasSummary_RMS_Barrel", 11520, 0., 11520.);
57 fs_->
make<TH1F>(
"bnoiseRMSDist",
"Mean ScurveSigmasSummary_RMS_Barrel Distribution", 768, 0., 8.);
61 bhGainMean =
fs_->
make<TH1F>(
"bgainMean",
"ScurveGainSummary_mean_Barrel", 11520, 0., 11520.);
62 bhGainMean_dist =
fs_->
make<TH1F>(
"bgainMeanDist",
"Mean ScurveGainSummary_mean_Barrel Distribution", 80, 0., 8.);
63 bhGainRMS =
fs_->
make<TH1F>(
"bgainRMS",
"ScurveGainSummary_RMS_Barrel", 11520, 0., 11520.);
64 bhGainRMS_dist =
fs_->
make<TH1F>(
"bgainRMSDist",
"Mean ScurveGainSummary_RMS_Barrel Distribution", 100, 0., 10.);
68 bhPedestalMean =
fs_->
make<TH1F>(
"bpedestalMean",
"ScurvePedestalSummary_mean_Barrel", 11520, 0., 11520.);
70 fs_->
make<TH1F>(
"bpedestalMeanDist",
"Mean ScurvePedestalSummary_mean_Barrel Distribution", 600, 0., 300.);
71 bhPedestalRMS =
fs_->
make<TH1F>(
"bpedestalRMS",
"ScurvePedestalSummary_RMS_Barrel", 11520, 0., 11520.);
73 fs_->
make<TH1F>(
"bpedestalRMSDist",
"Mean ScurvePedestalSummary_RMS_Barrel Distribution", 1000, 0., 100.);
81 ehPixelAlive =
fs_->
make<TH1F>(
"fpixAlive",
"PixelAliveSummary_mean_Endcap", 4320, 0., 4320.);
83 fs_->
make<TH1F>(
"fpixAliveDist",
"Mean PixelAliveSummary_mean_Endcap Disbribution", 110, 0., 1.1);
89 fs_->
make<TH1F>(
"fthreshMeanDist",
"Mean ScurveThresholdSummary_mean_Endcap Distribution", 600, 0., 150.);
92 fs_->
make<TH1F>(
"fthreshRMSDist",
"Mean ScurveThresholdSummary_RMS_Endcap Distribution", 800, 0., 80.);
96 ehNoiseMean =
fs_->
make<TH1F>(
"fnoiseMean",
"ScurveSigmasSummary_mean_Endcap", 4320, 0., 4320.);
98 fs_->
make<TH1F>(
"fnoiseMeanDist",
"Mean ScurveSigmasSummary_mean_Endcap Distribution", 256, -2., 6.);
99 ehNoiseRMS =
fs_->
make<TH1F>(
"fnoiseRMS",
"ScurveSigmasSummary_RMS_Endcap", 4320, 0., 4320.);
101 fs_->
make<TH1F>(
"fnoiseRMSDist",
"Mean ScurveSigmasSummary_RMS_Endcap Distribution", 384, 0., 4.);
105 ehGainMean =
fs_->
make<TH1F>(
"fgainMean",
"ScurveGainSummary_mean_Endcap", 4320, 0., 4320.);
107 fs_->
make<TH1F>(
"fgainMeanDist",
"Mean ScurveGainSummary_mean_Endcap Distribution", 600, 0., 150.);
108 ehGainRMS =
fs_->
make<TH1F>(
"fgainRMS",
"ScurveGainSummary_RMS_Endcap", 4320, 0., 4320.);
109 ehGainRMS_dist =
fs_->
make<TH1F>(
"fgainRMSDist",
"Mean ScurveGainSummary_RMS_Endcap Distribution", 800, 0., 80.);
113 ehPedestalMean =
fs_->
make<TH1F>(
"fpedestalMean",
"ScurvePedestalSummary_mean_Endcap", 4320, 0., 4320.);
115 fs_->
make<TH1F>(
"fpedestalMeanDist",
"Mean ScurvePedestalSummary_mean_Endcap Distribution", 600, 0., 150.);
116 ehPedestalRMS =
fs_->
make<TH1F>(
"fpedestalRMS",
"ScurvePedestalSummary_RMS_Endcap", 4320, 0., 4320.);
118 fs_->
make<TH1F>(
"fpedestalRMSDist",
"Mean ScurvePedestalSummary_RMS_Endcap Distribution", 800, 0., 80.);
128 for (
unsigned int i = 0;
i <
vbpixCN.size();
i++) {
129 if (
vbpixM[
i] < pixelAliveThresh) {
153 if (lad == 1 || (lay == 1 && lad == 10) || (lay == 2 && lad == 16) || (lay == 3 && lad == 22))
155 while (
temp > modsize) {
175 std::cout <<
" Lay" << lay <<
" Lad" << lad <<
" Mod" <<
mod <<
" Chip" <<
temp <<
"\n\n";
182 for (
unsigned int i = 0;
i <
vfpixCN.size();
i++) {
183 if (
vfpixM[
i] < pixelAliveThresh) {
185 int hcyl = (
int)((
temp - 1) / 1080);
197 int panel = 1,
mod = 1;
203 }
else if (
temp > 8) {
206 }
else if (
temp > 2) {
217 }
else if (
temp > 6) {
239 std::cout <<
" Disk" << disk <<
" Blade" << blade <<
" Panel" << panel <<
" Mod" <<
mod <<
" Chip" <<
temp 254 RocSummary(
"ScurveThresholds_siPixelCalibDigis_");
273 RocSummary(
"ScurveSigmas_siPixelCalibDigis_");
327 int maxcrow, maxccol;
330 int moduleNumber = 0;
333 bool bbarrel =
false, bforward =
false, bhalfMod =
false, bwasHM =
false;
336 int panelNumber = -1;
338 for (std::vector<MonitorElement *>::const_iterator ime =
mes.begin(); ime !=
mes.end(); ++ime) {
346 name = (*ime)->getName();
348 path = (*ime)->getPathname();
351 if (
path.find(
"Module_") <
path.size()) {
352 if (
path != oldPath) {
354 if (moduleNumber != 1)
358 if (moduleNumber > 0)
364 if (
path.find(
"Barrel/") <
path.size()) {
369 if (
path.find(
"Endcap/") <
path.size()) {
372 if (
path.find(
"Panel_1") <
path.size())
374 if (
path.find(
"Panel_2") <
path.size())
385 if (bbarrel &&
bRS) {
390 for (
int i = 0;
i <
a;
i++) {
392 vbpixCN.push_back(bchipNumber);
402 if (bforward &&
fRS) {
404 int mod = moduleNumber;
408 if (panelNumber == 1)
413 if (panelNumber == 1 && (
mod == 1 ||
mod == 4))
416 for (
int i = 0;
i < maxcol * (
mod + panelNumber);
i++) {
418 vfpixCN.push_back(fchipNumber);
422 fchipNumber += maxcol * (
mod + panelNumber);
433 if (bbarrel &&
bRS) {
434 maxccol = 8, maxcrow = 2;
443 if (bforward &&
fRS) {
444 maxccol = moduleNumber + panelNumber;
446 if (panelNumber == 1 && (moduleNumber == 1 || moduleNumber == 4))
453 std::cout <<
"Number of Chips: b" << bchipNumber <<
" f" << fchipNumber <<
" " <<
tagname << std::endl;
459 std::vector<double> &vecCN,
460 std::vector<double> &vecMean,
461 std::vector<double> &vecSD,
463 float temp, sum, nentries;
464 for (
int cr = 0; cr <
maxr; cr++) {
465 for (
int cc = 0;
cc < maxc;
cc++) {
471 for (
int c = 1;
c < 53;
c++) {
472 for (
int r = 1;
r < 81;
r++) {
473 temp =
me->getBinContent(52 *
cc +
c, 80 * cr +
r);
482 vecCN.push_back(chipNumber);
483 vecMean.push_back(0);
486 double mean = sum / nentries;
489 vecCN.push_back(chipNumber);
490 vecMean.push_back(
mean);
493 for (
int c = 1;
c < 53;
c++) {
494 for (
int r = 1;
r < 81;
r++) {
495 temp =
me->getBinContent(52 *
cc +
c, 80 * cr +
r);
504 vecSD.push_back(avsd);
512 std::vector<double> &vecx,
513 std::vector<double> &vecy) {
514 if (vecx.size() == vecy.size()) {
515 for (
unsigned int i = 0;
i < vecx.size();
i++) {
516 hrocdep->Fill(vecx[
i], vecy[
i]);
517 hdist->Fill(vecy[
i]);
void analyze(const edm::Event &, const edm::EventSetup &) override
static const std::string kSharedResource
void FillRocLevelHistos(TH1F *hrocdep, TH1F *hdist, std::vector< double > &vecx, std::vector< double > &vecy)
std::vector< double > vfpixSD
TH1F * bhThresholdMean_dist
uint32_t cc[maxCellsPerHit]
void RocSumOneModule(int maxr, int maxc, MonitorElement *const &me, std::vector< double > &vecCN, std::vector< double > &vecMean, std::vector< double > &vecSD, int &chipNumber)
SiPixelDQMRocLevelAnalyzer(const edm::ParameterSet &)
std::vector< double > vfpixCN
~SiPixelDQMRocLevelAnalyzer() override
TH1F * ehPedestalRMS_dist
TH1F * ehPedestalMean_dist
std::vector< double > vbpixM
T getUntrackedParameter(std::string const &, T const &) const
virtual std::vector< dqm::harvesting::MonitorElement * > getAllContents(std::string const &path) const
void RocSummary(std::string tagname)
#define DEFINE_FWK_MODULE(type)
std::vector< MonitorElement * > mes
TH1F * ehThresholdMean_dist
std::vector< double > vfpixM
TH1F * ehThresholdRMS_dist
TH1F * bhPedestalRMS_dist
T * make(const Args &...args) const
make new ROOT object
edm::Service< TFileService > fs_
std::vector< double > vbpixCN
T mod(const T &a, const T &b)
TH1F * bhThresholdRMS_dist
TH1F * bhPedestalMean_dist
std::vector< double > vbpixSD
DQM_DEPRECATED bool open(std::string const &filename, bool overwrite=false, std::string const &path="", std::string const &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
constexpr float maxr[nPairs]