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.);
161 std::vector<string> binAxisLabels = {
"Layer 1",
"Layer 2",
"Layer 3",
"Layer 4",
"Ring 1",
"Ring 2"};
164 std::vector<string> varName ={
"Layer_1",
"Layer_2",
"Layer_3",
"Layer_4",
"Ring_1",
"Ring_2"};
165 std::vector<int>
yMax = {1536,3584,5632,8192,4224,6528};
166 for (
unsigned int i = 0;
i < histoOrder.size();
i++){
167 string varNameStr =
"deadRocTrend"+varName[
i];
168 string varTitle = binAxisLabels[
i]+
" dead ROC trend";
170 varNameStr =
"ineffRocTrend"+varName[
i];
171 varTitle = binAxisLabels[
i]+
" inefficient ROC trend";
182 for (
unsigned int i = 1;
i <= binAxisLabels.size();
i++){
196 auto name = mapInfo.first;
197 std::ostringstream histNameStream;
200 for (
int i = 0;
i < 12;
i++){
201 for (
int j = 0; j < 4; j++){
202 if (
i > 3 && j == 3)
continue;
203 bool minus = i < 2 || (i > 3 &&
i < 8);
204 int iOver2 = floor(
i/2.);
205 bool outer = (
i > 3)?iOver2%2==0:
i%2==0;
207 histNameStream.str(
"");
208 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);
209 histName = histNameStream.str();
213 edm::LogWarning(
"SiPixelPhase1Summary") <<
"ME " << histName <<
" is not available !!";
218 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Summary map " <<
name <<
" is not available !!";
227 float sumOfNonNegBins = 0.;
229 for (
int i = 0;
i < 12;
i++){
231 edm::LogWarning(
"SiPixelPhase1Summary") <<
"Grand summary does not exist!";
234 for (
int j = 0; j < 4; j++){
236 for (
auto const mapInfo: summaryPlotName_){
237 auto name = mapInfo.first;
244 if (
summaryMap_[
"Grand"]->getBinContent(
i+1,j+1) > -0.1) sumOfNonNegBins +=
summaryMap_[
"Grand"]->getBinContent(
i+1,j+1);
257 if (lumiSec%10 != 0)
return;
264 std::vector<int> nFilledROCs(trendOrder.size(),0);
265 std::vector<int> hiEffROCs(trendOrder.size(),0);
266 std::vector<int> nRocsPerTrend = {1536,3584,5632,8192,4224,6528};
267 std::vector<string> trendNames = {};
269 for (
auto it : {1,2,3,4}) {
270 histName =
"PXBarrel/digi_occupancy_per_SignedModuleCoord_per_SignedLadderCoord_PXLayer_" + std::to_string(it);
271 trendNames.push_back(histName);
273 for (
auto it : {1,2}) {
274 histName =
"PXForward/digi_occupancy_per_SignedDiskCoord_per_SignedBladePanelCoord_PXRing_" + std::to_string(it);
275 trendNames.push_back(histName);
278 for (
unsigned int trendIt = 0; trendIt < trendOrder.size(); trendIt++){
280 histName =
"PixelPhase1/Phase1_MechanicalView/" + trendNames[trendIt];
282 if (tempLayerME==
nullptr)
continue;
283 float lowEffValue = 0.25 * (tempLayerME->
getTH1()->Integral() / nRocsPerTrend[trendIt]);
284 for (
int i=1;
i<=tempLayerME->
getTH1()->GetXaxis()->GetNbins();
i++){
285 for (
int j=1; j<=tempLayerME->
getTH1()->GetYaxis()->GetNbins(); j++){
287 if (tempLayerME->
getBinContent(
i,j) > lowEffValue) hiEffROCs[trendIt]++;
291 tempLayerME->
Reset();
296 for (
unsigned int i = 0;
i < trendOrder.size();
i++){
302 for (
unsigned int i = 0;
i < trendOrder.size();
i++){
304 ineffROCTrends_[trendOrder[
i]]->Fill(lumiSec-1,nFilledROCs[i]-hiEffROCs[i]);
310 for (
auto it : {1,2,3,4}) {
311 histName =
"PixelPhase1/Phase1_MechanicalView/PXBarrel/clusterposition_zphi_PXLayer_" +std::to_string(it);
313 if (toReset!=
nullptr) {
317 for (
auto it : {-3,-2,-1,1,2,3}){
318 histName =
"PixelPhase1/Phase1_MechanicalView/PXForward/clusterposition_xy_PXDisk_" + std::to_string(it);
320 if (toReset!=
nullptr) {
LuminosityBlockID id() const
T getParameter(std::string const &) const
SiPixelPhase1Summary(const edm::ParameterSet &conf)
std::map< std::string, std::string > summaryPlotName_
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)
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)