diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h index ddd282836130c60275334b06a7cbfd8d758a1dc1..9aaf663dbf70e0d692bd991dbf3ec4c7213e1da3 100755 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/PixelMonitoring/PixelMainMon.h @@ -120,7 +120,6 @@ class PixelMainMon : public ManagedMonitorToolBase { int getPixLayerIDDBM(int ec, int ld, bool ibl); int getPixLayerDiskID(int ec, int ld, bool ibl); void th1FillMonitoring(TH1F_LW* mon, TH1F_LW* tmp); - void fillTimeHisto(double, TProfile*, TProfile*, TProfile*, double, double, double); void fillSummaryHistos(PixelMon2DMapsLW* occupancy, TH1F_LW* A, TH1F_LW* C, TH1F_LW* IBL, TH1F_LW* B0, TH1F_LW* B1, TH1F_LW* B2); void fillPP0Histos(PixelMon2DMapsLW* occupancy, TProfile_LW* D_A, TProfile_LW* D_C, TProfile_LW* B0, TProfile_LW* B1, TProfile_LW* B2, TProfile_LW* IBL_A, TProfile_LW* IBL_C); void formatPP0Histos(TProfile_LW* D_A, TProfile_LW* D_C, TProfile_LW* B0, TProfile_LW* B1, TProfile_LW* B2, TProfile_LW* IBL_A, TProfile_LW* IBL_C); @@ -241,7 +240,6 @@ class PixelMainMon : public ManagedMonitorToolBase { bool m_doDCS; bool m_doHoleSearch; - bool m_doESD; bool m_do2DMaps; bool m_doModules; bool m_doOffline; @@ -298,12 +296,10 @@ class PixelMainMon : public ManagedMonitorToolBase { std::unique_ptr<PixelMon2DMapsLW> m_hitmap_tmp; TH1F_LW* m_nhits_mod[PixLayer::COUNT]; TProfile_LW* m_hits_per_lumi_mod[PixLayer::COUNT]; - TH1F_LW* m_nlargeevt_per_lumi_mod[PixLayerIBL2D3D::COUNT]; TH1F_LW* m_totalhits_per_bcid_mod[PixLayerIBL2D3D::COUNT]; // hit occupancy TProfile_LW* m_avgocc_per_lumi; - TProfile_LW* m_avgocc_ratioIBLB0_per_lumi; TProfile_LW* m_avgocc_per_lumi_mod[PixLayerIBL2D3D::COUNT]; TH1F* m_avgocc_ratio_lastXlb_mod[PixLayer::COUNT]; TProfile_LW* m_avgocc_per_bcid_mod[PixLayerIBL2D3D::COUNT]; @@ -315,9 +311,6 @@ class PixelMainMon : public ManagedMonitorToolBase { std::unique_ptr<PixelMon2DMapsLW> m_average_pixocc; std::unique_ptr<PixelMon2DProfilesLW> m_occupancy_pix_evt; std::unique_ptr<PixelMon2DMapsLW> m_occupancy_10min; - TProfile* m_occupancy_time1; - TProfile* m_occupancy_time2; - TProfile* m_occupancy_time3; TH1F_LW* m_occupancy_summary_mod[PixLayer::COUNT]; TProfile_LW* m_occupancy_PP0_ECA; TProfile_LW* m_occupancy_PP0_ECC; @@ -401,14 +394,6 @@ class PixelMainMon : public ManagedMonitorToolBase { TH2F_LW* m_npixhits_per_track_lumi; TH2F* m_npixhits_per_track_lastXlb; - // lorentz angle - TProfile2D_LW* m_LorentzAngle_IBL; - TProfile2D_LW* m_LorentzAngle_IBL2D; - TProfile2D_LW* m_LorentzAngle_IBL3D; - TProfile2D_LW* m_LorentzAngle_B0; - TProfile2D_LW* m_LorentzAngle_B1; - TProfile2D_LW* m_LorentzAngle_B2; - // cluster size TH1F_LW* m_clusize_ontrack_mod[PixLayerIBL2D3D::COUNT]; TH1F_LW* m_clusize_offtrack_mod[PixLayerIBL2D3D::COUNT]; @@ -420,24 +405,13 @@ class PixelMainMon : public ManagedMonitorToolBase { TProfile_LW* m_clusters_col_width_per_lumi_mod[PixLayerIBL2D3D::COUNT]; TProfile_LW* m_clusters_row_width_per_bcid_mod[PixLayerIBL2D3D::COUNT]; TProfile_LW* m_clusters_col_width_per_bcid_mod[PixLayerIBL2D3D::COUNT]; - TProfile_LW* m_largeclusters_per_lumi; - TProfile_LW* m_verylargeclusters_per_lumi; TH1I_LW* m_totalclusters_per_lumi; TH1I_LW* m_totalclusters_per_lumi_mod[PixLayerIBL2D3D::COUNT]; TH1I_LW* m_totalclusters_per_bcid_mod[PixLayerIBL2D3D::COUNT]; - TH1I_LW* m_highNclusters_per_lumi; TH1F_LW* m_cluster_ToT1d_mod[PixLayerIBL2D3DDBM::COUNT]; TH1F_LW* m_cluster_ToT1d_corr[PixLayerIBL2D3DDBM::COUNT]; - TH1F_LW* m_1cluster_ToT_mod[PixLayer::COUNT]; - TH1F_LW* m_2cluster_ToT_mod[PixLayer::COUNT]; - TH1F_LW* m_3cluster_ToT_mod[PixLayer::COUNT]; - TH1F_LW* m_bigcluster_ToT_mod[PixLayer::COUNT]; TH1F_LW* m_cluster_Q_mod[PixLayerIBL2D3DDBM::COUNT]; TH1F_LW* m_cluster_Q_corr[PixLayerIBL2D3DDBM::COUNT]; - TH1F_LW* m_1cluster_Q_mod[PixLayer::COUNT]; - TH1F_LW* m_2cluster_Q_mod[PixLayer::COUNT]; - TH1F_LW* m_3cluster_Q_mod[PixLayer::COUNT]; - TH1F_LW* m_bigcluster_Q_mod[PixLayer::COUNT]; std::unique_ptr<PixelMon2DProfilesLW> m_clussize_map; std::unique_ptr<PixelMon2DProfilesLW> m_cluscharge_map; std::unique_ptr<PixelMon2DProfilesLW> m_clusToT_map; @@ -450,17 +424,11 @@ class PixelMainMon : public ManagedMonitorToolBase { TH1F_LW* m_cluster_LVL1A; TH1F_LW* m_cluster_LVL1A1d_mod[PixLayer::COUNT]; TProfile_LW* m_clusterSize_eta; - TH2F_LW* m_clusToT_vs_eta_mod[PixLayer::COUNT]; - TH2F_LW* m_ToT_vs_clussize_mod[PixLayer::COUNT]; TProfile_LW* m_clussize_vs_eta_mod[PixLayer::COUNT]; std::unique_ptr<PixelMon2DMapsLW> m_clustermap_mon; std::unique_ptr<PixelMon2DMapsLW> m_clustermap_tmp; std::unique_ptr<PixelMon2DMapsLW> m_cluster_occupancy; - TH2F_LW* m_cluster_occupancy_FE_B0_mon; - TProfile* m_cluster_occupancy_time1; - TProfile* m_cluster_occupancy_time2; - TProfile* m_cluster_occupancy_time3; std::unique_ptr<PixelMon2DMapsLW> m_clusocc_sizenot1; std::unique_ptr<PixelMonModulesProf> m_cluseff_mod; @@ -499,9 +467,6 @@ class PixelMainMon : public ManagedMonitorToolBase { TProfile2D_LW* m_errhist_per_bit_LB[PixLayerIBL2D3D::COUNT]; TProfile2D_LW* m_errhist_per_type_LB[PixLayerIBL2D3D::COUNT]; TProfile_LW* m_errhist_syncerr_LB_pix; - TProfile* m_error_time1; - TProfile* m_error_time2; - TProfile* m_error_time3; std::unique_ptr<PixelMonModules1D> m_errors; std::unique_ptr<PixelMon2DProfilesLW> m_errhist_femcc_errwords_map; diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Clusters.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Clusters.cxx index 32e52864cc8e22e3c649e9e4a26b6155e7e24f7f..c628341b6b908268deb775b9c8b8e66fdfe37fa4 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Clusters.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Clusters.cxx @@ -101,18 +101,6 @@ StatusCode PixelMainMon::bookClustersMon(void) { htitles = makeHisttitle("Average cluster size as a function of barrel module eta", (atext_eta + atext_cluw), false); sc = clusterExpert.regHist(m_clusterSize_eta = TProfile_LW::create(hname.c_str(), htitles.c_str(), nbins_eta, min_eta, max_eta)); - hname = makeHistname("LargeClusters_per_lumi", true); - htitles = makeHisttitle("Average number of large clusters (with >10 pixels) per event", (atext_LB + atext_clu), true); - sc = clusterShift.regHist(m_largeclusters_per_lumi = TProfile_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, min_LB, max_LB)); - - hname = makeHistname("VeryLargeClusters_per_lumi", true); - htitles = makeHisttitle("Average number of very large clusters (with >50 pixels) per event", (atext_LB + atext_clu), true); - sc = clusterShift.regHist(m_verylargeclusters_per_lumi = TProfile_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, min_LB, max_LB)); - - hname = makeHistname("HighNClusters_per_lumi", true); - htitles = makeHisttitle("Number of events with >1000 clusters/event", (atext_LB + atext_nevt), true); - sc = clusterExpert.regHist(m_highNclusters_per_lumi = TH1I_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, min_LB, max_LB)); - hname = makeHistname("Clusters_per_lumi", true); htitles = makeHisttitle("Average number of pixel clusters per event", (atext_LB + atext_clu), true); sc = clusterShift.regHist(m_clusters_per_lumi = TProfile_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, min_LB, max_LB)); @@ -145,38 +133,6 @@ StatusCode PixelMainMon::bookClustersMon(void) { htitles = makeHisttitle(("Average number of pixel clusters per event per LB, " + m_modLabel_PixLayerIBL2D3D[i1]), (atext_LB + atext_clu), false); sc = clusterExpert.regHist(m_clusters_per_lumi_mod[i] = TProfile_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, min_LB, max_LB)); - hname = makeHistname(("1Hit_Cluster_ToT_" + m_modLabel_PixLayerIBL2D3D[i1]), false); - htitles = makeHisttitle(("ToT for 1-hit clusters, " + m_modLabel_PixLayerIBL2D3D[i1]), (atext_tot + atext_nclu), false); - sc = clusterExpert.regHist(m_1cluster_ToT_mod[i] = TH1F_LW::create(hname.c_str(), htitles.c_str(), nbins_tot, min_tot, max_tot)); - - hname = makeHistname(("2Hit_Cluster_ToT_" + m_modLabel_PixLayerIBL2D3D[i1]), false); - htitles = makeHisttitle(("ToT for 2-hit clusters, " + m_modLabel_PixLayerIBL2D3D[i1]), (atext_tot + atext_nclu), false); - sc = clusterExpert.regHist(m_2cluster_ToT_mod[i] = TH1F_LW::create(hname.c_str(), htitles.c_str(), nbins_tot, min_tot, max_tot)); - - hname = makeHistname(("3Hit_Cluster_ToT_" + m_modLabel_PixLayerIBL2D3D[i1]), false); - htitles = makeHisttitle(("ToT for 3-hit clusters, " + m_modLabel_PixLayerIBL2D3D[i1]), (atext_tot + atext_nclu), false); - sc = clusterExpert.regHist(m_3cluster_ToT_mod[i] = TH1F_LW::create(hname.c_str(), htitles.c_str(), nbins_tot, min_tot, max_tot)); - - hname = makeHistname(("BigHit_Cluster_ToT_" + m_modLabel_PixLayerIBL2D3D[i1]), false); - htitles = makeHisttitle(("ToT for cluster size > 3, " + m_modLabel_PixLayerIBL2D3D[i1]), (atext_tot + atext_nclu), false); - sc = clusterExpert.regHist(m_bigcluster_ToT_mod[i] = TH1F_LW::create(hname.c_str(), htitles.c_str(), nbins_tot, min_tot, max_tot)); - - hname = makeHistname(("1Hit_Cluster_Q_" + m_modLabel_PixLayerIBL2D3D[i1]), false); - htitles = makeHisttitle(("Charge for 1-hit clusters, " + m_modLabel_PixLayerIBL2D3D[i1]), (atext_Q + atext_nclu), false); - sc = clusterExpert.regHist(m_1cluster_Q_mod[i] = TH1F_LW::create(hname.c_str(), htitles.c_str(), nbins_Q, min_Q, max_Q)); - - hname = makeHistname(("2Hit_Cluster_Q_" + m_modLabel_PixLayerIBL2D3D[i1]), false); - htitles = makeHisttitle(("Charge for 2-hit clusters, " + m_modLabel_PixLayerIBL2D3D[i1]), (atext_Q + atext_nclu), false); - sc = clusterExpert.regHist(m_2cluster_Q_mod[i] = TH1F_LW::create(hname.c_str(), htitles.c_str(), nbins_Q, min_Q, max_Q)); - - hname = makeHistname(("3Hit_Cluster_Q_" + m_modLabel_PixLayerIBL2D3D[i1]), false); - htitles = makeHisttitle(("Charge for 3-hit clusters, " + m_modLabel_PixLayerIBL2D3D[i1]), (atext_Q + atext_nclu), false); - sc = clusterExpert.regHist(m_3cluster_Q_mod[i] = TH1F_LW::create(hname.c_str(), htitles.c_str(), nbins_Q, min_Q, max_Q)); - - hname = makeHistname(("BigHit_Cluster_Q_" + m_modLabel_PixLayerIBL2D3D[i1]), false); - htitles = makeHisttitle(("Charge for cluster size > 3, " + m_modLabel_PixLayerIBL2D3D[i1]), (atext_Q + atext_nclu), false); - sc = clusterExpert.regHist(m_bigcluster_Q_mod[i] = TH1F_LW::create(hname.c_str(), htitles.c_str(), nbins_Q, min_Q, max_Q)); - hname = makeHistname(("Cluster_LVL1A_" + m_modLabel_PixLayerIBL2D3D[i1]), true); if (i != PixLayer::kIBL) { htitles = makeHisttitle(("Cluster Level 1 Accept with ToT > 15, " + m_modLabel_PixLayerIBL2D3D[i1]), (atext_lvl1 + atext_nclu), false); @@ -188,16 +144,6 @@ StatusCode PixelMainMon::bookClustersMon(void) { hname = makeHistname(("Cluster_groupsize_vs_eta_" + m_modLabel_PixLayerIBL2D3D[i1]), false); htitles = makeHisttitle(("Number of pixels per cluster vs eta, " + m_modLabel_PixLayerIBL2D3D[i1]), (atext_eta + atext_npix), false); sc = clusterExpert.regHist(m_clussize_vs_eta_mod[i] = TProfile_LW::create(hname.c_str(), htitles.c_str(), nbins_eta, min_eta, max_eta)); - - if (m_doESD && !m_doOnline) { - hname = makeHistname(("ClusterToT_vs_eta_" + m_modLabel_PixLayerIBL2D3D[i1]), false); - htitles = makeHisttitle(("Cluster ToT vs eta, " + m_modLabel_PixLayerIBL2D3D[i1]), (atext_eta + atext_tot), false); - sc = clusterExpert.regHist(m_clusToT_vs_eta_mod[i] = TH2F_LW::create(hname.c_str(), htitles.c_str(), nbins_eta, min_eta, max_eta, nbins_tot, min_tot, max_tot)); - - hname = makeHistname(("ClusterToT_vs_groupsize_" + m_modLabel_PixLayerIBL2D3D[i1]), false); - htitles = makeHisttitle(("Cluster ToT vs groupsize, " + m_modLabel_PixLayerIBL2D3D[i1]), (atext_tot + atext_npix), false); - sc = clusterExpert.regHist(m_ToT_vs_clussize_mod[i] = TH2F_LW::create(hname.c_str(), htitles.c_str(), nbins_tot, min_tot, max_tot, nbins_npix, min_npix, max_npix)); - } } for (int i = 0; i < PixLayerIBL2D3DDBM::COUNT; i++) { @@ -323,27 +269,6 @@ StatusCode PixelMainMon::bookClustersMon(void) { tmp2 = "Average cluster ToT map"; m_clusToT_map = std::make_unique<PixelMon2DProfilesLW>(PixelMon2DProfilesLW(tmp.c_str(), (tmp2 + m_histTitleExt).c_str(), PixMon::HistConf::kPixIBL2D3D, true)); sc = m_clusToT_map->regHist(clusterExpert); - - hname = makeHistname("Cluster_Occupancy_FEMap_mon", true); - tmp2 = "Cluster Occ."; - sc = clusterExpert.regHist(m_cluster_occupancy_FE_B0_mon = TH2F_LW::create((hname + "_B0").c_str(), (tmp2 + ", B0 " + ";eta index of FE;phi index of FE").c_str(), 13 * 8, -48.5, -48.5 + (13 * 8), 22 * 2, -0.5, -0.5 + (22 * 2))); - - // For FE map (temporary) - const int nmod = 13; - const char* mod[nmod] = {"M6C", "M5C", "M4C", "M3C", "M2C", "M1C", "M0", "M1A", "M2A", "M3A", "M4A", "M5A", "M6A"}; - const int nstave0 = 22; - const char* stave0[nstave0] = {"B11_S2", "B01_S1", "B01_S2", "B02_S1", "B02_S2", - "B03_S1", "B03_S2", "B04_S1", "B04_S2", "B05_S1", - "B05_S2", "B06_S1", "B06_S2", "B07_S1", "B07_S2", - "B08_S1", "B08_S2", "B09_S1", "B09_S2", "B10_S1", "B10_S2", "B11_S1"}; - for (unsigned int x = 0; x < m_cluster_occupancy_FE_B0_mon->GetNbinsX(); x++) { - if (x % 8 == 0) m_cluster_occupancy_FE_B0_mon->GetXaxis()->SetBinLabel(x + 1, mod[x / 8]); - } - for (unsigned int y = 0; y < m_cluster_occupancy_FE_B0_mon->GetNbinsY(); y++) { - if (y % 2 == 0) m_cluster_occupancy_FE_B0_mon->GetYaxis()->SetBinLabel(y + 1, stave0[y / 2]); - } - m_cluster_occupancy_FE_B0_mon->GetYaxis()->SetLabelSize(0.03); - m_cluster_occupancy_FE_B0_mon->SetOption("colz"); } } @@ -361,9 +286,6 @@ StatusCode PixelMainMon::bookClustersMon(void) { sc = m_cluster_ToT_mod->regHist(this, (path + "/Modules_ClusToT").c_str(), run); } if (m_doOnline) { - sc = clusterShift.regHist(m_cluster_occupancy_time1 = new TProfile("cluster_occupancy_time_10min", ("Module hit occupancy as function of time over 10 minutes. 6 sec/bin" + m_histTitleExt + ";time;module occupancy").c_str(), 99, 0., 1., "i")); - sc = clusterShift.regHist(m_cluster_occupancy_time2 = new TProfile("cluster_occupancy_time_1hr", ("Module hit occupancy as function of time over 1 hour. 36 sec/bin" + m_histTitleExt + ";time;module occupancy").c_str(), 99, 0., 1., "i")); - sc = clusterShift.regHist(m_cluster_occupancy_time3 = new TProfile("cluster_occupancy_time_6hr", ("Module hit occupancy as function of time over 6 hours. 3.6 min/bin" + m_histTitleExt + ";time;module occupancy").c_str(), 99, 0., 1., "i")); if (m_doOnTrack) { if (m_doIBL) { hname = makeHistname("Cluster_Occupancy_PP0_IBLA", false); @@ -498,8 +420,6 @@ StatusCode PixelMainMon::fillClustersMon(void) { int nclusters = 0; int nclusters_mod[PixLayer::COUNT] = {0}; - int nlargeclusters = 0; - int nverylargeclusters = 0; int nclusters_all = 0; int nclusters_ontrack = 0; @@ -571,9 +491,6 @@ StatusCode PixelMainMon::fillClustersMon(void) { npixHitsInCluster = (int)(m_cluster_groupsize_mod[pixlayeribl2d3ddbm]->getXMax() - 0.5); } - int fephi = 0; - int feeta = 0; - if (pixlayer != 99) nclusters_all++; // count all (no DBM) clusters on and off track if (isOnTrack(clusID, true)) { @@ -626,15 +543,6 @@ StatusCode PixelMainMon::fillClustersMon(void) { } if (m_cluster_ToT_mod) m_cluster_ToT_mod->fill(cluster.totalToT(), clusID, m_pixelid); - if (cluster.rdoList().size() == 1 && m_1cluster_ToT_mod[pixlayer]) m_1cluster_ToT_mod[pixlayer]->Fill(cluster.totalToT()); - if (cluster.rdoList().size() == 2 && m_2cluster_ToT_mod[pixlayer]) m_2cluster_ToT_mod[pixlayer]->Fill(cluster.totalToT()); - if (cluster.rdoList().size() == 3 && m_3cluster_ToT_mod[pixlayer]) m_3cluster_ToT_mod[pixlayer]->Fill(cluster.totalToT()); - if (cluster.rdoList().size() > 3 && m_bigcluster_ToT_mod[pixlayer]) m_bigcluster_ToT_mod[pixlayer]->Fill(cluster.totalToT()); - - if (cluster.rdoList().size() == 1 && m_1cluster_Q_mod[pixlayer]) m_1cluster_Q_mod[pixlayer]->Fill(cluster.totalCharge()); - if (cluster.rdoList().size() == 2 && m_2cluster_Q_mod[pixlayer]) m_2cluster_Q_mod[pixlayer]->Fill(cluster.totalCharge()); - if (cluster.rdoList().size() == 3 && m_3cluster_Q_mod[pixlayer]) m_3cluster_Q_mod[pixlayer]->Fill(cluster.totalCharge()); - if (cluster.rdoList().size() > 3 && m_bigcluster_Q_mod[pixlayer]) m_bigcluster_Q_mod[pixlayer]->Fill(cluster.totalCharge()); // Fill the number of pixel hits in a cluster if (m_cluster_groupsize) m_cluster_groupsize->Fill(npixHitsInClusterRaw); @@ -672,14 +580,10 @@ StatusCode PixelMainMon::fillClustersMon(void) { if (m_clusToT_map) m_clusToT_map->fill(clusID, m_pixelid, cluster.totalToT()); if (m_cluster_size_mod) m_cluster_size_mod->fill(cluster.rdoList().size(), clusID, m_pixelid); - if (m_clusToT_vs_eta_mod[pixlayer]) m_clusToT_vs_eta_mod[pixlayer]->Fill(m_pixelid->eta_module(clusID), cluster.totalToT()); - if (m_ToT_vs_clussize_mod[pixlayer]) m_ToT_vs_clussize_mod[pixlayer]->Fill(cluster.totalToT(), cluster.rdoList().size()); if (m_clussize_vs_eta_mod[pixlayer]) m_clussize_vs_eta_mod[pixlayer]->Fill(1.0 * m_pixelid->eta_module(clusID), cluster.rdoList().size()); nclusters++; nclusters_mod[pixlayer]++; - if (cluster.rdoList().size() > 10) nlargeclusters++; - if (cluster.rdoList().size() > 50) nverylargeclusters++; if (m_doModules && m_doOnTrack) { if (m_pixelid->barrel_ec(clusID) == 2) m_ClusPerEventArray_disksA[m_pixelid->phi_module(clusID)][m_pixelid->layer_disk(clusID)]++; @@ -697,16 +601,6 @@ StatusCode PixelMainMon::fillClustersMon(void) { if (m_cluster_ToT_LB) m_cluster_ToT_LB->Fill(cluster.totalToT()); if (m_cluster_ToT_mod_LB) m_cluster_ToT_mod_LB->fill(cluster.totalToT(), clusID, m_pixelid); } - - // Quick Status - fephi = 0; - feeta = 0; - if (pixlayer == PixLayer::kB0 && getFEID(pixlayer, m_pixelid->phi_index(clusID), m_pixelid->eta_index(clusID), fephi, feeta)) { - if (m_doOnline) { - if (m_cluster_occupancy_FE_B0_mon) m_cluster_occupancy_FE_B0_mon->Fill((8.0 * m_pixelid->eta_module(clusID)) + (1.0 * feeta), (2.0 * m_pixelid->phi_module(clusID)) + (1.0 * fephi)); - if (m_doRefresh5min && m_cluster_occupancy_FE_B0_mon) m_cluster_occupancy_FE_B0_mon->Reset(); - } - } } // PixelClusterContainer loop } // end of cluster collections loop @@ -747,10 +641,6 @@ StatusCode PixelMainMon::fillClustersMon(void) { m_clusters_per_track_per_lumi_mod[i]->Fill(m_manager->lumiBlockNumber(), (1.0 * nclusters_mod[i]) / (1.0 * m_ntracksPerEvent)); } } - - if (m_largeclusters_per_lumi) m_largeclusters_per_lumi->Fill(m_manager->lumiBlockNumber(), nlargeclusters); - if (m_verylargeclusters_per_lumi) m_verylargeclusters_per_lumi->Fill(m_manager->lumiBlockNumber(), nverylargeclusters); - if ((nclusters >= 1000) && m_highNclusters_per_lumi) m_highNclusters_per_lumi->Fill(m_manager->lumiBlockNumber()); if (m_doOnTrack && m_clustersOnOffTrack_per_lumi && nclusters_all > 0) { m_clustersOnOffTrack_per_lumi->Fill(m_manager->lumiBlockNumber(), (float)nclusters_ontrack / nclusters_all); } @@ -762,10 +652,6 @@ StatusCode PixelMainMon::fillClustersMon(void) { for (int i = 0; i < PixLayer::COUNT - 1 + (int)(m_doIBL); i++) { if (m_num_clusters_mod[i]) m_num_clusters_mod[i]->Fill(nclusters_mod[i]); } - - if (m_cluster_occupancy_time1 && m_cluster_occupancy_time2 && m_cluster_occupancy_time3) { - fillTimeHisto(double(nclusters / (1744.0 + 280 * m_doIBL)), m_cluster_occupancy_time1, m_cluster_occupancy_time2, m_cluster_occupancy_time3, 10., 60., 360.); - } if (m_doLumiBlock && m_num_clusters_LB) m_num_clusters_LB->Fill(nclusters); if (m_doModules && m_doOnTrack) { diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Errors.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Errors.cxx index 0a3ac9b77902360c4a4973cbeb3f2b9d161ee7b7..676cebbc62e4128cc7cc8b7843e0d0f47e693bfa 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Errors.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Errors.cxx @@ -210,17 +210,6 @@ StatusCode PixelMainMon::bookRODErrorMon(void) { } } - if (m_doOnline) { - const std::string tmp = "errors_over_time"; - const std::string tmp2 = "Number of Errors as function of time over"; - int nbin = 99; - float min = 0.0; - float max = 1.0; - sc = rodHistos.regHist(m_error_time1 = new TProfile((tmp + "_10min").c_str(), (tmp2 + " 10 minutes. 6 sec/bin" + m_histTitleExt + ";time;module occupancy").c_str(), nbin, min, max, "i")); - sc = rodHistos.regHist(m_error_time2 = new TProfile((tmp + "_1hr").c_str(), (tmp2 + " 1 hour. 36 sec/bin" + m_histTitleExt + ";time;module occupancy").c_str(), nbin, min, max, "i")); - sc = rodHistos.regHist(m_error_time3 = new TProfile((tmp + "_6hr").c_str(), (tmp2 + " 6 hours. 3.6 min/bin" + m_histTitleExt + ";time;module occupancy").c_str(), nbin, min, max, "i")); - } - if (m_doModules) { m_errors = std::make_unique<PixelMonModules1D>(PixelMonModules1D("errors", ("Errors in module:ErrorType" + m_histTitleExt + ";Number of Errors").c_str(), 7, 0.5, 7.5)); sc = m_errors->regHist(this, (path + "/ModulesErrors").c_str(), run); @@ -557,9 +546,6 @@ StatusCode PixelMainMon::fillRODErrorMon(void) { for (int i = 0; i < PixLayerIBL2D3D::COUNT; i++) { total_errors += num_errors[i]; } - if (m_error_time1 && m_error_time2 && m_error_time3) { - fillTimeHisto(total_errors, m_error_time1, m_error_time2, m_error_time3, 10., 60., 360.); - } for (int i = 0; i < PixLayer::COUNT - 1; i++) { for (int j = 0; j < kNumErrorStates; j++) { diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/HelperFunctions.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/HelperFunctions.cxx index 5f85c8d38decfd29a3fedb78c3190b41494c5589..bcb8d33dd49540f0c16f86e544969452d3cd8793 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/HelperFunctions.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/HelperFunctions.cxx @@ -112,118 +112,6 @@ void PixelMainMon::th1FillMonitoring(TH1F_LW* mon, TH1F_LW* tmp) { tmp->Reset(); } -void PixelMainMon::fillTimeHisto(double value, TProfile* one = 0, TProfile* two = 0, TProfile* three = 0, double time1 = 10., double time2 = 60., double time3 = 360.) { - // This function fills time profile histograms - time_t rawtime; - struct tm* timeinfo; - char buffer1[14]; - - time_t endtime; - struct tm* endtimeinfo; - char buffer2[14]; - - time(&rawtime); - timeinfo = localtime(&rawtime); - strftime(buffer1, 14, "%I:%M:%S", timeinfo); - char* buffer = buffer1; - - // Make m_startTime a global variable - double lagtime = difftime(rawtime, m_startTime); // how long since we started the run; - - if (one) { - int binNo = one->GetNbinsX(); - double histoTime = time1 * 60.; // number of seconds this histogram represents; - double timeInterval = histoTime / binNo; // number of seconds per bin - int intervalNumber = int(lagtime / timeInterval); // what interval we are in. Keep this stored as number of Entries; - int bins2shift = intervalNumber - int(one->GetEntries()); // how many bins to shift the bin contents; - if (bins2shift) { // shift bins, skip this if we are in the same bin - for (int iii = 0; iii <= binNo - bins2shift; iii++) { // loop over all bins that need moved; - one->SetBinEntries(iii, one->GetBinEntries(iii + bins2shift)); // move bins to right - one->SetBinContent(iii, one->GetBinContent(iii + bins2shift) * one->GetBinEntries(iii + bins2shift)); // move bins to right - } - for (int jjj = binNo; jjj > binNo - bins2shift; jjj--) { - one->SetBinContent(jjj, 0.0); - one->SetBinEntries(jjj, 0.0); - } - one->GetXaxis()->SetBinLabel(binNo, buffer); // write the timestamp on the first and last bin - endtime = time_t(rawtime - histoTime); - endtimeinfo = localtime(&endtime); - strftime(buffer2, 14, "%I:%M:%S", endtimeinfo); - char* buffer3 = buffer2; - one->GetXaxis()->SetBinLabel(1, buffer3); // write the timestamp on the first and last bin - one->LabelsOption("h", "X"); - } - double binEntries = one->GetBinEntries(binNo); - double binContent = one->GetBinContent(binNo); - one->SetBinEntries(binNo, binEntries + 1); - one->SetBinContent(binNo, binContent * binEntries + value); - - one->SetEntries(intervalNumber); // store the interval number in a convienent place - } - - if (two) { - int binNo = two->GetNbinsX(); - double histoTime = time2 * 60.; // number of seconds this histogram represents; - double timeInterval = histoTime / binNo; // number of seconds per bin - int intervalNumber = int(lagtime / timeInterval); // what interval we are in. Keep this stored as number of Entries; - int bins2shift = intervalNumber - int(two->GetEntries()); // how many bins to shift the bin contents; - if (bins2shift) { // shift bins, skip this if we are in the same bin - for (int iii = 0; iii <= binNo - bins2shift; iii++) { // loop over all bins that need moved; - two->SetBinEntries(iii, two->GetBinEntries(iii + bins2shift)); // move bins to right - two->SetBinContent(iii, two->GetBinContent(iii + bins2shift) * two->GetBinEntries(iii + bins2shift)); // move bins to right - } - for (int jjj = binNo; jjj > binNo - bins2shift; jjj--) { - two->SetBinContent(jjj, 0.0); - two->SetBinEntries(jjj, 0.0); - } - two->GetXaxis()->SetBinLabel(binNo, buffer); // write the timestamp on the first and last bin - endtime = rawtime - time2 * 60; - endtimeinfo = localtime(&endtime); - strftime(buffer2, 14, "%I:%M:%S", endtimeinfo); - char* buffer3 = buffer2; - two->GetXaxis()->SetBinLabel(1, buffer3); // write the timestamp on the first and last bin - two->LabelsOption("h", "X"); - } - double binEntries = two->GetBinEntries(binNo); - double binContent = two->GetBinContent(binNo); - two->SetBinEntries(binNo, binEntries + 1); - two->SetBinContent(binNo, binContent * binEntries + value); - - two->SetEntries(intervalNumber); // store the interval number in a convienent place - } - - if (three) { - int binNo = three->GetNbinsX(); - double histoTime = time3 * 60.; // number of seconds this histogram represents; - double timeInterval = histoTime / binNo; // number of seconds per bin - int intervalNumber = int(lagtime / timeInterval); // what interval we are in. Keep this stored as number of Entries; - int bins2shift = intervalNumber - int(three->GetEntries()); // how many bins to shift the bin contents; - if (bins2shift) { // shift bins, skip this if we are in the same bin - for (int iii = 0; iii <= binNo - bins2shift; iii++) { // loop over all bins that need moved; - three->SetBinEntries(iii, three->GetBinEntries(iii + bins2shift)); // move bins to right - three->SetBinContent(iii, three->GetBinContent(iii + bins2shift) * three->GetBinEntries(iii + bins2shift)); // move bins to right - } - for (int jjj = binNo; jjj > binNo - bins2shift; jjj--) { - three->SetBinContent(jjj, 0.0); - three->SetBinEntries(jjj, 0.0); - } - three->GetXaxis()->SetBinLabel(binNo, buffer); // write the timestamp on the first and last bin - endtime = rawtime - time3 * 60; - endtimeinfo = localtime(&endtime); - strftime(buffer2, 14, "%I:%M:%S", endtimeinfo); - char* buffer3 = buffer2; - three->GetXaxis()->SetBinLabel(1, buffer3); // write the timestamp on the first and last bin - three->LabelsOption("h", "X"); - } - double binEntries = three->GetBinEntries(binNo); - double binContent = three->GetBinContent(binNo); - three->SetBinEntries(binNo, binEntries + 1); - three->SetBinContent(binNo, binContent * binEntries + value); - - three->SetEntries(intervalNumber); // store the interval number in a convienent place - } -} - void PixelMainMon::fillSummaryHistos(PixelMon2DMapsLW* occupancy, TH1F_LW* A, TH1F_LW* C, TH1F_LW* IBL, TH1F_LW* B0, TH1F_LW* B1, TH1F_LW* B2) { // if the histos don't exist, dont' fill them if (!(A && C && B0 && B1 && B2 && occupancy)) return; @@ -412,7 +300,7 @@ int PixelMainMon::parseDetailsString(std::string& detailsMod) { int modID[4] = {0, 0, 0, 0}; char* pch; pch = new char[detailsMod.size() + 1]; - strcpy(pch, detailsMod.c_str()); + strncpy(pch, detailsMod.c_str(), detailsMod.size()); const int nmod = 13; const char* mod[nmod] = {"M6C", "M5C", "M4C", "M3C", "M2C", "M1C", "M0", "M1A", "M2A", "M3A", "M4A", "M5A", "M6A"}; const int nstave0 = 22; diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx index 6239d8cf5f2799626861835f38e3e0a0fcc54ff0..60bed2effceef6fd8a1d5c61adfee4f2fb7efeab 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Hits.cxx @@ -94,10 +94,6 @@ StatusCode PixelMainMon::bookHitsMon(void) { htitles = makeHisttitle("Average pixel occupancy per event over all layers", (atext_LB + atext_occ), false); sc = rdoShift.regHist(m_avgocc_per_lumi = TProfile_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, min_LB, max_LB)); - hname = makeHistname("AvgOcc_RatioIBLB0_per_lumi", false); - htitles = makeHisttitle("Average pixel occupancy ratio of IBL/B0 per event per LB", (atext_LB + ";ratio"), false); - sc = rdoShift.regHist(m_avgocc_ratioIBLB0_per_lumi = TProfile_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, min_LB, max_LB)); - for (int i = 0; i < PixLayer::COUNT - 1 + (int)(m_doIBL); i++) { // not include IBL2D and IBL3D hname = makeHistname(("Hits_per_lumi_" + m_modLabel_PixLayerIBL2D3D[i]), false); htitles = makeHisttitle(("Average number of pixel hits per event, " + m_modLabel_PixLayerIBL2D3D[i]), (atext_LB + atext_hit), false); @@ -150,10 +146,6 @@ StatusCode PixelMainMon::bookHitsMon(void) { hname = makeHistname(("ToatlHits_per_BCID_" + m_modLabel_PixLayerIBL2D3D[i]), false); htitles = makeHisttitle(("Total Number of hits per BCID, " + m_modLabel_PixLayerIBL2D3D[i]), (atext_BCID + ";#hits"), false); sc = rdoExpert.regHist(m_totalhits_per_bcid_mod[i] = TH1F_LW::create(hname.c_str(), htitles.c_str(), nbins_BCID, min_BCID, max_BCID)); - - hname = makeHistname(("nLargeEvent_per_lumi_" + m_modLabel_PixLayerIBL2D3D[i]), false); - htitles = makeHisttitle(("Number of large events (hitocc > 0.7#times 10^{-3}), " + m_modLabel_PixLayerIBL2D3D[i]), (atext_LB + atext_nevt), false); - sc = rdoShift.regHist(m_nlargeevt_per_lumi_mod[i] = TH1F_LW::create(hname.c_str(), htitles.c_str(), nbins_LB, min_LB, max_LB)); } for (int i = 0; i < PixLayerIBL2D3DDBM::COUNT; i++) { @@ -176,10 +168,6 @@ StatusCode PixelMainMon::bookHitsMon(void) { } if (m_doOnline) { - sc = rdoShift.regHist(m_occupancy_time1 = new TProfile("occupancy_time_10min", ("Module hit occupancy as function of time over 10 minutes. 6 sec/bin" + m_histTitleExt + ";time;module occupancy").c_str(), 99, 0., 1., "i")); - sc = rdoShift.regHist(m_occupancy_time2 = new TProfile("occupancy_time_1hr", ("Module hit occupancy as function of time over 1 hour. 36 sec/bin" + m_histTitleExt + ";time;module occupancy").c_str(), 99, 0., 1., "i")); - sc = rdoShift.regHist(m_occupancy_time3 = new TProfile("occupancy_time_6hr", ("Module hit occupancy as function of time over 6 hours. 3.6 min/bin" + m_histTitleExt + ";time;module occupancy").c_str(), 99, 0., 1., "i")); - m_hitmap_mon = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("HitMap_Mon", ("Hit map for monitoring" + m_histTitleExt).c_str(), PixMon::HistConf::kPixDBMIBL2D3D)); sc = m_hitmap_mon->regHist(rdoShift); @@ -639,9 +627,6 @@ StatusCode PixelMainMon::fillHitsMon(void) // Called once per event m_occupancy_summary_mod[PixLayer::kB0], m_occupancy_summary_mod[PixLayer::kB1], m_occupancy_summary_mod[PixLayer::kB2]); - if (m_occupancy_time1 && m_occupancy_time2 && m_occupancy_time3) { - fillTimeHisto(double(nhits / (1744.0 + 280 * m_doIBL)), m_occupancy_time1, m_occupancy_time2, m_occupancy_time3, 10., 60., 360.); - } if (m_doRefresh5min) { if (m_occupancy_PP0_ECA) m_occupancy_PP0_ECA->Reset(); if (m_occupancy_PP0_ECC) m_occupancy_PP0_ECC->Reset(); @@ -685,20 +670,18 @@ StatusCode PixelMainMon::fillHitsMon(void) // Called once per event if (m_avgocc_per_lumi_mod[i]) m_avgocc_per_lumi_mod[i]->Fill(m_manager->lumiBlockNumber(), avgocc_mod[i]); if (m_avgocc_per_bcid_mod[i]) m_avgocc_per_bcid_mod[i]->Fill(pix_rod_bcid, avgocc_mod[i]); - if (m_avgocc_active_per_lumi_mod[i]) m_avgocc_active_per_lumi_mod[i]->Fill(m_manager->lumiBlockNumber(), avgocc_active_mod[i]); + if (m_avgocc_active_per_lumi_mod[i]) m_avgocc_active_per_lumi_mod[i]->Fill(m_manager->lumiBlockNumber(), avgocc_active_mod[i]); if (m_maxocc_per_lumi_mod[i]) m_maxocc_per_lumi_mod[i]->Fill(m_manager->lumiBlockNumber(), avgocc_active_mod[i]); + if (m_maxocc_per_bcid_mod[i]) { int bin = m_maxocc_per_bcid_mod[i]->GetXaxis()->FindBin(1.0 * pix_rod_bcid); double content = m_maxocc_per_bcid_mod[i]->GetBinContent(bin); if (avgocc_mod[i] > content) m_maxocc_per_bcid_mod[i]->SetBinContent(bin, avgocc_mod[i]); } if (m_totalhits_per_bcid_mod[i]) m_totalhits_per_bcid_mod[i]->Fill(1.0 * pix_rod_bcid, nhits_mod[i]); - if (avgocc_mod[i] > 0.0007 && m_nlargeevt_per_lumi_mod[i]) m_nlargeevt_per_lumi_mod[i]->Fill(m_lumiBlockNum); } - if (avgocc_mod[PixLayer::kB0] > 0 && m_avgocc_ratioIBLB0_per_lumi) m_avgocc_ratioIBLB0_per_lumi->Fill(m_manager->lumiBlockNumber(), avgocc_mod[PixLayer::kIBL] / avgocc_mod[PixLayer::kB0]); - if (m_Atlas_BCID_hits) m_Atlas_BCID_hits->Fill(pix_rod_bcid, nhits); // Fill the #hit per module per event @@ -831,9 +814,12 @@ StatusCode PixelMainMon::procHitsMon(void) { //m_avgocc_ratio_lastXlb_mod[i]->SetEntries(lastlb); // for testing } } + for (int i = 0; i < PixLayer::COUNT - 1 + (int)(m_doIBL); i++) { - if (m_doIBL) m_avgocc_ratio_lastXlb_mod[i]->Divide(m_avgocc_ratio_lastXlb_mod[PixLayer::kIBL]); - else m_avgocc_ratio_lastXlb_mod[i]->Divide(m_avgocc_ratio_lastXlb_mod[PixLayer::kB0]); + if (m_avgocc_ratio_lastXlb_mod[i]) { + if (m_doIBL && m_avgocc_ratio_lastXlb_mod[PixLayer::kIBL]) m_avgocc_ratio_lastXlb_mod[i]->Divide(m_avgocc_ratio_lastXlb_mod[PixLayer::kIBL]); + else if (m_avgocc_ratio_lastXlb_mod[PixLayer::kB0]) m_avgocc_ratio_lastXlb_mod[i]->Divide(m_avgocc_ratio_lastXlb_mod[PixLayer::kB0]); + } } } diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelDCSMon.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelDCSMon.cxx index b468f9501a92b227832424e17013545cc435d668..590f690877b7632b9ee2417a2d8c578078a96ce5 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelDCSMon.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelDCSMon.cxx @@ -508,7 +508,7 @@ StatusCode PixelMainMon::fillPixelDCSMon(void) { msg(MSG::DEBUG) << "[FillPixelDCSMon]" << endmsg; // loop over DCS directories - const CondAttrListCollection* atrlistcol; + const CondAttrListCollection* atrlistcol = nullptr; const CondAttrListCollection* atrlistcol_temperature; const CondAttrListCollection* atrlistcol_hv; const CondAttrListCollection* atrlistcol_hvcurrent; @@ -543,7 +543,7 @@ StatusCode PixelMainMon::fillPixelDCSMon(void) { sc = detStore()->retrieve(atrlistcol_fsmstatus, *itr); atrlistcol = atrlistcol_fsmstatus; } - if (sc == StatusCode::SUCCESS) { + if (sc == StatusCode::SUCCESS && atrlistcol != nullptr) { for (CondAttrListCollection::const_iterator citr = atrlistcol->begin(); citr != atrlistcol->end(); ++citr) { // the following code dumps the attribute list into a string for printing // to access individual elements by name, use e.g. diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx index 6167d5eff407511e35b80639bb5e09165f3c890f..e0bf53b390cf022c1661b365ef65eca4b44a53d2 100755 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelMainMon.cxx @@ -109,7 +109,6 @@ PixelMainMon::PixelMainMon(const std::string& type, const std::string& name, con declareProperty("doHeavyIonMon", m_doHeavyIonMon = false); declareProperty("doIBL", m_doIBL = false); - declareProperty("doESD", m_doESD = false); declareProperty("DetailsMod1", m_DetailsMod1 = ""); declareProperty("DetailsMod2", m_DetailsMod2 = ""); declareProperty("DetailsMod3", m_DetailsMod3 = ""); @@ -155,21 +154,16 @@ PixelMainMon::PixelMainMon(const std::string& type, const std::string& name, con memset(m_nhits_mod, 0, sizeof(m_nhits_mod)); memset(m_hits_per_lumi_mod, 0, sizeof(m_hits_per_lumi_mod)); memset(m_avgocc_ratio_lastXlb_mod, 0, sizeof(m_avgocc_ratio_lastXlb_mod)); - memset(m_nlargeevt_per_lumi_mod, 0, sizeof(m_nlargeevt_per_lumi_mod)); memset(m_totalhits_per_bcid_mod, 0, sizeof(m_totalhits_per_bcid_mod)); // hit occupancy m_avgocc_per_lumi = 0; - m_avgocc_ratioIBLB0_per_lumi = 0; memset(m_avgocc_per_lumi_mod, 0, sizeof(m_avgocc_per_lumi_mod)); memset(m_modocc_per_lumi, 0, sizeof(m_modocc_per_lumi)); memset(m_avgocc_per_bcid_mod, 0, sizeof(m_avgocc_per_bcid_mod)); memset(m_avgocc_active_per_lumi_mod, 0, sizeof(m_avgocc_active_per_lumi_mod)); memset(m_maxocc_per_lumi_mod, 0, sizeof(m_maxocc_per_lumi_mod)); memset(m_maxocc_per_bcid_mod, 0, sizeof(m_maxocc_per_bcid_mod)); - m_occupancy_time1 = 0; - m_occupancy_time2 = 0; - m_occupancy_time3 = 0; memset(m_occupancy_summary_mod, 0, sizeof(m_occupancy_summary_mod)); m_occupancy_PP0_ECA = 0; m_occupancy_PP0_ECC = 0; @@ -234,14 +228,6 @@ PixelMainMon::PixelMainMon(const std::string& type, const std::string& name, con memset(m_hiteff_incl_mod, 0, sizeof(m_hiteff_incl_mod)); memset(m_hiteff_lastXlb_mod, 0, sizeof(m_hiteff_lastXlb_mod)); - // Lorentz Angle - m_LorentzAngle_IBL = 0; - m_LorentzAngle_IBL2D = 0; - m_LorentzAngle_IBL3D = 0; - m_LorentzAngle_B0 = 0; - m_LorentzAngle_B1 = 0; - m_LorentzAngle_B2 = 0; - // cluster size memset(m_clusize_ontrack_mod, 0, sizeof(m_clusize_ontrack_mod)); memset(m_clusize_offtrack_mod, 0, sizeof(m_clusize_offtrack_mod)); @@ -253,24 +239,13 @@ PixelMainMon::PixelMainMon(const std::string& type, const std::string& name, con memset(m_clusters_row_width_per_lumi_mod, 0, sizeof(m_clusters_row_width_per_lumi_mod)); memset(m_clusters_col_width_per_bcid_mod, 0, sizeof(m_clusters_col_width_per_bcid_mod)); memset(m_clusters_row_width_per_bcid_mod, 0, sizeof(m_clusters_row_width_per_bcid_mod)); - m_largeclusters_per_lumi = 0; - m_verylargeclusters_per_lumi = 0; m_totalclusters_per_lumi = 0; memset(m_totalclusters_per_lumi_mod, 0, sizeof(m_totalclusters_per_lumi_mod)); memset(m_totalclusters_per_bcid_mod, 0, sizeof(m_totalclusters_per_bcid_mod)); - m_highNclusters_per_lumi = 0; memset(m_cluster_ToT1d_mod, 0, sizeof(m_cluster_ToT1d_mod)); memset(m_cluster_ToT1d_corr, 0, sizeof(m_cluster_ToT1d_corr)); - memset(m_1cluster_ToT_mod, 0, sizeof(m_1cluster_ToT_mod)); - memset(m_2cluster_ToT_mod, 0, sizeof(m_2cluster_ToT_mod)); - memset(m_3cluster_ToT_mod, 0, sizeof(m_3cluster_ToT_mod)); - memset(m_bigcluster_ToT_mod, 0, sizeof(m_bigcluster_ToT_mod)); memset(m_cluster_Q_mod, 0, sizeof(m_cluster_Q_mod)); memset(m_cluster_Q_corr, 0, sizeof(m_cluster_Q_corr)); - memset(m_1cluster_Q_mod, 0, sizeof(m_1cluster_Q_mod)); - memset(m_2cluster_Q_mod, 0, sizeof(m_2cluster_Q_mod)); - memset(m_3cluster_Q_mod, 0, sizeof(m_3cluster_Q_mod)); - memset(m_bigcluster_Q_mod, 0, sizeof(m_bigcluster_Q_mod)); m_cluster_groupsize = 0; m_cluster_col_width = 0; m_cluster_row_width = 0; @@ -280,13 +255,7 @@ PixelMainMon::PixelMainMon(const std::string& type, const std::string& name, con m_cluster_LVL1A = 0; memset(m_cluster_LVL1A1d_mod, 0, sizeof(m_cluster_LVL1A1d_mod)); m_clusterSize_eta = 0; - memset(m_clusToT_vs_eta_mod, 0, sizeof(m_clusToT_vs_eta_mod)); - memset(m_ToT_vs_clussize_mod, 0, sizeof(m_ToT_vs_clussize_mod)); memset(m_clussize_vs_eta_mod, 0, sizeof(m_clussize_vs_eta_mod)); - m_cluster_occupancy_FE_B0_mon = 0; - m_cluster_occupancy_time1 = 0; - m_cluster_occupancy_time2 = 0; - m_cluster_occupancy_time3 = 0; m_num_clusters = 0; memset(m_clusters_per_track_per_lumi_mod, 0, sizeof(m_clusters_per_track_per_lumi_mod)); memset(m_num_clusters_mod, 0, sizeof(m_num_clusters_mod)); @@ -307,9 +276,6 @@ PixelMainMon::PixelMainMon(const std::string& type, const std::string& name, con m_errhist_syncerr_LB_pix = 0; memset(m_errhist_errcat_LB, 0, sizeof(m_errhist_errcat_LB)); memset(m_errhist_errtype_LB, 0, sizeof(m_errhist_errtype_LB)); - m_error_time1 = 0; - m_error_time2 = 0; - m_error_time3 = 0; memset(m_errhist_expert_LB, 0, sizeof(m_errhist_expert_LB)); memset(m_errhist_expert_IBL_LB, 0, sizeof(m_errhist_expert_IBL_LB)); memset(m_errhist_per_bit_LB, 0, sizeof(m_errhist_per_bit_LB)); @@ -621,7 +587,6 @@ StatusCode PixelMainMon::bookHistograms() { } if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "[PixelMonitoring] flags in bookHisto" << endmsg; - if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "m_doESD " << m_doESD << endmsg; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "m_doRDO " << m_doRDO << endmsg; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "m_doRODError " << m_doRODError << endmsg; if (msgLvl(MSG::DEBUG)) msg(MSG::DEBUG) << "m_doSpacePoint" << m_doSpacePoint << endmsg; diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx index 5e1c4fdaafcb9393eb2227cf2a6c6f4f754e3ba9..cff0aa316759b1f764d3b7c4622dddafda0d2fba 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/Track.cxx @@ -70,32 +70,6 @@ StatusCode PixelMainMon::bookTrackMon(void) { sc = trackHistos.regHist(m_track_chi2 = TH1F_LW::create("Track_chi2", ("chi2 of rec. track" + m_histTitleExt + ";#chi^{2}/DoF;#tracks").c_str(), 50, -0., 10.)); sc = trackHistos.regHist(m_tracksPerEvt_per_lumi = TProfile_LW::create("tracksPerEvt_per_lumi", ("Number of tracks per event per LB" + m_histTitleExt + ";lumi block;tracks/event").c_str(), nbins_LB, min_LB, max_LB)); - hname = makeHistname("LorentzAngle_IBL", false); - htitles = makeHisttitle("Lorentz angle IBL", ";#phi of track incidence [rad];phi module index;cluster row (phi) width [pixels]", false); - sc = trackHistos.regHist(m_LorentzAngle_IBL = TProfile2D_LW::create(hname.c_str(), htitles.c_str(), 100, -0.4, 0.6, 14, -0.5, 13.5)); - hname = makeHistname("LorentzAngle_IBL2D", false); - htitles = makeHisttitle("Lorentz angle IBL2D", ";#phi of track incidence [rad];phi module index;cluster row (phi) width [pixels]", false); - sc = trackHistos.regHist(m_LorentzAngle_IBL2D = TProfile2D_LW::create(hname.c_str(), htitles.c_str(), 100, -0.4, 0.6, 14, -0.5, 13.5)); - hname = makeHistname("LorentzAngle_IBL3D", false); - htitles = makeHisttitle("Lorentz angle IBL3D", ";#phi of track incidence [rad];phi module index;cluster row (phi) width [pixels]", false); - sc = trackHistos.regHist(m_LorentzAngle_IBL3D = TProfile2D_LW::create(hname.c_str(), htitles.c_str(), 100, -0.4, 0.6, 14, -0.5, 13.5)); - hname = makeHistname("LorentzAngle_B0", false); - htitles = makeHisttitle("Lorentz angle B0", ";#phi of track incidence [rad];phi module index;cluster row (phi) width [pixels]", false); - sc = trackHistos.regHist(m_LorentzAngle_B0 = TProfile2D_LW::create(hname.c_str(), htitles.c_str(), 100, -0.4, 0.6, 22, -0.5, 21.5)); - hname = makeHistname("LorentzAngle_B1", false); - htitles = makeHisttitle("Lorentz angle B1", ";#phi of track incidence [rad];phi module index;cluster row (phi) width [pixels]", false); - sc = trackHistos.regHist(m_LorentzAngle_B1 = TProfile2D_LW::create(hname.c_str(), htitles.c_str(), 100, -0.4, 0.6, 38, -0.5, 37.5)); - hname = makeHistname("LorentzAngle_B2", false); - htitles = makeHisttitle("Lorentz angle B2", ";#phi of track incidence [rad];phi module index;cluster row (phi) width [pixels]", false); - sc = trackHistos.regHist(m_LorentzAngle_B2 = TProfile2D_LW::create(hname.c_str(), htitles.c_str(), 100, -0.4, 0.6, 52, -0.5, 51.5)); - - if (m_LorentzAngle_IBL) m_LorentzAngle_IBL->SetOption("colz"); - if (m_LorentzAngle_IBL2D) m_LorentzAngle_IBL2D->SetOption("colz"); - if (m_LorentzAngle_IBL3D) m_LorentzAngle_IBL3D->SetOption("colz"); - if (m_LorentzAngle_B0) m_LorentzAngle_B0->SetOption("colz"); - if (m_LorentzAngle_B1) m_LorentzAngle_B1->SetOption("colz"); - if (m_LorentzAngle_B2) m_LorentzAngle_B2->SetOption("colz"); - if (m_do2DMaps && !m_doOnline) { m_tsos_hitmap = std::make_unique<PixelMon2DMapsLW>(PixelMon2DMapsLW("TSOS_Measurement", ("TSOS of type Measurement" + m_histTitleExt), PixMon::HistConf::kPixDBMIBL2D3D, true)); sc = m_tsos_hitmap->regHist(trackHistos); @@ -135,6 +109,7 @@ StatusCode PixelMainMon::bookTrackMon(void) { hname = makeHistname("NPixhits_per_track_last100lb", false); htitles = makeHisttitle("Number of pixhits per track last 100 LB", ";last 100 lumi blocks;number of hits", false); sc = trackHistos.regHist(m_npixhits_per_track_lastXlb = new TH2F(hname.c_str(), htitles.c_str(), 100, 0.5, 100.5, 10, -0.5, 9.5)); + if (m_npixhits_per_track_lastXlb) m_npixhits_per_track_lastXlb->SetOption("colz"); } if (sc.isFailure()) ATH_MSG_WARNING("Problems with booking Track histograms"); @@ -180,7 +155,6 @@ StatusCode PixelMainMon::fillTrackMon(void) { } int nPixelHits = 0; bool passJOTrkTightCut = m_trackSelTool->accept(*track0); - bool passTightCut = (passJOTrkTightCut && npixholes == 0); // lorentz angle bool pass1hole1GeVptTightCut = (passJOTrkTightCut && (measPerigee->pT() / 1000.0 > 1.0)); // misshit ratios bool pass1hole5GeVptTightCut = (passJOTrkTightCut && (measPerigee->pT() / 1000.0 > 5.0)); // eff vs lumi @@ -249,21 +223,6 @@ StatusCode PixelMainMon::fillTrackMon(void) { nPixelHits++; //add another pixel hit - bool passClusterSelection = false; - float npixHitsInCluster = 0; - float rowWidthOfCluster = 0; - const InDet::PixelCluster *pixelCluster = dynamic_cast<const InDet::PixelCluster *>(RawDataClus); - if (pixelCluster) { - if (!RawDataClus->gangedPixel() && // not include ganged-pixel - !pixelCluster->isFake() && // not fake - ((pixlayer == PixLayer::kIBL && fabs(clus->localParameters()[Trk::locX]) < 8.3) || (pixlayer != PixLayer::kIBL && fabs(clus->localParameters()[Trk::locX]) < 8.1)) && - ((pixlayeribl2d3d == PixLayerIBL2D3D::kIBL2D && fabs(clus->localParameters()[Trk::locY]) < 19.7) || (pixlayeribl2d3d == PixLayerIBL2D3D::kIBL3D && fabs(clus->localParameters()[Trk::locY]) < 9.5) || (pixlayer != PixLayer::kIBL && fabs(clus->localParameters()[Trk::locY]) < 28.7))) { - passClusterSelection = true; - } - npixHitsInCluster = pixelCluster->rdoList().size(); - rowWidthOfCluster = pixelCluster->width().colRow().x(); - } - const Trk::AtaPlane *trackAtPlane = dynamic_cast<const Trk::AtaPlane *>(trkParameters); if (trackAtPlane) { const Amg::Vector2D localpos = trackAtPlane->localPosition(); @@ -286,19 +245,8 @@ StatusCode PixelMainMon::fillTrackMon(void) { if (m_track_pull_eta) m_track_pull_eta->Fill(pull); Amg::Vector3D mynormal = side->normal(); - Amg::Vector3D myphiax = side->phiAxis(); Amg::Vector3D mytrack = trackAtPlane->momentum(); - double trkphicomp = mytrack.dot(myphiax); double trknormcomp = mytrack.dot(mynormal); - double phiIncident = atan2(trkphicomp, trknormcomp); - if (npixHitsInCluster > 0 && passTightCut && passClusterSelection) { - if (pixlayer == PixLayer::kIBL && m_LorentzAngle_IBL) m_LorentzAngle_IBL->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0 * rowWidthOfCluster); - if (pixlayeribl2d3d == PixLayerIBL2D3D::kIBL2D && m_LorentzAngle_IBL2D) m_LorentzAngle_IBL2D->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0 * rowWidthOfCluster); - if (pixlayeribl2d3d == PixLayerIBL2D3D::kIBL3D && m_LorentzAngle_IBL3D) m_LorentzAngle_IBL3D->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0 * rowWidthOfCluster); - if (pixlayer == PixLayer::kB0 && m_LorentzAngle_B0) m_LorentzAngle_B0->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0 * rowWidthOfCluster); - if (pixlayer == PixLayer::kB1 && m_LorentzAngle_B1) m_LorentzAngle_B1->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0 * rowWidthOfCluster); - if (pixlayer == PixLayer::kB2 && m_LorentzAngle_B2) m_LorentzAngle_B2->Fill(phiIncident, m_pixelid->phi_module(surfaceID), 1.0 * rowWidthOfCluster); - } // Fill containers, which hold id's of hits and clusters on track _and_ incident angle information for later normalization double mytrack_mag = mytrack.mag(); @@ -366,6 +314,8 @@ StatusCode PixelMainMon::procTrackMon(void) { bing--; } } + m_hiteff_lastXlb_mod[i]->SetMinimum(0.8); + m_hiteff_lastXlb_mod[i]->SetMaximum(1.01); m_hiteff_lastXlb_mod[i]->SetEntries(entries); //m_hiteff_lastXlb_mod[i]->SetEntries(lastlb); // for testing } @@ -394,8 +344,10 @@ StatusCode PixelMainMon::procTrackMon(void) { } if (m_doOffline) { for (int i = 0; i < PixLayer::COUNT - 1 + (int)(m_doIBL); i++) { - if (m_hiteff_incl_mod[i]) m_hiteff_incl_mod[i]->SetMinimum(0.8); - if (m_hiteff_incl_mod[i]) m_hiteff_incl_mod[i]->SetMaximum(1.01); + if (m_hiteff_incl_mod[i]) { + m_hiteff_incl_mod[i]->SetMinimum(0.8); + m_hiteff_incl_mod[i]->SetMaximum(1.01); + } } } return StatusCode::SUCCESS;