diff --git a/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py b/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py index ff8e8a79a017d4e090c2fa11535f399604ddb671..49a5e67cec1994175550c38c0ffafb34b58d4e00 100644 --- a/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py +++ b/TileCalorimeter/TileMonitoring/python/TileMonitoringCfgHelper.py @@ -504,7 +504,7 @@ def addTileEtaPhiMapsArray(helper, algorithm, name, title, path, weight = '', ty def addTile1DHistogramsArray(helper, algorithm, name = '', xvalue = '', value = '', title = '', path = '', - xbins = 0, xmin = 0, xmax = 0, type = 'TH1D', run = '', triggers = [], + weight = '', xbins = 0, xmin = 0, xmax = 0, type = 'TH1D', run = '', triggers = [], subDirectory = False, perPartition = True, perSample = False, opt = '', perGain = False, xlabels = (), allPartitions = False, separator = '_' ): ''' @@ -550,7 +550,7 @@ def addTile1DHistogramsArray(helper, algorithm, name = '', xvalue = '', value = subPath = getTileHistogramPath(path = '', subDirectory = subDirectory, **kwargs) fullTitle = getTileHistogramTitle(title = title, run = run, **kwargs) - tool.defineHistogram( fullName, path = subPath, type = type, title = fullTitle, + tool.defineHistogram( fullName, path = subPath, weight = weight, type = type, title = fullTitle, xlabels = nxlabels, xbins = xbins, xmin = xmin, xmax = xmax, opt = opt) return array diff --git a/TileCalorimeter/TileMonitoring/python/TileMuIdMonitorAlgorithm.py b/TileCalorimeter/TileMonitoring/python/TileMuIdMonitorAlgorithm.py index ed69925e3d4c6dc85cf81a57b89308132eecfdda..126e84de72af10b17c7a359c8655c47e6498e3e9 100644 --- a/TileCalorimeter/TileMonitoring/python/TileMuIdMonitorAlgorithm.py +++ b/TileCalorimeter/TileMonitoring/python/TileMuIdMonitorAlgorithm.py @@ -104,7 +104,7 @@ def TileMuIdMonitoringConfig(flags, **kwargs): # 9) Configure histograms with all Tile MuId energy addTile1DHistogramsArray(helper, tileMuIdMonAlg, name = 'TileMuIdEnergy', xvalue = 'energy', - title = 'Tile MuId Energy [MeV]', path = 'Tile/MuId', + title = 'Tile MuId Energy;Energy [MeV]', path = 'Tile/MuId', xbins = 100, xmin = 0., xmax = 10000., type = 'TH1D', run = run, triggers = l1Triggers, perPartition = False, perSample = False, perGain = False, subDirectory = False, allPartitions = False) @@ -139,7 +139,7 @@ def TileMuIdMonitoringConfig(flags, **kwargs): # 14) Configure histograms with all Tile MuId muon average energy vs phi addTile1DHistogramsArray(helper, tileMuIdMonAlg, name = 'TileMuIdEnePhi', xvalue = 'phi', value='energy', - title = 'Tile MuId muon everage energy;#phi', path = 'Tile/MuId', + title = 'Tile MuId muon everage energy [MeV];#phi', path = 'Tile/MuId', xbins = Tile.MAX_DRAWER, xmin = -3.15, xmax = 3.15, type = 'TProfile', run = run, triggers = l1Triggers, perPartition = False, perSample = False, perGain = False, subDirectory = False, allPartitions = False) @@ -147,7 +147,7 @@ def TileMuIdMonitoringConfig(flags, **kwargs): # 15) Configure histograms with all Tile MuId energy when Tags=1 addTile1DHistogramsArray(helper, tileMuIdMonAlg, name = 'TileMuId1TagEnergy', xvalue = 'energy', - title = 'Tile MuId Tags=1 Energy [MeV]', path = 'Tile/MuId', + title = 'Tile MuId Tags=1 Energy;Energy [MeV]', path = 'Tile/MuId', xbins = 100, xmin = 0., xmax = 10000., type = 'TH1D', run = run, triggers = l1Triggers, perPartition = False, perSample = False, perGain = False, subDirectory = False, allPartitions = False) @@ -159,24 +159,23 @@ def TileMuIdMonitoringConfig(flags, **kwargs): triggers = l1Triggers, perPartition = False, perSample = False, perGain = False, subDirectory = False, allPartitions = False) - # 17) Configure histograms with all Tile MuId muon average energy vs eta when Tags=1 - addTile1DHistogramsArray(helper, tileMuIdMonAlg, name = 'TileMuId1TagEneEta', xvalue = 'eta', - value = 'energy', title = 'Tile MuId Tags=1 muon average energy;#eta', - path = 'Tile/MuId', xbins = 40, xmin = -2., xmax = 2., type = 'TProfile', - run = run, triggers = l1Triggers, perPartition = False, perSample = False, + # 17) Configure histograms with all Tile MuId muon eta position when Tags=1 + addTile1DHistogramsArray(helper, tileMuIdMonAlg, name = 'TileMuId1TagEta', xvalue = 'eta', + title = 'Tile MuId Tags=1 muon #eta position;#eta', path = 'Tile/MuId', + weight = 'energy', xbins = 40, xmin = -2., xmax = 2., type = 'TH1D', run = run, + triggers = l1Triggers, perPartition = False, perSample = False, perGain = False, subDirectory = False, allPartitions = False) - # 18) Configure histograms with all Tile MuId muon average energy vs phi when Tags=1 - addTile1DHistogramsArray(helper, tileMuIdMonAlg, name = 'TileMuId1TagEnePhi', xvalue = 'phi', - value = 'energy', title = 'Tile MuId Tags=1 muon everage energy;#phi', - path = 'Tile/MuId', xbins = Tile.MAX_DRAWER, xmin = -3.15, xmax = 3.15, - type = 'TProfile', run = run, triggers = l1Triggers, perPartition = False, - perSample = False, perGain = False, subDirectory = False, allPartitions = False) - + # 18) Configure histograms with all Tile MuId muon phi position when Tags=1 + addTile1DHistogramsArray(helper, tileMuIdMonAlg, name = 'TileMuId1TagPhi', xvalue = 'phi', + title = 'Tile MuId Tags=1 muon #phi position;#phi', path = 'Tile/MuId', + weight = 'energy', xbins = Tile.MAX_DRAWER, xmin = -3.15, xmax = 3.15, type = 'TH1D', + run = run, triggers = l1Triggers, perPartition = False, perSample = False, + perGain = False, subDirectory = False, allPartitions = False) # 19) Configure histograms with all Tile MuId energy when Tags=2 addTile1DHistogramsArray(helper, tileMuIdMonAlg, name = 'TileMuId2TagEnergy', xvalue = 'energy', - title = 'Tile MuId Tags=2 Energy [MeV]', path = 'Tile/MuId', + title = 'Tile MuId Tags=2 Energy; Energy [MeV]', path = 'Tile/MuId', xbins = 100, xmin = 0., xmax = 10000., type = 'TH1D', run = run, triggers = l1Triggers, perPartition = False, perSample = False, perGain = False, subDirectory = False, allPartitions = False) @@ -188,19 +187,19 @@ def TileMuIdMonitoringConfig(flags, **kwargs): triggers = l1Triggers, perPartition = False, perSample = False, perGain = False, subDirectory = False, allPartitions = False) - # 21) Configure histograms with all Tile MuId muon average energy vs eta when Tags=2 - addTile1DHistogramsArray(helper, tileMuIdMonAlg, name = 'TileMuId2TagEneEta', xvalue = 'eta', - value = 'energy', title = 'Tile MuId Tags=2 muon average energy;#eta', - path = 'Tile/MuId', xbins = 40, xmin = -2., xmax = 2., type = 'TProfile', - run = run, triggers = l1Triggers, perPartition = False, perSample = False, + # 21) Configure histograms with all Tile MuId muon eta position when Tags=2 + addTile1DHistogramsArray(helper, tileMuIdMonAlg, name = 'TileMuId2TagEta', xvalue = 'eta', + title = 'Tile MuId Tags=2 muon #eta position;#eta', path = 'Tile/MuId', + weight = 'energy', xbins = 40, xmin = -2., xmax = 2., type = 'TH1D', run = run, + triggers = l1Triggers, perPartition = False, perSample = False, perGain = False, subDirectory = False, allPartitions = False) - # 22) Configure histograms with all Tile MuId muon average energy vs phi when Tags=2 - addTile1DHistogramsArray(helper, tileMuIdMonAlg, name = 'TileMuId2TagEnePhi', xvalue = 'phi', - value = 'energy', title = 'Tile MuId Tags=2 muon everage energy;#phi', - path = 'Tile/MuId', xbins = Tile.MAX_DRAWER, xmin = -3.15, xmax = 3.15, - type = 'TProfile', run = run, triggers = l1Triggers, perPartition = False, - perSample = False, perGain = False, subDirectory = False, allPartitions = False) + # 22) Configure histograms with all Tile MuId muon phi position when Tags=2 + addTile1DHistogramsArray(helper, tileMuIdMonAlg, name = 'TileMuId2TagPhi', xvalue = 'phi', + title = 'Tile MuId Tags=2 muon #phi position;#phi', path = 'Tile/MuId', + weight = 'energy', xbins = Tile.MAX_DRAWER, xmin = -3.15, xmax = 3.15, type = 'TH1D', + run = run, triggers = l1Triggers, perPartition = False, perSample = False, + perGain = False, subDirectory = False, allPartitions = False) accumalator = helper.result() result.merge(accumalator) @@ -225,6 +224,8 @@ if __name__=='__main__': ConfigFlags.Output.HISTFileName = 'TileMuIdMonitorOutput.root' ConfigFlags.DQ.useTrigger = False ConfigFlags.DQ.enableLumiAccess = False + ConfigFlags.Exec.MaxEvents = 3 + ConfigFlags.fillFromArgs() ConfigFlags.lock() # Initialize configuration object, add accumulator, merge, and run. @@ -244,7 +245,7 @@ if __name__=='__main__': cfg.store( open('TileMuIdMonitorAlgorithm.pkl','wb') ) - sc = cfg.run(maxEvents=-1) + sc = cfg.run() import sys # Success should be 0 diff --git a/TileCalorimeter/TileMonitoring/src/TileMuIdMonitorAlgorithm.cxx b/TileCalorimeter/TileMonitoring/src/TileMuIdMonitorAlgorithm.cxx index 401e1101660683f5a6ca4c623a9753168389c656..45577d4309720f9a0fe2602a7edae880e3355723 100644 --- a/TileCalorimeter/TileMonitoring/src/TileMuIdMonitorAlgorithm.cxx +++ b/TileCalorimeter/TileMonitoring/src/TileMuIdMonitorAlgorithm.cxx @@ -34,15 +34,15 @@ StatusCode TileMuIdMonitorAlgorithm::initialize() { m_muId1TagEnergyGroups = buildToolMap<int>(m_tools, "TileMuId1TagEnergy", nL1Triggers); m_muId1TagQualityGroups = buildToolMap<int>(m_tools, "TileMuId1TagQuality", nL1Triggers); m_muId1TagEtaPhiGroups = buildToolMap<int>(m_tools, "TileMuId1TagEtaPhi", nL1Triggers); - m_muId1TagEneEtaGroups = buildToolMap<int>(m_tools, "TileMuId1TagEneEta", nL1Triggers); - m_muId1TagEnePhiGroups = buildToolMap<int>(m_tools, "TileMuId1TagEnePhi", nL1Triggers); + m_muId1TagEtaGroups = buildToolMap<int>(m_tools, "TileMuId1TagEta", nL1Triggers); + m_muId1TagPhiGroups = buildToolMap<int>(m_tools, "TileMuId1TagPhi", nL1Triggers); m_muId1TagEneQualityGroups = buildToolMap<int>(m_tools, "TileMuId1TagEneQuality", nL1Triggers); m_muId2TagEnergyGroups = buildToolMap<int>(m_tools, "TileMuId2TagEnergy", nL1Triggers); m_muId2TagQualityGroups = buildToolMap<int>(m_tools, "TileMuId2TagQuality", nL1Triggers); m_muId2TagEtaPhiGroups = buildToolMap<int>(m_tools, "TileMuId2TagEtaPhi", nL1Triggers); - m_muId2TagEneEtaGroups = buildToolMap<int>(m_tools, "TileMuId2TagEneEta", nL1Triggers); - m_muId2TagEnePhiGroups = buildToolMap<int>(m_tools, "TileMuId2TagEnePhi", nL1Triggers); + m_muId2TagEtaGroups = buildToolMap<int>(m_tools, "TileMuId2TagEta", nL1Triggers); + m_muId2TagPhiGroups = buildToolMap<int>(m_tools, "TileMuId2TagPhi", nL1Triggers); m_muId2TagEneQualityGroups = buildToolMap<int>(m_tools, "TileMuId2TagEneQuality", nL1Triggers); return TileMonitorAlgorithm::initialize(); @@ -95,8 +95,8 @@ StatusCode TileMuIdMonitorAlgorithm::fillHistograms( const EventContext& ctx ) c fill(m_tools[m_muId1TagEnergyGroups[l1TriggerIdx]], monEnergy); fill(m_tools[m_muId1TagQualityGroups[l1TriggerIdx]], monQuality); fill(m_tools[m_muId1TagEtaPhiGroups[l1TriggerIdx]], monEta, monPhi); - fill(m_tools[m_muId1TagEneEtaGroups[l1TriggerIdx]], monEta, monEnergy); - fill(m_tools[m_muId1TagEnePhiGroups[l1TriggerIdx]], monPhi, monEnergy); + fill(m_tools[m_muId1TagEtaGroups[l1TriggerIdx]], monEta, monEnergy); + fill(m_tools[m_muId1TagPhiGroups[l1TriggerIdx]], monPhi, monEnergy); fill(m_tools[m_muId1TagEneQualityGroups[l1TriggerIdx]], monEnergy, monQuality); } } else if (nTags == 2) { @@ -104,8 +104,8 @@ StatusCode TileMuIdMonitorAlgorithm::fillHistograms( const EventContext& ctx ) c fill(m_tools[m_muId2TagEnergyGroups[l1TriggerIdx]], monEnergy); fill(m_tools[m_muId2TagQualityGroups[l1TriggerIdx]], monQuality); fill(m_tools[m_muId2TagEtaPhiGroups[l1TriggerIdx]], monEta, monPhi); - fill(m_tools[m_muId2TagEneEtaGroups[l1TriggerIdx]], monEta, monEnergy); - fill(m_tools[m_muId2TagEnePhiGroups[l1TriggerIdx]], monPhi, monEnergy); + fill(m_tools[m_muId2TagEtaGroups[l1TriggerIdx]], monEta, monEnergy); + fill(m_tools[m_muId2TagPhiGroups[l1TriggerIdx]], monPhi, monEnergy); fill(m_tools[m_muId2TagEneQualityGroups[l1TriggerIdx]], monEnergy, monQuality); } } diff --git a/TileCalorimeter/TileMonitoring/src/TileMuIdMonitorAlgorithm.h b/TileCalorimeter/TileMonitoring/src/TileMuIdMonitorAlgorithm.h index 6dbae1df3508c38ef785e652af43ff47a14a2bf8..9ff9fdf5c695e918c23fccb957f5dc8b3a40b749 100644 --- a/TileCalorimeter/TileMonitoring/src/TileMuIdMonitorAlgorithm.h +++ b/TileCalorimeter/TileMonitoring/src/TileMuIdMonitorAlgorithm.h @@ -42,15 +42,15 @@ class TileMuIdMonitorAlgorithm : public TileMonitorAlgorithm { std::vector<int> m_muId1TagEnergyGroups; std::vector<int> m_muId1TagQualityGroups; std::vector<int> m_muId1TagEtaPhiGroups; - std::vector<int> m_muId1TagEneEtaGroups; - std::vector<int> m_muId1TagEnePhiGroups; + std::vector<int> m_muId1TagEtaGroups; + std::vector<int> m_muId1TagPhiGroups; std::vector<int> m_muId1TagEneQualityGroups; std::vector<int> m_muId2TagEnergyGroups; std::vector<int> m_muId2TagQualityGroups; std::vector<int> m_muId2TagEtaPhiGroups; - std::vector<int> m_muId2TagEneEtaGroups; - std::vector<int> m_muId2TagEnePhiGroups; + std::vector<int> m_muId2TagEtaGroups; + std::vector<int> m_muId2TagPhiGroups; std::vector<int> m_muId2TagEneQualityGroups; };