CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiPixelActionExecutor Class Reference

#include <SiPixelActionExecutor.h>

Public Member Functions

void bookDeviations (DQMStore::IBooker &iBooker, bool isUpgrade)
 
void bookEfficiency (DQMStore::IBooker &iBooker, bool isUpgrade)
 
void bookOccupancyPlots (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool hiRes, bool isbarrel)
 
void bookOccupancyPlots (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool hiRes)
 
void createEfficiency (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isUpgrade)
 
void createOccupancy (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
 
void createSummary (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isUpgrade)
 
void fillEfficiency (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isbarrel, bool isUpgrade)
 
void fillEfficiencySummary (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
 
int getBlade (const std::string &dname)
 
int getLadder (const std::string &dname)
 
void normaliseAvDigiOcc (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
 
void normaliseAvDigiOccVsLumi (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, int lumisec)
 
bool readConfiguration (int &tkmap_freq, int &sum_barrel_freq, int &sum_endcap_freq, int &sum_grandbarrel_freq, int &sum_grandendcap_freq, int &message_limit, int &source_type, int &calib_type)
 
bool readConfiguration (int &tkmap_freq, int &summary_freq)
 
void readConfiguration ()
 
 SiPixelActionExecutor (bool offlineXMLfile, bool Tier0Flag)
 
 ~SiPixelActionExecutor ()
 

Private Member Functions

void fillDeviations (DQMStore::IGetter &iGetter)
 
void fillFEDErrorSummary (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string dir_name, std::vector< std::string > &me_names)
 
void fillGrandBarrelSummaryHistos (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::vector< std::string > &me_names, bool isUpgrade)
 
void fillGrandEndcapSummaryHistos (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::vector< std::string > &me_names, bool isUpgrade)
 
void fillOccupancy (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isbarrel)
 
void fillSummary (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string dir_name, std::vector< std::string > &me_names, bool isbarrel, bool isUpgrade)
 
void GetBladeSubdirs (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::vector< std::string > &blade_subdirs)
 
MonitorElementgetFEDSummaryME (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string me_name)
 
void getGrandSummaryME (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, int nbin, std::string &me_name, std::vector< MonitorElement * > &mes)
 
MonitorElementgetSummaryME (DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string me_name, bool isUpgrade)
 

Private Attributes

int calib_type_
 
SiPixelConfigParserconfigParser_
 
SiPixelConfigWriterconfigWriter_
 
MonitorElementDEV_adc_Barrel
 
MonitorElementDEV_adc_Endcap
 
MonitorElementDEV_charge_Barrel
 
MonitorElementDEV_charge_Endcap
 
MonitorElementDEV_nclusters_Barrel
 
MonitorElementDEV_nclusters_Endcap
 
MonitorElementDEV_ndigis_Barrel
 
MonitorElementDEV_ndigis_Endcap
 
MonitorElementDEV_size_Barrel
 
MonitorElementDEV_size_Endcap
 
MonitorElementHitEfficiency_Dm1
 
MonitorElementHitEfficiency_Dm2
 
MonitorElementHitEfficiency_Dm3
 
MonitorElementHitEfficiency_Dp1
 
MonitorElementHitEfficiency_Dp2
 
MonitorElementHitEfficiency_Dp3
 
MonitorElementHitEfficiency_L1
 
MonitorElementHitEfficiency_L2
 
MonitorElementHitEfficiency_L3
 
MonitorElementHitEfficiency_L4
 
MonitorElementHitEfficiencySummary
 
int message_limit_
 
int ndet_
 
MonitorElementOccupancyMap
 
bool offlineXMLfile_
 
MonitorElementPixelOccupancyMap
 
int source_type_
 
std::vector< std::string > summaryMENames
 
TH2F * temp_1x2
 
TH2F * temp_1x5
 
TH2F * temp_2x3
 
TH2F * temp_2x4
 
TH2F * temp_2x5
 
TH2F * temp_H
 
edm::ESHandle< SiPixelFedCablingMaptheCablingMap
 
bool Tier0Flag_
 
std::vector< std::string > tkMapMENames
 

Detailed Description

Definition at line 49 of file SiPixelActionExecutor.h.

Constructor & Destructor Documentation

SiPixelActionExecutor::SiPixelActionExecutor ( bool  offlineXMLfile,
bool  Tier0Flag 
)

Definition at line 28 of file SiPixelActionExecutor.cc.

References configParser_, configWriter_, and ndet_.

29  : offlineXMLfile_(offlineXMLfile), Tier0Flag_(Tier0Flag) {
30  edm::LogInfo("SiPixelActionExecutor") << " Creating SiPixelActionExecutor "
31  << "\n";
32  configParser_ = nullptr;
33  configWriter_ = nullptr;
34  ndet_ = 0;
35  // collationDone = false;
36 }
SiPixelConfigParser * configParser_
SiPixelConfigWriter * configWriter_
SiPixelActionExecutor::~SiPixelActionExecutor ( )

Definition at line 41 of file SiPixelActionExecutor.cc.

References configParser_, and configWriter_.

41  {
42  edm::LogInfo("SiPixelActionExecutor") << " Deleting SiPixelActionExecutor "
43  << "\n";
44  if (configParser_)
45  delete configParser_;
46  if (configWriter_)
47  delete configWriter_;
48 }
SiPixelConfigParser * configParser_
SiPixelConfigWriter * configWriter_

Member Function Documentation

void SiPixelActionExecutor::bookDeviations ( DQMStore::IBooker iBooker,
bool  isUpgrade 
)

Definition at line 231 of file SiPixelActionExecutor.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::cd(), DEV_adc_Barrel, DEV_adc_Endcap, DEV_charge_Barrel, DEV_charge_Endcap, DEV_nclusters_Barrel, DEV_nclusters_Endcap, DEV_ndigis_Barrel, DEV_ndigis_Endcap, DEV_size_Barrel, DEV_size_Endcap, and DQMStore::IBooker::setCurrentFolder().

231  {
232  int nBPixModules;
233  if (isUpgrade) {
234  nBPixModules = 1184;
235  } else {
236  nBPixModules = 768;
237  }
238 
239  iBooker.cd();
240  iBooker.setCurrentFolder("Pixel/Barrel");
241  DEV_adc_Barrel = iBooker.book1D(
242  "DEV_adc_Barrel", "Deviation from reference;Module;<adc_ref>-<adc>", nBPixModules, 0., nBPixModules);
243  DEV_ndigis_Barrel = iBooker.book1D(
244  "DEV_ndigis_Barrel", "Deviation from reference;Module;<ndigis_ref>-<ndigis>", nBPixModules, 0., nBPixModules);
245  DEV_charge_Barrel = iBooker.book1D(
246  "DEV_charge_Barrel", "Deviation from reference;Module;<charge_ref>-<charge>", nBPixModules, 0., nBPixModules);
247  DEV_nclusters_Barrel = iBooker.book1D("DEV_nclusters_Barrel",
248  "Deviation from reference;Module;<nclusters_ref>-<nclusters>",
249  nBPixModules,
250  0.,
251  nBPixModules);
252  DEV_size_Barrel = iBooker.book1D(
253  "DEV_size_Barrel", "Deviation from reference;Module;<size_ref>-<size>", nBPixModules, 0., nBPixModules);
254  iBooker.cd();
255  iBooker.setCurrentFolder("Pixel/Endcap");
256  DEV_adc_Endcap = iBooker.book1D("DEV_adc_Endcap", "Deviation from reference;Module;<adc_ref>-<adc>", 672, 0., 672.);
258  iBooker.book1D("DEV_ndigis_Endcap", "Deviation from reference;Module;<ndigis_ref>-<ndigis>", 672, 0., 672.);
260  iBooker.book1D("DEV_charge_Endcap", "Deviation from reference;Module;<charge_ref>-<charge>", 672, 0., 672.);
261  DEV_nclusters_Endcap = iBooker.book1D(
262  "DEV_nclusters_Endcap", "Deviation from reference;Module;<nclusters_ref>-<nclusters>", 672, 0., 672.);
264  iBooker.book1D("DEV_size_Endcap", "Deviation from reference;Module;<size_ref>-<size>", 672, 0., 672.);
265  iBooker.cd();
266 }
MonitorElement * DEV_size_Barrel
MonitorElement * DEV_nclusters_Barrel
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * DEV_adc_Endcap
MonitorElement * DEV_charge_Endcap
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * DEV_charge_Barrel
MonitorElement * DEV_nclusters_Endcap
MonitorElement * DEV_size_Endcap
MonitorElement * DEV_ndigis_Endcap
MonitorElement * DEV_ndigis_Barrel
MonitorElement * DEV_adc_Barrel
void SiPixelActionExecutor::bookEfficiency ( DQMStore::IBooker iBooker,
bool  isUpgrade 
)

Definition at line 2072 of file SiPixelActionExecutor.cc.

References create_public_pileup_plots::bins, DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::cd(), HitEfficiency_Dm1, HitEfficiency_Dm2, HitEfficiency_Dm3, HitEfficiency_Dp1, HitEfficiency_Dp2, HitEfficiency_Dp3, HitEfficiency_L1, HitEfficiency_L2, HitEfficiency_L3, HitEfficiency_L4, HitEfficiencySummary, mps_fire::i, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), and Tier0Flag_.

2072  {
2073  // Barrel
2074  iBooker.cd();
2075  iBooker.setCurrentFolder("Pixel/Barrel");
2076  if (!isUpgrade) {
2077  if (Tier0Flag_) {
2078  HitEfficiency_L1 = iBooker.book2D(
2079  "HitEfficiency_L1", "Hit Efficiency in Barrel_Layer1;Module;Ladder", 9, -4.5, 4.5, 21, -10.5, 10.5);
2080  HitEfficiency_L2 = iBooker.book2D(
2081  "HitEfficiency_L2", "Hit Efficiency in Barrel_Layer2;Module;Ladder", 9, -4.5, 4.5, 33, -16.5, 16.5);
2082  HitEfficiency_L3 = iBooker.book2D(
2083  "HitEfficiency_L3", "Hit Efficiency in Barrel_Layer3;Module;Ladder", 9, -4.5, 4.5, 45, -22.5, 22.5);
2084  } else {
2085  HitEfficiency_L1 = iBooker.book2D(
2086  "HitEfficiency_L1", "Hit Efficiency in Barrel_Layer1;Module;Ladder", 9, -4.5, 4.5, 21, -10.5, 10.5);
2087  HitEfficiency_L2 = iBooker.book2D(
2088  "HitEfficiency_L2", "Hit Efficiency in Barrel_Layer2;Module;Ladder", 9, -4.5, 4.5, 33, -16.5, 16.5);
2089  HitEfficiency_L3 = iBooker.book2D(
2090  "HitEfficiency_L3", "Hit Efficiency in Barrel_Layer3;Module;Ladder", 9, -4.5, 4.5, 45, -22.5, 22.5);
2091  }
2092  } // endifNOTUpgrade
2093  else if (isUpgrade) {
2094  if (Tier0Flag_) {
2096  iBooker.book2D("HitEfficiency_L1", "Hit Efficiency in Barrel_Layer1;z-side;Ladder", 2, -1., 1., 12, -6., 6.);
2097  HitEfficiency_L2 = iBooker.book2D(
2098  "HitEfficiency_L2", "Hit Efficiency in Barrel_Layer2;z-side;Ladder", 2, -1., 1., 28, -14., 14.);
2099  HitEfficiency_L3 = iBooker.book2D(
2100  "HitEfficiency_L3", "Hit Efficiency in Barrel_Layer3;z-side;Ladder", 2, -1., 1., 44, -22., 22.);
2101  HitEfficiency_L4 = iBooker.book2D(
2102  "HitEfficiency_L4", "Hit Efficiency in Barrel_Layer4;z-side;Ladder", 2, -1., 1., 64, -32., 32.);
2103  } else {
2105  iBooker.book2D("HitEfficiency_L1", "Hit Efficiency in Barrel_Layer1;Module;Ladder", 8, -4., 4., 12, -6., 6.);
2106  HitEfficiency_L2 = iBooker.book2D(
2107  "HitEfficiency_L2", "Hit Efficiency in Barrel_Layer2;Module;Ladder", 8, -4., 4., 28, -14., 14.);
2108  HitEfficiency_L3 = iBooker.book2D(
2109  "HitEfficiency_L3", "Hit Efficiency in Barrel_Layer3;Module;Ladder", 8, -4., 4., 44, -22., 22.);
2110  HitEfficiency_L4 = iBooker.book2D(
2111  "HitEfficiency_L4", "Hit Efficiency in Barrel_Layer4;Module;Ladder", 8, -4., 4., 64, -32., 32.);
2112  }
2113  } // endifUpgrade
2114  // Endcap
2115  iBooker.cd();
2116  iBooker.setCurrentFolder("Pixel/Endcap");
2117  if (!isUpgrade) {
2118  if (Tier0Flag_) {
2119  HitEfficiency_Dp1 = iBooker.book2D(
2120  "HitEfficiency_Dp1", "Hit Efficiency in Endcap_Disk_p1;Blade;Panel", 26, -13., 13., 2, 0.5, 2.5);
2121  HitEfficiency_Dp2 = iBooker.book2D(
2122  "HitEfficiency_Dp2", "Hit Efficiency in Endcap_Disk_p2;Blade;Panel", 26, -13., 13., 2, 0.5, 2.5);
2123  HitEfficiency_Dm1 = iBooker.book2D(
2124  "HitEfficiency_Dm1", "Hit Efficiency in Endcap_Disk_m1;Blade;Panel", 26, -13., 13., 2, 0.5, 2.5);
2125  HitEfficiency_Dm2 = iBooker.book2D(
2126  "HitEfficiency_Dm2", "Hit Efficiency in Endcap_Disk_m2;;Blade;Panel", 26, -13., 13., 2, 0.5, 2.5);
2127  } else {
2128  HitEfficiency_Dp1 = iBooker.book2D(
2129  "HitEfficiency_Dp1", "Hit Efficiency in Endcap_Disk_p1;Blades;Modules", 24, -12., 12., 7, 1., 8.);
2130  HitEfficiency_Dp2 = iBooker.book2D(
2131  "HitEfficiency_Dp2", "Hit Efficiency in Endcap_Disk_p2;Blades;Modules", 24, -12., 12., 7, 1., 8.);
2132  HitEfficiency_Dm1 = iBooker.book2D(
2133  "HitEfficiency_Dm1", "Hit Efficiency in Endcap_Disk_m1;Blades;Modules", 24, -12., 12., 7, 1., 8.);
2134  HitEfficiency_Dm2 = iBooker.book2D(
2135  "HitEfficiency_Dm2", "Hit Efficiency in Endcap_Disk_m2;Blades;Modules", 24, -12., 12., 7, 1., 8.);
2136  }
2137  } else if (isUpgrade) {
2138  if (Tier0Flag_) {
2140  iBooker.book2D("HitEfficiency_Dp1", "Hit Efficiency in Endcap_Disk_p1;Blades;", 28, -17., 11., 1, 0., 1.);
2142  iBooker.book2D("HitEfficiency_Dp2", "Hit Efficiency in Endcap_Disk_p2;Blades;", 28, -17., 11., 1, 0., 1.);
2144  iBooker.book2D("HitEfficiency_Dp3", "Hit Efficiency in Endcap_Disk_p3;Blades;", 28, -17., 11., 1, 0., 1.);
2146  iBooker.book2D("HitEfficiency_Dm1", "Hit Efficiency in Endcap_Disk_m1;Blades;", 28, -17., 11., 1, 0., 1.);
2148  iBooker.book2D("HitEfficiency_Dm2", "Hit Efficiency in Endcap_Disk_m2;Blades;", 28, -17., 11., 1, 0., 1.);
2150  iBooker.book2D("HitEfficiency_Dm3", "Hit Efficiency in Endcap_Disk_m3;Blades;", 28, -17., 11., 1, 0., 1.);
2151  } else {
2152  HitEfficiency_Dp1 = iBooker.book2D(
2153  "HitEfficiency_Dp1", "Hit Efficiency in Endcap_Disk_p1;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2154  HitEfficiency_Dp2 = iBooker.book2D(
2155  "HitEfficiency_Dp2", "Hit Efficiency in Endcap_Disk_p2;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2156  HitEfficiency_Dp3 = iBooker.book2D(
2157  "HitEfficiency_Dp3", "Hit Efficiency in Endcap_Disk_p3;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2158  HitEfficiency_Dm1 = iBooker.book2D(
2159  "HitEfficiency_Dm1", "Hit Efficiency in Endcap_Disk_m1;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2160  HitEfficiency_Dm2 = iBooker.book2D(
2161  "HitEfficiency_Dm2", "Hit Efficiency in Endcap_Disk_m2;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2162  HitEfficiency_Dm3 = iBooker.book2D(
2163  "HitEfficiency_Dm3", "Hit Efficiency in Endcap_Disk_m3;Blades;Modules", 28, -17., 11., 2, 1., 3.);
2164  }
2165  } // endif(isUpgrade)
2166  iBooker.cd();
2167  iBooker.cd("Pixel/");
2168  string bins[] = {"Layer1", "Layer2", "Layer3", "Disk1+", "Disk2+", "Disk1-", "Disk2-"};
2169  HitEfficiencySummary = iBooker.book1D("HitEfficiencySummary", "Hit efficiency per sub detector", 7, 0, 7);
2170  HitEfficiencySummary->setAxisTitle("Sub Detector", 1);
2171  HitEfficiencySummary->setAxisTitle("Efficiency (%)", 2);
2172  for (int i = 1; i < 8; i++) {
2173  HitEfficiencySummary->setBinLabel(i, bins[i - 1]);
2174  }
2175 }
MonitorElement * HitEfficiency_Dp3
MonitorElement * HitEfficiency_L4
MonitorElement * HitEfficiency_L3
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * HitEfficiency_Dm2
MonitorElement * HitEfficiency_L2
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * HitEfficiency_Dm3
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * HitEfficiency_L1
MonitorElement * HitEfficiency_Dp1
MonitorElement * HitEfficiencySummary
MonitorElement * HitEfficiency_Dp2
MonitorElement * HitEfficiency_Dm1
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void SiPixelActionExecutor::bookOccupancyPlots ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
bool  hiRes,
bool  isbarrel 
)

Definition at line 1863 of file SiPixelActionExecutor.cc.

References DQMStore::IBooker::book2D(), DQMStore::IBooker::cd(), DQMStore::IGetter::cd(), DQMStore::IGetter::getSubdirs(), DQMStore::IBooker::goUp(), OccupancyMap, DQMStore::IBooker::pwd(), MonitorElement::setAxisTitle(), DQMStore::IGetter::setCurrentFolder(), and Tier0Flag_.

Referenced by bookOccupancyPlots().

1867 {
1868  if (Tier0Flag_)
1869  return;
1870  vector<string> subdirs = iGetter.getSubdirs();
1871  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1872  if (isbarrel && (*it).find("Barrel") == string::npos)
1873  continue;
1874  if (!isbarrel && (*it).find("Endcap") == string::npos)
1875  continue;
1876 
1877  if ((*it).find("Module_") != string::npos)
1878  continue;
1879  if ((*it).find("Panel_") != string::npos)
1880  continue;
1881  if ((*it).find("Ladder_") != string::npos)
1882  continue;
1883  if ((*it).find("Blade_") != string::npos)
1884  continue;
1885  if ((*it).find("Layer_") != string::npos)
1886  continue;
1887  if ((*it).find("Disk_") != string::npos)
1888  continue;
1889  iBooker.cd(*it);
1890  iGetter.cd(*it);
1891  bookOccupancyPlots(iBooker, iGetter, hiRes, isbarrel);
1892  if (!hiRes) {
1893  // occupancyprinting cout<<"booking low res barrel occ plot now!"<<endl;
1894  OccupancyMap = iBooker.book2D((isbarrel ? "barrelOccupancyMap" : "endcapOccupancyMap"),
1895  "Barrel Digi Occupancy Map (4 pix per bin)",
1896  isbarrel ? 208 : 130,
1897  0.,
1898  isbarrel ? 416. : 260.,
1899  80,
1900  0.,
1901  160.);
1902  } else {
1903  // occupancyprinting cout<<"booking high res barrel occ plot now!"<<endl;
1904  OccupancyMap = iBooker.book2D((isbarrel ? "barrelOccupancyMap" : "endcapOccupancyMap"),
1905  "Barrel Digi Occupancy Map (1 pix per bin)",
1906  isbarrel ? 416 : 260,
1907  0.,
1908  isbarrel ? 416. : 260.,
1909  160,
1910  0.,
1911  160.);
1912  }
1913  OccupancyMap->setAxisTitle("Columns", 1);
1914  OccupancyMap->setAxisTitle("Rows", 2);
1915 
1916  iBooker.goUp();
1917  iGetter.setCurrentFolder(iBooker.pwd());
1918  }
1919 }
void bookOccupancyPlots(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool hiRes, bool isbarrel)
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:361
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
std::string const & pwd()
Definition: DQMStore.cc:278
std::vector< std::string > getSubdirs()
Definition: DQMStore.cc:325
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void SiPixelActionExecutor::bookOccupancyPlots ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
bool  hiRes 
)

Definition at line 1921 of file SiPixelActionExecutor.cc.

References bookOccupancyPlots(), DQMStore::IBooker::cd(), DQMStore::IGetter::cd(), DQMStore::IBooker::setCurrentFolder(), DQMStore::IGetter::setCurrentFolder(), and Tier0Flag_.

1921  {
1922  if (Tier0Flag_)
1923  return;
1924  // Barrel
1925  iGetter.cd();
1926  iBooker.cd();
1927  iGetter.setCurrentFolder("Pixel");
1928  iBooker.setCurrentFolder("Pixel");
1929  this->bookOccupancyPlots(iBooker, iGetter, hiRes, true);
1930 
1931  // Endcap
1932  iGetter.cd();
1933  iBooker.cd();
1934  iGetter.setCurrentFolder("Pixel");
1935  iBooker.setCurrentFolder("Pixel");
1936  this->bookOccupancyPlots(iBooker, iGetter, hiRes, false);
1937 }
void bookOccupancyPlots(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool hiRes, bool isbarrel)
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:361
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
void SiPixelActionExecutor::createEfficiency ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
bool  isUpgrade 
)

Definition at line 2179 of file SiPixelActionExecutor.cc.

References DQMStore::IBooker::cd(), DQMStore::IGetter::cd(), and fillEfficiency().

2179  {
2180  // std::cout<<"entering
2181  // SiPixelActionExecutor::createEfficiency..."<<std::endl;
2182  iGetter.cd();
2183  iBooker.cd();
2184  fillEfficiency(iBooker, iGetter, true, isUpgrade); // Barrel
2185  iGetter.cd();
2186  iBooker.cd();
2187  fillEfficiency(iBooker, iGetter, false, isUpgrade); // Endcap
2188  iGetter.cd();
2189  iBooker.cd();
2190  // std::cout<<"leaving SiPixelActionExecutor::createEfficiency..."<<std::endl;
2191 }
void fillEfficiency(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isbarrel, bool isUpgrade)
void SiPixelActionExecutor::createOccupancy ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)

Definition at line 1939 of file SiPixelActionExecutor.cc.

References DQMStore::IBooker::cd(), DQMStore::IGetter::cd(), fillOccupancy(), and Tier0Flag_.

1939  {
1940  // std::cout<<"entering SiPixelActionExecutor::createOccupancy..."<<std::endl;
1941  if (Tier0Flag_)
1942  return;
1943  iBooker.cd();
1944  iGetter.cd();
1945  fillOccupancy(iBooker, iGetter, true);
1946  iBooker.cd();
1947  iGetter.cd();
1948  fillOccupancy(iBooker, iGetter, false);
1949  iBooker.cd();
1950  iGetter.cd();
1951 
1952  // std::cout<<"leaving SiPixelActionExecutor::createOccupancy..."<<std::endl;
1953 }
void fillOccupancy(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isbarrel)
void SiPixelActionExecutor::createSummary ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
bool  isUpgrade 
)

Definition at line 162 of file SiPixelActionExecutor.cc.

References configParser_, configWriter_, gather_cfg::cout, fillFEDErrorSummary(), fillSummary(), DQMParserBase::getDocument(), SiPixelConfigParser::getMENamesForBarrelSummary(), SiPixelConfigParser::getMENamesForEndcapSummary(), SiPixelConfigParser::getMENamesForFEDErrorSummary(), SiPixelConfigParser::getSourceType(), offlineXMLfile_, DQMStore::IBooker::setCurrentFolder(), DQMStore::IGetter::setCurrentFolder(), source_type_, and AlCaHLTBitMon_QueryRunRegistry::string.

162  {
163  // To be majorly overhauled and split into two, I guess.
164 
165  // cout<<"entering SiPixelActionExecutor::createSummary..."<<endl;
166  string barrel_structure_name;
167  vector<string> barrel_me_names;
168  string localPath;
169  if (offlineXMLfile_)
170  localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
171  else
172  localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
173  // cout<<"*********************ATTENTION! LOCALPATH= "<<localPath<<endl;
174  if (configParser_ == nullptr) {
176  configParser_->getDocument(edm::FileInPath(localPath).fullPath());
177  }
178  if (!configParser_->getMENamesForBarrelSummary(barrel_structure_name, barrel_me_names)) {
179  cout << "SiPixelActionExecutor::createSummary: Failed to read Barrel "
180  "Summary configuration parameters!! ";
181  return;
182  }
184 
185  iBooker.setCurrentFolder("Pixel/");
186  iGetter.setCurrentFolder("Pixel/");
187  fillSummary(iBooker, iGetter, barrel_structure_name, barrel_me_names, true,
188  isUpgrade); // Barrel
189  iBooker.setCurrentFolder("Pixel/");
190  iGetter.setCurrentFolder("Pixel/");
191  string endcap_structure_name;
192  vector<string> endcap_me_names;
193  if (!configParser_->getMENamesForEndcapSummary(endcap_structure_name, endcap_me_names)) {
194  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Endcap Summary configuration parameters!! "
195  << "\n";
196  return;
197  }
198 
199  // cout << "--- Processing endcap" << endl;
200 
201  iBooker.setCurrentFolder("Pixel/");
202  iGetter.setCurrentFolder("Pixel/");
203 
204  fillSummary(iBooker, iGetter, endcap_structure_name, endcap_me_names, false,
205  isUpgrade); // Endcap
206  iBooker.setCurrentFolder("Pixel/");
207  iGetter.setCurrentFolder("Pixel/");
208 
209  if (source_type_ == 0 || source_type_ == 5 || source_type_ == 20) { // do this only if RawData source is present
210  string federror_structure_name;
211  vector<string> federror_me_names;
212  if (!configParser_->getMENamesForFEDErrorSummary(federror_structure_name, federror_me_names)) {
213  cout << "SiPixelActionExecutor::createSummary: Failed to read FED Error "
214  "Summary configuration parameters!! ";
215  return;
216  }
217  iBooker.setCurrentFolder("Pixel/");
218  iGetter.setCurrentFolder("Pixel/");
219 
220  fillFEDErrorSummary(iBooker, iGetter, federror_structure_name, federror_me_names);
221  iBooker.setCurrentFolder("Pixel/");
222  iGetter.setCurrentFolder("Pixel/");
223  }
224  if (configWriter_)
225  delete configWriter_;
226  configWriter_ = nullptr;
227  // cout<<"leaving SiPixelActionExecutor::createSummary..."<<endl;
228 }
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:361
SiPixelConfigParser * configParser_
bool getMENamesForEndcapSummary(std::string &structure_name, std::vector< std::string > &me_names)
SiPixelConfigWriter * configWriter_
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
bool getMENamesForFEDErrorSummary(std::string &structure_name, std::vector< std::string > &me_names)
void fillFEDErrorSummary(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string dir_name, std::vector< std::string > &me_names)
bool getMENamesForBarrelSummary(std::string &structure_name, std::vector< std::string > &me_names)
bool getSourceType(int &u_freq)
void fillSummary(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string dir_name, std::vector< std::string > &me_names, bool isbarrel, bool isUpgrade)
void SiPixelActionExecutor::fillDeviations ( DQMStore::IGetter iGetter)
private

Definition at line 268 of file SiPixelActionExecutor.cc.

References DQMStore::IGetter::get(), MonitorElement::getBinContent(), MonitorElement::getRefTH1(), mps_fire::i, gen::n, groupFilesInBlocks::nn, and MonitorElement::setBinContent().

268  {
269  int n = 768;
270  MonitorElement *me1;
271  MonitorElement *me2;
272  MonitorElement *me3;
273  MonitorElement *me4;
274  MonitorElement *me5;
275  TH1 *ref1;
276  TH1 *ref2;
277  TH1 *ref3;
278  TH1 *ref4;
279  TH1 *ref5;
280  MonitorElement *dev1;
281  MonitorElement *dev2;
282  MonitorElement *dev3;
283  MonitorElement *dev4;
284  MonitorElement *dev5;
285  me1 = iGetter.get("Pixel/Barrel/SUMDIG_adc_Barrel");
286  ref1 = me1->getRefTH1();
287  dev1 = iGetter.get("Pixel/Barrel/DEV_adc_Barrel");
288  me2 = iGetter.get("Pixel/Barrel/SUMDIG_ndigis_Barrel");
289  ref2 = me2->getRefTH1();
290  dev2 = iGetter.get("Pixel/Barrel/DEV_ndigis_Barrel");
291  me3 = iGetter.get("Pixel/Barrel/SUMCLU_charge_Barrel");
292  ref3 = me3->getRefTH1();
293  dev3 = iGetter.get("Pixel/Barrel/DEV_charge_Barrel");
294  me4 = iGetter.get("Pixel/Barrel/SUMCLU_nclusters_Barrel");
295  ref4 = me4->getRefTH1();
296  dev4 = iGetter.get("Pixel/Barrel/DEV_nclusters_Barrel");
297  me5 = iGetter.get("Pixel/Barrel/SUMCLU_size_Barrel");
298  ref5 = me5->getRefTH1();
299  dev5 = iGetter.get("Pixel/Barrel/DEV_size_Barrel");
300  for (int i = 1; i != n + 1; i++) {
301  float ref_value;
302  float new_value;
303  // Barrel adc:
304  if (me1)
305  if (ref1)
306  if (dev1) {
307  new_value = me1->getBinContent(i);
308  ref_value = ref1->GetBinContent(i);
309  dev1->setBinContent(i, ref_value - new_value);
310  }
311  // Barrel ndigis:
312  if (me2)
313  if (ref2)
314  if (dev2) {
315  new_value = me2->getBinContent(i);
316  ref_value = ref2->GetBinContent(i);
317  dev2->setBinContent(i, ref_value - new_value);
318  }
319  // Barrel cluster charge:
320  if (me3)
321  if (ref3)
322  if (dev3) {
323  new_value = me3->getBinContent(i);
324  ref_value = ref3->GetBinContent(i);
325  dev3->setBinContent(i, ref_value - new_value);
326  }
327  // Barrel nclusters:
328  if (me4)
329  if (ref4)
330  if (dev4) {
331  new_value = me4->getBinContent(i);
332  ref_value = ref4->GetBinContent(i);
333  dev4->setBinContent(i, ref_value - new_value);
334  }
335  // Barrel cluster size:
336  if (me5)
337  if (ref5)
338  if (dev5) {
339  new_value = me5->getBinContent(i);
340  ref_value = ref5->GetBinContent(i);
341  dev5->setBinContent(i, ref_value - new_value);
342  }
343  }
344 
345  int nn = 672;
346  MonitorElement *me11;
347  MonitorElement *me12;
348  MonitorElement *me13;
349  MonitorElement *me14;
350  MonitorElement *me15;
351  TH1 *ref11;
352  TH1 *ref12;
353  TH1 *ref13;
354  TH1 *ref14;
355  TH1 *ref15;
356  MonitorElement *dev11;
357  MonitorElement *dev12;
358  MonitorElement *dev13;
359  MonitorElement *dev14;
360  MonitorElement *dev15;
361  me11 = iGetter.get("Pixel/Endcap/SUMDIG_adc_Endcap");
362  ref11 = me11->getRefTH1();
363  dev11 = iGetter.get("Pixel/Endcap/DEV_adc_Endcap");
364  me12 = iGetter.get("Pixel/Endcap/SUMDIG_ndigis_Endcap");
365  ref12 = me12->getRefTH1();
366  dev12 = iGetter.get("Pixel/Endcap/DEV_ndigis_Endcap");
367  me13 = iGetter.get("Pixel/Endcap/SUMCLU_charge_Endcap");
368  ref13 = me13->getRefTH1();
369  dev13 = iGetter.get("Pixel/Endcap/DEV_charge_Endcap");
370  me14 = iGetter.get("Pixel/Endcap/SUMCLU_nclusters_Endcap");
371  ref14 = me14->getRefTH1();
372  dev14 = iGetter.get("Pixel/Endcap/DEV_nclusters_Endcap");
373  me15 = iGetter.get("Pixel/Endcap/SUMCLU_size_Endcap");
374  ref15 = me15->getRefTH1();
375  dev15 = iGetter.get("Pixel/Endcap/DEV_size_Endcap");
376  for (int i = 1; i != nn + 1; i++) {
377  float ref_value;
378  float new_value;
379  // Endcap adc:
380  if (me11)
381  if (ref11)
382  if (dev11) {
383  new_value = me11->getBinContent(i);
384  ref_value = ref11->GetBinContent(i);
385  dev11->setBinContent(i, ref_value - new_value);
386  }
387  // Endcap ndigis:
388  if (me12)
389  if (ref12)
390  if (dev12) {
391  new_value = me12->getBinContent(i);
392  ref_value = ref12->GetBinContent(i);
393  dev12->setBinContent(i, ref_value - new_value);
394  }
395  // Endcap cluster charge:
396  if (me13)
397  if (ref13)
398  if (dev13) {
399  new_value = me13->getBinContent(i);
400  ref_value = ref13->GetBinContent(i);
401  dev13->setBinContent(i, ref_value - new_value);
402  }
403  // Endcap nclusters:
404  if (me14)
405  if (ref14)
406  if (dev14) {
407  new_value = me14->getBinContent(i);
408  ref_value = ref14->GetBinContent(i);
409  dev14->setBinContent(i, ref_value - new_value);
410  }
411  // Endcap cluster size:
412  if (me15)
413  if (ref15)
414  if (dev15) {
415  new_value = me15->getBinContent(i);
416  ref_value = ref15->GetBinContent(i);
417  dev15->setBinContent(i, ref_value - new_value);
418  }
419  }
420 }
void setBinContent(int binx, double content)
set content of bin (1-D)
TH1 * getRefTH1() const
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
double getBinContent(int binx) const
get content of bin (1-D)
void SiPixelActionExecutor::fillEfficiency ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
bool  isbarrel,
bool  isUpgrade 
)

Definition at line 2217 of file SiPixelActionExecutor.cc.

References DQMStore::IBooker::cd(), DQMStore::IGetter::cd(), RefreshWebPage::dname, objects.autophobj::float, DQMStore::IGetter::get(), MonitorElement::getBinContent(), getBlade(), MonitorElement::getEntries(), getLadder(), DQMStore::IGetter::getMEs(), DQMStore::IGetter::getSubdirs(), MonitorElement::getTH2F(), DQMStore::IBooker::goUp(), HitEfficiency_Dm1, HitEfficiency_Dm2, HitEfficiency_Dm3, HitEfficiency_Dp1, HitEfficiency_Dp2, HitEfficiency_Dp3, HitEfficiency_L1, HitEfficiency_L2, HitEfficiency_L3, HitEfficiency_L4, mps_fire::i, DQMStore::IBooker::pwd(), MonitorElement::setBinContent(), DQMStore::IGetter::setCurrentFolder(), and Tier0Flag_.

Referenced by createEfficiency().

2220  {
2221  // cout<<"entering SiPixelActionExecutor::fillEfficiency..."<<std::endl;
2222  string currDir = iBooker.pwd();
2223  string dname = currDir.substr(currDir.find_last_of("/") + 1);
2224  // cout<<"currDir= "<<currDir<< " , dname= "<<dname<<std::endl;
2225 
2226  if (Tier0Flag_) { // Offline
2227  if (isbarrel && dname.find("Ladder_") != string::npos) {
2228  if (!isUpgrade) {
2229  vector<string> meVec = iGetter.getMEs();
2230  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2231  string full_path = currDir + "/" + (*it);
2232 
2233  if (full_path.find("missingMod_") != string::npos) { // If we have missing hits ME
2234 
2235  // Get the MEs that contain missing and valid hits
2236  MonitorElement *missing = iGetter.get(full_path);
2237  if (!missing)
2238  continue;
2239  string new_path = full_path.replace(full_path.find("missing"), 7, "valid");
2240  MonitorElement *valid = iGetter.get(new_path);
2241  if (!valid)
2242  continue;
2243  int binx = 0;
2244  int biny = 0;
2245  // get the ladder number
2246  biny = getLadder(dname); // Current
2247  if (currDir.find("Shell_mO") != string::npos || currDir.find("Shell_pO") != string::npos) {
2248  biny = -biny;
2249  }
2250  const int nMod = 4;
2251  for (int i = 1; i < nMod + 1; i++) {
2252  float hitEfficiency = -1.0;
2253  float missingHits = 0;
2254  float validHits = 0;
2255  binx = i; // Module
2256  if (currDir.find("Shell_m") != string::npos)
2257  binx = -binx;
2258 
2259  missingHits = missing->getBinContent(i);
2260  validHits = valid->getBinContent(i);
2261  if (validHits + missingHits > 0.)
2262  hitEfficiency = validHits / (validHits + missingHits);
2263 
2264  if (currDir.find("Layer_1") != string::npos) {
2265  HitEfficiency_L1 = iGetter.get("Pixel/Barrel/HitEfficiency_L1");
2266  if (HitEfficiency_L1)
2267  HitEfficiency_L1->setBinContent(HitEfficiency_L1->getTH2F()->FindBin(binx, biny),
2268  (float)hitEfficiency);
2269  } else if (currDir.find("Layer_2") != string::npos) {
2270  HitEfficiency_L2 = iGetter.get("Pixel/Barrel/HitEfficiency_L2");
2271  if (HitEfficiency_L2)
2272  HitEfficiency_L2->setBinContent(HitEfficiency_L2->getTH2F()->FindBin(binx, biny),
2273  (float)hitEfficiency);
2274  } else if (currDir.find("Layer_3") != string::npos) {
2275  HitEfficiency_L3 = iGetter.get("Pixel/Barrel/HitEfficiency_L3");
2276  if (HitEfficiency_L3)
2277  HitEfficiency_L3->setBinContent(HitEfficiency_L3->getTH2F()->FindBin(binx, biny),
2278  (float)hitEfficiency);
2279  }
2280  }
2281  }
2282  }
2283  } // endifNOTUpgradeInBPix
2284  else if (isUpgrade) {
2285  vector<string> meVec = iGetter.getMEs();
2286  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2287  string full_path = currDir + "/" + (*it);
2288  if (full_path.find("missing_") != string::npos) { // If we have missing hits ME
2289  MonitorElement *me = iGetter.get(full_path);
2290  if (!me)
2291  continue;
2292  float missingHits = me->getEntries();
2293  string new_path = full_path.replace(full_path.find("missing"), 7, "valid");
2294  me = iGetter.get(new_path);
2295  if (!me)
2296  continue;
2297  float validHits = me->getEntries();
2298  float hitEfficiency = -1.;
2299  if (validHits + missingHits > 0.)
2300  hitEfficiency = validHits / (validHits + missingHits);
2301  int binx = 0;
2302  int biny = 0;
2303  biny = getLadder(dname);
2304  if (currDir.find("Shell_mO") != string::npos || currDir.find("Shell_pO") != string::npos) {
2305  biny = -biny;
2306  }
2307  if (currDir.find("Shell_m") != string::npos) {
2308  binx = 1;
2309  } else {
2310  binx = 2;
2311  } // x-axis: z-side
2312  if (currDir.find("Layer_1") != string::npos) {
2313  HitEfficiency_L1 = iGetter.get("Pixel/Barrel/HitEfficiency_L1");
2314  if (HitEfficiency_L1)
2315  HitEfficiency_L1->setBinContent(binx, biny, (float)hitEfficiency);
2316  } else if (currDir.find("Layer_2") != string::npos) {
2317  HitEfficiency_L2 = iGetter.get("Pixel/Barrel/HitEfficiency_L2");
2318  if (HitEfficiency_L2)
2319  HitEfficiency_L2->setBinContent(binx, biny, (float)hitEfficiency);
2320  } else if (currDir.find("Layer_3") != string::npos) {
2321  HitEfficiency_L3 = iGetter.get("Pixel/Barrel/HitEfficiency_L3");
2322  if (HitEfficiency_L3)
2323  HitEfficiency_L3->setBinContent(binx, biny, (float)hitEfficiency);
2324  } else if (currDir.find("Layer_4") != string::npos) {
2325  HitEfficiency_L4 = iGetter.get("Pixel/Barrel/HitEfficiency_L4");
2326  if (HitEfficiency_L4)
2327  HitEfficiency_L4->setBinContent(binx, biny, (float)hitEfficiency);
2328  }
2329  }
2330  }
2331  } // endifUpgradeInBPix
2332  } else if (!isbarrel && dname.find("Blade_") != string::npos && !isUpgrade) {
2333  vector<string> meVec = iGetter.getMEs();
2334  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2335  string full_path = currDir + "/" + (*it);
2336  if (full_path.find("missing_") != string::npos) { // If we have missing hits ME
2337  MonitorElement *missing = iGetter.get(full_path);
2338  if (!missing)
2339  continue;
2340  // float missingHits = missing->getEntries();
2341  string new_path = full_path.replace(full_path.find("missing"), 7, "valid");
2342  MonitorElement *valid = iGetter.get(new_path);
2343  if (!valid)
2344  continue;
2345  // float validHits = valid->getEntries();
2346  int binx = 0;
2347  int biny = 0;
2348  binx = getBlade(dname);
2349  if (currDir.find("HalfCylinder_mI") != string::npos || currDir.find("HalfCylinder_pI") != string::npos) {
2350  binx = binx + 14;
2351  } else {
2352  binx = 13 - binx;
2353  }
2354  const int nPanel = 2;
2355  for (int i = 1; i < nPanel + 1; i++) {
2356  float hitEfficiency = -1.;
2357  float missingHits = 0;
2358  float validHits = 0;
2359  biny = i;
2360  missingHits = missing->getBinContent(i);
2361  validHits = valid->getBinContent(i);
2362  if (validHits + missingHits > 0.)
2363  hitEfficiency = validHits / (validHits + missingHits);
2364  if (currDir.find("Disk_1") != string::npos && currDir.find("HalfCylinder_m") != string::npos) {
2365  HitEfficiency_Dm1 = iGetter.get("Pixel/Endcap/HitEfficiency_Dm1");
2366  if (HitEfficiency_Dm1)
2367  HitEfficiency_Dm1->setBinContent(binx, biny, (float)hitEfficiency);
2368  } else if (currDir.find("Disk_2") != string::npos && currDir.find("HalfCylinder_m") != string::npos) {
2369  HitEfficiency_Dm2 = iGetter.get("Pixel/Endcap/HitEfficiency_Dm2");
2370  if (HitEfficiency_Dm2)
2371  HitEfficiency_Dm2->setBinContent(binx, biny, (float)hitEfficiency);
2372  } else if (currDir.find("Disk_1") != string::npos && currDir.find("HalfCylinder_p") != string::npos) {
2373  HitEfficiency_Dp1 = iGetter.get("Pixel/Endcap/HitEfficiency_Dp1");
2374  if (HitEfficiency_Dp1)
2375  HitEfficiency_Dp1->setBinContent(binx, biny, (float)hitEfficiency);
2376  } else if (currDir.find("Disk_2") != string::npos && currDir.find("HalfCylinder_p") != string::npos) {
2377  HitEfficiency_Dp2 = iGetter.get("Pixel/Endcap/HitEfficiency_Dp2");
2378  if (HitEfficiency_Dp2)
2379  HitEfficiency_Dp2->setBinContent(binx, biny, (float)hitEfficiency);
2380  }
2381  } // EndOfFor
2382  }
2383  }
2384  } else if (!isbarrel && dname.find("Blade_") != string::npos && isUpgrade) {
2385  vector<string> meVec = iGetter.getMEs();
2386  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2387  string full_path = currDir + "/" + (*it);
2388  if (full_path.find("missing_") != string::npos) { // If we have missing hits ME
2389  MonitorElement *me = iGetter.get(full_path);
2390  if (!me)
2391  continue;
2392  float missingHits = me->getEntries();
2393  string new_path = full_path.replace(full_path.find("missing"), 7, "valid");
2394  me = iGetter.get(new_path);
2395  if (!me)
2396  continue;
2397  float validHits = me->getEntries();
2398  float hitEfficiency = -1.;
2399  if (validHits + missingHits > 0.)
2400  hitEfficiency = validHits / (validHits + missingHits);
2401  int binx = 0;
2402  int biny = 1;
2403  binx = getBlade(dname);
2404  if (currDir.find("HalfCylinder_mI") != string::npos || currDir.find("HalfCylinder_pI") != string::npos) {
2405  binx = binx + 12;
2406  } else {
2407  if (binx == 1)
2408  binx = 17;
2409  else if (binx == 2)
2410  binx = 16;
2411  else if (binx == 3)
2412  binx = 15;
2413  else if (binx == 4)
2414  binx = 14;
2415  else if (binx == 5)
2416  binx = 13;
2417  else if (binx == 6)
2418  binx = 12;
2419  else if (binx == 7)
2420  binx = 11;
2421  else if (binx == 8)
2422  binx = 10;
2423  else if (binx == 9)
2424  binx = 9;
2425  else if (binx == 10)
2426  binx = 8;
2427  else if (binx == 11)
2428  binx = 7;
2429  else if (binx == 12)
2430  binx = 6;
2431  else if (binx == 13)
2432  binx = 5;
2433  else if (binx == 14)
2434  binx = 4;
2435  else if (binx == 15)
2436  binx = 3;
2437  else if (binx == 16)
2438  binx = 2;
2439  else if (binx == 17)
2440  binx = 1;
2441  }
2442  if (currDir.find("Disk_1") != string::npos && currDir.find("HalfCylinder_m") != string::npos) {
2443  HitEfficiency_Dm1 = iGetter.get("Pixel/Endcap/HitEfficiency_Dm1");
2444  if (HitEfficiency_Dm1)
2445  HitEfficiency_Dm1->setBinContent(binx, biny, (float)hitEfficiency);
2446  } else if (currDir.find("Disk_2") != string::npos && currDir.find("HalfCylinder_m") != string::npos) {
2447  HitEfficiency_Dm2 = iGetter.get("Pixel/Endcap/HitEfficiency_Dm2");
2448  if (HitEfficiency_Dm2)
2449  HitEfficiency_Dm2->setBinContent(binx, biny, (float)hitEfficiency);
2450  } else if (currDir.find("Disk_3") != string::npos && currDir.find("HalfCylinder_m") != string::npos) {
2451  HitEfficiency_Dm3 = iGetter.get("Pixel/Endcap/HitEfficiency_Dm3");
2452  if (HitEfficiency_Dm3)
2453  HitEfficiency_Dm3->setBinContent(binx, biny, (float)hitEfficiency);
2454  } else if (currDir.find("Disk_1") != string::npos && currDir.find("HalfCylinder_p") != string::npos) {
2455  HitEfficiency_Dp1 = iGetter.get("Pixel/Endcap/HitEfficiency_Dp1");
2456  if (HitEfficiency_Dp1)
2457  HitEfficiency_Dp1->setBinContent(binx, biny, (float)hitEfficiency);
2458  } else if (currDir.find("Disk_2") != string::npos && currDir.find("HalfCylinder_p") != string::npos) {
2459  HitEfficiency_Dp2 = iGetter.get("Pixel/Endcap/HitEfficiency_Dp2");
2460  if (HitEfficiency_Dp2)
2461  HitEfficiency_Dp2->setBinContent(binx, biny, (float)hitEfficiency);
2462  } else if (currDir.find("Disk_3") != string::npos && currDir.find("HalfCylinder_p") != string::npos) {
2463  HitEfficiency_Dp3 = iGetter.get("Pixel/Endcap/HitEfficiency_Dp3");
2464  if (HitEfficiency_Dp3)
2465  HitEfficiency_Dp3->setBinContent(binx, biny, (float)hitEfficiency);
2466  }
2467  // std::cout<<"EFFI: "<<currDir<<" , x: "<<binx<<" , y:
2468  // "<<biny<<std::endl;
2469  }
2470  }
2471  } else {
2472  vector<string> subdirs = iGetter.getSubdirs();
2473  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2474  iBooker.cd(*it);
2475  iGetter.cd(*it);
2476  if (*it != "Pixel" &&
2477  ((isbarrel && (*it).find("Barrel") == string::npos) || (!isbarrel && (*it).find("Endcap") == string::npos)))
2478  continue;
2479  fillEfficiency(iBooker, iGetter, isbarrel, isUpgrade);
2480  iBooker.goUp();
2481  iGetter.setCurrentFolder(iBooker.pwd());
2482  }
2483  }
2484  } else { // Online
2485  if (dname.find("Module_") != string::npos) {
2486  vector<string> meVec = iGetter.getMEs();
2487  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
2488  string full_path = currDir + "/" + (*it);
2489  if (full_path.find("missing_") != string::npos) { // If we have missing hits ME
2490  MonitorElement *me = iGetter.get(full_path);
2491  if (!me)
2492  continue;
2493  float missingHits = me->getEntries();
2494  string new_path = full_path.replace(full_path.find("missing"), 7, "valid");
2495  me = iGetter.get(new_path);
2496  if (!me)
2497  continue;
2498  float validHits = me->getEntries();
2499  float hitEfficiency = -1.;
2500  if (validHits + missingHits > 0.)
2501  hitEfficiency = validHits / (validHits + missingHits);
2502  int binx = 0;
2503  int biny = 0;
2504  if (isbarrel) {
2505  if (currDir.find("Shell_m") != string::npos) {
2506  if (currDir.find("Module_4") != string::npos) {
2507  binx = 1;
2508  } else if (currDir.find("Module_3") != string::npos) {
2509  binx = 2;
2510  }
2511  if (currDir.find("Module_2") != string::npos) {
2512  binx = 3;
2513  } else if (currDir.find("Module_1") != string::npos) {
2514  binx = 4;
2515  }
2516  } else if (currDir.find("Shell_p") != string::npos) {
2517  if (currDir.find("Module_1") != string::npos) {
2518  binx = 5;
2519  } else if (currDir.find("Module_2") != string::npos) {
2520  binx = 6;
2521  }
2522  if (currDir.find("Module_3") != string::npos) {
2523  binx = 7;
2524  } else if (currDir.find("Module_4") != string::npos) {
2525  binx = 8;
2526  }
2527  }
2528  if (!isUpgrade) {
2529  if (currDir.find("01") != string::npos) {
2530  biny = 1;
2531  } else if (currDir.find("02") != string::npos) {
2532  biny = 2;
2533  } else if (currDir.find("03") != string::npos) {
2534  biny = 3;
2535  } else if (currDir.find("04") != string::npos) {
2536  biny = 4;
2537  } else if (currDir.find("05") != string::npos) {
2538  biny = 5;
2539  } else if (currDir.find("06") != string::npos) {
2540  biny = 6;
2541  } else if (currDir.find("07") != string::npos) {
2542  biny = 7;
2543  } else if (currDir.find("08") != string::npos) {
2544  biny = 8;
2545  } else if (currDir.find("09") != string::npos) {
2546  biny = 9;
2547  } else if (currDir.find("10") != string::npos) {
2548  biny = 10;
2549  } else if (currDir.find("11") != string::npos) {
2550  biny = 11;
2551  } else if (currDir.find("12") != string::npos) {
2552  biny = 12;
2553  } else if (currDir.find("13") != string::npos) {
2554  biny = 13;
2555  } else if (currDir.find("14") != string::npos) {
2556  biny = 14;
2557  } else if (currDir.find("15") != string::npos) {
2558  biny = 15;
2559  } else if (currDir.find("16") != string::npos) {
2560  biny = 16;
2561  } else if (currDir.find("17") != string::npos) {
2562  biny = 17;
2563  } else if (currDir.find("18") != string::npos) {
2564  biny = 18;
2565  } else if (currDir.find("19") != string::npos) {
2566  biny = 19;
2567  } else if (currDir.find("20") != string::npos) {
2568  biny = 20;
2569  } else if (currDir.find("21") != string::npos) {
2570  biny = 21;
2571  } else if (currDir.find("22") != string::npos) {
2572  biny = 22;
2573  }
2574  if (currDir.find("Shell_mO") != string::npos || currDir.find("Shell_pO") != string::npos) {
2575  if (currDir.find("Layer_1") != string::npos) {
2576  biny = biny + 10;
2577  } else if (currDir.find("Layer_2") != string::npos) {
2578  biny = biny + 16;
2579  } else if (currDir.find("Layer_3") != string::npos) {
2580  biny = biny + 22;
2581  }
2582  }
2583  } else if (isUpgrade) {
2584  if (currDir.find("01") != string::npos) {
2585  biny = 1;
2586  } else if (currDir.find("02") != string::npos) {
2587  biny = 2;
2588  } else if (currDir.find("03") != string::npos) {
2589  biny = 3;
2590  } else if (currDir.find("04") != string::npos) {
2591  biny = 4;
2592  } else if (currDir.find("05") != string::npos) {
2593  biny = 5;
2594  } else if (currDir.find("06") != string::npos) {
2595  biny = 6;
2596  } else if (currDir.find("07") != string::npos) {
2597  biny = 7;
2598  } else if (currDir.find("08") != string::npos) {
2599  biny = 8;
2600  } else if (currDir.find("09") != string::npos) {
2601  biny = 9;
2602  } else if (currDir.find("10") != string::npos) {
2603  biny = 10;
2604  } else if (currDir.find("11") != string::npos) {
2605  biny = 11;
2606  } else if (currDir.find("12") != string::npos) {
2607  biny = 12;
2608  } else if (currDir.find("13") != string::npos) {
2609  biny = 13;
2610  } else if (currDir.find("14") != string::npos) {
2611  biny = 14;
2612  } else if (currDir.find("15") != string::npos) {
2613  biny = 15;
2614  } else if (currDir.find("16") != string::npos) {
2615  biny = 16;
2616  } else if (currDir.find("17") != string::npos) {
2617  biny = 17;
2618  } else if (currDir.find("18") != string::npos) {
2619  biny = 18;
2620  } else if (currDir.find("19") != string::npos) {
2621  biny = 19;
2622  } else if (currDir.find("20") != string::npos) {
2623  biny = 20;
2624  } else if (currDir.find("21") != string::npos) {
2625  biny = 21;
2626  } else if (currDir.find("22") != string::npos) {
2627  biny = 22;
2628  } else if (currDir.find("23") != string::npos) {
2629  biny = 23;
2630  } else if (currDir.find("24") != string::npos) {
2631  biny = 24;
2632  } else if (currDir.find("25") != string::npos) {
2633  biny = 25;
2634  } else if (currDir.find("25") != string::npos) {
2635  biny = 25;
2636  } else if (currDir.find("26") != string::npos) {
2637  biny = 26;
2638  } else if (currDir.find("27") != string::npos) {
2639  biny = 27;
2640  } else if (currDir.find("28") != string::npos) {
2641  biny = 28;
2642  } else if (currDir.find("29") != string::npos) {
2643  biny = 29;
2644  } else if (currDir.find("30") != string::npos) {
2645  biny = 30;
2646  } else if (currDir.find("31") != string::npos) {
2647  biny = 31;
2648  } else if (currDir.find("32") != string::npos) {
2649  biny = 32;
2650  }
2651  if (currDir.find("Shell_mO") != string::npos || currDir.find("Shell_pO") != string::npos) {
2652  if (currDir.find("Layer_1") != string::npos) {
2653  biny = biny + 6;
2654  } else if (currDir.find("Layer_2") != string::npos) {
2655  biny = biny + 14;
2656  } else if (currDir.find("Layer_3") != string::npos) {
2657  biny = biny + 22;
2658  } else if (currDir.find("Layer_4") != string::npos) {
2659  biny = biny + 32;
2660  }
2661  }
2662  }
2663  } else { // endcap
2664  if (!isUpgrade) {
2665  if (currDir.find("01") != string::npos) {
2666  binx = 1;
2667  } else if (currDir.find("02") != string::npos) {
2668  binx = 2;
2669  } else if (currDir.find("03") != string::npos) {
2670  binx = 3;
2671  } else if (currDir.find("04") != string::npos) {
2672  binx = 4;
2673  } else if (currDir.find("05") != string::npos) {
2674  binx = 5;
2675  } else if (currDir.find("06") != string::npos) {
2676  binx = 6;
2677  } else if (currDir.find("07") != string::npos) {
2678  binx = 7;
2679  } else if (currDir.find("08") != string::npos) {
2680  binx = 8;
2681  } else if (currDir.find("09") != string::npos) {
2682  binx = 9;
2683  } else if (currDir.find("10") != string::npos) {
2684  binx = 10;
2685  } else if (currDir.find("11") != string::npos) {
2686  binx = 11;
2687  } else if (currDir.find("12") != string::npos) {
2688  binx = 12;
2689  }
2690  if (currDir.find("HalfCylinder_mO") != string::npos || currDir.find("HalfCylinder_pO") != string::npos) {
2691  binx = binx + 12;
2692  }
2693  if (currDir.find("Panel_1/Module_1") != string::npos) {
2694  biny = 1;
2695  } else if (currDir.find("Panel_2/Module_1") != string::npos) {
2696  biny = 2;
2697  } else if (currDir.find("Panel_1/Module_2") != string::npos) {
2698  biny = 3;
2699  } else if (currDir.find("Panel_2/Module_2") != string::npos) {
2700  biny = 4;
2701  } else if (currDir.find("Panel_1/Module_3") != string::npos) {
2702  biny = 5;
2703  } else if (currDir.find("Panel_2/Module_3") != string::npos) {
2704  biny = 6;
2705  } else if (currDir.find("Panel_1/Module_4") != string::npos) {
2706  biny = 7;
2707  }
2708  } else if (isUpgrade) {
2709  if (currDir.find("01") != string::npos) {
2710  binx = 1;
2711  } else if (currDir.find("02") != string::npos) {
2712  binx = 2;
2713  } else if (currDir.find("03") != string::npos) {
2714  binx = 3;
2715  } else if (currDir.find("04") != string::npos) {
2716  binx = 4;
2717  } else if (currDir.find("05") != string::npos) {
2718  binx = 5;
2719  } else if (currDir.find("06") != string::npos) {
2720  binx = 6;
2721  } else if (currDir.find("07") != string::npos) {
2722  binx = 7;
2723  } else if (currDir.find("08") != string::npos) {
2724  binx = 8;
2725  } else if (currDir.find("09") != string::npos) {
2726  binx = 9;
2727  } else if (currDir.find("10") != string::npos) {
2728  binx = 10;
2729  } else if (currDir.find("11") != string::npos) {
2730  binx = 11;
2731  } else if (currDir.find("12") != string::npos) {
2732  binx = 12;
2733  } else if (currDir.find("13") != string::npos) {
2734  binx = 13;
2735  } else if (currDir.find("14") != string::npos) {
2736  binx = 14;
2737  } else if (currDir.find("15") != string::npos) {
2738  binx = 15;
2739  } else if (currDir.find("16") != string::npos) {
2740  binx = 16;
2741  } else if (currDir.find("17") != string::npos) {
2742  binx = 17;
2743  }
2744  if (currDir.find("HalfCylinder_mO") != string::npos || currDir.find("HalfCylinder_pO") != string::npos) {
2745  binx = binx + 17;
2746  }
2747  if (currDir.find("Panel_1/Module_1") != string::npos) {
2748  biny = 1;
2749  } else if (currDir.find("Panel_2/Module_1") != string::npos) {
2750  biny = 2;
2751  }
2752  } // endif(isUpgrade)
2753  }
2754 
2755  if (currDir.find("Layer_1") != string::npos) {
2756  HitEfficiency_L1 = iGetter.get("Pixel/Barrel/HitEfficiency_L1");
2757  if (HitEfficiency_L1)
2758  HitEfficiency_L1->setBinContent(binx, biny, (float)hitEfficiency);
2759  } else if (currDir.find("Layer_2") != string::npos) {
2760  HitEfficiency_L2 = iGetter.get("Pixel/Barrel/HitEfficiency_L2");
2761  if (HitEfficiency_L2)
2762  HitEfficiency_L2->setBinContent(binx, biny, (float)hitEfficiency);
2763  } else if (currDir.find("Layer_3") != string::npos) {
2764  HitEfficiency_L3 = iGetter.get("Pixel/Barrel/HitEfficiency_L3");
2765  if (HitEfficiency_L3)
2766  HitEfficiency_L3->setBinContent(binx, biny, (float)hitEfficiency);
2767  } else if (isUpgrade && (currDir.find("Layer_4") != string::npos)) {
2768  HitEfficiency_L4 = iGetter.get("Pixel/Barrel/HitEfficiency_L4");
2769  if (HitEfficiency_L4)
2770  HitEfficiency_L4->setBinContent(binx, biny, (float)hitEfficiency);
2771  } else if (currDir.find("Disk_1") != string::npos && currDir.find("HalfCylinder_m") != string::npos) {
2772  HitEfficiency_Dm1 = iGetter.get("Pixel/Endcap/HitEfficiency_Dm1");
2773  if (HitEfficiency_Dm1)
2774  HitEfficiency_Dm1->setBinContent(binx, biny, (float)hitEfficiency);
2775  } else if (currDir.find("Disk_2") != string::npos && currDir.find("HalfCylinder_m") != string::npos) {
2776  HitEfficiency_Dm2 = iGetter.get("Pixel/Endcap/HitEfficiency_Dm2");
2777  if (HitEfficiency_Dm2)
2778  HitEfficiency_Dm2->setBinContent(binx, biny, (float)hitEfficiency);
2779  } else if (currDir.find("Disk_3") != string::npos && currDir.find("HalfCylinder_m") != string::npos) {
2780  HitEfficiency_Dm3 = iGetter.get("Pixel/Endcap/HitEfficiency_Dm3");
2781  if (HitEfficiency_Dm3)
2782  HitEfficiency_Dm3->setBinContent(binx, biny, (float)hitEfficiency);
2783  } else if (currDir.find("Disk_1") != string::npos && currDir.find("HalfCylinder_p") != string::npos) {
2784  HitEfficiency_Dp1 = iGetter.get("Pixel/Endcap/HitEfficiency_Dp1");
2785  if (HitEfficiency_Dp1)
2786  HitEfficiency_Dp1->setBinContent(binx, biny, (float)hitEfficiency);
2787  } else if (currDir.find("Disk_2") != string::npos && currDir.find("HalfCylinder_p") != string::npos) {
2788  HitEfficiency_Dp2 = iGetter.get("Pixel/Endcap/HitEfficiency_Dp2");
2789  if (HitEfficiency_Dp2)
2790  HitEfficiency_Dp2->setBinContent(binx, biny, (float)hitEfficiency);
2791  } else if (currDir.find("Disk_3") != string::npos && currDir.find("HalfCylinder_p") != string::npos) {
2792  HitEfficiency_Dp3 = iGetter.get("Pixel/Endcap/HitEfficiency_Dp3");
2793  if (HitEfficiency_Dp3)
2794  HitEfficiency_Dp3->setBinContent(binx, biny, (float)hitEfficiency);
2795  }
2796  }
2797  }
2798  } else {
2799  // cout<<"finding subdirs now"<<std::endl;
2800  vector<string> subdirs = iGetter.getSubdirs();
2801  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
2802  iBooker.cd(*it);
2803  iGetter.cd(*it);
2804  if (*it != "Pixel" &&
2805  ((isbarrel && (*it).find("Barrel") == string::npos) || (!isbarrel && (*it).find("Endcap") == string::npos)))
2806  continue;
2807  fillEfficiency(iBooker, iGetter, isbarrel, isUpgrade);
2808  iBooker.goUp();
2809  iGetter.setCurrentFolder(iBooker.pwd());
2810  }
2811  }
2812  } // end online/offline
2813  // cout<<"leaving SiPixelActionExecutor::fillEfficiency..."<<std::endl;
2814 }
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * HitEfficiency_Dp3
MonitorElement * HitEfficiency_L4
MonitorElement * HitEfficiency_L3
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:361
MonitorElement * HitEfficiency_Dm2
MonitorElement * HitEfficiency_L2
int getBlade(const std::string &dname)
void fillEfficiency(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isbarrel, bool isUpgrade)
int getLadder(const std::string &dname)
TH2F * getTH2F() const
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
MonitorElement * HitEfficiency_Dm3
double getEntries() const
get # of entries
std::string const & pwd()
Definition: DQMStore.cc:278
MonitorElement * HitEfficiency_L1
MonitorElement * HitEfficiency_Dp1
double getBinContent(int binx) const
get content of bin (1-D)
std::vector< std::string > getSubdirs()
Definition: DQMStore.cc:325
MonitorElement * HitEfficiency_Dp2
std::vector< std::string > getMEs()
Definition: DQMStore.cc:331
MonitorElement * HitEfficiency_Dm1
void SiPixelActionExecutor::fillEfficiencySummary ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)

Definition at line 2818 of file SiPixelActionExecutor.cc.

References objects.autophobj::float, DQMStore::IGetter::get(), MonitorElement::getTH1(), HitEfficiencySummary, mps_fire::i, MonitorElement::setBinContent(), Tier0Flag_, and cuy::yBin.

2818  {
2819  // cout<<"entering
2820  // SiPixelActionExecutor::fillEfficiencySummary..."<<std::endl; First we get
2821  // the summary plot"
2822  if (!Tier0Flag_)
2823  return;
2824  HitEfficiencySummary = iGetter.get("Pixel/HitEfficiencySummary");
2825  // Now we will loop over the hit efficiency plots and fill it"
2826  string hitEfficiencyPostfix[] = {"L1", "L2", "L3", "Dp1", "Dp2", "Dm1", "Dm2"};
2827  std::vector<std::vector<float>> ignoreXBins = {
2828  {-4, 2}, {4, 4, -1, -3, 3, -4, -3, -2, -1, -4, -3, -2, -1, 1, -4}, {1, -4, 1}, {}, {}, {}, {}};
2829  std::vector<std::vector<float>> ignoreYBins = {
2830  {-9, -3}, {1, 16, 1, -13, -13, -5, -5, -5, -5, -6, -6, -6, -6, -8, -8}, {3, 14, 6}, {}, {}, {}, {}};
2831 
2832  for (int i = 0; i < 7; i++) {
2833  string subdetName = "Endcap/";
2834  if (i < 3)
2835  subdetName = "Barrel/";
2836  char meName[50];
2837  sprintf(meName, "Pixel/%sHitEfficiency_%s", subdetName.c_str(), hitEfficiencyPostfix[i].c_str());
2838  MonitorElement *tempHitEffMap = iGetter.get(meName);
2839  float totalEff = 0.;
2840  int totalBins = 0;
2841  TH1 *hitEffMap = tempHitEffMap->getTH1();
2842  for (int xBin = 1; xBin < tempHitEffMap->getNbinsX() + 1; xBin++) {
2843  if (fabs(hitEffMap->GetXaxis()->GetBinCenter(xBin)) < 1.)
2844  continue;
2845  for (int yBin = 1; yBin < tempHitEffMap->getNbinsY() + 1; yBin++) {
2846  if (fabs(hitEffMap->GetYaxis()->GetBinCenter(yBin)) < 0.5)
2847  continue;
2848  bool ignoreBin = false;
2849  for (unsigned int j = 0; j < ignoreXBins[i].size(); j++) {
2850  if (hitEffMap->GetXaxis()->GetBinCenter(xBin) == ignoreXBins[i][j] &&
2851  hitEffMap->GetYaxis()->GetBinCenter(yBin) == ignoreYBins[i][j]) {
2852  ignoreBin = true;
2853  break;
2854  }
2855  }
2856  if (ignoreBin)
2857  continue;
2858  if (!(tempHitEffMap->getBinContent(xBin, yBin) < 0.))
2859  totalEff += tempHitEffMap->getBinContent(xBin, yBin);
2860  totalBins++;
2861  }
2862  }
2863  float overalEff = 0.;
2864  // std::cout << i << " " << totalEff << " " << totalBins << std::endl;
2865  if (totalBins > 0)
2866  overalEff = totalEff / float(totalBins);
2867  HitEfficiencySummary->setBinContent(i + 1, overalEff);
2868  }
2869 }
void setBinContent(int binx, double content)
set content of bin (1-D)
TH1 * getTH1() const
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
MonitorElement * HitEfficiencySummary
yBin
Definition: cuy.py:893
void SiPixelActionExecutor::fillFEDErrorSummary ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
std::string  dir_name,
std::vector< std::string > &  me_names 
)
private

Definition at line 842 of file SiPixelActionExecutor.cc.

References DQMStore::IBooker::book2D(), DQMStore::IBooker::cd(), DQMStore::IGetter::cd(), relmon_rootfiles_spy::contents, MonitorElement::Fill(), spr::find(), DQMStore::IGetter::get(), MonitorElement::getBinContent(), MonitorElement::getEntries(), getFEDSummaryME(), MonitorElement::getMean(), DQMStore::IGetter::getMEs(), DQMStore::IGetter::getSubdirs(), DQMStore::IBooker::goUp(), mps_fire::i, isum, findQualityFiles::jj, tablePrinter::prefix, DQMStore::IBooker::pwd(), MonitorElement::Reset(), MonitorElement::setBinContent(), MonitorElement::setBinLabel(), DQMStore::IGetter::setCurrentFolder(), lumiContext::sname, source_type_, GlobalPosition_Frontier_DevDB_cff::tag, groupFilesInBlocks::temp, runGCPTkAlMap::title, and cond::persistency::GLOBAL_TAG::tname.

Referenced by createSummary().

845  {
846  // printing cout<<"entering
847  // SiPixelActionExecutor::fillFEDErrorSummary..."<<endl;
848  string currDir = iBooker.pwd();
849  string prefix;
850  if (source_type_ == 0)
851  prefix = "SUMRAW";
852  else if (source_type_ == 20)
853  prefix = "SUMOFF";
854 
855  if (currDir.find(dir_name) != string::npos) {
856  vector<MonitorElement *> sum_mes;
857  for (vector<string>::const_iterator iv = me_names.begin(); iv != me_names.end(); iv++) {
858  bool isBooked = false;
859  vector<string> contents = iGetter.getMEs();
860  for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++)
861  if ((*im).find(*iv) != string::npos)
862  isBooked = true;
863  if (source_type_ == 5 || source_type_ == 6) {
864  if ((*iv) == "errorType" || (*iv) == "NErrors" || (*iv) == "fullType" || (*iv) == "chanNmbr" ||
865  (*iv) == "TBMType" || (*iv) == "EvtNbr" || (*iv) == "evtSize" || (*iv) == "linkId" || (*iv) == "ROCId" ||
866  (*iv) == "DCOLId" || (*iv) == "PXId" || (*iv) == "ROCNmbr" || (*iv) == "TBMMessage" ||
867  (*iv) == "Type36Hitmap" || (*iv) == "FedChLErr" || (*iv) == "FedChNErr" || (*iv) == "FedETypeNErr")
868  prefix = "SUMRAW";
869  }
870  if ((*iv) == "errorType" || (*iv) == "NErrors" || (*iv) == "fullType" || (*iv) == "chanNmbr" ||
871  (*iv) == "TBMType" || (*iv) == "EvtNbr" || (*iv) == "evtSize" || (*iv) == "linkId" || (*iv) == "ROCId" ||
872  (*iv) == "DCOLId" || (*iv) == "PXId" || (*iv) == "ROCNmbr" || (*iv) == "TBMMessage" ||
873  (*iv) == "Type36Hitmap") {
874  string tag = prefix + "_" + (*iv) + "_FEDErrors";
875  MonitorElement *temp = getFEDSummaryME(iBooker, iGetter, tag);
876  sum_mes.push_back(temp);
877  } else if ((*iv) == "FedChLErr" || (*iv) == "FedChNErr" || (*iv) == "FedETypeNErr") {
878  string tag = prefix + "_" + (*iv);
880  if ((*iv) == "FedChLErr") {
881  if (!isBooked)
882  temp = iBooker.book2D("FedChLErr", "Type of last error", 40, -0.5, 39.5, 37, 0., 37.);
883  else {
884  string fullpathname = iBooker.pwd() + "/" + (*iv);
885  temp = iGetter.get(fullpathname);
886  temp->Reset();
887  }
888  } // If I don't reset this one, then I instead start adding error
889  // codes..
890  if ((*iv) == "FedChNErr") {
891  if (!isBooked)
892  temp = iBooker.book2D("FedChNErr", "Total number of errors", 40, -0.5, 39.5, 37, 0., 37.);
893  else {
894  string fullpathname = iBooker.pwd() + "/" + (*iv);
895  temp = iGetter.get(fullpathname);
896  temp->Reset();
897  }
898  } // If I don't reset this one, then I instead start adding error
899  // codes..
900  if ((*iv) == "FedETypeNErr") {
901  if (!isBooked) {
902  temp = iBooker.book2D("FedETypeNErr", "Number of each error type", 40, -0.5, 39.5, 21, 0., 21.);
903  temp->setBinLabel(1, "ROC of 25", 2);
904  temp->setBinLabel(2, "Gap word", 2);
905  temp->setBinLabel(3, "Dummy word", 2);
906  temp->setBinLabel(4, "FIFO full", 2);
907  temp->setBinLabel(5, "Timeout", 2);
908  temp->setBinLabel(6, "Stack full", 2);
909  temp->setBinLabel(7, "Pre-cal issued", 2);
910  temp->setBinLabel(8, "Trigger clear or sync", 2);
911  temp->setBinLabel(9, "No token bit", 2);
912  temp->setBinLabel(10, "Overflow", 2);
913  temp->setBinLabel(11, "FSM error", 2);
914  temp->setBinLabel(12, "Invalid #ROCs", 2);
915  temp->setBinLabel(13, "Event number", 2);
916  temp->setBinLabel(14, "Slink header", 2);
917  temp->setBinLabel(15, "Slink trailer", 2);
918  temp->setBinLabel(16, "Event size", 2);
919  temp->setBinLabel(17, "Invalid channel#", 2);
920  temp->setBinLabel(18, "ROC value", 2);
921  temp->setBinLabel(19, "Dcol or pixel value", 2);
922  temp->setBinLabel(20, "Readout order", 2);
923  temp->setBinLabel(21, "CRC error", 2);
924  } else {
925  string fullpathname = iBooker.pwd() + "/" + (*iv);
926  temp = iGetter.get(fullpathname);
927  temp->Reset();
928  } // If I don't reset this one, then I instead start adding error
929  // codes..
930  }
931  sum_mes.push_back(temp);
932  }
933  }
934  if (sum_mes.empty()) {
935  edm::LogInfo("SiPixelActionExecutor") << " Summary MEs can not be created"
936  << "\n";
937  return;
938  }
939  vector<string> subdirs = iGetter.getSubdirs();
940  int ndet = 0;
941  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
942  if ((*it).find("FED_") == string::npos)
943  continue;
944  iBooker.cd(*it);
945  iGetter.cd(*it);
946  string fedid = (*it).substr((*it).find("_") + 1);
947  std::istringstream isst;
948  isst.str(fedid);
949  isst >> ndet;
950  ndet++;
951  vector<string> contents = iGetter.getMEs();
952 
953  for (vector<MonitorElement *>::const_iterator isum = sum_mes.begin(); isum != sum_mes.end(); isum++) {
954  for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++) {
955  if (((*im).find("FedChNErr") != std::string::npos &&
956  (*isum)->getName().find("FedChNErr") != std::string::npos) ||
957  ((*im).find("FedChLErr") != std::string::npos &&
958  (*isum)->getName().find("FedChLErr") != std::string::npos) ||
959  ((*im).find("FedETypeNErr") != std::string::npos &&
960  (*isum)->getName().find("FedETypeNErr") != std::string::npos)) {
961  string fullpathname = iBooker.pwd() + "/" + (*im);
962  MonitorElement *me = iGetter.get(fullpathname);
963  if (me) {
964  for (int i = 0; i != 37; i++) {
965  if ((*im).find("FedETypeNErr") != std::string::npos && i < 21)
966  (*isum)->Fill(ndet - 1, i, me->getBinContent(i + 1));
967  else
968  (*isum)->Fill(ndet - 1, i, me->getBinContent(i + 1));
969  }
970  }
971  }
972  string sname = ((*isum)->getName());
973  string tname = " ";
974  tname = sname.substr(7, (sname.find("_", 7) - 6));
975  if (((*im)).find(tname) == 0) {
976  string fullpathname = iBooker.pwd() + "/" + (*im);
977  MonitorElement *me = iGetter.get(fullpathname);
978 
979  if (me) {
980  if (me->getMean() > 0.) {
981  if (sname.find("_NErrors_") != string::npos) {
982  string path1 = fullpathname;
983  path1 = path1.replace(path1.find("NErrors"), 7, "errorType");
984  MonitorElement *me1 = iGetter.get(path1);
985  bool notReset = true;
986  if (me1) {
987  for (int jj = 1; jj < 16; jj++) {
988  if (me1->getBinContent(jj) > 0.) {
989  if (jj == 6) { // errorType=30 (reset)
990  string path2 = path1;
991  path2 = path2.replace(path2.find("errorType"), 9, "TBMMessage");
992  MonitorElement *me2 = iGetter.get(path2);
993  if (me2)
994  if (me2->getBinContent(6) > 0. || me2->getBinContent(7) > 0.)
995  notReset = false;
996  }
997  }
998  }
999  }
1000  if (notReset)
1001  (*isum)->setBinContent(ndet, (*isum)->getBinContent(ndet) + me1->getEntries());
1002  } else
1003  (*isum)->setBinContent(ndet, (*isum)->getBinContent(ndet) + me->getEntries());
1004  }
1005  (*isum)->setAxisTitle("FED #", 1);
1006  string title = " ";
1007  title = sname.substr(7, (sname.find("_", 7) - 7)) + " per FED";
1008  (*isum)->setAxisTitle(title, 2);
1009  }
1010  break;
1011  }
1012  }
1013  }
1014  iBooker.goUp();
1015  iGetter.setCurrentFolder(iBooker.pwd());
1016  }
1017  } else {
1018  vector<string> subdirs = iGetter.getSubdirs();
1019  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1020  if ((*it).find("Endcap") != string::npos || (*it).find("Barrel") != string::npos)
1021  continue;
1022  iBooker.cd(*it);
1023  iGetter.cd(*it);
1024  fillFEDErrorSummary(iBooker, iGetter, dir_name, me_names);
1025  iBooker.goUp();
1026  iGetter.setCurrentFolder(iBooker.pwd());
1027  }
1028  }
1029  // printing cout<<"...leaving
1030  // SiPixelActionExecutor::fillFEDErrorSummary!"<<endl;
1031 }
void setBinContent(int binx, double content)
set content of bin (1-D)
static char const * tname
Definition: GTSchema.h:13
MonitorElement * getFEDSummaryME(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string me_name)
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:361
double isum
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
void Fill(long long x)
void fillFEDErrorSummary(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string dir_name, std::vector< std::string > &me_names)
void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
double getEntries() const
get # of entries
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
std::string const & pwd()
Definition: DQMStore.cc:278
double getBinContent(int binx) const
get content of bin (1-D)
std::vector< std::string > getSubdirs()
Definition: DQMStore.cc:325
std::vector< std::string > getMEs()
Definition: DQMStore.cc:331
void SiPixelActionExecutor::fillGrandBarrelSummaryHistos ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
std::vector< std::string > &  me_names,
bool  isUpgrade 
)
private

Definition at line 1034 of file SiPixelActionExecutor.cc.

References DQMStore::IBooker::cd(), DQMStore::IGetter::cd(), relmon_rootfiles_spy::contents, compare_using_db::dir_name, DQMStore::IGetter::get(), MonitorElement::getBinContent(), getGrandSummaryME(), DQMStore::IGetter::getMEs(), MonitorElement::getName(), DQMStore::IGetter::getSubdirs(), MonitorElement::getTH1F(), DQMStore::IBooker::goUp(), gen::k, create_public_lumi_plots::path_name, tablePrinter::prefix, DQMStore::IBooker::pwd(), DQMStore::IGetter::setCurrentFolder(), source_type_, runGCPTkAlMap::title, and JetChargeProducer_cfi::var.

Referenced by fillSummary().

1037  {
1038  // cout<<"Entering
1039  // SiPixelActionExecutor::fillGrandBarrelSummaryHistos...:"<<me_names.size()<<endl;
1040  vector<MonitorElement *> gsum_mes;
1041  string currDir = iBooker.pwd();
1042  string path_name = iBooker.pwd();
1043  string dir_name = path_name.substr(path_name.find_last_of("/") + 1);
1044  if ((dir_name.find("DQMData") == 0) || (dir_name.find("Pixel") == 0) ||
1045  (dir_name.find("AdditionalPixelErrors") == 0) || (dir_name.find("Endcap") == 0) ||
1046  (dir_name.find("HalfCylinder") == 0) || (dir_name.find("Disk") == 0) || (dir_name.find("Blade") == 0) ||
1047  (dir_name.find("Panel") == 0))
1048  return;
1049  vector<string> subdirs = iGetter.getSubdirs();
1050  int nDirs = subdirs.size();
1051  int iDir = 0;
1052  int nbin = 0;
1053  int nbin_i = 0;
1054  int nbin_subdir = 0;
1055  int cnt = 0;
1056  bool first_subdir = true;
1057  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1058  cnt++;
1059  iBooker.cd(*it);
1060  iGetter.cd(*it);
1061  vector<string> contents = iGetter.getMEs();
1062 
1063  iBooker.goUp();
1064  iGetter.setCurrentFolder(iBooker.pwd());
1065 
1066  string prefix;
1067  if (source_type_ == 0)
1068  prefix = "SUMRAW";
1069  else if (source_type_ == 1)
1070  prefix = "SUMDIG";
1071  else if (source_type_ == 2)
1072  prefix = "SUMCLU";
1073  else if (source_type_ == 3)
1074  prefix = "SUMTRK";
1075  else if (source_type_ == 4)
1076  prefix = "SUMHIT";
1077  else if (source_type_ >= 7 && source_type_ < 20)
1078  prefix = "SUMCAL";
1079  else if (source_type_ == 20)
1080  prefix = "SUMOFF";
1081 
1082  for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++) {
1083  for (vector<string>::const_iterator iv = me_names.begin(); iv != me_names.end(); iv++) {
1084  string var = "_" + (*iv) + "_";
1085  if ((*im).find(var) != string::npos) {
1086  if ((var == "_charge_" || var == "_nclusters_" || var == "_size_" || var == "_sizeX_" || var == "_sizeY_") &&
1087  (*im).find("Track_") != string::npos)
1088  continue;
1089  string full_path = (*it) + "/" + (*im);
1090  MonitorElement *me = iGetter.get(full_path);
1091  if (!me)
1092  continue;
1093  if (source_type_ == 5 || source_type_ == 6) {
1094  if ((*iv) == "errorType" || (*iv) == "NErrors" || (*iv) == "fullType" || (*iv) == "chanNmbr" ||
1095  (*iv) == "TBMType" || (*iv) == "EvtNbr" || (*iv) == "evtSize" || (*iv) == "linkId" ||
1096  (*iv) == "ROCId" || (*iv) == "DCOLId" || (*iv) == "PXId" || (*iv) == "ROCNmbr" ||
1097  (*iv) == "TBMMessage" || (*iv) == "Type36Hitmap")
1098  prefix = "SUMRAW";
1099  else if ((*iv) == "ndigis" || (*iv) == "adc" || (*iv) == "ndigisFREQ" || (*iv) == "adcCOMB")
1100  prefix = "SUMDIG";
1101  else if ((*iv) == "nclusters" || (*iv) == "x" || (*iv) == "y" || (*iv) == "charge" ||
1102  (*iv) == "chargeCOMB" || (*iv) == "size" || (*iv) == "sizeX" || (*iv) == "sizeY" ||
1103  (*iv) == "minrow" || (*iv) == "maxrow" || (*iv) == "mincol" || (*iv) == "maxcol")
1104  prefix = "SUMCLU";
1105  if (currDir.find("Track") != string::npos)
1106  prefix = "SUMTRK";
1107  else if ((*iv) == "residualX_mean" || (*iv) == "residualY_mean" || (*iv) == "residualX_RMS" ||
1108  (*iv) == "residualY_RMS")
1109  prefix = "SUMTRK";
1110  else if ((*iv) == "ClustX" || (*iv) == "ClustY" || (*iv) == "nRecHits" || (*iv) == "ErrorX" ||
1111  (*iv) == "ErrorY")
1112  prefix = "SUMHIT";
1113  else if ((*iv) == "Gain1d_mean" || (*iv) == "GainChi2NDF1d_mean" || (*iv) == "GainChi2Prob1d_mean" ||
1114  (*iv) == "Pedestal1d_mean" || (*iv) == "ScurveChi2ProbSummary_mean" ||
1115  (*iv) == "ScurveFitResultSummary_mean" || (*iv) == "ScurveSigmasSummary_mean" ||
1116  (*iv) == "ScurveThresholdSummary_mean" || (*iv) == "Gain1d_RMS" || (*iv) == "GainChi2NDF1d_RMS" ||
1117  (*iv) == "GainChi2Prob1d_RMS" || (*iv) == "Pedestal1d_RMS" || (*iv) == "GainNPoints1d_mean" ||
1118  (*iv) == "GainNPoints1d_RMS" || (*iv) == "GainHighPoint1d_mean" ||
1119  (*iv) == "GainHighPoint1d_RMS" || (*iv) == "GainLowPoint1d_mean" ||
1120  (*iv) == "GainLowPoint1d_RMS" || (*iv) == "GainEndPoint1d_mean" || (*iv) == "GainEndPoint1d_RMS" ||
1121  (*iv) == "GainFitResult2d_mean" || (*iv) == "GainFitResult2d_RMS" ||
1122  (*iv) == "GainDynamicRange2d_mean" || (*iv) == "GainDynamicRange2d_RMS" ||
1123  (*iv) == "GainSaturate2d_mean" || (*iv) == "GainSaturate2d_RMS" ||
1124  (*iv) == "ScurveChi2ProbSummary_RMS" || (*iv) == "ScurveFitResultSummary_RMS" ||
1125  (*iv) == "ScurveSigmasSummary_RMS" || (*iv) == "ScurveThresholdSummary_RMS" ||
1126  (*iv) == "pixelAliveSummary_mean" || (*iv) == "pixelAliveSummary_FracOfPerfectPix" ||
1127  (*iv) == "SiPixelErrorsCalibDigis_NCalibErrors")
1128  prefix = "SUMCAL";
1129  } // end source_type if
1130 
1131  if (first_subdir && !isUpgrade) {
1132  nbin = me->getTH1F()->GetNbinsX();
1133  string me_name = prefix + "_" + (*iv) + "_" + dir_name;
1134  if ((*iv) == "adcCOMB" || (*iv) == "chargeCOMB")
1135  me_name = "ALLMODS_" + (*iv) + "_" + dir_name;
1136  else if (prefix == "SUMOFF" && dir_name == "Barrel")
1137  nbin = 192;
1138  else if ((*iv) == "adcCOMB")
1139  nbin = 256;
1140  else if (dir_name == "Barrel")
1141  nbin = 768;
1142  else if (prefix == "SUMOFF" && dir_name.find("Shell") != string::npos)
1143  nbin = 48;
1144  else if (dir_name.find("Shell") != string::npos)
1145  nbin = 192;
1146  else
1147  nbin = nbin * nDirs;
1148 
1149  getGrandSummaryME(iBooker, iGetter, nbin, me_name, gsum_mes);
1150  } else if (first_subdir && isUpgrade) {
1151  nbin = me->getTH1F()->GetNbinsX();
1152  string me_name = prefix + "_" + (*iv) + "_" + dir_name;
1153  if ((*iv) == "adcCOMB" || (*iv) == "chargeCOMB")
1154  me_name = "ALLMODS_" + (*iv) + "_" + dir_name;
1155  else if (prefix == "SUMOFF" && dir_name == "Barrel")
1156  nbin = 296;
1157  else if ((*iv) == "adcCOMB")
1158  nbin = 256;
1159  else if (dir_name == "Barrel")
1160  nbin = 1184;
1161  else if (prefix == "SUMOFF" && dir_name.find("Shell") != string::npos)
1162  nbin = 74;
1163  else if (dir_name.find("Shell") != string::npos)
1164  nbin = 296;
1165  else
1166  nbin = nbin * nDirs;
1167 
1168  getGrandSummaryME(iBooker, iGetter, nbin, me_name, gsum_mes);
1169  }
1170 
1171  for (vector<MonitorElement *>::const_iterator igm = gsum_mes.begin(); igm != gsum_mes.end(); igm++) {
1172  if ((*igm)->getName().find(var) != string::npos) {
1173  if (prefix == "SUMOFF")
1174  (*igm)->setAxisTitle("Ladders", 1);
1175  else if ((*igm)->getName().find("adcCOMB_") != string::npos)
1176  (*igm)->setAxisTitle("Digi charge [ADC]", 1);
1177  else if ((*igm)->getName().find("chargeCOMB_") != string::npos)
1178  (*igm)->setAxisTitle("Cluster charge [kilo electrons]", 1);
1179  else
1180  (*igm)->setAxisTitle("Modules", 1);
1181 
1182  // Setting title
1183 
1184  string title = "";
1185  if ((*igm)->getName().find("NErrors_") != string::npos && prefix == "SUMOFF")
1186  title = "Total number of errors per Ladder";
1187  else if ((*igm)->getName().find("NErrors_") != string::npos && prefix == "SUMRAW")
1188  title = "Total number of errors per Module";
1189  else if (prefix == "SUMOFF")
1190  title = "mean " + (*iv) + " per Ladder";
1191  else if ((*igm)->getName().find("FREQ_") != string::npos && prefix != "SUMOFF")
1192  title = "NEvents with digis per Module";
1193  else if ((*igm)->getName().find("FREQ_") != string::npos && prefix == "SUMOFF")
1194  title = "NEvents with digis per Ladder/Blade";
1195  else if ((*igm)->getName().find("adcCOMB_") != string::npos)
1196  title = "NDigis";
1197  else if ((*igm)->getName().find("chargeCOMB_") != string::npos)
1198  title = "NClusters";
1199  else
1200  title = "mean " + (*iv) + " per Module";
1201  (*igm)->setAxisTitle(title, 2);
1202 
1203  // Setting binning
1204  if (!isUpgrade) {
1205  if ((*igm)->getName().find("ALLMODS_adcCOMB_") != string::npos) {
1206  nbin_subdir = 128;
1207  } else if ((*igm)->getName().find("ALLMODS_chargeCOMB_") != string::npos) {
1208  nbin_subdir = 100;
1209  } else if ((*igm)->getName().find("Ladder") != string::npos) {
1210  nbin_i = 0;
1211  nbin_subdir = 4;
1212  } else if ((*igm)->getName().find("Layer") != string::npos) {
1213  nbin_i = (cnt - 1) * 4;
1214  nbin_subdir = 4;
1215  } else if ((*igm)->getName().find("Shell") != string::npos) {
1216  if (prefix != "SUMOFF") {
1217  if (iDir == 0) {
1218  nbin_i = 0;
1219  nbin_subdir = 40;
1220  } else if (iDir == 1) {
1221  nbin_i = 40;
1222  nbin_subdir = 64;
1223  } else if (iDir == 2) {
1224  nbin_i = 104;
1225  nbin_subdir = 88;
1226  }
1227  } else {
1228  if (iDir == 0) {
1229  nbin_i = 0;
1230  nbin_subdir = 10;
1231  } else if (iDir == 1) {
1232  nbin_i = 10;
1233  nbin_subdir = 16;
1234  } else if (iDir == 2) {
1235  nbin_i = 26;
1236  nbin_subdir = 22;
1237  }
1238  }
1239  } else if ((*igm)->getName().find("Barrel") != string::npos) {
1240  if (prefix != "SUMOFF") {
1241  if (iDir == 0) {
1242  nbin_i = 0;
1243  nbin_subdir = 192;
1244  } else if (iDir == 1) {
1245  nbin_i = 192;
1246  nbin_subdir = 192;
1247  } else if (iDir == 2) {
1248  nbin_i = 384;
1249  nbin_subdir = 192;
1250  } else if (iDir == 3) {
1251  nbin_i = 576;
1252  nbin_subdir = 192;
1253  }
1254  } else {
1255  if (iDir == 0) {
1256  nbin_i = 0;
1257  nbin_subdir = 48;
1258  } else if (iDir == 1) {
1259  nbin_i = 48;
1260  nbin_subdir = 48;
1261  } else if (iDir == 2) {
1262  nbin_i = 96;
1263  nbin_subdir = 48;
1264  } else if (iDir == 3) {
1265  nbin_i = 144;
1266  nbin_subdir = 48;
1267  }
1268  }
1269  }
1270  } else if (isUpgrade) {
1271  if ((*igm)->getName().find("ALLMODS_adcCOMB_") != string::npos) {
1272  nbin_subdir = 128;
1273  } else if ((*igm)->getName().find("ALLMODS_chargeCOMB_") != string::npos) {
1274  nbin_subdir = 100;
1275  } else if ((*igm)->getName().find("Ladder") != string::npos) {
1276  nbin_i = 0;
1277  nbin_subdir = 4;
1278  } else if ((*igm)->getName().find("Layer") != string::npos) {
1279  nbin_i = (cnt - 1) * 4;
1280  nbin_subdir = 4;
1281  } else if ((*igm)->getName().find("Shell") != string::npos) {
1282  if (prefix != "SUMOFF") {
1283  if (iDir == 0) {
1284  nbin_i = 0;
1285  nbin_subdir = 24;
1286  } // 40(2*20)-->24(2*12)
1287  else if (iDir == 1) {
1288  nbin_i = 24;
1289  nbin_subdir = 56;
1290  } // 64(32*2)-->56(2*28)
1291  else if (iDir == 2) {
1292  nbin_i = 80;
1293  nbin_subdir = 88;
1294  } // 88(44*2)-->same88(44*2)
1295  else if (iDir == 3) {
1296  nbin_i = 168;
1297  nbin_subdir = 128;
1298  }
1299  } else {
1300  if (iDir == 0) {
1301  nbin_i = 0;
1302  nbin_subdir = 6;
1303  } // 10-->6
1304  else if (iDir == 1) {
1305  nbin_i = 6;
1306  nbin_subdir = 14;
1307  } // 16-->14
1308  else if (iDir == 2) {
1309  nbin_i = 20;
1310  nbin_subdir = 22;
1311  } // 22-->same22
1312  else if (iDir == 3) {
1313  nbin_i = 42;
1314  nbin_subdir = 32;
1315  }
1316  }
1317  } else if ((*igm)->getName().find("Barrel") != string::npos) {
1318  if (prefix != "SUMOFF") {
1319  if (iDir == 0) {
1320  nbin_i = 0;
1321  nbin_subdir = 296;
1322  } // 192=76 8/4-->296=1184/4
1323  else if (iDir == 1) {
1324  nbin_i = 296;
1325  nbin_subdir = 296;
1326  } // 296*2,*3,*4=1184
1327  else if (iDir == 2) {
1328  nbin_i = 592;
1329  nbin_subdir = 296;
1330  } else if (iDir == 3) {
1331  nbin_i = 888;
1332  nbin_subdir = 296;
1333  } else if (iDir == 4) {
1334  nbin_i = 1184;
1335  nbin_subdir = 296;
1336  }
1337  } else {
1338  if (iDir == 0) {
1339  nbin_i = 0;
1340  nbin_subdir = 74;
1341  } // 48=192/4-->74=296/4
1342  else if (iDir == 1) {
1343  nbin_i = 74;
1344  nbin_subdir = 74;
1345  } // 74*2,...*4=296
1346  else if (iDir == 2) {
1347  nbin_i = 148;
1348  nbin_subdir = 74;
1349  } else if (iDir == 3) {
1350  nbin_i = 222;
1351  nbin_subdir = 74;
1352  } else if (iDir == 4) {
1353  nbin_i = 296;
1354  nbin_subdir = 74;
1355  }
1356  }
1357  }
1358  }
1359 
1360  if ((*igm)->getName().find("ndigisFREQ") == string::npos) {
1361  if (((*igm)->getName().find("adcCOMB") != string::npos &&
1362  me->getName().find("adcCOMB") != string::npos) ||
1363  ((*igm)->getName().find("chargeCOMB") != string::npos &&
1364  me->getName().find("chargeCOMB") != string::npos)) {
1365  (*igm)->getTH1F()->Add(me->getTH1F());
1366  } else if (((*igm)->getName().find("charge_") != string::npos &&
1367  (*igm)->getName().find("Track_") == string::npos &&
1368  me->getName().find("charge_") != string::npos &&
1369  me->getName().find("Track_") == string::npos) ||
1370  ((*igm)->getName().find("nclusters_") != string::npos &&
1371  (*igm)->getName().find("Track_") == string::npos &&
1372  me->getName().find("nclusters_") != string::npos &&
1373  me->getName().find("Track_") == string::npos) ||
1374  ((*igm)->getName().find("size_") != string::npos &&
1375  (*igm)->getName().find("Track_") == string::npos &&
1376  me->getName().find("size_") != string::npos &&
1377  me->getName().find("Track_") == string::npos) ||
1378  ((*igm)->getName().find("charge_OffTrack_") != string::npos &&
1379  me->getName().find("charge_OffTrack_") != string::npos) ||
1380  ((*igm)->getName().find("nclusters_OffTrack_") != string::npos &&
1381  me->getName().find("nclusters_OffTrack_") != string::npos) ||
1382  ((*igm)->getName().find("size_OffTrack_") != string::npos &&
1383  me->getName().find("size_OffTrack_") != string::npos) ||
1384  ((*igm)->getName().find("charge_OnTrack_") != string::npos &&
1385  me->getName().find("charge_OnTrack_") != string::npos) ||
1386  ((*igm)->getName().find("nclusters_OnTrack_") != string::npos &&
1387  me->getName().find("nclusters_OnTrack_") != string::npos) ||
1388  ((*igm)->getName().find("size_OnTrack_") != string::npos &&
1389  me->getName().find("size_OnTrack_") != string::npos) ||
1390  ((*igm)->getName().find("charge_") == string::npos &&
1391  (*igm)->getName().find("nclusters_") == string::npos &&
1392  (*igm)->getName().find("size_") == string::npos)) {
1393  for (int k = 1; k < nbin_subdir + 1; k++)
1394  if (me->getBinContent(k) > 0)
1395  (*igm)->setBinContent(k + nbin_i, me->getBinContent(k));
1396  }
1397  } else if (me->getName().find("ndigisFREQ") != string::npos) {
1398  for (int k = 1; k < nbin_subdir + 1; k++)
1399  if (me->getBinContent(k) > 0)
1400  (*igm)->setBinContent(k + nbin_i, me->getBinContent(k));
1401  }
1402  } // end var in igm (gsum_mes)
1403  } // end igm loop
1404  } // end var in im (contents)
1405  } // end of iv loop
1406  } // end of im loop
1407  iDir++;
1408  first_subdir = false; // We are done processing the first directory, we
1409  // don't add any new MEs in the future passes.
1410  } // end of it loop (subdirs)
1411  // cout<<"...leaving
1412  // SiPixelActionExecutor::fillGrandBarrelSummaryHistos!"<<endl;
1413 }
TH1F * getTH1F() const
void getGrandSummaryME(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, int nbin, std::string &me_name, std::vector< MonitorElement * > &mes)
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:361
const std::string & getName() const
get name of ME
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
int k[5][pyjets_maxn]
std::string const & pwd()
Definition: DQMStore.cc:278
double getBinContent(int binx) const
get content of bin (1-D)
std::vector< std::string > getSubdirs()
Definition: DQMStore.cc:325
std::vector< std::string > getMEs()
Definition: DQMStore.cc:331
void SiPixelActionExecutor::fillGrandEndcapSummaryHistos ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
std::vector< std::string > &  me_names,
bool  isUpgrade 
)
private

Definition at line 1416 of file SiPixelActionExecutor.cc.

References DQMStore::IBooker::cd(), DQMStore::IGetter::cd(), relmon_rootfiles_spy::contents, compare_using_db::dir_name, DQMStore::IGetter::get(), MonitorElement::getBinContent(), getGrandSummaryME(), DQMStore::IGetter::getMEs(), MonitorElement::getName(), DQMStore::IGetter::getSubdirs(), MonitorElement::getTH1F(), DQMStore::IBooker::goUp(), gen::k, create_public_lumi_plots::path_name, tablePrinter::prefix, DQMStore::IBooker::pwd(), DQMStore::IGetter::setCurrentFolder(), source_type_, runGCPTkAlMap::title, and JetChargeProducer_cfi::var.

Referenced by fillSummary().

1419  {
1420  // printing cout<<"Entering
1421  // SiPixelActionExecutor::fillGrandEndcapSummaryHistos..."<<endl;
1422  vector<MonitorElement *> gsum_mes;
1423  string currDir = iBooker.pwd();
1424  string path_name = iBooker.pwd();
1425  string dir_name = path_name.substr(path_name.find_last_of("/") + 1);
1426  if ((dir_name.find("DQMData") == 0) || (dir_name.find("Pixel") == 0) ||
1427  (dir_name.find("AdditionalPixelErrors") == 0) || (dir_name.find("Barrel") == 0) ||
1428  (dir_name.find("Shell") == 0) || (dir_name.find("Layer") == 0) || (dir_name.find("Ladder") == 0))
1429  return;
1430  vector<string> subdirs = iGetter.getSubdirs();
1431  int iDir = 0;
1432  int nbin = 0;
1433  int nbin_i = 0;
1434  int nbin_subdir = 0;
1435  int cnt = 0;
1436  bool first_subdir = true;
1437  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1438  cnt++;
1439  iBooker.cd(*it);
1440  iGetter.cd(*it);
1441  vector<string> contents = iGetter.getMEs();
1442  iBooker.goUp();
1443  iGetter.setCurrentFolder(iBooker.pwd());
1444 
1445  string prefix;
1446  if (source_type_ == 0)
1447  prefix = "SUMRAW";
1448  else if (source_type_ == 1)
1449  prefix = "SUMDIG";
1450  else if (source_type_ == 2)
1451  prefix = "SUMCLU";
1452  else if (source_type_ == 3)
1453  prefix = "SUMTRK";
1454  else if (source_type_ == 4)
1455  prefix = "SUMHIT";
1456  else if (source_type_ >= 7 && source_type_ < 20)
1457  prefix = "SUMCAL";
1458  else if (source_type_ == 20)
1459  prefix = "SUMOFF";
1460 
1461  for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++) {
1462  for (vector<string>::const_iterator iv = me_names.begin(); iv != me_names.end(); iv++) {
1463  string var = "_" + (*iv) + "_";
1464  if ((*im).find(var) != string::npos) {
1465  if ((var == "_charge_" || var == "_nclusters_" || var == "_size_" || var == "_sizeX_" || var == "_sizeY_") &&
1466  (*im).find("Track_") != string::npos)
1467  continue;
1468  string full_path = (*it) + "/" + (*im);
1469  MonitorElement *me = iGetter.get(full_path);
1470  if (!me)
1471  continue;
1472  if (source_type_ == 5 || source_type_ == 6) {
1473  if ((*iv) == "errorType" || (*iv) == "NErrors" || (*iv) == "fullType" || (*iv) == "chanNmbr" ||
1474  (*iv) == "TBMType" || (*iv) == "EvtNbr" || (*iv) == "evtSize" || (*iv) == "linkId" ||
1475  (*iv) == "ROCId" || (*iv) == "DCOLId" || (*iv) == "PXId" || (*iv) == "ROCNmbr" ||
1476  (*iv) == "TBMMessage" || (*iv) == "Type36Hitmap")
1477  prefix = "SUMRAW";
1478  else if ((*iv) == "ndigis" || (*iv) == "adc" || (*iv) == "ndigisFREQ" || (*iv) == "adcCOMB")
1479  prefix = "SUMDIG";
1480  else if ((*iv) == "nclusters" || (*iv) == "x" || (*iv) == "y" || (*iv) == "charge" ||
1481  (*iv) == "chargeCOMB" || (*iv) == "size" || (*iv) == "sizeX" || (*iv) == "sizeY" ||
1482  (*iv) == "minrow" || (*iv) == "maxrow" || (*iv) == "mincol" || (*iv) == "maxcol")
1483  prefix = "SUMCLU";
1484  if (currDir.find("Track") != string::npos)
1485  prefix = "SUMTRK";
1486  else if ((*iv) == "residualX_mean" || (*iv) == "residualY_mean" || (*iv) == "residualX_RMS" ||
1487  (*iv) == "residualY_RMS")
1488  prefix = "SUMTRK";
1489  else if ((*iv) == "ClustX" || (*iv) == "ClustY" || (*iv) == "nRecHits" || (*iv) == "ErrorX" ||
1490  (*iv) == "ErrorY")
1491  prefix = "SUMHIT";
1492  else if ((*iv) == "Gain1d_mean" || (*iv) == "GainChi2NDF1d_mean" || (*iv) == "GainChi2Prob1d_mean" ||
1493  (*iv) == "Pedestal1d_mean" || (*iv) == "ScurveChi2ProbSummary_mean" ||
1494  (*iv) == "ScurveFitResultSummary_mean" || (*iv) == "ScurveSigmasSummary_mean" ||
1495  (*iv) == "ScurveThresholdSummary_mean" || (*iv) == "Gain1d_RMS" || (*iv) == "GainChi2NDF1d_RMS" ||
1496  (*iv) == "GainChi2Prob1d_RMS" || (*iv) == "Pedestal1d_RMS" || (*iv) == "GainNPoints1d_mean" ||
1497  (*iv) == "GainNPoints1d_RMS" || (*iv) == "GainHighPoint1d_mean" ||
1498  (*iv) == "GainHighPoint1d_RMS" || (*iv) == "GainLowPoint1d_mean" ||
1499  (*iv) == "GainLowPoint1d_RMS" || (*iv) == "GainEndPoint1d_mean" || (*iv) == "GainEndPoint1d_RMS" ||
1500  (*iv) == "GainFitResult2d_mean" || (*iv) == "GainFitResult2d_RMS" ||
1501  (*iv) == "GainDynamicRange2d_mean" || (*iv) == "GainDynamicRange2d_RMS" ||
1502  (*iv) == "GainSaturate2d_mean" || (*iv) == "GainSaturate2d_RMS" ||
1503  (*iv) == "ScurveChi2ProbSummary_RMS" || (*iv) == "ScurveFitResultSummary_RMS" ||
1504  (*iv) == "ScurveSigmasSummary_RMS" || (*iv) == "ScurveThresholdSummary_RMS" ||
1505  (*iv) == "pixelAliveSummary_mean" || (*iv) == "pixelAliveSummary_FracOfPerfectPix" ||
1506  (*iv) == "SiPixelErrorsCalibDigis_NCalibErrors")
1507  prefix = "SUMCAL";
1508  }
1509 
1510  if (first_subdir && !isUpgrade) {
1511  nbin = me->getTH1F()->GetNbinsX();
1512  string me_name = prefix + "_" + (*iv) + "_" + dir_name;
1513  if ((*iv) == "adcCOMB" || (*iv) == "chargeCOMB")
1514  me_name = "ALLMODS_" + (*iv) + "_" + dir_name;
1515  else if (prefix == "SUMOFF" && dir_name == "Endcap")
1516  nbin = 96;
1517  else if (dir_name == "Endcap")
1518  nbin = 672;
1519  else if (prefix == "SUMOFF" && dir_name.find("HalfCylinder") != string::npos)
1520  nbin = 24;
1521  else if (dir_name.find("HalfCylinder") != string::npos)
1522  nbin = 168;
1523  else if (prefix == "SUMOFF" && dir_name.find("Disk") != string::npos)
1524  nbin = 12;
1525  else if (dir_name.find("Disk") != string::npos)
1526  nbin = 84;
1527  else if (dir_name.find("Blade") != string::npos)
1528  nbin = 7;
1529  getGrandSummaryME(iBooker, iGetter, nbin, me_name, gsum_mes);
1530  } else if (first_subdir && isUpgrade) {
1531  nbin = me->getTH1F()->GetNbinsX();
1532  string me_name = prefix + "_" + (*iv) + "_" + dir_name;
1533  if ((*iv) == "adcCOMB" || (*iv) == "chargeCOMB")
1534  me_name = "ALLMODS_" + (*iv) + "_" + dir_name;
1535  else if (prefix == "SUMOFF" && dir_name == "Endcap")
1536  nbin = 336;
1537  else if (dir_name == "Endcap")
1538  nbin = 672;
1539  else if (prefix == "SUMOFF" && dir_name.find("HalfCylinder") != string::npos)
1540  nbin = 84;
1541  else if (dir_name.find("HalfCylinder") != string::npos)
1542  nbin = 168;
1543  else if (prefix == "SUMOFF" && dir_name.find("Disk") != string::npos)
1544  nbin = 28;
1545  else if (dir_name.find("Disk") != string::npos)
1546  nbin = 56;
1547  else if (dir_name.find("Blade") != string::npos)
1548  nbin = 2;
1549  getGrandSummaryME(iBooker, iGetter, nbin, me_name, gsum_mes);
1550  }
1551 
1552  for (vector<MonitorElement *>::const_iterator igm = gsum_mes.begin(); igm != gsum_mes.end(); igm++) {
1553  if ((*igm)->getName().find(var) != string::npos) {
1554  if (prefix == "SUMOFF")
1555  (*igm)->setAxisTitle("Blades", 1);
1556  else if ((*igm)->getName().find("adcCOMB_") != string::npos)
1557  (*igm)->setAxisTitle("Digi charge [ADC]", 1);
1558  else if ((*igm)->getName().find("chargeCOMB_") != string::npos)
1559  (*igm)->setAxisTitle("Cluster charge [kilo electrons]", 1);
1560  else
1561  (*igm)->setAxisTitle("Modules", 1);
1562  string title = "";
1563  if ((*igm)->getName().find("NErrors_") != string::npos && prefix == "SUMOFF")
1564  title = "Total number of errors per Blade";
1565  else if ((*igm)->getName().find("NErrors_") != string::npos && prefix == "SUMRAW")
1566  title = "Total number of errors per Module";
1567  else if (prefix == "SUMOFF")
1568  title = "mean " + (*iv) + " per Blade";
1569  else if ((*igm)->getName().find("FREQ_") != string::npos)
1570  title = "NEvents with digis per Module";
1571  else if ((*igm)->getName().find("adcCOMB_") != string::npos)
1572  title = "NDigis";
1573  else if ((*igm)->getName().find("chargeCOMB_") != string::npos)
1574  title = "NClusters";
1575  else
1576  title = "mean " + (*iv) + " per Module";
1577  (*igm)->setAxisTitle(title, 2);
1578  nbin_i = 0;
1579  if (!isUpgrade) {
1580  if ((*igm)->getName().find("ALLMODS_adcCOMB_") != string::npos) {
1581  nbin_subdir = 128;
1582  } else if ((*igm)->getName().find("ALLMODS_chargeCOMB_") != string::npos) {
1583  nbin_subdir = 100;
1584  } else if ((*igm)->getName().find("Panel_") != string::npos) {
1585  nbin_subdir = 7;
1586  } else if ((*igm)->getName().find("Blade") != string::npos) {
1587  if ((*im).find("_1") != string::npos)
1588  nbin_subdir = 4;
1589  if ((*im).find("_2") != string::npos) {
1590  nbin_i = 4;
1591  nbin_subdir = 3;
1592  }
1593  } else if ((*igm)->getName().find("Disk") != string::npos) {
1594  nbin_i = ((cnt - 1) % 12) * 7;
1595  nbin_subdir = 7;
1596  } else if ((*igm)->getName().find("HalfCylinder") != string::npos) {
1597  if (prefix != "SUMOFF") {
1598  nbin_subdir = 84;
1599  if ((*im).find("_2") != string::npos)
1600  nbin_i = 84;
1601  } else {
1602  nbin_subdir = 12;
1603  if ((*im).find("_2") != string::npos)
1604  nbin_i = 12;
1605  }
1606  } else if ((*igm)->getName().find("Endcap") != string::npos) {
1607  if (prefix != "SUMOFF") {
1608  nbin_subdir = 168;
1609  if ((*im).find("_mO") != string::npos)
1610  nbin_i = 168;
1611  if ((*im).find("_pI") != string::npos)
1612  nbin_i = 336;
1613  if ((*im).find("_pO") != string::npos)
1614  nbin_i = 504;
1615  } else {
1616  nbin_subdir = 24;
1617  if ((*im).find("_mO") != string::npos)
1618  nbin_i = 24;
1619  if ((*im).find("_pI") != string::npos)
1620  nbin_i = 48;
1621  if ((*im).find("_pO") != string::npos)
1622  nbin_i = 72;
1623  }
1624  }
1625  } else if (isUpgrade) {
1626  if ((*igm)->getName().find("ALLMODS_adcCOMB_") != string::npos) {
1627  nbin_subdir = 128;
1628  } else if ((*igm)->getName().find("ALLMODS_chargeCOMB_") != string::npos) {
1629  nbin_subdir = 100;
1630  } else if ((*igm)->getName().find("Panel_") != string::npos) {
1631  nbin_subdir = 2;
1632  } else if ((*igm)->getName().find("Blade") != string::npos) {
1633  if ((*im).find("_1") != string::npos)
1634  nbin_subdir = 1;
1635  if ((*im).find("_2") != string::npos) {
1636  nbin_i = 1;
1637  nbin_subdir = 1;
1638  }
1639  } else if ((*igm)->getName().find("Disk") != string::npos) {
1640  nbin_i = ((cnt - 1) % 28) * 2;
1641  nbin_subdir = 2;
1642  } else if ((*igm)->getName().find("HalfCylinder") != string::npos) {
1643  if (prefix != "SUMOFF") {
1644  nbin_subdir = 56;
1645  if ((*im).find("_2") != string::npos)
1646  nbin_i = 56;
1647  if ((*im).find("_3") != string::npos)
1648  nbin_i = 112;
1649  } else {
1650  nbin_subdir = 28;
1651  if ((*im).find("_2") != string::npos)
1652  nbin_i = 28;
1653  if ((*im).find("_3") != string::npos)
1654  nbin_i = 56;
1655  }
1656  } else if ((*igm)->getName().find("Endcap") != string::npos) {
1657  if (prefix != "SUMOFF") {
1658  nbin_subdir = 168;
1659  if ((*im).find("_mO") != string::npos)
1660  nbin_i = 168;
1661  if ((*im).find("_pI") != string::npos)
1662  nbin_i = 336;
1663  if ((*im).find("_pO") != string::npos)
1664  nbin_i = 504;
1665  } else {
1666  nbin_subdir = 84;
1667  if ((*im).find("_mO") != string::npos)
1668  nbin_i = 84;
1669  if ((*im).find("_pI") != string::npos)
1670  nbin_i = 168;
1671  if ((*im).find("_pO") != string::npos)
1672  nbin_i = 252;
1673  }
1674  }
1675  }
1676 
1677  if ((*igm)->getName().find("ndigisFREQ") == string::npos) {
1678  if (((*igm)->getName().find("adcCOMB") != string::npos &&
1679  me->getName().find("adcCOMB") != string::npos) ||
1680  ((*igm)->getName().find("chargeCOMB") != string::npos &&
1681  me->getName().find("chargeCOMB") != string::npos)) {
1682  (*igm)->getTH1F()->Add(me->getTH1F());
1683  } else if (((*igm)->getName().find("charge_") != string::npos &&
1684  (*igm)->getName().find("Track_") == string::npos &&
1685  me->getName().find("charge_") != string::npos &&
1686  me->getName().find("Track_") == string::npos) ||
1687  ((*igm)->getName().find("nclusters_") != string::npos &&
1688  (*igm)->getName().find("Track_") == string::npos &&
1689  me->getName().find("nclusters_") != string::npos &&
1690  me->getName().find("Track_") == string::npos) ||
1691  ((*igm)->getName().find("size_") != string::npos &&
1692  (*igm)->getName().find("Track_") == string::npos &&
1693  me->getName().find("size_") != string::npos &&
1694  me->getName().find("Track_") == string::npos) ||
1695  ((*igm)->getName().find("charge_OffTrack_") != string::npos &&
1696  me->getName().find("charge_OffTrack_") != string::npos) ||
1697  ((*igm)->getName().find("nclusters_OffTrack_") != string::npos &&
1698  me->getName().find("nclusters_OffTrack_") != string::npos) ||
1699  ((*igm)->getName().find("size_OffTrack_") != string::npos &&
1700  me->getName().find("size_OffTrack_") != string::npos) ||
1701  ((*igm)->getName().find("charge_OnTrack_") != string::npos &&
1702  me->getName().find("charge_OnTrack_") != string::npos) ||
1703  ((*igm)->getName().find("nclusters_OnTrack_") != string::npos &&
1704  me->getName().find("nclusters_OnTrack_") != string::npos) ||
1705  ((*igm)->getName().find("size_OnTrack_") != string::npos &&
1706  me->getName().find("size_OnTrack_") != string::npos) ||
1707  ((*igm)->getName().find("charge_") == string::npos &&
1708  (*igm)->getName().find("nclusters_") == string::npos &&
1709  (*igm)->getName().find("size_") == string::npos)) {
1710  for (int k = 1; k < nbin_subdir + 1; k++)
1711  if (me->getBinContent(k) > 0)
1712  (*igm)->setBinContent(k + nbin_i, me->getBinContent(k));
1713  }
1714  } else if (me->getName().find("ndigisFREQ") != string::npos) {
1715  for (int k = 1; k < nbin_subdir + 1; k++)
1716  if (me->getBinContent(k) > 0)
1717  (*igm)->setBinContent(k + nbin_i, me->getBinContent(k));
1718  }
1719  // }// for
1720  }
1721  }
1722  }
1723  }
1724  }
1725 
1726  iDir++;
1727  first_subdir = false; // We are done processing the first directory, we
1728  // don't add any new MEs in the future passes.
1729  } // end for it (subdirs)
1730 }
TH1F * getTH1F() const
void getGrandSummaryME(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, int nbin, std::string &me_name, std::vector< MonitorElement * > &mes)
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:361
const std::string & getName() const
get name of ME
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
int k[5][pyjets_maxn]
std::string const & pwd()
Definition: DQMStore.cc:278
double getBinContent(int binx) const
get content of bin (1-D)
std::vector< std::string > getSubdirs()
Definition: DQMStore.cc:325
std::vector< std::string > getMEs()
Definition: DQMStore.cc:331
void SiPixelActionExecutor::fillOccupancy ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
bool  isbarrel 
)
private

Definition at line 1957 of file SiPixelActionExecutor.cc.

References DQMStore::IBooker::cd(), DQMStore::IGetter::cd(), RefreshWebPage::dname, DQMStore::IGetter::get(), MonitorElement::getBinContent(), DQMStore::IGetter::getMEs(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), DQMStore::IGetter::getSubdirs(), MonitorElement::getTH2F(), DQMStore::IBooker::goUp(), mps_fire::i, OccupancyMap, callgraph::path, DQMStore::IBooker::pwd(), MonitorElement::setBinContent(), DQMStore::IGetter::setCurrentFolder(), and Tier0Flag_.

Referenced by createOccupancy().

1957  {
1958  // occupancyprinting cout<<"entering
1959  // SiPixelActionExecutor::fillOccupancy..."<<std::endl;
1960  if (Tier0Flag_)
1961  return;
1962  string currDir = iBooker.pwd();
1963  string dname = currDir.substr(currDir.find_last_of("/") + 1);
1964 
1965  if (dname.find("Layer_") != string::npos || dname.find("Disk_") != string::npos) {
1966  vector<string> meVec = iGetter.getMEs();
1967  for (vector<string>::const_iterator it = meVec.begin(); it != meVec.end(); it++) {
1968  string full_path = currDir + "/" + (*it);
1969  if (full_path.find("hitmap_siPixelDigis") != string::npos) { // If we have the hitmap ME
1970  MonitorElement *me = iGetter.get(full_path);
1971  if (!me)
1972  continue;
1973  string path = full_path;
1974  while (path.find_last_of("/") != 5) // Stop before Pixel/
1975  {
1976  path = path.substr(0, path.find_last_of("/"));
1977  // cout << "\t" <<
1978  // path
1979  //<< endl;
1980  OccupancyMap = iGetter.get(path + "/" + (isbarrel ? "barrel" : "endcap") + "OccupancyMap");
1981 
1982  if (OccupancyMap) {
1983  for (int i = 1; i != me->getNbinsX() + 1; i++)
1984  for (int j = 1; j != me->getNbinsY() + 1; j++) {
1985  float previous = OccupancyMap->getBinContent(i, j);
1986  OccupancyMap->setBinContent(i, j, previous + me->getBinContent(i, j));
1987  }
1988  OccupancyMap->getTH2F()->SetEntries(OccupancyMap->getTH2F()->Integral());
1989  }
1990  }
1991  }
1992  }
1993  } else {
1994  vector<string> subdirs = iGetter.getSubdirs();
1995  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
1996  iGetter.cd(*it);
1997  iBooker.cd(*it);
1998  if (*it != "Pixel" &&
1999  ((isbarrel && (*it).find("Barrel") == string::npos) || (!isbarrel && (*it).find("Endcap") == string::npos)))
2000  continue;
2001  fillOccupancy(iBooker, iGetter, isbarrel);
2002  iBooker.goUp();
2003  iGetter.setCurrentFolder(iBooker.pwd());
2004  }
2005  }
2006 
2007  // occupancyprinting cout<<"leaving
2008  // SiPixelActionExecutor::fillOccupancy..."<<std::endl;
2009 }
void setBinContent(int binx, double content)
set content of bin (1-D)
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:361
TH2F * getTH2F() const
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
void fillOccupancy(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, bool isbarrel)
std::string const & pwd()
Definition: DQMStore.cc:278
int getNbinsY() const
get # of bins in Y-axis
double getBinContent(int binx) const
get content of bin (1-D)
std::vector< std::string > getSubdirs()
Definition: DQMStore.cc:325
int getNbinsX() const
get # of bins in X-axis
std::vector< std::string > getMEs()
Definition: DQMStore.cc:331
void SiPixelActionExecutor::fillSummary ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
std::string  dir_name,
std::vector< std::string > &  me_names,
bool  isbarrel,
bool  isUpgrade 
)
private

Definition at line 442 of file SiPixelActionExecutor.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::cd(), DQMStore::IGetter::cd(), configParser_, relmon_rootfiles_spy::contents, gather_cfg::cout, MonitorElement::Fill(), fillGrandBarrelSummaryHistos(), fillGrandEndcapSummaryHistos(), spr::find(), objects.autophobj::float, DQMStore::IGetter::get(), MonitorElement::getBinContent(), GetBladeSubdirs(), MonitorElement::getEntries(), MonitorElement::getMean(), SiPixelConfigParser::getMENamesForGrandBarrelSummary(), SiPixelConfigParser::getMENamesForGrandEndcapSummary(), DQMStore::IGetter::getMEs(), MonitorElement::getName(), MonitorElement::getNbinsX(), MonitorElement::getNbinsY(), MonitorElement::getRMS(), DQMStore::IGetter::getSubdirs(), getSummaryME(), MonitorElement::getTH1F(), DQMStore::IBooker::goUp(), isum, findQualityFiles::jj, nlast, tablePrinter::prefix, DQMStore::IBooker::pwd(), MonitorElement::Reset(), tablePrinter::rows, DQMStore::IGetter::setCurrentFolder(), lumiContext::sname, source_type_, mathSSE::sqrt(), GlobalPosition_Frontier_DevDB_cff::tag, groupFilesInBlocks::temp, runGCPTkAlMap::title, and cond::persistency::GLOBAL_TAG::tname.

Referenced by createSummary().

447  {
448  // cout<<"entering SiPixelActionExecutor::fillSummary..."<<endl;
449  string currDir = iBooker.pwd();
450  string prefix;
451  if (source_type_ == 0)
452  prefix = "SUMRAW";
453  else if (source_type_ == 1)
454  prefix = "SUMDIG";
455  else if (source_type_ == 2)
456  prefix = "SUMCLU";
457  else if (source_type_ == 3)
458  prefix = "SUMTRK";
459  else if (source_type_ == 4)
460  prefix = "SUMHIT";
461  else if (source_type_ >= 7 && source_type_ < 20)
462  prefix = "SUMCAL";
463  else if (source_type_ == 20)
464  prefix = "SUMOFF";
465  if (currDir.find(dir_name) != string::npos) {
466  vector<MonitorElement *> sum_mes;
467  for (vector<string>::const_iterator iv = me_names.begin(); iv != me_names.end(); iv++) {
468  if (source_type_ == 5 || source_type_ == 6) {
469  if ((*iv) == "errorType" || (*iv) == "NErrors" || (*iv) == "fullType" || (*iv) == "chanNmbr" ||
470  (*iv) == "TBMType" || (*iv) == "EvtNbr" || (*iv) == "evtSize" || (*iv) == "linkId" || (*iv) == "ROCId" ||
471  (*iv) == "DCOLId" || (*iv) == "PXId" || (*iv) == "ROCNmbr" || (*iv) == "TBMMessage" ||
472  (*iv) == "Type36Hitmap")
473  prefix = "SUMRAW";
474  else if ((*iv) == "ndigis" || (*iv) == "adc")
475  prefix = "SUMDIG";
476  else if ((*iv) == "nclusters" || (*iv) == "x" || (*iv) == "y" || (*iv) == "charge" || (*iv) == "size" ||
477  (*iv) == "sizeX" || (*iv) == "sizeY" || (*iv) == "minrow" || (*iv) == "maxrow" || (*iv) == "mincol" ||
478  (*iv) == "maxcol")
479  prefix = "SUMCLU";
480  if (currDir.find("Track") != string::npos)
481  prefix = "SUMTRK";
482  else if ((*iv) == "residualX" || (*iv) == "residualY")
483  prefix = "SUMTRK";
484  else if ((*iv) == "ClustX" || (*iv) == "ClustY" || (*iv) == "nRecHits" || (*iv) == "ErrorX" ||
485  (*iv) == "ErrorY")
486  prefix = "SUMHIT";
487  else if ((*iv) == "Gain1d" || (*iv) == "GainChi2NDF1d" || (*iv) == "GainChi2Prob1d" || (*iv) == "Pedestal1d" ||
488  (*iv) == "GainNPoints1d" || (*iv) == "GainHighPoint1d" || (*iv) == "GainLowPoint1d" ||
489  (*iv) == "GainEndPoint1d" || (*iv) == "GainFitResult2d" || (*iv) == "GainDynamicRange2d" ||
490  (*iv) == "GainSaturate2d" || (*iv) == "ScurveChi2ProbSummary" || (*iv) == "ScurveFitResultSummary" ||
491  (*iv) == "ScurveSigmasSummary" || (*iv) == "ScurveThresholdSummary" || (*iv) == "pixelAliveSummary" ||
492  (*iv) == "SiPixelErrorsCalibDigis")
493  prefix = "SUMCAL";
494  }
496  string tag;
497  if ((*iv).find("residual") != string::npos) { // track residuals
498  tag = prefix + "_" + (*iv) + "_mean_" + currDir.substr(currDir.find(dir_name));
499  temp = getSummaryME(iBooker, iGetter, tag, isUpgrade);
500  sum_mes.push_back(temp);
501  tag = prefix + "_" + (*iv) + "_RMS_" + currDir.substr(currDir.find(dir_name));
502  temp = getSummaryME(iBooker, iGetter, tag, isUpgrade);
503  sum_mes.push_back(temp);
504  } else if (prefix == "SUMCAL") { // calibrations
505  if ((*iv) == "Gain1d" || (*iv) == "GainChi2NDF1d" || (*iv) == "GainChi2Prob1d" || (*iv) == "GainNPoints1d" ||
506  (*iv) == "GainHighPoint1d" || (*iv) == "GainLowPoint1d" || (*iv) == "GainEndPoint1d" ||
507  (*iv) == "GainDynamicRange2d" || (*iv) == "GainSaturate2d" || (*iv) == "Pedestal1d" ||
508  (*iv) == "ScurveChi2ProbSummary" || (*iv) == "ScurveFitResultSummary" || (*iv) == "ScurveSigmasSummary" ||
509  (*iv) == "ScurveThresholdSummary") {
510  tag = prefix + "_" + (*iv) + "_mean_" + currDir.substr(currDir.find(dir_name));
511  temp = getSummaryME(iBooker, iGetter, tag, isUpgrade);
512  sum_mes.push_back(temp);
513  tag = prefix + "_" + (*iv) + "_RMS_" + currDir.substr(currDir.find(dir_name));
514  temp = getSummaryME(iBooker, iGetter, tag, isUpgrade);
515  sum_mes.push_back(temp);
516  } else if ((*iv) == "SiPixelErrorsCalibDigis") {
517  tag = prefix + "_" + (*iv) + "_NCalibErrors_" + currDir.substr(currDir.find(dir_name));
518  temp = getSummaryME(iBooker, iGetter, tag, isUpgrade);
519  sum_mes.push_back(temp);
520  } else if ((*iv) == "GainFitResult2d") {
521  tag = prefix + "_" + (*iv) + "_NNegativeFits_" + currDir.substr(currDir.find(dir_name));
522  temp = getSummaryME(iBooker, iGetter, tag, isUpgrade);
523  sum_mes.push_back(temp);
524  } else if ((*iv) == "pixelAliveSummary") {
525  tag = prefix + "_" + (*iv) + "_FracOfPerfectPix_" + currDir.substr(currDir.find(dir_name));
526  temp = getSummaryME(iBooker, iGetter, tag, isUpgrade);
527  sum_mes.push_back(temp);
528  tag = prefix + "_" + (*iv) + "_mean_" + currDir.substr(currDir.find(dir_name));
529  temp = getSummaryME(iBooker, iGetter, tag, isUpgrade);
530  sum_mes.push_back(temp);
531  }
532  } else {
533  tag = prefix + "_" + (*iv) + "_" + currDir.substr(currDir.find(dir_name));
534  temp = getSummaryME(iBooker, iGetter, tag, isUpgrade);
535  sum_mes.push_back(temp);
536  if ((*iv) == "ndigis") {
537  tag = prefix + "_" + (*iv) + "FREQ_" + currDir.substr(currDir.find(dir_name));
538  temp = getSummaryME(iBooker, iGetter, tag, isUpgrade);
539  sum_mes.push_back(temp);
540  }
541  if (prefix == "SUMDIG" && (*iv) == "adc") {
542  tag = "ALLMODS_" + (*iv) + "COMB_" + currDir.substr(currDir.find(dir_name));
543  temp = nullptr;
544  string fullpathname = iBooker.pwd() + "/" + tag;
545  temp = iGetter.get(fullpathname);
546  if (temp) {
547  temp->Reset();
548  } else {
549  temp = iBooker.book1D(tag.c_str(), tag.c_str(), 128, 0., 256.);
550  }
551  sum_mes.push_back(temp);
552  }
553  if (prefix == "SUMCLU" && (*iv) == "charge") {
554  tag = "ALLMODS_" + (*iv) + "COMB_" + currDir.substr(currDir.find(dir_name));
555  temp = nullptr;
556  string fullpathname = iBooker.pwd() + "/" + tag;
557  temp = iGetter.get(fullpathname);
558  if (temp) {
559  temp->Reset();
560  } else {
561  temp = iBooker.book1D(tag.c_str(), tag.c_str(), 100, 0.,
562  200.); // To look to get the size automatically
563  }
564  sum_mes.push_back(temp);
565  }
566  }
567  }
568  if (sum_mes.empty()) {
569  edm::LogInfo("SiPixelActionExecutor") << " Summary MEs can not be created"
570  << "\n";
571  return;
572  }
573  vector<string> subdirs = iGetter.getSubdirs();
574  // Blade
575  if (dir_name.find("Blade_") == 0)
576  GetBladeSubdirs(iBooker, iGetter, subdirs);
577 
578  int ndet = 0;
579  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
580  if (prefix != "SUMOFF" && (*it).find("Module_") == string::npos)
581  continue;
582  if (prefix == "SUMOFF" && (*it).find(isbarrel ? "Layer_" : "Disk_") == string::npos)
583  continue;
584  iBooker.cd(*it);
585  iGetter.cd(*it);
586  ndet++;
587 
588  vector<string> contents = iGetter.getMEs();
589 
590  for (vector<MonitorElement *>::const_iterator isum = sum_mes.begin(); isum != sum_mes.end(); isum++) {
591  for (vector<string>::const_iterator im = contents.begin(); im != contents.end(); im++) {
592  string sname = ((*isum)->getName());
593  string tname = " ";
594  tname = sname.substr(7, (sname.find("_", 7) - 6));
595  if (sname.find("ALLMODS_adcCOMB_") != string::npos)
596  tname = "adc_";
597  if (sname.find("ALLMODS_chargeCOMB_") != string::npos)
598  tname = "charge_";
599  if (sname.find("_charge_") != string::npos && sname.find("Track_") == string::npos)
600  tname = "charge_";
601  if (sname.find("_nclusters_") != string::npos && sname.find("Track_") == string::npos)
602  tname = "nclusters_";
603  if (sname.find("_size_") != string::npos && sname.find("Track_") == string::npos)
604  tname = "size_";
605  if (sname.find("_charge_OffTrack_") != string::npos)
606  tname = "charge_OffTrack_";
607  if (sname.find("_nclusters_OffTrack_") != string::npos)
608  tname = "nclusters_OffTrack_";
609  if (sname.find("_size_OffTrack_") != string::npos)
610  tname = "size_OffTrack_";
611  if (sname.find("_sizeX_OffTrack_") != string::npos)
612  tname = "sizeX_OffTrack_";
613  if (sname.find("_sizeY_OffTrack_") != string::npos)
614  tname = "sizeY_OffTrack_";
615  if (sname.find("_charge_OnTrack_") != string::npos)
616  tname = "charge_OnTrack_";
617  if (sname.find("_nclusters_OnTrack_") != string::npos)
618  tname = "nclusters_OnTrack_";
619  if (sname.find("_size_OnTrack_") != string::npos)
620  tname = "size_OnTrack_";
621  if (sname.find("_sizeX_OnTrack_") != string::npos)
622  tname = "sizeX_OnTrack_";
623  if (sname.find("_sizeY_OnTrack_") != string::npos)
624  tname = "sizeY_OnTrack_";
625  if (tname.find("FREQ") != string::npos)
626  tname = "ndigis_";
627  if (((*im)).find(tname) == 0) {
628  string fullpathname = iBooker.pwd() + "/" + (*im);
629  MonitorElement *me = iGetter.get(fullpathname);
630 
631  if (me) {
632  if (sname.find("_charge") != string::npos && sname.find("Track_") == string::npos &&
633  me->getName().find("Track_") != string::npos)
634  continue;
635  if (sname.find("_nclusters_") != string::npos && sname.find("Track_") == string::npos &&
636  me->getName().find("Track_") != string::npos)
637  continue;
638  if (sname.find("_size") != string::npos && sname.find("Track_") == string::npos &&
639  me->getName().find("Track_") != string::npos)
640  continue;
641  // fill summary histos:
642  if (sname.find("_RMS_") != string::npos && sname.find("GainDynamicRange2d") == string::npos &&
643  sname.find("GainSaturate2d") == string::npos) {
644  (*isum)->Fill(ndet, me->getRMS());
645  } else if (sname.find("GainDynamicRange2d") != string::npos ||
646  sname.find("GainSaturate2d") != string::npos) {
647  float SumOfEntries = 0.;
648  float SumOfSquaredEntries = 0.;
649  int SumOfPixels = 0;
650  for (int cols = 1; cols != me->getNbinsX() + 1; cols++)
651  for (int rows = 1; rows != me->getNbinsY() + 1; rows++) {
652  SumOfEntries += me->getBinContent(cols, rows);
653  SumOfSquaredEntries += (me->getBinContent(cols, rows)) * (me->getBinContent(cols, rows));
654  SumOfPixels++;
655  }
656 
657  float MeanInZ = SumOfEntries / float(SumOfPixels);
658  float RMSInZ = sqrt(SumOfSquaredEntries / float(SumOfPixels));
659  if (sname.find("_mean_") != string::npos)
660  (*isum)->Fill(ndet, MeanInZ);
661  if (sname.find("_RMS_") != string::npos)
662  (*isum)->Fill(ndet, RMSInZ);
663  } else if (sname.find("_FracOfPerfectPix_") != string::npos) {
664  float nlast = me->getBinContent(me->getNbinsX());
665  float nall = (me->getTH1F())->Integral(1, 11);
666  (*isum)->Fill(ndet, nlast / nall);
667  } else if (sname.find("_NCalibErrors_") != string::npos || sname.find("FREQ_") != string::npos) {
668  float nall = me->getEntries();
669  (*isum)->Fill(ndet, nall);
670  } else if (sname.find("GainFitResult2d") != string::npos) {
671  int NegFitPixels = 0;
672  for (int cols = 1; cols != me->getNbinsX() + 1; cols++)
673  for (int rows = 1; rows != me->getNbinsY() + 1; rows++) {
674  if (me->getBinContent(cols, rows) < 0.)
675  NegFitPixels++;
676  }
677  (*isum)->Fill(ndet, float(NegFitPixels));
678  } else if (sname.find("ALLMODS_adcCOMB_") != string::npos ||
679  (sname.find("ALLMODS_chargeCOMB_") != string::npos &&
680  me->getName().find("Track_") == string::npos)) {
681  (*isum)->getTH1F()->Add(me->getTH1F());
682  } else if (sname.find("_NErrors_") != string::npos) {
683  string path1 = fullpathname;
684  path1 = path1.replace(path1.find("NErrors"), 7, "errorType");
685  MonitorElement *me1 = iGetter.get(path1);
686  bool notReset = true;
687  if (me1) {
688  for (int jj = 1; jj < 16; jj++) {
689  if (me1->getBinContent(jj) > 0.) {
690  if (jj == 6) { // errorType=30 (reset)
691  string path2 = path1;
692  path2 = path2.replace(path2.find("errorType"), 9, "TBMMessage");
693  MonitorElement *me2 = iGetter.get(path2);
694  if (me2)
695  if (me2->getBinContent(6) > 0. || me2->getBinContent(7) > 0.)
696  notReset = false;
697  }
698  }
699  }
700  }
701  if (notReset)
702  (*isum)->Fill(ndet, me1->getEntries());
703  } else if ((sname.find("_charge_") != string::npos && sname.find("Track_") == string::npos &&
704  me->getName().find("Track_") == string::npos) ||
705  (sname.find("_charge_") != string::npos && sname.find("_OnTrack_") != string::npos &&
706  me->getName().find("_OnTrack_") != string::npos) ||
707  (sname.find("_charge_") != string::npos && sname.find("_OffTrack_") != string::npos &&
708  me->getName().find("_OffTrack_") != string::npos) ||
709  (sname.find("_nclusters_") != string::npos && sname.find("Track_") == string::npos &&
710  me->getName().find("Track_") == string::npos) ||
711  (sname.find("_nclusters_") != string::npos && sname.find("_OnTrack_") != string::npos &&
712  me->getName().find("_OnTrack_") != string::npos) ||
713  (sname.find("_nclusters_") != string::npos && sname.find("_OffTrack_") != string::npos &&
714  me->getName().find("_OffTrack_") != string::npos) ||
715  (sname.find("_size") != string::npos && sname.find("Track_") == string::npos &&
716  me->getName().find("Track_") == string::npos) ||
717  (sname.find("_size") != string::npos && sname.find("_OnTrack_") != string::npos &&
718  me->getName().find("_OnTrack_") != string::npos) ||
719  (sname.find("_size") != string::npos && sname.find("_OffTrack_") != string::npos &&
720  me->getName().find("_OffTrack_") != string::npos)) {
721  (*isum)->Fill(ndet, me->getMean());
722  } else if (sname.find("_charge_") == string::npos && sname.find("_nclusters_") == string::npos &&
723  sname.find("_size") == string::npos) {
724  (*isum)->Fill(ndet, me->getMean());
725  }
726 
727  // set titles:
728  if (prefix == "SUMOFF") {
729  (*isum)->setAxisTitle(isbarrel ? "Ladders" : "Blades", 1);
730  } else if (sname.find("ALLMODS_adcCOMB_") != string::npos) {
731  (*isum)->setAxisTitle("Digi charge [ADC]", 1);
732  } else if (sname.find("ALLMODS_chargeCOMB_") != string::npos) {
733  (*isum)->setAxisTitle("Cluster charge [kilo electrons]", 1);
734  } else {
735  (*isum)->setAxisTitle("Modules", 1);
736  }
737  string title = " ";
738  if (sname.find("_RMS_") != string::npos) {
739  title = "RMS of " + sname.substr(7, (sname.find("_", 7) - 7)) + " per module";
740  } else if (sname.find("_FracOfPerfectPix_") != string::npos) {
741  title = "FracOfPerfectPix " + sname.substr(7, (sname.find("_", 7) - 7)) + " per module";
742  } else if (sname.find("_NCalibErrors_") != string::npos) {
743  title = "Number of CalibErrors " + sname.substr(7, (sname.find("_", 7) - 7)) + " per module";
744  } else if (sname.find("_NNegativeFits_") != string::npos) {
745  title = "Number of pixels with neg. fit result " + sname.substr(7, (sname.find("_", 7) - 7)) +
746  " per module";
747  } else if (sname.find("FREQ_") != string::npos) {
748  title = "NEvents with digis per module";
749  } else if (sname.find("ALLMODS_adcCOMB_") != string::npos) {
750  title = "NDigis";
751  } else if (sname.find("ALLMODS_chargeCOMB_") != string::npos) {
752  title = "NClusters";
753  } else if (sname.find("_NErrors_") != string::npos) {
754  if (prefix == "SUMOFF" && isbarrel)
755  title = "Total number of errors per Ladder";
756  else if (prefix == "SUMOFF" && !isbarrel)
757  title = "Total number of errors per Blade";
758  else
759  title = "Total number of errors per Module";
760  } else {
761  if (prefix == "SUMOFF")
762  title =
763  "Mean " + sname.substr(7, (sname.find("_", 7) - 7)) + (isbarrel ? " per Ladder" : " per Blade");
764  else
765  title = "Mean " + sname.substr(7, (sname.find("_", 7) - 7)) + " per Module";
766  }
767  (*isum)->setAxisTitle(title, 2);
768  }
769  break;
770  }
771  }
772  }
773  iBooker.goUp();
774  iGetter.setCurrentFolder(iBooker.pwd());
775  if (dir_name.find("Blade") == 0) {
776  iBooker.goUp(); // Going up a second time if we are processing the Blade
777  iGetter.setCurrentFolder(iBooker.pwd());
778  }
779  } // end for it (subdirs)
780  } else {
781  vector<string> subdirs = iGetter.getSubdirs();
782  // printing cout << "#\t" << iBooker.pwd() << endl;
783  if (isbarrel) {
784  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
785  // cout << "##\t" << iBooker.pwd() << "\t"
786  //<<
787  //(*it) << endl;
788  if ((iBooker.pwd()).find("Endcap") != string::npos ||
789  (iBooker.pwd()).find("AdditionalPixelErrors") != string::npos) {
790  iBooker.goUp();
791  iGetter.setCurrentFolder(iBooker.pwd());
792  }
793  iBooker.cd(*it);
794  iGetter.cd(*it);
795  if ((*it).find("Endcap") != string::npos || (*it).find("AdditionalPixelErrors") != string::npos)
796  continue;
797  fillSummary(iBooker, iGetter, dir_name, me_names, true,
798  isUpgrade); // Barrel
799  iBooker.goUp();
800  iGetter.setCurrentFolder(iBooker.pwd());
801  }
802  string grandbarrel_structure_name;
803  vector<string> grandbarrel_me_names;
804  if (!configParser_->getMENamesForGrandBarrelSummary(grandbarrel_structure_name, grandbarrel_me_names)) {
805  cout << "SiPixelActionExecutor::createSummary: Failed to read Grand "
806  "Barrel Summary configuration parameters!! ";
807  return;
808  }
809  fillGrandBarrelSummaryHistos(iBooker, iGetter, grandbarrel_me_names, isUpgrade);
810 
811  } else // Endcap
812  {
813  for (vector<string>::const_iterator it = subdirs.begin(); it != subdirs.end(); it++) {
814  if ((iBooker.pwd()).find("Barrel") != string::npos ||
815  (iBooker.pwd()).find("AdditionalPixelErrors") != string::npos) {
816  iBooker.goUp();
817  iGetter.setCurrentFolder(iBooker.pwd());
818  }
819  iBooker.cd(*it);
820  iGetter.cd(*it);
821  if ((*it).find("Barrel") != string::npos || (*it).find("AdditionalPixelErrors") != string::npos)
822  continue;
823  fillSummary(iBooker, iGetter, dir_name, me_names, false,
824  isUpgrade); // Endcap
825  iBooker.goUp();
826  iGetter.setCurrentFolder(iBooker.pwd());
827  }
828  string grandendcap_structure_name;
829  vector<string> grandendcap_me_names;
830  if (!configParser_->getMENamesForGrandEndcapSummary(grandendcap_structure_name, grandendcap_me_names)) {
831  cout << "SiPixelActionExecutor::createSummary: Failed to read Grand "
832  "Endcap Summary configuration parameters!! ";
833  return;
834  }
835  fillGrandEndcapSummaryHistos(iBooker, iGetter, grandendcap_me_names, isUpgrade);
836  }
837  }
838  // cout<<"...leaving SiPixelActionExecutor::fillSummary!"<<endl;
839 }
TH1F * getTH1F() const
static char const * tname
Definition: GTSchema.h:13
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:361
const std::string & getName() const
get name of ME
SiPixelConfigParser * configParser_
void fillGrandEndcapSummaryHistos(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::vector< std::string > &me_names, bool isUpgrade)
double isum
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
void Fill(long long x)
bool getMENamesForGrandEndcapSummary(std::string &structure_name, std::vector< std::string > &me_names)
T sqrt(T t)
Definition: SSEVec.h:18
bool getMENamesForGrandBarrelSummary(std::string &structure_name, std::vector< std::string > &me_names)
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
MonitorElement * getSummaryME(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string me_name, bool isUpgrade)
void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
double getEntries() const
get # of entries
std::string const & pwd()
Definition: DQMStore.cc:278
int getNbinsY() const
get # of bins in Y-axis
double getBinContent(int binx) const
get content of bin (1-D)
int nlast
Definition: AMPTWrapper.h:47
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
std::vector< std::string > getSubdirs()
Definition: DQMStore.cc:325
int getNbinsX() const
get # of bins in X-axis
void fillGrandBarrelSummaryHistos(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::vector< std::string > &me_names, bool isUpgrade)
void fillSummary(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::string dir_name, std::vector< std::string > &me_names, bool isbarrel, bool isUpgrade)
void GetBladeSubdirs(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, std::vector< std::string > &blade_subdirs)
std::vector< std::string > getMEs()
Definition: DQMStore.cc:331
int SiPixelActionExecutor::getBlade ( const std::string &  dname)

Definition at line 2206 of file SiPixelActionExecutor.cc.

Referenced by fillEfficiency().

2206  {
2207  int binx_ = 0;
2208  string blad = dname_.substr(dname_.find("Blade_") + 6, 2);
2209  if (dname_.find(blad) != string::npos) {
2210  binx_ = atoi(blad.c_str());
2211  }
2212  return binx_;
2213 }
void SiPixelActionExecutor::GetBladeSubdirs ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
std::vector< std::string > &  blade_subdirs 
)
private

Definition at line 424 of file SiPixelActionExecutor.cc.

References DQMStore::IBooker::cd(), DQMStore::IGetter::cd(), DQMStore::IGetter::getSubdirs(), and electrons_cff::modules.

Referenced by fillSummary().

426  {
427  blade_subdirs.clear();
428  vector<string> panels = iGetter.getSubdirs();
429  vector<string> modules;
430  for (vector<string>::const_iterator it = panels.begin(); it != panels.end(); it++) {
431  iGetter.cd(*it);
432  iBooker.cd(*it);
433  modules = iGetter.getSubdirs();
434  for (vector<string>::const_iterator m_it = modules.begin(); m_it != modules.end(); m_it++) {
435  blade_subdirs.push_back(*m_it);
436  }
437  }
438 }
std::vector< std::string > getSubdirs()
Definition: DQMStore.cc:325
MonitorElement * SiPixelActionExecutor::getFEDSummaryME ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
std::string  me_name 
)
private

Definition at line 1835 of file SiPixelActionExecutor.cc.

References DQMStore::IBooker::book1D(), relmon_rootfiles_spy::contents, spr::find(), DQMStore::IGetter::get(), DQMStore::IGetter::getMEs(), DQMStore::IBooker::pwd(), and MonitorElement::Reset().

Referenced by fillFEDErrorSummary().

1837  {
1838  // printing cout<<"Entering SiPixelActionExecutor::getFEDSummaryME..."<<endl;
1839  MonitorElement *me = nullptr;
1840  if ((iBooker.pwd()).find("Pixel") == string::npos)
1841  return me;
1842  vector<string> contents = iGetter.getMEs();
1843 
1844  for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++) {
1845  if ((*it).find(me_name) == 0) {
1846  string fullpathname = iBooker.pwd() + "/" + (*it);
1847 
1848  me = iGetter.get(fullpathname);
1849 
1850  if (me) {
1851  me->Reset();
1852  return me;
1853  }
1854  }
1855  }
1856  contents.clear();
1857  me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 40, -0.5, 39.5);
1858 
1859  return me;
1860 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
std::string const & pwd()
Definition: DQMStore.cc:278
std::vector< std::string > getMEs()
Definition: DQMStore.cc:331
void SiPixelActionExecutor::getGrandSummaryME ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
int  nbin,
std::string &  me_name,
std::vector< MonitorElement * > &  mes 
)
private

Definition at line 1735 of file SiPixelActionExecutor.cc.

References DQMStore::IBooker::book1D(), relmon_rootfiles_spy::contents, spr::find(), DQMStore::IGetter::get(), DQMStore::IGetter::getMEs(), DQMStore::IBooker::pwd(), and MonitorElement::Reset().

Referenced by fillGrandBarrelSummaryHistos(), and fillGrandEndcapSummaryHistos().

1736  {
1737  // printing cout<<"Entering SiPixelActionExecutor::getGrandSummaryME for:
1738  // "<<me_name<<endl;
1739  if ((iBooker.pwd()).find("Pixel") == string::npos)
1740  return; // If one doesn't find pixel
1741  vector<string> contents = iGetter.getMEs();
1742 
1743  for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++) {
1744  // printing cout<<"in grand summary me: "<<me_name<<","<<(*it)<<endl;
1745  if ((*it).find(me_name) == 0) {
1746  string fullpathname = iBooker.pwd() + "/" + me_name;
1747  MonitorElement *me = iGetter.get(fullpathname);
1748 
1749  if (me) {
1750  me->Reset();
1751  mes.push_back(me);
1752  return;
1753  }
1754  }
1755  }
1756 
1757  MonitorElement *temp_me(nullptr);
1758  if (me_name.find("ALLMODS_adcCOMB_") != string::npos)
1759  temp_me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 128, 0, 256);
1760  else if (me_name.find("ALLMODS_chargeCOMB_") != string::npos)
1761  temp_me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 100, 0, 200);
1762  else
1763  temp_me = iBooker.book1D(me_name.c_str(), me_name.c_str(), nbin, 1., nbin + 1.);
1764  if (temp_me)
1765  mes.push_back(temp_me);
1766 
1767  // if(temp_me) cout<<"finally found grand ME: "<<me_name<<endl;
1768 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
std::string const & pwd()
Definition: DQMStore.cc:278
std::vector< std::string > getMEs()
Definition: DQMStore.cc:331
int SiPixelActionExecutor::getLadder ( const std::string &  dname)

Definition at line 2195 of file SiPixelActionExecutor.cc.

Referenced by fillEfficiency().

2195  {
2196  int biny_ = 0;
2197  string lad = dname_.substr(dname_.find("Ladder_") + 7, 2);
2198  if (dname_.find(lad) != string::npos) {
2199  biny_ = atoi(lad.c_str());
2200  }
2201  return biny_;
2202 }
MonitorElement * SiPixelActionExecutor::getSummaryME ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
std::string  me_name,
bool  isUpgrade 
)
private

Definition at line 1774 of file SiPixelActionExecutor.cc.

References DQMStore::IBooker::book1D(), relmon_rootfiles_spy::contents, spr::find(), DQMStore::IGetter::get(), DQMStore::IGetter::getMEs(), DQMStore::IBooker::pwd(), and MonitorElement::Reset().

Referenced by fillSummary().

1777  {
1778  // printing cout<<"Entering SiPixelActionExecutor::getSummaryME for:
1779  // "<<me_name<<endl;
1780  MonitorElement *me = nullptr;
1781  if ((iBooker.pwd()).find("Pixel") == string::npos)
1782  return me;
1783  vector<string> contents = iGetter.getMEs();
1784 
1785  for (vector<string>::const_iterator it = contents.begin(); it != contents.end(); it++) {
1786  if ((*it).find(me_name) == 0) {
1787  string fullpathname = iBooker.pwd() + "/" + (*it);
1788  me = iGetter.get(fullpathname);
1789  if (me) {
1790  me->Reset();
1791  return me;
1792  }
1793  }
1794  }
1795  contents.clear();
1796  if (!isUpgrade) {
1797  if (me_name.find("SUMOFF") == string::npos) {
1798  if (me_name.find("Blade_") != string::npos)
1799  me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 7, 1., 8.);
1800  else
1801  me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 4, 1., 5.);
1802  } else if (me_name.find("Layer_1") != string::npos) {
1803  me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 10, 1., 11.);
1804  } else if (me_name.find("Layer_2") != string::npos) {
1805  me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 16, 1., 17.);
1806  } else if (me_name.find("Layer_3") != string::npos) {
1807  me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 22, 1., 23.);
1808  } else if (me_name.find("Disk_") != string::npos) {
1809  me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 12, 1., 13.);
1810  }
1811  } // endifNOTUpgrade
1812  else if (isUpgrade) {
1813  if (me_name.find("SUMOFF") == string::npos) {
1814  if (me_name.find("Blade_") != string::npos)
1815  me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 2, 1., 3.);
1816  else
1817  me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 1, 1., 2.);
1818  } else if (me_name.find("Layer_1") != string::npos) {
1819  me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 6, 1., 7.);
1820  } else if (me_name.find("Layer_2") != string::npos) {
1821  me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 14, 1., 15.);
1822  } else if (me_name.find("Layer_3") != string::npos) {
1823  me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 22, 1., 23.);
1824  } else if (me_name.find("Layer_4") != string::npos) {
1825  me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 32, 1., 33.);
1826  } else if (me_name.find("Disk_") != string::npos) {
1827  me = iBooker.book1D(me_name.c_str(), me_name.c_str(), 28, 1., 29.);
1828  }
1829  } // endifUpgrade
1830 
1831  return me;
1832 }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
std::string const & pwd()
Definition: DQMStore.cc:278
std::vector< std::string > getMEs()
Definition: DQMStore.cc:331
void SiPixelActionExecutor::normaliseAvDigiOcc ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter 
)

Definition at line 2013 of file SiPixelActionExecutor.cc.

References DQMStore::IGetter::cd(), DQMStore::IGetter::get(), MonitorElement::getBinContent(), mps_fire::i, DQMStore::IBooker::pwd(), MonitorElement::setBinContent(), and DQMStore::IGetter::setCurrentFolder().

2013  {
2014  // occupancyprinting cout<<"entering
2015  // SiPixelActionExecutor::normaliseAvDigiOcc..."<<std::endl;
2016 
2017  iGetter.cd();
2018 
2019  MonitorElement *roccupancyPlot = iGetter.get("Pixel/averageDigiOccupancy");
2020 
2021  float totalDigisBPIX = 0.;
2022  float totalDigisFPIX = 0.;
2023  for (int i = 1; i != 41; i++) {
2024  if (i < 33)
2025  totalDigisBPIX += roccupancyPlot->getBinContent(i);
2026  else
2027  totalDigisFPIX += roccupancyPlot->getBinContent(i);
2028  }
2029  float averageBPIXOcc = totalDigisBPIX / 32.;
2030  float averageFPIXOcc = totalDigisFPIX / 8.;
2031  for (int i = 1; i != 41; i++) {
2032  if (i < 33)
2033  roccupancyPlot->setBinContent(i, roccupancyPlot->getBinContent(i) / averageBPIXOcc);
2034  else
2035  roccupancyPlot->setBinContent(i, roccupancyPlot->getBinContent(i) / averageFPIXOcc);
2036  }
2037 
2038  iGetter.setCurrentFolder(iBooker.pwd());
2039 }
void setBinContent(int binx, double content)
set content of bin (1-D)
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:361
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
std::string const & pwd()
Definition: DQMStore.cc:278
double getBinContent(int binx) const
get content of bin (1-D)
void SiPixelActionExecutor::normaliseAvDigiOccVsLumi ( DQMStore::IBooker iBooker,
DQMStore::IGetter iGetter,
int  lumisec 
)

Definition at line 2043 of file SiPixelActionExecutor.cc.

References DQMStore::IGetter::cd(), DQMStore::IGetter::get(), MonitorElement::getBinContent(), mps_fire::i, DQMStore::IBooker::pwd(), MonitorElement::setBinContent(), and DQMStore::IGetter::setCurrentFolder().

2045  {
2046  iGetter.cd();
2047 
2048  MonitorElement *avgfedDigiOccvsLumi = iGetter.get("Pixel/avgfedDigiOccvsLumi");
2049 
2050  float totalDigisBPIX = 0.;
2051  float totalDigisFPIX = 0.;
2052  for (int i = 1; i != 41; i++) {
2053  if (i < 33)
2054  totalDigisBPIX += avgfedDigiOccvsLumi->getBinContent(lumisec, i);
2055  else
2056  totalDigisFPIX += avgfedDigiOccvsLumi->getBinContent(lumisec, i);
2057  }
2058  float averageBPIXOcc = totalDigisBPIX / 32.;
2059  float averageFPIXOcc = totalDigisFPIX / 8.;
2060  for (int i = 1; i != 41; i++) {
2061  if (i < 33)
2062  avgfedDigiOccvsLumi->setBinContent(lumisec, i, avgfedDigiOccvsLumi->getBinContent(lumisec, i) / averageBPIXOcc);
2063  else
2064  avgfedDigiOccvsLumi->setBinContent(lumisec, i, avgfedDigiOccvsLumi->getBinContent(lumisec, i) / averageFPIXOcc);
2065  }
2066 
2067  iGetter.setCurrentFolder(iBooker.pwd());
2068 }
void setBinContent(int binx, double content)
set content of bin (1-D)
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:361
MonitorElement * get(std::string const &path)
Definition: DQMStore.cc:303
std::string const & pwd()
Definition: DQMStore.cc:278
double getBinContent(int binx) const
get content of bin (1-D)
bool SiPixelActionExecutor::readConfiguration ( int &  tkmap_freq,
int &  sum_barrel_freq,
int &  sum_endcap_freq,
int &  sum_grandbarrel_freq,
int &  sum_grandendcap_freq,
int &  message_limit,
int &  source_type,
int &  calib_type 
)

Definition at line 68 of file SiPixelActionExecutor.cc.

References configParser_, gather_cfg::cout, SiPixelConfigParser::getCalibType(), DQMParserBase::getDocument(), SiPixelConfigParser::getFrequencyForBarrelSummary(), SiPixelConfigParser::getFrequencyForEndcapSummary(), SiPixelConfigParser::getFrequencyForGrandBarrelSummary(), SiPixelConfigParser::getFrequencyForGrandEndcapSummary(), SiPixelConfigParser::getFrequencyForTrackerMap(), SiPixelConfigParser::getMessageLimitForQTests(), SiPixelConfigParser::getSourceType(), offlineXMLfile_, and AlCaHLTBitMon_QueryRunRegistry::string.

75  {
76  // printing cout<<"Entering
77  // SiPixelActionExecutor::readConfiguration..."<<endl;
78  string localPath;
79  if (offlineXMLfile_)
80  localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
81  else
82  localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
83  if (configParser_ == nullptr) {
85  configParser_->getDocument(edm::FileInPath(localPath).fullPath());
86  }
87 
88  if (!configParser_->getFrequencyForTrackerMap(tkmap_freq)) {
89  cout << "SiPixelActionExecutor::readConfiguration: Failed to read "
90  "TrackerMap configuration parameters!! ";
91  return false;
92  }
93  if (!configParser_->getFrequencyForBarrelSummary(sum_barrel_freq)) {
94  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Barrel Summary configuration parameters!! "
95  << "\n";
96  return false;
97  }
98  if (!configParser_->getFrequencyForEndcapSummary(sum_endcap_freq)) {
99  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Endcap Summary configuration parameters!! "
100  << "\n";
101  return false;
102  }
103  if (!configParser_->getFrequencyForGrandBarrelSummary(sum_grandbarrel_freq)) {
104  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Grand Barrel Summary configuration parameters!! "
105  << "\n";
106  return false;
107  }
108  if (!configParser_->getFrequencyForGrandEndcapSummary(sum_grandendcap_freq)) {
109  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Grand Endcap Summary configuration parameters!! "
110  << "\n";
111  return false;
112  }
114  edm::LogInfo("SiPixelActionExecutor") << "Failed to read QTest Message Limit"
115  << "\n";
116  return false;
117  }
119  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Source Type"
120  << "\n";
121  return false;
122  }
124  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Calib Type"
125  << "\n";
126  return false;
127  }
128  // printing cout<<"...leaving
129  // SiPixelActionExecutor::readConfiguration..."<<endl;
130  return true;
131 }
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
SiPixelConfigParser * configParser_
bool getCalibType(int &u_freq)
bool getFrequencyForGrandBarrelSummary(int &u_freq)
bool getFrequencyForEndcapSummary(int &u_freq)
bool getFrequencyForBarrelSummary(int &u_freq)
bool getFrequencyForGrandEndcapSummary(int &u_freq)
bool getMessageLimitForQTests(int &u_freq)
bool getSourceType(int &u_freq)
bool getFrequencyForTrackerMap(int &u_freq)
bool SiPixelActionExecutor::readConfiguration ( int &  tkmap_freq,
int &  summary_freq 
)

Definition at line 133 of file SiPixelActionExecutor.cc.

References configParser_, gather_cfg::cout, DQMParserBase::getDocument(), SiPixelConfigParser::getFrequencyForBarrelSummary(), SiPixelConfigParser::getFrequencyForTrackerMap(), offlineXMLfile_, and AlCaHLTBitMon_QueryRunRegistry::string.

133  {
134  // printing cout<<"Entering
135  // SiPixelActionExecutor::readConfiguration..."<<endl;
136  string localPath;
137  if (offlineXMLfile_)
138  localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
139  else
140  localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
141  if (configParser_ == nullptr) {
143  configParser_->getDocument(edm::FileInPath(localPath).fullPath());
144  }
145 
146  if (!configParser_->getFrequencyForTrackerMap(tkmap_freq)) {
147  cout << "SiPixelActionExecutor::readConfiguration: Failed to read "
148  "TrackerMap configuration parameters!! ";
149  return false;
150  }
151  if (!configParser_->getFrequencyForBarrelSummary(summary_freq)) {
152  edm::LogInfo("SiPixelActionExecutor") << "Failed to read Summary configuration parameters!! "
153  << "\n";
154  return false;
155  }
156  // printing cout<<"...leaving
157  // SiPixelActionExecutor::readConfiguration..."<<endl;
158  return true;
159 }
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
SiPixelConfigParser * configParser_
bool getFrequencyForBarrelSummary(int &u_freq)
bool getFrequencyForTrackerMap(int &u_freq)
void SiPixelActionExecutor::readConfiguration ( )

Definition at line 53 of file SiPixelActionExecutor.cc.

References configParser_, DQMParserBase::getDocument(), offlineXMLfile_, and AlCaHLTBitMon_QueryRunRegistry::string.

53  {
54  string localPath;
55  if (offlineXMLfile_)
56  localPath = string("DQM/SiPixelMonitorClient/test/sipixel_tier0_config.xml");
57  else
58  localPath = string("DQM/SiPixelMonitorClient/test/sipixel_monitorelement_config.xml");
59  if (configParser_ == nullptr) {
61  configParser_->getDocument(edm::FileInPath(localPath).fullPath());
62  }
63 }
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
SiPixelConfigParser * configParser_

Member Data Documentation

int SiPixelActionExecutor::calib_type_
private

Definition at line 121 of file SiPixelActionExecutor.h.

SiPixelConfigParser* SiPixelActionExecutor::configParser_
private
SiPixelConfigWriter* SiPixelActionExecutor::configWriter_
private
MonitorElement* SiPixelActionExecutor::DEV_adc_Barrel
private

Definition at line 139 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_adc_Endcap
private

Definition at line 144 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_charge_Barrel
private

Definition at line 141 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_charge_Endcap
private

Definition at line 146 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_nclusters_Barrel
private

Definition at line 142 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_nclusters_Endcap
private

Definition at line 147 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_ndigis_Barrel
private

Definition at line 140 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_ndigis_Endcap
private

Definition at line 145 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_size_Barrel
private

Definition at line 143 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::DEV_size_Endcap
private

Definition at line 148 of file SiPixelActionExecutor.h.

Referenced by bookDeviations().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dm1
private

Definition at line 135 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dm2
private

Definition at line 136 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dm3
private

Definition at line 137 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dp1
private

Definition at line 132 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dp2
private

Definition at line 133 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_Dp3
private

Definition at line 134 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_L1
private

Definition at line 128 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_L2
private

Definition at line 129 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_L3
private

Definition at line 130 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiency_L4
private

Definition at line 131 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiency().

MonitorElement* SiPixelActionExecutor::HitEfficiencySummary
private

Definition at line 138 of file SiPixelActionExecutor.h.

Referenced by bookEfficiency(), and fillEfficiencySummary().

int SiPixelActionExecutor::message_limit_
private

Definition at line 119 of file SiPixelActionExecutor.h.

int SiPixelActionExecutor::ndet_
private

Definition at line 122 of file SiPixelActionExecutor.h.

Referenced by SiPixelActionExecutor().

MonitorElement* SiPixelActionExecutor::OccupancyMap
private

Definition at line 126 of file SiPixelActionExecutor.h.

Referenced by bookOccupancyPlots(), and fillOccupancy().

bool SiPixelActionExecutor::offlineXMLfile_
private

Definition at line 123 of file SiPixelActionExecutor.h.

Referenced by createSummary(), and readConfiguration().

MonitorElement* SiPixelActionExecutor::PixelOccupancyMap
private

Definition at line 127 of file SiPixelActionExecutor.h.

int SiPixelActionExecutor::source_type_
private
std::vector<std::string> SiPixelActionExecutor::summaryMENames
private

Definition at line 116 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_1x2
private

Definition at line 151 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_1x5
private

Definition at line 152 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_2x3
private

Definition at line 153 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_2x4
private

Definition at line 154 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_2x5
private

Definition at line 155 of file SiPixelActionExecutor.h.

TH2F* SiPixelActionExecutor::temp_H
private

Definition at line 150 of file SiPixelActionExecutor.h.

edm::ESHandle<SiPixelFedCablingMap> SiPixelActionExecutor::theCablingMap
private

Definition at line 114 of file SiPixelActionExecutor.h.

bool SiPixelActionExecutor::Tier0Flag_
private
std::vector<std::string> SiPixelActionExecutor::tkMapMENames
private

Definition at line 117 of file SiPixelActionExecutor.h.