54 LogInfo (
"PixelDQM") <<
"SiPixelPhase1Summary::SiPixelPhase1Summary: Got DQM BackEnd interface"<<endl;
59 std::vector<edm::ParameterSet> mapPSets =
conf_.
getParameter<std::vector<edm::ParameterSet> >(
"SummaryMaps");
62 for (
auto const mapPSet : mapPSets){
72 LogInfo (
"PixelDQM") <<
"SiPixelPhase1Summary::~SiPixelPhase1Summary: Destructor"<<endl;
119 std::vector<std::string> xAxisLabels_ = {
"BMO",
"BMI",
"BPO ",
"BPI",
"HCMO_1",
"HCMO_2",
"HCMI_1",
"HCMI_2",
"HCPO_1",
"HCPO_2",
"HCPI_1",
"HCPI_2"};
120 std::vector<std::string> yAxisLabels_ = {
"1",
"2",
"3",
"4"};
125 auto name = mapInfo.first;
130 summaryMap_[
"Grand"] = iBooker.
book2D(
"reportSummaryMap",
"Pixel Summary Map",12,0,12,4,0,4);
135 auto summaryMap = summaryMapEntry.second;
136 for (
unsigned int i = 0;
i < xAxisLabels_.size();
i++){
139 for (
unsigned int i = 0;
i < yAxisLabels_.size();
i++){
140 summaryMap->setBinLabel(
i+1,yAxisLabels_[
i],2);
142 summaryMap->setAxisTitle(
"Subdetector",1);
143 summaryMap->setAxisTitle(
"Layer/disk",2);
144 for (
int i = 0;
i < 12;
i++){
145 for (
int j = 0; j < 4; j++){
146 summaryMap->Fill(
i,j,-1.);
191 auto name = mapInfo.first;
192 std::ostringstream histNameStream;
195 for (
int i = 0;
i < 12;
i++){
196 for (
int j = 0; j < 4; j++){
197 if (
i > 3 && j == 3)
continue;
198 bool minus = i < 2 || (i > 3 &&
i < 8);
199 int iOver2 = floor(
i/2.);
200 bool outer = (
i > 3)?iOver2%2==0:
i%2==0;
202 histNameStream.str(
"");
203 histNameStream <<
topFolderName_.c_str() <<
"PX" << ((
i > 3)?
"Forward":
"Barrel") <<
"/" << ((
i > 3)?
"HalfCylinder":
"Shell") <<
"_" << (minus?
"m":
"p") << ((outer)?
"O":
"I") <<
"/" << ((
i > 3)?((
i%2 == 0)?
"PXRing_1/":
"PXRing_2/"):
"") << summaryPlotName_[
name].c_str() <<
"_PX" << ((
i > 3)?
"Disk":
"Layer") <<
"_" << ((
i>3)?((minus)?
"-":
"+"):
"") << (j+1);
204 histName = histNameStream.str();
208 edm::LogWarning(
"SiPixelPhase1Summary") <<
"ME " << histName <<
" is not available !!";
213 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Summary map " << name <<
" is not available !!";
222 float sumOfNonNegBins = 0.;
224 for (
int i = 0;
i < 12;
i++){
226 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Grand summary does not exist!";
229 for (
int j = 0; j < 4; j++){
231 for (
auto const mapInfo: summaryPlotName_){
232 auto name = mapInfo.first;
234 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Summary " << name <<
" does not exist!";
239 if (
summaryMap_[
"Grand"]->getBinContent(
i+1,j+1) > -0.1) sumOfNonNegBins +=
summaryMap_[
"Grand"]->getBinContent(
i+1,j+1);
252 if (lumiSec%10 != 0)
return;
254 std::ostringstream histNameStream;
259 int nFilledROCsFPix = 0, nFilledROCsBPix = 0;
260 int hiEffROCsFPix = 0, hiEffROCsBPix = 0;
261 std::vector<int> nRocsPerLayer = {1536,3584,5632,8192};
262 std::vector<int> nRocsPerRing = {4224,6528};
264 for (
auto it : {1,2,3,4}){
267 histNameStream.str(
"");
268 histNameStream <<
"PixelPhase1/Phase1_MechanicalView/PXBarrel/digi_occupancy_per_SignedModuleCoord_per_SignedLadderCoord_PXLayer_" << it;
269 histName = histNameStream.str();
271 if (!tempLayerME)
continue;
272 float lowEffValue = 0.25 * tempLayerME->
getTH1()->Integral() / nRocsPerLayer[it-1];
273 for (
int i=1;
i<=tempLayerME->
getTH1()->GetXaxis()->GetNbins();
i++){
274 for (
int j=1; j<=tempLayerME->
getTH1()->GetYaxis()->GetNbins(); j++){
276 if (tempLayerME->
getBinContent(
i,j) > lowEffValue) hiEffROCsBPix++;
280 if (it > 2)
continue;
282 histNameStream.str(
"");
283 histNameStream <<
"PixelPhase1/Phase1_MechanicalView/PXForward/digi_occupancy_per_SignedDiskCoord_per_SignedBladePanelCoord_PXRing_" << it;
284 histName = histNameStream.str();
286 lowEffValue = 0.25 * tempDiskME->
getTH1()->Integral()/ nRocsPerRing[it-1];
287 for (
int i=1;
i<=tempDiskME->
getTH1()->GetXaxis()->GetNbins();
i++){
288 for (
int j=1; j<=tempDiskME->
getTH1()->GetYaxis()->GetNbins(); j++){
290 if (tempDiskME->
getBinContent(
i,j) > lowEffValue) hiEffROCsFPix++;
LuminosityBlockID id() const
T getParameter(std::string const &) const
SiPixelPhase1Summary(const edm::ParameterSet &conf)
std::map< std::string, std::string > summaryPlotName_
std::string topFolderName_
MonitorElement * get(const std::string &path)
#define DEFINE_FWK_MODULE(type)
std::map< trendPlots, MonitorElement * > deadROCTrends_
void fillSummaries(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter)
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)
std::map< trendPlots, MonitorElement * > ineffROCTrends_
void fillTrendPlots(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, int lumiSeg=0)
std::map< std::string, MonitorElement * > summaryMap_
void beginRun(edm::Run const &run, edm::EventSetup const &eSetup)
MonitorElement * book1D(Args &&...args)
void bookTrendPlots(DQMStore::IBooker &iBooker)
MonitorElement * reportSummary
void setCurrentFolder(const std::string &fullpath)
std::vector< QReport * > getQReports(void) const
get map of QReports
MonitorElement * book2D(Args &&...args)
LuminosityBlockNumber_t luminosityBlock() const
void dqmEndJob(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter) override
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * bookFloat(Args &&...args)
void bookSummaries(DQMStore::IBooker &iBooker)
void dqmEndLuminosityBlock(DQMStore::IBooker &iBooker, DQMStore::IGetter &iGetter, edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c) override
void Reset(void)
reset ME (ie. contents, errors, etc)