diff --git a/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py b/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py index 5e12c1b905164a80d25333378cb19d2b34f59a0c..c339889ee7f37952ee52d336dbebe350aaa7e042 100644 --- a/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py +++ b/InnerDetector/InDetExample/InDetRecExample/share/InDetMonitoringPixel.py @@ -27,7 +27,7 @@ kwargsHitMonAlg = { 'doOnline' : True if athenaCommonFlags.isOnline() els 'doLowOccupancy' : False, #Turn on/off histograms with binning for cosmics/single beam 'doHighOccupancy' : True, #Turn on/off histograms with binning for collisions 'doHeavyIonMon' : InDetFlags.doHeavyIon(), # Histogram modification for heavy ion monitoring - 'doFEPlots' : False, #Turn on/off histograms with FE Status information + 'doFEPlots' : True, #Turn on/off histograms with FE Status information 'RDOName' : InDetKeys.PixelRDOs() } @@ -36,7 +36,7 @@ kwargsClusMonAlg = { 'doOnline' : True if athenaCommonFlags.isOnline() el 'doLowOccupancy' : False, #Turn on/off histograms with binning for cosmics/single beam 'doHighOccupancy' : True, #Turn on/off histograms with binning for collisions 'doHeavyIonMon' : InDetFlags.doHeavyIon(), # Histogram modification for heavy ion monitoring - 'doFEPlots' : False, #Turn on/off histograms with FE Status information + 'doFEPlots' : True, #Turn on/off histograms with FE Status information 'ClusterName' : InDetKeys.PixelClusters(), 'TrackName' : InDetKeys.Tracks() } diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthClusterMonAlgCfg.py b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthClusterMonAlgCfg.py index 5f8cfa1458c65862f558dcd0f11704c3d7cb6feb..aa7c0b0e51240213a02da6e69fe2931877bd6148 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthClusterMonAlgCfg.py +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthClusterMonAlgCfg.py @@ -33,15 +33,20 @@ def PixelAthClusterMonAlgCfg(helper, alg, **kwargs): title = 'Modules Status Reset (0=Active+Good, 1=Active+Bad, 2=Inactive)' define2DProfHist(helper, alg, histoGroupName, title, path, type='TProfile2D', zmin=0, zmax=2, opt='kLBNHistoryDepth=2', histname='MapOfModulesStatusMon') - if doLumiBlock: - title = 'Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive)' - define2DProfHist(helper, alg, histoGroupName, title, pathLowStat, type='TProfile2D', lifecycle='lowstat', histname='MapOfModulesStatusLB') - if doFEPlots: histoGroupName = 'MapOfFEsStatus' title = 'FEs Status (0=Active+Good, 1=Active+Bad, 2=Inactive)' + histlbname = 'MapOfFEsStatusLB' define2DProfPerFEHist(helper, alg, histoGroupName, title, path, type='TProfile2D') + if doLumiBlock: + if not doFEPlots: + title = 'Modules Status (0=Active+Good, 1=Active+Bad, 2=Inactive)' + define2DProfHist(helper, alg, histoGroupName, title, pathLowStat, type='TProfile2D', lifecycle='lumiblock', histname='MapOfModulesStatusLB') + else: + title = 'FEs Status (0=Active+Good, 1=Active+Bad, 2=Inactive)' + define2DProfPerFEHist(helper, alg, histoGroupName, title, pathLowStat, type='TProfile2D', lifecycle='lumiblock', histname='MapOfFEsStatusLB') + histoGroupName = 'BadModulesPerLumi' title = 'Number of bad modules (bad+active) per event per LB' yaxistext = ';# modules/event' @@ -273,16 +278,21 @@ def PixelAthClusterMonAlgCfg(helper, alg, **kwargs): title = addOnTrackTxt('Average per module(FE) cluster occupancy reset every 5 min', ontrack, True) definePP0Histos(helper, alg, histoGroupName, title, pathGroup, opt='kLBNHistoryDepth=5') - if not ontrack and doFEPlots: - histoGroupName = 'ClusterFEOccupancy' - title = 'Cluster occupancy per FE' + if doFEPlots: + histoGroupName = addOnTrackTxt('ClusterFEOccupancy', ontrack) + title = addOnTrackTxt('Cluster occupancy per FE', ontrack, True) define2DProfPerFEHist(helper, alg, histoGroupName, title, pathGroup, type='TH2F') if doLumiBlock: pathGroup = addOnTrackToPath(pathLowStat, ontrack) - histoGroupName = addOnTrackTxt('ClusterOccupancyLB', ontrack) - title = addOnTrackTxt('Cluster Occupancy', ontrack, True) - define2DProfHist(helper, alg, addOnTrackTxt('ClusterOccupancy', ontrack), title, pathGroup, type='TH2D', lifecycle='lowStat', histname=histoGroupName) + if not doFEPlots: + histoGroupName = addOnTrackTxt('ClusterOccupancyLB', ontrack) + title = addOnTrackTxt('Cluster occupancy', ontrack, True) + define2DProfHist(helper, alg, addOnTrackTxt('ClusterOccupancy', ontrack), title, pathGroup, type='TH2D', lifecycle='lumiblock', histname=histoGroupName) + else: + histoGroupName = addOnTrackTxt('ClusterFEOccupancyLB', ontrack) + title = addOnTrackTxt('Cluster occupancy per FE', ontrack, True) + define2DProfPerFEHist(helper, alg, addOnTrackTxt('ClusterFEOccupancy', ontrack), title, pathGroup, type='TH2F', lifecycle='lumiblock', histname=histoGroupName) ### @@ -294,7 +304,7 @@ def PixelAthClusterMonAlgCfg(helper, alg, **kwargs): histoGroupName = addOnTrackTxt('ClusterToTxCosAlpha', ontrack) title = addOnTrackTxt('Cluster ToTxCosAlpha', ontrack, True) define1DLayers(helper, alg, histoGroupName, title, pathGroup, ';ToT [BC]', ';# clusters', xbins=[300], xmins=[-0.5]) - if (not doOnline): + if not doOnline: histoGroupName = addOnTrackTxt('ClusterQxCosAlpha', ontrack) title = addOnTrackTxt('Cluster Q normalized', ontrack, True) define1DLayers(helper, alg, histoGroupName, title, pathGroup, ';Charge [e]', ';# clusters', xbins=[70], xmins=[-0.5], binsizes=[3000.]) diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthHitMonAlgCfg.py b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthHitMonAlgCfg.py index 219fd938ca56a2023a700ed8b1c2d0b8578b767c..91dfa29bbe6bf0d100c33f27cb4eef45b0f01d6f 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthHitMonAlgCfg.py +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthHitMonAlgCfg.py @@ -74,14 +74,20 @@ def PixelAthHitMonAlgCfg(helper, alg, **kwargs): histoGroupName = 'HitMap' title = 'hit map' define2DProfHist(helper, alg, histoGroupName, title, path, type='TH2F') - if doLumiBlock: - define2DProfHist(helper, alg, histoGroupName, title, pathLowStat, type='TH2F', lifecycle='lowStat', histname='HitMapLB') if doFEPlots: histoGroupName = 'HitFEMap' title = 'hit map per FE' define2DProfPerFEHist(helper, alg, histoGroupName, title, path, type='TH2F') + if doLumiBlock: + if not doFEPlots: + define2DProfHist(helper, alg, histoGroupName, title, pathLowStat, type='TH2F', lifecycle='lumiblock', histname='HitMapLB') + else: + define2DProfPerFEHist(helper, alg, histoGroupName, title, pathLowStat, type='TH2F', lifecycle='lumiblock', histname='HitFEMapLB') + + + histoname = 'AvgOccPerBCID' for layer in layers: title = 'Average pixel occupancy per BCID, {0}'.format(layer) + runtext + ';BCID;# hits/pixel/event' diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthMonitoringBase.py b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthMonitoringBase.py index 010006a3b05c1c69e80a0379c20a33594a2fb2a9..001664924df6e65a5bbaf164d1a644fc55e250fb 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthMonitoringBase.py +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelAthMonitoringBase.py @@ -288,7 +288,7 @@ def define2DProfHist(helper, alg, name, title, path, type='TProfile2D', doWeight title -- Title of histogram (Title = title +' '+layer) path -- Path in output file for histogram type -- Type of histogram (TH2D, TProfile2D) - lifecycle -- global life duration of histograms (run, lowstat [i.e. 20 LB], lumiblock) - APPLIES to MonGroup only + lifecycle -- global life duration of histograms (run, lowStat [i.e. 20 LB], lumiblock) - APPLIES to MonGroup only zmin(zmax) -- fix the displayed range - simply chopping the range!!! opt -- history depth of a histogram e.g. 'kLBNHistoryDepth=10' histname -- another way of naming the histogram(s), useful when multiple histograms are filled from exactly the same variables, but in a different way @@ -330,7 +330,7 @@ def define2DProfPerFEHist(helper, alg, name, title, path, type='TProfile2D', doW title -- Title of histogram (Title = title +' '+layer) path -- Path in output file for histogram type -- Type of histogram (TH2D, TProfile2D) - lifecycle -- global life duration of histograms (run, lowstat [i.e. 20 LB], lumiblock) - APPLIES to MonGroup only + lifecycle -- global life duration of histograms (run, lowStat [i.e. 20 LB], lumiblock) - APPLIES to MonGroup only zmin(zmax) -- fix the displayed range - simply chopping the range!!! opt -- history depth of a histogram e.g. 'kLBNHistoryDepth=10' histname -- another way of naming the histogram(s), useful when multiple histograms are filled from exactly the same variables, but in a different way diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py index b07a05f5dec3c5648d47661c5e16a8aba6f9ce49..5bdc90e8bdd3122ceacfdac1bc2eafeabab63a9d 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/python/PixelMonitoringConfig.py @@ -15,7 +15,7 @@ def PixelMonitoringConfig(flags): #'doHeavyIonMon' : InDetFlags.doHeavyIon(), # Histogram modification for heavy ion monitoring #'RDOName' : InDetKeys.PixelRDOs() 'doHeavyIonMon' : False, #Until new config ready - 'doFEPlots' : False, #Turn on/off histograms with FE Status information + 'doFEPlots' : True, #Turn on/off histograms with FE Status information 'RDOName' : 'PixelRDOs',#Until new config ready } @@ -25,7 +25,7 @@ def PixelMonitoringConfig(flags): 'doHighOccupancy' : True, #Turn on/off histograms with binning for collisions #'doHeavyIonMon' : InDetFlags.doHeavyIon(), # Histogram modification for heavy ion monitoring 'doHeavyIonMon' : False, #Until new config ready - 'doFEPlots' : False, #Turn on/off histograms with FE Status information + 'doFEPlots' : True, #Turn on/off histograms with FE Status information #'ClusterName' : InDetKeys.PixelClusters(), 'ClusterName' : 'PixelClusters', #Until new config ready #'TrackName' : InDetKeys.Tracks() diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthClusterMonAlg.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthClusterMonAlg.cxx index f2025d05bc8c26e1085b6a66a6cde2d847ed1bdb..d04d158a1a0c1e9140f6f9c3d473e3d6ac87b34f 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthClusterMonAlg.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthClusterMonAlg.cxx @@ -109,7 +109,7 @@ StatusCode PixelAthClusterMonAlg::fillHistograms( const EventContext& ctx ) cons // Per FE Status // - if (m_doFEPlots && !m_doOnline) { + if (m_doFEPlots) { int nFE = getNumberOfFEs(pixlayer, m_pixelid->eta_module(waferID)); for (int iFE=0; iFE<nFE; iFE++) { Identifier pixelID = m_pixelCablingSvc->getPixelIdfromHash(id_hash, iFE, 1, 1); @@ -129,7 +129,7 @@ StatusCode PixelAthClusterMonAlg::fillHistograms( const EventContext& ctx ) cons fill1DProfLumiLayers("BadModulesPerLumi", lb, nBadMod); fill1DProfLumiLayers("DisabledModulesPerLumi", lb, nDisabledMod); - if (m_doFEPlots && !m_doOnline) fill2DProfLayerAccum( Map_Of_FEs_Status ); + if (m_doFEPlots) fill2DProfLayerAccum( Map_Of_FEs_Status ); //******************************************************************************* //*************************** End of filling Status Histograms ****************** @@ -353,6 +353,7 @@ StatusCode PixelAthClusterMonAlg::fillHistograms( const EventContext& ctx ) cons VecAccumulator2DMap Clus_Occ_SizeCut("ClusOccSizeCut"); VecAccumulator2DMap Clus_Occ_SizeCut_OnTrack("ClusOccSizeCutOnTrack"); VecAccumulator2DMap Cluster_FE_Occupancy("ClusterFEOccupancy"); + VecAccumulator2DMap Cluster_FE_Occupancy_OnTrack("ClusterFEOccupancyOnTrack"); auto clusterGroup = getGroup("Cluster"); auto clusterGroup_OnTrack = getGroup("Cluster_OnTrack"); @@ -416,7 +417,7 @@ StatusCode PixelAthClusterMonAlg::fillHistograms( const EventContext& ctx ) cons // begin cluster occupancy // Cluster_Occupancy.add(pixlayer, clusID, m_pixelid); - if (m_doFEPlots && !m_doOnline) { + if (m_doFEPlots) { Cluster_FE_Occupancy.add(pixlayer, clusID, m_pixelid, m_pixelCablingSvc->getFE(&clusID, clusID), 1.0); } if (cluster.rdoList().size() > 1) Clus_Occ_SizeCut.add(pixlayer, clusID, m_pixelid); @@ -473,6 +474,9 @@ StatusCode PixelAthClusterMonAlg::fillHistograms( const EventContext& ctx ) cons // begin cluster occupancy // Cluster_Occupancy_OnTrack.add(pixlayer, clusID, m_pixelid); + if (m_doFEPlots) { + Cluster_FE_Occupancy_OnTrack.add(pixlayer, clusID, m_pixelid, m_pixelCablingSvc->getFE(&clusID, clusID), 1.0); + } if (cluster.rdoList().size() > 1) Clus_Occ_SizeCut_OnTrack.add(pixlayer, clusID, m_pixelid); // // end cluster occupancy @@ -504,7 +508,10 @@ StatusCode PixelAthClusterMonAlg::fillHistograms( const EventContext& ctx ) cons fill2DProfLayerAccum(Cluster_Occupancy_OnTrack); fill2DProfLayerAccum(Clus_Occ_SizeCut); fill2DProfLayerAccum(Clus_Occ_SizeCut_OnTrack); - if (m_doFEPlots && !m_doOnline) fill2DProfLayerAccum(Cluster_FE_Occupancy); + if (m_doFEPlots) { + fill2DProfLayerAccum(Cluster_FE_Occupancy); + fill2DProfLayerAccum(Cluster_FE_Occupancy_OnTrack); + } // begin cluster rates // auto nCls = Monitored::Scalar<int>( "ncls_per_event", nclusters ); diff --git a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthHitMonAlg.cxx b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthHitMonAlg.cxx index c6fa0f8edb0a77b857bca5287bc9e298158ff661..061cf34ac36d3b53eb05981b540cdcad37edc439 100644 --- a/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthHitMonAlg.cxx +++ b/InnerDetector/InDetMonitoring/PixelMonitoring/src/PixelAthHitMonAlg.cxx @@ -160,7 +160,7 @@ StatusCode PixelAthHitMonAlg::fillHistograms( const EventContext& ctx ) const { int pixlayer = getPixLayersID(m_pixelid->barrel_ec(rdoID), m_pixelid->layer_disk(rdoID) ); if (pixlayer == 99) continue; HitMap.add(pixlayer, rdoID, m_pixelid, 1.0); - if (m_doFEPlots && !m_doOnline) HitFEMap.add(pixlayer, rdoID, m_pixelid, m_pixelCablingSvc->getFE(&rdoID, rdoID), 1.0); + if (m_doFEPlots) HitFEMap.add(pixlayer, rdoID, m_pixelid, m_pixelCablingSvc->getFE(&rdoID, rdoID), 1.0); nhits++; nhits_layer[pixlayer]++; hitLvl1a.push_back( (*p_rdo)->getLVL1A() ); @@ -191,7 +191,7 @@ StatusCode PixelAthHitMonAlg::fillHistograms( const EventContext& ctx ) const { } fill2DProfLayerAccum( HitMap ); - if (m_doFEPlots && !m_doOnline) fill2DProfLayerAccum( HitFEMap ); + if (m_doFEPlots) fill2DProfLayerAccum( HitFEMap ); auto vals = Monitored::Collection( "Hit_LVL1A_pixel", hitLvl1a ); fill( hitGroup, vals);