Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:11:13

0001 /*! \file SiPixelDataQuality.cc
0002  *  \brief This class represents ...
0003  *
0004  *  (Documentation under development)
0005  *
0006  */
0007 #include "DQM/SiPixelCommon/interface/SiPixelFolderOrganizer.h"
0008 #include "DQM/SiPixelMonitorClient/interface/ANSIColors.h"
0009 #include "DQM/SiPixelMonitorClient/interface/SiPixelDataQuality.h"
0010 #include "DQM/SiPixelMonitorClient/interface/SiPixelEDAClient.h"
0011 #include "DQM/SiPixelMonitorClient/interface/SiPixelUtility.h"
0012 
0013 #include "DQMServices/Core/interface/DQMStore.h"
0014 
0015 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0016 #include "FWCore/ParameterSet/interface/FileInPath.h"
0017 
0018 #include "DataFormats/DetId/interface/DetId.h"
0019 #include "DataFormats/GeometrySurface/interface/Surface.h"
0020 #include "DataFormats/TrackerCommon/interface/PixelBarrelName.h"
0021 #include "DataFormats/TrackerCommon/interface/PixelEndcapName.h"
0022 #include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h"
0023 
0024 #include "CondFormats/SiPixelObjects/interface/DetectorIndex.h"
0025 #include "CondFormats/SiPixelObjects/interface/SiPixelFrameConverter.h"
0026 
0027 #include "Geometry/CommonTopologies/interface/PixelTopology.h"
0028 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0029 #include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
0030 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0031 #include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h"
0032 
0033 #include "Rtypes.h"
0034 #include "TAxis.h"
0035 #include "TClass.h"
0036 #include "TH1F.h"
0037 #include "TH2F.h"
0038 #include "TImage.h"
0039 #include "TImageDump.h"
0040 #include "TPad.h"
0041 #include "TPaveLabel.h"
0042 #include "TPaveText.h"
0043 #include "TProfile.h"
0044 #include "TROOT.h"
0045 #include "TRandom.h"
0046 #include "TStopwatch.h"
0047 #include "TString.h"
0048 #include "TStyle.h"
0049 #include "TSystem.h"
0050 #include "TText.h"
0051 
0052 #include <cmath>
0053 #include <iostream>
0054 #include <map>
0055 
0056 #include <cstdlib>  // for free() - Root can allocate with malloc() - sigh...
0057 #include <fstream>
0058 
0059 using namespace std;
0060 using namespace edm;
0061 
0062 //------------------------------------------------------------------------------
0063 /*! \brief Constructor of the SiPixelInformationExtractor class.
0064  *
0065  */
0066 SiPixelDataQuality::SiPixelDataQuality(bool offlineXMLfile) : offlineXMLfile_(offlineXMLfile) {
0067   edm::LogInfo("SiPixelDataQuality") << " Creating SiPixelDataQuality "
0068                                      << "\n";
0069 
0070   allMods_ = 0;
0071   errorMods_ = 0;
0072   qflag_ = 1.;
0073 
0074   allmodsMap = nullptr;
0075   errmodsMap = nullptr;
0076   goodmodsMap = nullptr;
0077   allmodsVec = nullptr;
0078   errmodsVec = nullptr;
0079   goodmodsVec = nullptr;
0080   for (int i = 0; i < 40; ++i) {
0081     lastallmods_[i] = 0;
0082     lasterrmods_[i] = 0;
0083   }
0084   timeoutCounter_ = 0;
0085   lastLS_ = -1;
0086 }
0087 
0088 //------------------------------------------------------------------------------
0089 /*! \brief Destructor of the SiPixelDataQuality class.
0090  *
0091  */
0092 SiPixelDataQuality::~SiPixelDataQuality() {
0093   edm::LogInfo("SiPixelDataQuality") << " Deleting SiPixelDataQuality "
0094                                      << "\n";
0095   if (allmodsMap)
0096     delete allmodsMap;
0097   if (errmodsMap)
0098     delete errmodsMap;
0099   if (goodmodsMap)
0100     delete goodmodsMap;
0101   if (allmodsVec)
0102     delete allmodsVec;
0103   if (errmodsVec)
0104     delete errmodsVec;
0105   if (goodmodsVec)
0106     delete goodmodsVec;
0107 }
0108 
0109 //------------------------------------------------------------------------------
0110 /*! \brief (Documentation under construction).
0111  *
0112  *  Given a pointer to ME returns the associated detId
0113  */
0114 int SiPixelDataQuality::getDetId(MonitorElement *mE) {
0115   const string &mEName = mE->getName();
0116 
0117   int detId = 0;
0118 
0119   if (mEName.find("_3") != string::npos) {
0120     string detIdString = mEName.substr((mEName.find_last_of('_')) + 1, 9);
0121     std::istringstream isst;
0122     isst.str(detIdString);
0123     isst >> detId;
0124   }
0125 
0126   return detId;
0127 }
0128 
0129 /////////////////////////////////////////////////////////////////////////////////////////////////////
0130 
0131 void SiPixelDataQuality::bookGlobalQualityFlag(DQMStore::IBooker &iBooker, bool Tier0Flag, int nFEDs) {
0132   // std::cout<<"BOOK GLOBAL QUALITY FLAG MEs!"<<std::endl;
0133   iBooker.cd();
0134 
0135   iBooker.setCurrentFolder("Pixel/Barrel");
0136   if (!Tier0Flag) {
0137     ClusterModAll = iBooker.book1D("NClustertoChargeRatio_AllMod", "Cluster Noise All Modules", 768, 0., 768.);
0138     ClusterMod1 = iBooker.book1D(
0139         "NClustertoChargeRatio_NormMod1", "Normalized N_{Clusters} to Charge Ratio per Module1", 192, 0., 192.);
0140     ClusterMod2 = iBooker.book1D(
0141         "NClustertoChargeRatio_NormMod2", "Normalized N_{Clusters} to Charge Ratio per Module2", 192, 0., 192.);
0142     ClusterMod3 = iBooker.book1D(
0143         "NClustertoChargeRatio_NormMod3", "Normalized N_{Clusters} to Charge Ratio per Module3", 192, 0., 192.);
0144     ClusterMod4 = iBooker.book1D(
0145         "NClustertoChargeRatio_NormMod4", "Normalized N_{Clusters} to Charge Ratio per Module4", 192, 0., 192.);
0146   }
0147   iBooker.setCurrentFolder("Pixel/EventInfo");
0148   if (!Tier0Flag) {
0149     SummaryReportMap = iBooker.book2D("reportSummaryMap", "Pixel Summary Map", 3000, 0., 3000., 40, 0., 40.);
0150     SummaryReportMap->setAxisTitle("Lumi Section", 1);
0151     SummaryReportMap->setAxisTitle("Pixel FED #", 2);
0152     allmodsVec = new TH1D("allmodsVec", "allmodsVec", 40, 0., 40.);
0153     errmodsVec = new TH1D("errmodsVec", "errmodsVec", 40, 0., 40.);
0154     goodmodsVec = new TH1D("goodmodsVec", "goodmodsVec", 40, 0., 40.);
0155   } else {
0156     SummaryReportMap = iBooker.book2D("reportSummaryMap", "Pixel Summary Map", 2, 0., 2., 7, 0., 7.);
0157     SummaryReportMap->setBinLabel(1, "Barrel", 1);
0158     SummaryReportMap->setBinLabel(2, "Endcaps", 1);
0159     SummaryReportMap->setBinLabel(1, "Errors", 2);
0160     SummaryReportMap->setBinLabel(2, "NDigis", 2);
0161     SummaryReportMap->setBinLabel(3, "DigiCharge", 2);
0162     SummaryReportMap->setBinLabel(4, "ClusterSize", 2);
0163     SummaryReportMap->setBinLabel(5, "NClusters", 2);
0164     SummaryReportMap->setBinLabel(6, "ClusterCharge", 2);
0165     SummaryReportMap->setBinLabel(7, "HitEff", 2);
0166     allmodsMap = new TH2F("allmodsMap", "allmodsMap", 2, 0., 2., 7, 0., 7.);
0167     errmodsMap = new TH2F("errmodsMap", "errmodsMap", 2, 0., 2., 7, 0., 7.);
0168     goodmodsMap = new TH2F("goodmodsMap", "goodmodsMap", 2, 0., 2., 7, 0., 7.);
0169   }
0170   SummaryPixel = iBooker.bookFloat("reportSummary");
0171   iBooker.setCurrentFolder("Pixel/EventInfo/reportSummaryContents");
0172   SummaryBarrel = iBooker.bookFloat("PixelBarrelFraction");
0173   SummaryEndcap = iBooker.bookFloat("PixelEndcapFraction");
0174   // book the data certification cuts:
0175   iBooker.setCurrentFolder("Pixel/AdditionalPixelErrors");
0176   NErrorsFEDs = iBooker.bookFloat("FEDsNErrorsCut");
0177   iBooker.setCurrentFolder("Pixel/Barrel");
0178   NErrorsBarrel = iBooker.bookFloat("BarrelNErrorsCut");
0179   NDigisBarrel = iBooker.bookInt("BarrelNDigisCut");
0180   DigiChargeBarrel = iBooker.bookInt("BarrelDigiChargeCut");
0181   ClusterSizeBarrel = iBooker.bookInt("BarrelClusterSizeCut");
0182   NClustersBarrel = iBooker.bookInt("BarrelNClustersCut");
0183   ClusterChargeBarrel = iBooker.bookInt("BarrelClusterChargeCut");
0184   iBooker.setCurrentFolder("Pixel/Endcap");
0185   NErrorsEndcap = iBooker.bookFloat("EndcapNErrorsCut");
0186   NDigisEndcap = iBooker.bookInt("EndcapNDigisCut");
0187   DigiChargeEndcap = iBooker.bookInt("EndcapDigiChargeCut");
0188   ClusterSizeEndcap = iBooker.bookInt("EndcapClusterSizeCut");
0189   NClustersEndcap = iBooker.bookInt("EndcapNClustersCut");
0190   ClusterChargeEndcap = iBooker.bookInt("EndcapClusterChargeCut");
0191   if (Tier0Flag) {
0192     iBooker.setCurrentFolder("Pixel/Tracks");
0193     NPixelTracks = iBooker.bookInt("PixelTracksCut");
0194   }
0195 
0196   // Init MonitoringElements:
0197   if (nFEDs > 0) {
0198     if (SummaryPixel)
0199       SummaryPixel->Fill(1.);
0200     if (SummaryBarrel)
0201       SummaryBarrel->Fill(1.);
0202     if (SummaryEndcap)
0203       SummaryEndcap->Fill(1.);
0204   } else {
0205     if (SummaryPixel)
0206       SummaryPixel->Fill(-1.);
0207     if (SummaryBarrel)
0208       SummaryBarrel->Fill(-1.);
0209     if (SummaryEndcap)
0210       SummaryEndcap->Fill(-1.);
0211   }
0212   if (NErrorsBarrel)
0213     NErrorsBarrel->Fill(1.);
0214   if (NErrorsEndcap)
0215     NErrorsEndcap->Fill(1.);
0216   if (NErrorsFEDs)
0217     NErrorsFEDs->Fill(1.);
0218   if (NDigisBarrel)
0219     NDigisBarrel->Fill(1);
0220   if (NDigisEndcap)
0221     NDigisEndcap->Fill(1);
0222   if (DigiChargeBarrel)
0223     DigiChargeBarrel->Fill(1);
0224   if (DigiChargeEndcap)
0225     DigiChargeEndcap->Fill(1);
0226   if (ClusterSizeBarrel)
0227     ClusterSizeBarrel->Fill(1);
0228   if (ClusterSizeEndcap)
0229     ClusterSizeEndcap->Fill(1);
0230   if (ClusterChargeBarrel)
0231     ClusterChargeBarrel->Fill(1);
0232   if (ClusterChargeEndcap)
0233     ClusterChargeEndcap->Fill(1);
0234   if (NClustersBarrel)
0235     NClustersBarrel->Fill(1);
0236   if (NClustersEndcap)
0237     NClustersEndcap->Fill(1);
0238   if (Tier0Flag) {
0239     if (NPixelTracks)
0240       NPixelTracks->Fill(1);
0241   }
0242 
0243   if (SummaryReportMap) {
0244     if (!Tier0Flag)
0245       for (int i = 1; i != 3001; i++)
0246         for (int j = 1; j != 41; j++)
0247           SummaryReportMap->setBinContent(i, j, -1.);
0248     if (Tier0Flag)
0249       for (int i = 1; i != 3; i++)
0250         for (int j = 1; j != 8; j++)
0251           SummaryReportMap->setBinContent(i, j, -1.);
0252   }
0253   if (!Tier0Flag) {
0254     for (int j = 1; j != 41; j++) {
0255       if (allmodsVec)
0256         allmodsVec->SetBinContent(j, 0.);
0257       if (errmodsVec)
0258         errmodsVec->SetBinContent(j, 0.);
0259       if (goodmodsVec)
0260         goodmodsVec->SetBinContent(j, 0.);
0261     }
0262   }
0263   if (Tier0Flag) {
0264     for (int i = 1; i != 3; i++)
0265       for (int j = 1; j != 8; j++) {
0266         if (allmodsMap)
0267           allmodsMap->SetBinContent(i, j, 0.);
0268         if (errmodsMap)
0269           errmodsMap->SetBinContent(i, j, 0.);
0270         if (goodmodsMap)
0271           goodmodsMap->SetBinContent(i, j, 0.);
0272       }
0273   }
0274 
0275   iBooker.cd();
0276 }
0277 
0278 //**********************************************************************************************
0279 
0280 void SiPixelDataQuality::computeGlobalQualityFlag(
0281     DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool init, int nFEDs, bool Tier0Flag) {
0282   if (init) {
0283     allMods_ = 0;
0284     errorMods_ = 0;
0285     qflag_ = 0.;
0286     barrelMods_ = 0;
0287     endcapMods_ = 0;
0288     objectCount_ = 0;
0289     DONE_ = false;
0290 
0291     // Error counters and flags:
0292     n_errors_barrel_ = 0;
0293     barrel_error_flag_ = 0.;
0294     n_errors_endcap_ = 0;
0295     endcap_error_flag_ = 0.;
0296     n_errors_pixel_ = 0;
0297     pixel_error_flag_ = 0.;
0298     digiStatsBarrel = false, clusterStatsBarrel = false, trackStatsBarrel = false;
0299     digiCounterBarrel = 0, clusterCounterBarrel = 0, trackCounterBarrel = 0;
0300     digiStatsEndcap = false, clusterStatsEndcap = false, trackStatsEndcap = false;
0301     digiCounterEndcap = 0, clusterCounterEndcap = 0, trackCounterEndcap = 0;
0302     init = false;
0303   }
0304   if (nFEDs == 0)
0305     return;
0306 
0307   string currDir = iBooker.pwd();
0308   string dname = currDir.substr(currDir.find_last_of('/') + 1);
0309 
0310   if ((!Tier0Flag && dname.find("Module_") != string::npos) ||
0311       (Tier0Flag && (dname.find("Ladder_") != string::npos || dname.find("Blade_") != string::npos))) {
0312     objectCount_++;
0313 
0314     if (currDir.find("Pixel") != string::npos)
0315       allMods_++;
0316     if (currDir.find("Barrel") != string::npos)
0317       barrelMods_++;
0318     if (currDir.find("Endcap") != string::npos)
0319       endcapMods_++;
0320     vector<string> meVec = iGetter.getMEs();
0321     for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
0322       string full_path = currDir + "/" + (*it);
0323       if (full_path.find("ndigis_") != string::npos) {
0324         MonitorElement *me = iGetter.get(full_path);
0325         if (!me)
0326           continue;
0327         if (me->getEntries() > 25) {
0328           if (full_path.find("Barrel") != string::npos)
0329             digiCounterBarrel++;
0330           if (full_path.find("Endcap") != string::npos)
0331             digiCounterEndcap++;
0332         }
0333       } else if (Tier0Flag && full_path.find("nclusters_OnTrack_") != string::npos) {
0334         MonitorElement *me = iGetter.get(full_path);
0335         if (!me)
0336           continue;
0337         if (me->getEntries() > 25) {
0338           if (full_path.find("Barrel") != string::npos)
0339             clusterCounterBarrel++;
0340           if (full_path.find("Endcap") != string::npos)
0341             clusterCounterEndcap++;
0342         }
0343       } else if (!Tier0Flag && full_path.find("nclusters_") != string::npos) {
0344         MonitorElement *me = iGetter.get(full_path);
0345         if (!me)
0346           continue;
0347         if (me->getEntries() > 25) {
0348           if (full_path.find("Barrel") != string::npos)
0349             clusterCounterBarrel++;
0350           if (full_path.find("Endcap") != string::npos)
0351             clusterCounterEndcap++;
0352         }
0353       }
0354     }
0355   }
0356   vector<string> subDirVec = iGetter.getSubdirs();
0357   for (vector<string>::const_iterator ic = subDirVec.begin(); ic != subDirVec.end(); ic++) {
0358     iGetter.cd(*ic);
0359     iBooker.cd(*ic);
0360     init = false;
0361     computeGlobalQualityFlag(iBooker, iGetter, init, nFEDs, Tier0Flag);
0362     iBooker.goUp();
0363     iGetter.setCurrentFolder(iBooker.pwd());
0364   }
0365 
0366   // Make sure I have finished looping over all Modules/Ladders/Blades:
0367   if (!Tier0Flag) {  // online case
0368     if (objectCount_ == 1440)
0369       DONE_ = true;
0370   } else {  // offline case
0371     if (objectCount_ == 288)
0372       DONE_ = true;
0373   }
0374 
0375   if (DONE_ && currDir == "Pixel/EventInfo/reportSummaryContents") {
0376     // Evaluate error flag now, only stored in AdditionalPixelErrors:
0377     MonitorElement *me_err = iGetter.get("Pixel/AdditionalPixelErrors/FedETypeNErr");
0378     MonitorElement *me_evt = iGetter.get("Pixel/EventInfo/processedEvents");
0379     if (me_err && me_evt) {
0380       for (int i = 1; i != 41; i++)
0381         for (int j = 1; j != 22; j++)
0382           if (me_err->getBinContent(i, j) > 0) {
0383             n_errors_pixel_ = n_errors_pixel_ + int(me_err->getBinContent(i, j));
0384             if (i < 33)
0385               n_errors_barrel_ = n_errors_barrel_ + int(me_err->getBinContent(i, j));
0386             if (i > 32)
0387               n_errors_endcap_ = n_errors_endcap_ + int(me_err->getBinContent(i, j));
0388           }
0389       int NProcEvts = me_evt->getIntValue();
0390       if (NProcEvts > 0) {
0391         barrel_error_flag_ = (float(NProcEvts) - float(n_errors_barrel_)) / float(NProcEvts);
0392         endcap_error_flag_ = (float(NProcEvts) - float(n_errors_endcap_)) / float(NProcEvts);
0393         pixel_error_flag_ = (float(NProcEvts) - float(n_errors_barrel_) - float(n_errors_endcap_)) / float(NProcEvts);
0394       }
0395     }
0396     NErrorsBarrel = iGetter.get("Pixel/Barrel/BarrelNErrorsCut");
0397     if (NErrorsBarrel)
0398       NErrorsBarrel->Fill(barrel_error_flag_);
0399     NErrorsEndcap = iGetter.get("Pixel/Endcap/EndcapNErrorsCut");
0400     if (NErrorsEndcap)
0401       NErrorsEndcap->Fill(endcap_error_flag_);
0402 
0403     string meName0;
0404     MonitorElement *me;
0405 
0406     // Fill the Digi flags:
0407     if (!Tier0Flag) {
0408       meName0 = "Pixel/Barrel/SUMDIG_ndigis_Barrel";
0409       if (digiCounterBarrel / 768 > 0.5)
0410         digiStatsBarrel = true;
0411       if (digiCounterEndcap / 672 > 0.5)
0412         digiStatsEndcap = true;
0413     } else {
0414       meName0 = "Pixel/Barrel/SUMOFF_ndigis_Barrel";
0415       if (digiCounterBarrel / 192 > 0.5)
0416         digiStatsBarrel = true;
0417       if (digiCounterEndcap / 96 > 0.5)
0418         digiStatsEndcap = true;
0419     }
0420     me = iGetter.get(meName0);
0421     if (me) {
0422       NDigisBarrel = iGetter.get("Pixel/Barrel/BarrelNDigisCut");
0423       if (NDigisBarrel && digiStatsBarrel) {
0424         if (me->hasError())
0425           NDigisBarrel->Fill(0);
0426         else
0427           NDigisBarrel->Fill(1);
0428       }
0429     }
0430     if (!Tier0Flag)
0431       meName0 = "Pixel/Endcap/SUMDIG_ndigis_Endcap";
0432     else
0433       meName0 = "Pixel/Endcap/SUMOFF_ndigis_Endcap";
0434     me = iGetter.get(meName0);
0435     if (me) {
0436       NDigisEndcap = iGetter.get("Pixel/Endcap/EndcapNDigisCut");
0437       if (NDigisEndcap && digiStatsEndcap) {
0438         if (me->hasError())
0439           NDigisEndcap->Fill(0);
0440         else
0441           NDigisEndcap->Fill(1);
0442       }
0443     }
0444     if (!Tier0Flag)
0445       meName0 = "Pixel/Barrel/SUMDIG_adc_Barrel";
0446     else
0447       meName0 = "Pixel/Barrel/SUMOFF_adc_Barrel";
0448     me = iGetter.get(meName0);
0449     if (me) {
0450       DigiChargeBarrel = iGetter.get("Pixel/Barrel/BarrelDigiChargeCut");
0451       if (DigiChargeBarrel && digiStatsBarrel) {
0452         if (me->hasError())
0453           DigiChargeBarrel->Fill(0);
0454         else
0455           DigiChargeBarrel->Fill(1);
0456       }
0457     }
0458     if (!Tier0Flag)
0459       meName0 = "Pixel/Endcap/SUMDIG_adc_Endcap";
0460     else
0461       meName0 = "Pixel/Endcap/SUMOFF_adc_Endcap";
0462     me = iGetter.get(meName0);
0463     if (me) {
0464       DigiChargeEndcap = iGetter.get("Pixel/Endcap/EndcapDigiChargeCut");
0465       if (DigiChargeEndcap && digiStatsEndcap) {
0466         if (me->hasError())
0467           DigiChargeEndcap->Fill(0);
0468         else
0469           DigiChargeEndcap->Fill(1);
0470       }
0471     }
0472 
0473     // Fill the Cluster flags:
0474     if (!Tier0Flag) {
0475       meName0 = "Pixel/Barrel/SUMCLU_size_Barrel";
0476       if (clusterCounterBarrel / 768 > 0.5)
0477         clusterStatsBarrel = true;
0478       if (clusterCounterEndcap / 672 > 0.5)
0479         clusterStatsEndcap = true;
0480     } else {
0481       meName0 = "Pixel/Barrel/SUMOFF_size_OnTrack_Barrel";
0482       if (clusterCounterBarrel / 192 > 0.5)
0483         clusterStatsBarrel = true;
0484       if (clusterCounterEndcap / 96 > 0.5)
0485         clusterStatsEndcap = true;
0486     }
0487     me = iGetter.get(meName0);
0488     if (me) {
0489       ClusterSizeBarrel = iGetter.get("Pixel/Barrel/BarrelClusterSizeCut");
0490       if (ClusterSizeBarrel && clusterStatsBarrel) {
0491         if (me->hasError())
0492           ClusterSizeBarrel->Fill(0);
0493         else
0494           ClusterSizeBarrel->Fill(1);
0495       }
0496     }
0497     if (!Tier0Flag)
0498       meName0 = "Pixel/Endcap/SUMCLU_size_Endcap";
0499     else
0500       meName0 = "Pixel/Endcap/SUMOFF_size_OnTrack_Endcap";
0501     me = iGetter.get(meName0);
0502     if (me) {
0503       ClusterSizeEndcap = iGetter.get("Pixel/Endcap/EndcapClusterSizeCut");
0504       if (ClusterSizeEndcap && clusterStatsEndcap) {
0505         if (me->hasError())
0506           ClusterSizeEndcap->Fill(0);
0507         else
0508           ClusterSizeEndcap->Fill(1);
0509       }
0510     }
0511     if (!Tier0Flag)
0512       meName0 = "Pixel/Barrel/SUMCLU_charge_Barrel";
0513     else
0514       meName0 = "Pixel/Barrel/SUMOFF_charge_OnTrack_Barrel";
0515     me = iGetter.get(meName0);
0516     if (me) {
0517       ClusterChargeBarrel = iGetter.get("Pixel/Barrel/BarrelClusterChargeCut");
0518       if (ClusterChargeBarrel && clusterStatsBarrel) {
0519         if (me->hasError())
0520           ClusterChargeBarrel->Fill(0);
0521         else
0522           ClusterChargeBarrel->Fill(1);
0523       }
0524     }
0525     if (!Tier0Flag)
0526       meName0 = "Pixel/Endcap/SUMCLU_charge_Endcap";
0527     else
0528       meName0 = "Pixel/Endcap/SUMOFF_charge_OnTrack_Endcap";
0529     me = iGetter.get(meName0);
0530     if (me) {
0531       ClusterChargeEndcap = iGetter.get("Pixel/Endcap/EndcapClusterChargeCut");
0532       if (ClusterChargeEndcap && clusterStatsEndcap) {
0533         if (me->hasError())
0534           ClusterChargeEndcap->Fill(0);
0535         else
0536           ClusterChargeEndcap->Fill(1);
0537       }
0538     }
0539     if (!Tier0Flag)
0540       meName0 = "Pixel/Barrel/SUMCLU_nclusters_Barrel";
0541     else
0542       meName0 = "Pixel/Barrel/SUMOFF_nclusters_OnTrack_Barrel";
0543     me = iGetter.get(meName0);
0544     if (me) {
0545       NClustersBarrel = iGetter.get("Pixel/Barrel/BarrelNClustersCut");
0546       if (NClustersBarrel && clusterStatsBarrel) {
0547         if (me->hasError())
0548           NClustersBarrel->Fill(0);
0549         else
0550           NClustersBarrel->Fill(1);
0551       }
0552     }
0553     if (!Tier0Flag)
0554       meName0 = "Pixel/Endcap/SUMCLU_nclusters_Endcap";
0555     else
0556       meName0 = "Pixel/Endcap/SUMOFF_nclusters_OnTrack_Endcap";
0557     me = iGetter.get(meName0);
0558     if (me) {
0559       NClustersEndcap = iGetter.get("Pixel/Endcap/EndcapNClustersCut");
0560       if (NClustersEndcap && clusterStatsEndcap) {
0561         if (me->hasError())
0562           NClustersEndcap->Fill(0);
0563         else
0564           NClustersEndcap->Fill(1);
0565       }
0566     }
0567     // Pixel Track multiplicity / Pixel hit efficiency
0568     meName0 = "Pixel/Tracks/ntracks_generalTracks";
0569     me = iGetter.get(meName0);
0570     if (me) {
0571       NPixelTracks = iGetter.get("Pixel/Tracks/PixelTracksCut");
0572       if (NPixelTracks && me->getBinContent(1) > 1000) {
0573         if ((float)me->getBinContent(2) / (float)me->getBinContent(1) < 0.01) {
0574           NPixelTracks->Fill(0);
0575         } else {
0576           NPixelTracks->Fill(1);
0577         }
0578       }
0579     }
0580 
0581     //********************************************************************************************************
0582 
0583     // Final combination of all Data Quality results:
0584     float pixelFlag = -1., barrelFlag = -1., endcapFlag = -1.;
0585     float barrel_errors_temp[1] = {-1.};
0586     int barrel_cuts_temp[5] = {5 * -1};
0587     float endcap_errors_temp[1] = {-1.};
0588     int endcap_cuts_temp[5] = {5 * -1};
0589     int pixel_cuts_temp[1] = {-1};
0590     float combinedCuts = 1.;
0591     int numerator = 0, denominator = 0;
0592 
0593     // Barrel results:
0594     me = iGetter.get("Pixel/Barrel/BarrelNErrorsCut");
0595     if (me)
0596       barrel_errors_temp[0] = me->getFloatValue();
0597     me = iGetter.get("Pixel/Barrel/BarrelNDigisCut");
0598     if (me)
0599       barrel_cuts_temp[0] = me->getIntValue();
0600     me = iGetter.get("Pixel/Barrel/BarrelDigiChargeCut");
0601     if (me)
0602       barrel_cuts_temp[1] = me->getIntValue();
0603     me = iGetter.get("Pixel/Barrel/BarrelClusterSizeCut");
0604     if (me)
0605       barrel_cuts_temp[2] = me->getIntValue();
0606     me = iGetter.get("Pixel/Barrel/BarrelNClustersCut");
0607     if (me)
0608       barrel_cuts_temp[3] = me->getIntValue();
0609     me = iGetter.get("Pixel/Barrel/BarrelClusterChargeCut");
0610     if (me)
0611       barrel_cuts_temp[4] = me->getIntValue();
0612     for (int k = 0; k != 5; k++) {
0613       if (barrel_cuts_temp[k] >= 0) {
0614         numerator = numerator + barrel_cuts_temp[k];
0615         denominator++;
0616       }
0617     }
0618     if (denominator != 0)
0619       combinedCuts = float(numerator) / float(denominator);
0620     barrelFlag = barrel_errors_temp[0] * combinedCuts;
0621 
0622     // Endcap results:
0623     combinedCuts = 1.;
0624     numerator = 0;
0625     denominator = 0;
0626     me = iGetter.get("Pixel/Endcap/EndcapNErrorsCut");
0627     if (me)
0628       endcap_errors_temp[0] = me->getFloatValue();
0629     me = iGetter.get("Pixel/Endcap/EndcapNDigisCut");
0630     if (me)
0631       endcap_cuts_temp[0] = me->getIntValue();
0632     me = iGetter.get("Pixel/Endcap/EndcapDigiChargeCut");
0633     if (me)
0634       endcap_cuts_temp[1] = me->getIntValue();
0635     me = iGetter.get("Pixel/Endcap/EndcapClusterSizeCut");
0636     if (me)
0637       endcap_cuts_temp[2] = me->getIntValue();
0638     me = iGetter.get("Pixel/Endcap/EndcapNClustersCut");
0639     if (me)
0640       endcap_cuts_temp[3] = me->getIntValue();
0641     me = iGetter.get("Pixel/Endcap/EndcapClusterChargeCut");
0642     if (me)
0643       endcap_cuts_temp[4] = me->getIntValue();
0644     for (int k = 0; k != 5; k++) {
0645       if (endcap_cuts_temp[k] >= 0) {
0646         numerator = numerator + endcap_cuts_temp[k];
0647         denominator++;
0648       }
0649     }
0650     if (denominator != 0)
0651       combinedCuts = float(numerator) / float(denominator);
0652     endcapFlag = endcap_errors_temp[0] * combinedCuts;
0653 
0654     // Track results:
0655     combinedCuts = 1.;
0656     numerator = 0;
0657     denominator = 0;
0658     me = iGetter.get("Pixel/Tracks/PixelTracksCut");
0659     if (me)
0660       pixel_cuts_temp[0] = me->getIntValue();
0661 
0662     // Combination of all:
0663     combinedCuts = 1.;
0664     numerator = 0;
0665     denominator = 0;
0666     for (int k = 0; k != 5; k++) {
0667       if (barrel_cuts_temp[k] >= 0) {
0668         numerator = numerator + barrel_cuts_temp[k];
0669         denominator++;
0670       }
0671       if (endcap_cuts_temp[k] >= 0) {
0672         numerator = numerator + endcap_cuts_temp[k];
0673         denominator++;
0674       }
0675       if (k < 1 && pixel_cuts_temp[k] >= 0) {
0676         numerator = numerator + pixel_cuts_temp[k];
0677         denominator++;
0678       }
0679     }
0680     if (denominator != 0)
0681       combinedCuts = float(numerator) / float(denominator);
0682     pixelFlag = float(pixel_error_flag_) * float(combinedCuts);
0683 
0684     SummaryPixel = iGetter.get("Pixel/EventInfo/reportSummary");
0685     if (SummaryPixel)
0686       SummaryPixel->Fill(pixelFlag);
0687     SummaryBarrel = iGetter.get("Pixel/EventInfo/reportSummaryContents/PixelBarrelFraction");
0688     if (SummaryBarrel)
0689       SummaryBarrel->Fill(barrelFlag);
0690     SummaryEndcap = iGetter.get("Pixel/EventInfo/reportSummaryContents/PixelEndcapFraction");
0691     if (SummaryEndcap)
0692       SummaryEndcap->Fill(endcapFlag);
0693   }
0694 }
0695 
0696 //**********************************************************************************************
0697 
0698 void SiPixelDataQuality::computeGlobalQualityFlagByLumi(DQMStore::IGetter &iGetter,
0699                                                         bool init,
0700                                                         int nFEDs,
0701                                                         bool Tier0Flag,
0702                                                         int nEvents_lastLS_,
0703                                                         int nErrorsBarrel_lastLS_,
0704                                                         int nErrorsEndcap_lastLS_) {
0705   if (nFEDs == 0)
0706     return;
0707 
0708   // evaluate fatal FED errors for data quality:
0709   float BarrelRate_LS = 1.;
0710   float EndcapRate_LS = 1.;
0711   float PixelRate_LS = 1.;
0712   MonitorElement *me = iGetter.get("Pixel/AdditionalPixelErrors/byLumiErrors");
0713   if (me) {
0714     double nBarrelErrors_LS = me->getBinContent(1) - nErrorsBarrel_lastLS_;
0715     double nEndcapErrors_LS = me->getBinContent(2) - nErrorsEndcap_lastLS_;
0716     double nEvents_LS = me->getBinContent(0) - nEvents_lastLS_;
0717     if (nBarrelErrors_LS / nEvents_LS > 0.5)
0718       BarrelRate_LS = 0.;
0719     if (nEndcapErrors_LS / nEvents_LS > 0.5)
0720       EndcapRate_LS = 0.;
0721     if ((nBarrelErrors_LS + nEndcapErrors_LS) / nEvents_LS > 0.5)
0722       PixelRate_LS = 0.;
0723   }
0724 
0725   // evaluate mean cluster charge on tracks for data quality:
0726   float BarrelClusterCharge = 1.;
0727   float EndcapClusterCharge = 1.;
0728   float PixelClusterCharge = 1.;
0729   MonitorElement *me1 = iGetter.get("Pixel/Clusters/OnTrack/charge_siPixelClusters_Barrel");
0730   if (me1 && me1->getMean() < 12.)
0731     BarrelClusterCharge = 0.;
0732   MonitorElement *me2 = iGetter.get("Pixel/Clusters/OnTrack/charge_siPixelClusters_Endcap");
0733   if (me2 && me2->getMean() < 12.)
0734     EndcapClusterCharge = 0.;
0735   MonitorElement *me3 = iGetter.get("Pixel/Clusters/OnTrack/charge_siPixelClusters");
0736   if (me3 && me3->getMean() < 12.)
0737     PixelClusterCharge = 0.;
0738 
0739   // evaluate average FED occupancy for data quality:
0740   float BarrelOccupancy = 1.;
0741   float EndcapOccupancy = 1.;
0742   float PixelOccupancy = 1.;
0743   MonitorElement *me4 = iGetter.get("Pixel/averageDigiOccupancy");
0744   if (me4) {
0745     double minBarrelOcc = 999999.;
0746     double maxBarrelOcc = -1.;
0747     double meanBarrelOcc = 0.;
0748     double minEndcapOcc = 999999.;
0749     double maxEndcapOcc = -1.;
0750     double meanEndcapOcc = 0.;
0751     for (int i = 1; i != 41; i++) {
0752       if (i <= 32 && me4->getBinContent(i) < minBarrelOcc)
0753         minBarrelOcc = me4->getBinContent(i);
0754       if (i <= 32 && me4->getBinContent(i) > maxBarrelOcc)
0755         maxBarrelOcc = me4->getBinContent(i);
0756       if (i <= 32)
0757         meanBarrelOcc += me4->getBinContent(i);
0758       if (i > 32 && me4->getBinContent(i) < minEndcapOcc)
0759         minEndcapOcc = me4->getBinContent(i);
0760       if (i > 32 && me4->getBinContent(i) > maxEndcapOcc)
0761         maxEndcapOcc = me4->getBinContent(i);
0762       if (i > 32)
0763         meanEndcapOcc += me4->getBinContent(i);
0764     }
0765     meanBarrelOcc = meanBarrelOcc / 32.;
0766     meanEndcapOcc = meanEndcapOcc / 8.;
0767     if (minBarrelOcc < 0.1 * meanBarrelOcc || maxBarrelOcc > 2.5 * meanBarrelOcc)
0768       BarrelOccupancy = 0.;
0769     if (minEndcapOcc < 0.2 * meanEndcapOcc || maxEndcapOcc > 1.8 * meanEndcapOcc)
0770       EndcapOccupancy = 0.;
0771     PixelOccupancy = BarrelOccupancy * EndcapOccupancy;
0772   }
0773 
0774   float pixelFlag = PixelRate_LS * PixelClusterCharge * PixelOccupancy;
0775   float barrelFlag = BarrelRate_LS * BarrelClusterCharge * BarrelOccupancy;
0776   float endcapFlag = EndcapRate_LS * EndcapClusterCharge * EndcapOccupancy;
0777   SummaryPixel = iGetter.get("Pixel/EventInfo/reportSummary");
0778   if (SummaryPixel)
0779     SummaryPixel->Fill(pixelFlag);
0780   SummaryBarrel = iGetter.get("Pixel/EventInfo/reportSummaryContents/PixelBarrelFraction");
0781   if (SummaryBarrel)
0782     SummaryBarrel->Fill(barrelFlag);
0783   SummaryEndcap = iGetter.get("Pixel/EventInfo/reportSummaryContents/PixelEndcapFraction");
0784   if (SummaryEndcap)
0785     SummaryEndcap->Fill(endcapFlag);
0786 }
0787 
0788 //**********************************************************************************************
0789 
0790 void SiPixelDataQuality::fillGlobalQualityPlot(DQMStore::IBooker &iBooker,
0791                                                DQMStore::IGetter &iGetter,
0792                                                bool init,
0793                                                const SiPixelFedCablingMap *theCablingMap,
0794                                                int nFEDs,
0795                                                bool Tier0Flag,
0796                                                int lumisec) {
0797   // std::cout<<"Entering SiPixelDataQuality::fillGlobalQualityPlot:
0798   // "<<nFEDs<<std::endl;
0799   if (init) {
0800     count = 0;
0801     errcount = 0;
0802     init = false;
0803     count1 = 0;
0804     count2 = 0;
0805     count3 = 0;
0806     count4 = 0;
0807     count5 = 0;
0808     count6 = 0;
0809     modCounter_ = 0;
0810     if (!Tier0Flag) {
0811       // The plots that these Vecs are integrated throughout a run
0812       // So at each lumi section I save their last values (lastmods)
0813       // And then subtract them out later when filling the SummaryMap
0814       for (int j = 1; j != 41; j++) {
0815         if (allmodsVec)
0816           lastallmods_[j - 1] = allmodsVec->GetBinContent(j);
0817         if (errmodsVec)
0818           lasterrmods_[j - 1] = errmodsVec->GetBinContent(j);
0819         if (allmodsVec)
0820           allmodsVec->SetBinContent(j, 0.);
0821         if (errmodsVec)
0822           errmodsVec->SetBinContent(j, 0.);
0823         if (goodmodsVec)
0824           goodmodsVec->SetBinContent(j, 0.);
0825       }
0826     }
0827     if (Tier0Flag) {
0828       for (int i = 1; i != 3; i++)
0829         for (int j = 1; j != 8; j++) {
0830           if (allmodsMap)
0831             allmodsMap->SetBinContent(i, j, 0.);
0832           if (errmodsMap)
0833             errmodsMap->SetBinContent(i, j, 0.);
0834           if (goodmodsMap)
0835             goodmodsMap->SetBinContent(i, j, 0.);
0836         }
0837     }
0838   }
0839 
0840   //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0841   // Fill Maps:
0842   // Online:
0843   if (nFEDs == 0)
0844     return;
0845 
0846   if (!Tier0Flag) {
0847     // Not elegant, but not sure where else to put this sweet new plot!
0848     MonitorElement *meTmp = iGetter.get("Pixel/Barrel/NClustertoChargeRatio_AllMod");
0849     MonitorElement *meTop = iGetter.get("Pixel/Barrel/SUMCLU_nclusters_Barrel");
0850     MonitorElement *meBot = iGetter.get("Pixel/Barrel/SUMCLU_charge_Barrel");
0851     if (meTop && meBot && meTmp) {
0852       for (int bin = 1; bin < 769; ++bin) {
0853         float content = 0.0;
0854         if (meBot->getBinContent(bin) > 0.0) {
0855           content = meTop->getBinContent(bin) / meBot->getBinContent(bin);
0856         }
0857         meTmp->setBinContent(bin, content);
0858       }
0859       for (int j = 0; j < 4; ++j) {
0860         static const char buf[] = "Pixel/Barrel/NClustertoChargeRatio_NormMod%i";
0861         char modplot[sizeof(buf) + 16];
0862         sprintf(modplot, buf, j + 1);
0863         MonitorElement *meFinal = iGetter.get(modplot);
0864         if (!meFinal)
0865           continue;
0866         for (int i = 1; i < 769; ++i) {
0867           int k = 3 - j;
0868           if (int(i + k) % 4 == 0)
0869             meFinal->setBinContent(int((i + k) / 4), meTmp->getBinContent(i));
0870         }
0871         // Filling done. Now modification.
0872         float SFLay[3], TotLay[3];
0873         for (int ll = 0; ll < 3; ++ll)
0874           TotLay[ll] = 0.0;
0875         for (int bin = 1; bin < (meFinal->getNbinsX() + 1); ++bin) {
0876           int layer = int((bin % 48) / 16);
0877           TotLay[layer] += meFinal->getBinContent(bin);
0878         }
0879         float laynorm = TotLay[1] / 64.;
0880         for (int ll = 0; ll < 3; ++ll) {
0881           SFLay[ll] = 0.0;
0882           if (TotLay[ll] > 0.0 && TotLay[1] > 0.0)
0883             SFLay[ll] = TotLay[1] / TotLay[ll] * (1. / laynorm);
0884         }
0885         // now loop through plot
0886         for (int bin = 1; bin < (meFinal->getNbinsX() + 1); ++bin) {
0887           // access the layer number for bin: int((i%48)/16)
0888           int layer = int((bin % 48) / 16);
0889           float content = meFinal->getBinContent(bin);
0890           // apply scale factor to bin content
0891           meFinal->setBinContent(bin, content * SFLay[layer]);
0892         }
0893       }
0894     }
0895 
0896     string currDir = iBooker.pwd();
0897     if (currDir.find("Reference") != string::npos || currDir.find("Additional") != string::npos)
0898       return;
0899     string dname = currDir.substr(currDir.find_last_of('/') + 1);
0900     if (dname.find("Module_") != string::npos && currDir.find("Reference") == string::npos) {
0901       vector<string> meVec = iGetter.getMEs();
0902       int detId = -1;
0903       int fedId = -1;
0904       for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end();
0905            it++) {  // loop over all modules and fill ndigis into allmodsMap
0906         // checking for any digis or FED errors to decide if this module is in
0907         // DAQ:
0908         string full_path = currDir + "/" + (*it);
0909         if (detId == -1 && full_path.find("SUMOFF") == string::npos &&
0910             (full_path.find("ndigis") != string::npos && full_path.find("SUMDIG") == string::npos) &&
0911             (getDetId(iGetter.get(full_path)) > 100)) {
0912           MonitorElement *me = iGetter.get(full_path);
0913           if (!me)
0914             continue;
0915           if ((full_path.find("ndigis") != string::npos)) {
0916             modCounter_++;
0917             detId = getDetId(me);
0918             for (int fedid = 0; fedid != 40; ++fedid) {
0919               SiPixelFrameConverter converter(theCablingMap, fedid);
0920               uint32_t newDetId = detId;
0921               if (converter.hasDetUnit(newDetId)) {
0922                 fedId = fedid;
0923                 break;
0924               }
0925             }
0926             double NDigis = 0;
0927             if (full_path.find("ndigis") != string::npos)
0928               NDigis = me->getEntries();
0929             float weight = (allmodsVec->GetBinContent(fedId + 1)) + NDigis;
0930             allmodsVec->SetBinContent(fedId + 1, weight);
0931           }
0932         }
0933       }  // end loop over MEs
0934     }    // end of module dir's
0935     vector<string> subDirVec = iGetter.getSubdirs();
0936     for (vector<string>::const_iterator ic = subDirVec.begin(); ic != subDirVec.end(); ic++) {
0937       iBooker.cd(*ic);
0938       iGetter.cd(*ic);
0939       init = false;
0940       fillGlobalQualityPlot(iBooker, iGetter, init, theCablingMap, nFEDs, Tier0Flag, lumisec);
0941       iBooker.goUp();
0942       iGetter.setCurrentFolder(iBooker.pwd());
0943     }
0944     if (modCounter_ == 1440) {
0945       iBooker.cd("Pixel/EventInfo/reportSummaryContents");
0946       iGetter.cd("Pixel/EventInfo/reportSummaryContents");
0947       if (iBooker.pwd() == "Pixel/EventInfo/reportSummaryContents") {
0948         for (int i = 0; i != 40; i++) {  // loop over FEDs to fetch the errors
0949           static const char buf[] = "Pixel/AdditionalPixelErrors/FED_%d/FedChNErr";
0950           char fedplot[sizeof(buf) + 4];
0951           int NErrors = 0;
0952           for (int j = 0; j != 37; j++) {  // loop over FED channels within a FED
0953             sprintf(fedplot, buf, i);
0954             MonitorElement *me = iGetter.get(fedplot);
0955             if (me)
0956               NErrors = NErrors + me->getBinContent(j + 1);
0957           }
0958           // If I fill, then I end up majorly overcounting the numbers of
0959           // errors...
0960           if (NErrors > 0) {
0961             errmodsVec->SetBinContent(i + 1, NErrors);
0962           }
0963         }
0964         SummaryReportMap = iGetter.get("Pixel/EventInfo/reportSummaryMap");
0965         if (SummaryReportMap) {
0966           float contents = 0.;
0967           for (int i = 1; i != 41; i++) {
0968             // Dynamically subtracting previous (integrated) lumi section values
0969             // in order to only show current lumi section's numbers
0970             float mydigis = allmodsVec->GetBinContent(i) - lastallmods_[i - 1];
0971             float myerrs = errmodsVec->GetBinContent(i) - lasterrmods_[i - 1];
0972             if ((mydigis + myerrs) > 0.) {
0973               contents = mydigis / (mydigis + myerrs);
0974             } else {
0975               // Changed so that dynamic zooming will still
0976               // advance over these bins(in renderplugins)
0977               contents = -0.5;
0978             }
0979             SummaryReportMap->setBinContent(lumisec + 1, i, contents);
0980           }  // end for loop over summaryReportMap bins
0981         }    // end if reportSummaryMap ME exists
0982       }      // end if in summary directory
0983     }        // end if modCounter_
0984   } else {   // Offline
0985     float barrel_errors_temp[1] = {-1.};
0986     int barrel_cuts_temp[6] = {6 * -1};
0987     float endcap_errors_temp[1] = {-1.};
0988     int endcap_cuts_temp[6] = {6 * -1};
0989     int pixel_cuts_temp[1] = {-1};
0990     // Barrel results:
0991     MonitorElement *me;
0992     me = iGetter.get("Pixel/Barrel/BarrelNErrorsCut");
0993     if (me)
0994       barrel_errors_temp[0] = me->getFloatValue();
0995     me = iGetter.get("Pixel/Endcap/EndcapNErrorsCut");
0996     if (me)
0997       endcap_errors_temp[0] = me->getFloatValue();
0998     SummaryReportMap->setBinContent(1, 1, barrel_errors_temp[0]);
0999     SummaryReportMap->setBinContent(2, 1, endcap_errors_temp[0]);
1000     me = iGetter.get("Pixel/Barrel/BarrelNDigisCut");
1001     if (me)
1002       barrel_cuts_temp[0] = me->getIntValue();
1003     me = iGetter.get("Pixel/Barrel/BarrelDigiChargeCut");
1004     if (me)
1005       barrel_cuts_temp[1] = me->getIntValue();
1006     me = iGetter.get("Pixel/Barrel/BarrelClusterSizeCut");
1007     if (me)
1008       barrel_cuts_temp[2] = me->getIntValue();
1009     me = iGetter.get("Pixel/Barrel/BarrelNClustersCut");
1010     if (me)
1011       barrel_cuts_temp[3] = me->getIntValue();
1012     me = iGetter.get("Pixel/Barrel/BarrelClusterChargeCut");
1013     if (me)
1014       barrel_cuts_temp[4] = me->getIntValue();
1015     me = iGetter.get("Pixel/Endcap/EndcapNDigisCut");
1016     if (me)
1017       endcap_cuts_temp[0] = me->getIntValue();
1018     me = iGetter.get("Pixel/Endcap/EndcapDigiChargeCut");
1019     if (me)
1020       endcap_cuts_temp[1] = me->getIntValue();
1021     me = iGetter.get("Pixel/Endcap/EndcapClusterSizeCut");
1022     if (me)
1023       endcap_cuts_temp[2] = me->getIntValue();
1024     me = iGetter.get("Pixel/Endcap/EndcapNClustersCut");
1025     if (me)
1026       endcap_cuts_temp[3] = me->getIntValue();
1027     me = iGetter.get("Pixel/Endcap/EndcapClusterChargeCut");
1028     if (me)
1029       endcap_cuts_temp[4] = me->getIntValue();
1030     for (int j = 2; j != 7; j++) {
1031       SummaryReportMap->setBinContent(1, j, barrel_cuts_temp[j - 2]);
1032       SummaryReportMap->setBinContent(2, j, endcap_cuts_temp[j - 2]);
1033     }
1034     me = iGetter.get("Pixel/Tracks/PixelTracksCut");
1035     if (me)
1036       pixel_cuts_temp[0] = me->getIntValue();
1037     SummaryReportMap->setBinContent(1, 7, pixel_cuts_temp[0]);
1038     SummaryReportMap->setBinContent(2, 7, pixel_cuts_temp[0]);
1039   }  // end of offline map
1040   if (allmodsMap)
1041     allmodsMap->Clear();
1042   if (goodmodsMap)
1043     goodmodsMap->Clear();
1044   if (errmodsMap)
1045     errmodsMap->Clear();
1046 }
1047 
1048 //**********************************************************************************************