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;
120 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"};
121 std::vector<std::string> yAxisLabels_ = {
"1",
"2",
"3",
"4"};
126 auto name = mapInfo.first;
130 deadROCSummary = iBooker.
book2D(
"deadROCSummary",
"Percentage of dead ROCs per layer/ring",2,0,2,4,0,4);
131 std::vector<std::string> xAxisLabelsReduced_ = {
"Barrel",
"Forward"};
133 for (
unsigned int i = 0;
i < xAxisLabelsReduced_.size();
i++){
142 summaryMap_[
"Grand"] = iBooker.
book2D(
"reportSummaryMap",
"Pixel Summary Map",2,0,2,4,0,4);
143 summaryMap_[
"Grand"]->setAxisTitle(
"Subdetector",1);
144 for (
unsigned int i = 0;
i < xAxisLabelsReduced_.size();
i++){
145 summaryMap_[
"Grand"]->setBinLabel(
i+1,xAxisLabelsReduced_[
i]);
146 for (
unsigned int j = 0; j < 4; j++){
summaryMap_[
"Grand"]->setBinContent(i,j,-1);}
151 summaryMap_[
"Grand"] = iBooker.
book2D(
"reportSummaryMap",
"Pixel Summary Map",12,0,12,4,0,4);
159 if (summaryMapEntry.first ==
"Grand")
continue;
160 auto summaryMap = summaryMapEntry.second;
161 for (
unsigned int i = 0;
i < xAxisLabels_.size();
i++){
164 for (
unsigned int i = 0;
i < yAxisLabels_.size();
i++){
165 summaryMap->setBinLabel(
i+1,yAxisLabels_[
i],2);
167 summaryMap->setAxisTitle(
"Subdetector",1);
168 summaryMap->setAxisTitle(
"Layer/disk",2);
169 for (
int i = 0;
i < summaryMap->getTH1()->GetXaxis()->GetNbins();
i++){
170 for (
int j = 0; j < summaryMap->getTH1()->GetYaxis()->GetNbins(); j++){
171 summaryMap->Fill(
i,j,-1.);
187 std::vector<string> binAxisLabels = {
"Layer 1",
"Layer 2",
"Layer 3",
"Layer 4",
"Ring 1",
"Ring 2"};
190 std::vector<string> varName ={
"Layer_1",
"Layer_2",
"Layer_3",
"Layer_4",
"Ring_1",
"Ring_2"};
191 std::vector<int>
yMax = {1536,3584,5632,8192,4224,6528};
192 for (
unsigned int i = 0;
i < histoOrder.size();
i++){
193 string varNameStr =
"deadRocTrend"+varName[
i];
194 string varTitle = binAxisLabels[
i]+
" dead ROC trend";
196 varNameStr =
"ineffRocTrend"+varName[
i];
197 varTitle = binAxisLabels[
i]+
" inefficient ROC trend";
208 for (
unsigned int i = 1;
i <= binAxisLabels.size();
i++){
222 auto name = mapInfo.first;
223 std::ostringstream histNameStream;
226 for (
int i = 0;
i < 12;
i++){
227 for (
int j = 0; j < 4; j++){
228 if (
i > 3 && j == 3)
continue;
229 bool minus = i < 2 || (i > 3 &&
i < 8);
230 int iOver2 = floor(
i/2.);
231 bool outer = (
i > 3)?iOver2%2==0:
i%2==0;
233 histNameStream.str(
"");
234 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);
235 histName = histNameStream.str();
239 edm::LogWarning(
"SiPixelPhase1Summary") <<
"ME " << histName <<
" is not available !!";
244 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Summary map " <<
name <<
" is not available !!";
255 std::vector<int> nRocsPerTrend = {1536,3584,5632,8192,4224,6528};
256 for (
unsigned int i = 0;
i < trendOrder.size();
i++){
257 int xBin =
i < 4 ? 1 : 2;
262 nROCs = tempProfile->GetBinContent(tempProfile->FindLastBinAbove());
266 nROCs = tempProfile->GetBinContent(
i+1);
272 float sumOfNonNegBins = 0.;
276 for (
int i = 0;
i < 12;
i++){
278 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Grand summary does not exist!";
281 for (
int j = 0; j < 4; j++){
283 for (
auto const mapInfo: summaryPlotName_){
284 auto name = mapInfo.first;
291 if (
summaryMap_[
"Grand"]->getBinContent(
i+1,j+1) > -0.1) sumOfNonNegBins +=
summaryMap_[
"Grand"]->getBinContent(
i+1,j+1);
300 for (
int i = 0;
i < 2;
i++){
302 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Grand summary does not exist!";
305 for (
int j = 0; j < 4; j++){
307 if (
i == 1 && j > 1)
continue;
310 sumOfNonNegBins +=
summaryMap_[
"Grand"]->getBinContent(
i+1,j+1);
323 if (lumiSec%10 != 0)
return;
326 MonitorElement * nClustersAll = iGetter.
get(
"PixelPhase1/Phase1_MechanicalView/num_clusters_per_Lumisection_PXAll");
327 if (nClustersAll==
nullptr){
328 edm::LogWarning(
"SiPixelPhase1Summary") <<
"All pixel cluster trend plot not available!!";
331 if (nClustersAll->
getTH1()->GetBinContent(lumiSec) < 100)
return;
338 std::vector<int> nFilledROCs(trendOrder.size(),0);
339 std::vector<int> hiEffROCs(trendOrder.size(),0);
340 std::vector<int> nRocsPerTrend = {1536,3584,5632,8192,4224,6528};
341 std::vector<string> trendNames = {};
343 for (
auto it : {1,2,3,4}) {
344 histName =
"PXBarrel/digi_occupancy_per_SignedModuleCoord_per_SignedLadderCoord_PXLayer_" + std::to_string(it);
345 trendNames.push_back(histName);
347 for (
auto it : {1,2}) {
348 histName =
"PXForward/digi_occupancy_per_SignedDiskCoord_per_SignedBladePanelCoord_PXRing_" + std::to_string(it);
349 trendNames.push_back(histName);
352 for (
unsigned int trendIt = 0; trendIt < trendOrder.size(); trendIt++){
354 histName =
"PixelPhase1/Phase1_MechanicalView/" + trendNames[trendIt];
356 if (tempLayerME==
nullptr)
continue;
357 float lowEffValue = 0.25 * (tempLayerME->
getTH1()->Integral() / nRocsPerTrend[trendIt]);
358 for (
int i=1;
i<=tempLayerME->
getTH1()->GetXaxis()->GetNbins();
i++){
359 for (
int j=1; j<=tempLayerME->
getTH1()->GetYaxis()->GetNbins(); j++){
361 if (tempLayerME->
getBinContent(
i,j) > lowEffValue) hiEffROCs[trendIt]++;
365 tempLayerME->
Reset();
370 for (
unsigned int i = 0;
i < trendOrder.size();
i++){
376 for (
unsigned int i = 0;
i < trendOrder.size();
i++){
378 ineffROCTrends_[trendOrder[
i]]->Fill(lumiSec-1,nFilledROCs[i]-hiEffROCs[i]);
384 for (
auto it : {1,2,3,4}) {
385 histName =
"PixelPhase1/Phase1_MechanicalView/PXBarrel/clusterposition_zphi_PXLayer_" +std::to_string(it);
387 if (toReset!=
nullptr) {
391 for (
auto it : {-3,-2,-1,1,2,3}){
392 histName =
"PixelPhase1/Phase1_MechanicalView/PXForward/clusterposition_xy_PXDisk_" + std::to_string(it);
394 if (toReset!=
nullptr) {
LuminosityBlockID id() const
T getParameter(std::string const &) const
void setBinContent(int binx, double content)
set content of bin (1-D)
SiPixelPhase1Summary(const edm::ParameterSet &conf)
std::map< std::string, std::string > summaryPlotName_
MonitorElement * deadROCSummary
MonitorElement * bookProfile(Args &&...args)
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)
~SiPixelPhase1Summary() override
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) override
void bookTrendPlots(DQMStore::IBooker &iBooker)
void Reset()
reset ME (ie. contents, errors, etc)
MonitorElement * reportSummary
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
LuminosityBlockNumber_t luminosityBlock() const
std::vector< QReport * > getQReports() const
get map of QReports
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
std::vector< double > deadRocThresholds_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)