diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RpcOccupancyAnalysis.h b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RpcOccupancyAnalysis.h deleted file mode 100644 index 32759c39d5dc8fed250fc5d2a8294f5c4df992f6..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/RpcRawDataMonitoring/RpcOccupancyAnalysis.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef RPCRAWDATAMONITORING_RPCOCCUPANCYANALYSIS_H -#define RPCRAWDATAMONITORING_RPCOCCUPANCYANALYSIS_H - -#include <utility> -#include <set> - -// Athena/Gaudi -#include "AthenaMonitoring/AthMonitorAlgorithm.h" -#include "GaudiKernel/ServiceHandle.h" -#include "GaudiKernel/ToolHandle.h" -#include "StoreGate/ReadHandleKey.h" -// #include "StoreGate/ReadCondHandleKey.h" -// #include "StoreGate/StoreGateSvc.h" -#include "xAODEventInfo/EventInfo.h" -#include "EventInfo/EventInfo.h" - -// ATLAS -// #include "MuonIdHelpers/MuonIdHelperTool.h" -#include "MuonIdHelpers/IMuonIdHelperSvc.h" -#include "MuonRDO/RpcPadContainer.h" -#include "MuonRDO/RpcSectorLogicContainer.h" -#include "MuonTrigCoinData/RpcCoinDataContainer.h" -#include "MuonReadoutGeometry/MuonDetectorManager.h" -#include "MuonPrepRawData/RpcPrepDataContainer.h" -#include "LumiBlockData/LuminosityCondData.h" -#include "LumiBlockData/LBDurationCondData.h" - -// local -#include "RpcRawDataMonitoring/RPCDQUtils.h" - - -namespace MuonGM -{ - class MuonDetectorManager; -} - -class RpcOccupancyAnalysis : public AthMonitorAlgorithm -{ - public: - RpcOccupancyAnalysis (const std::string& name, ISvcLocator* pSvcLocator); - virtual ~RpcOccupancyAnalysis(); - - virtual StatusCode initialize() override; - virtual StatusCode fillHistograms( const EventContext& ctx ) const override; - - typedef std::map<Identifier, std::shared_ptr<RpcPanel>> RpcPanelMap; - - private: - StatusCode initRpcPanel(); - - StatusCode fillHistPRD(const EventContext& ctx) const; - - private: - BooleanProperty m_plotPRD{this, "plotPRD", false, "switch to plot histograms for Prepare Data objects"}; - BooleanProperty m_hit_percma{this, "hit_percma", false, "switch to plot histograms for Raw Data objects for per CMA"}; - BooleanProperty m_analyseTrack{this, "analyseTrack", false, "switch to analysis track, extrapolate track to RPC"}; - BooleanProperty m_useAODParticle{this, "useAODParticle", false, "use AOD Particle"}; - - DoubleProperty m_avrLumiThr{this, "avrLumiThr", 10., "Thrshold of average luminosity per Luminosity block"}; - DoubleProperty m_lbDuraThr{this, "lbDuraThr", 10., "Thrshold of luminosity block deruation"}; - StringProperty m_packageName{this,"PackageName", "RpcOccupancyAnalysis","group name for histograming"}; - StringProperty m_trigTagList{this,"TagTrigList","HLT_mu26_ivarmedium_L1MU20","list of triggers to be used for trigger matching"}; - - ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}; - const MuonGM::MuonDetectorManager *m_muonMgr; - - SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo {this,"EventInfo","EventInfo","event info"}; - SG::ReadHandleKey<Muon::RpcPrepDataContainer> m_rpcPrdKey {this,"RpcPrepDataContainer","RPC_Measurements","RPC PRDs"}; - - RpcPanelMap m_rpcPanelMap; - - std::vector<TagDef> m_trigTagDefs; - std::vector<GasGapData*> m_gasGapData; - - std::map<std::string,int> m_timeTagGroups; -}; - - - -#endif diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/CommonConfig_RpcRawDataMonitoring.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/CommonConfig_RpcRawDataMonitoring.py deleted file mode 100644 index f8fdbc871d283d727446f4db9bf20052e173f1c6..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/CommonConfig_RpcRawDataMonitoring.py +++ /dev/null @@ -1,85 +0,0 @@ -#-------------------------------------------------------------- -# Configure algorithm. -#-------------------------------------------------------------- - -# setup trigger config -from RecExConfig.RecFlags import rec -rec.doTrigger=True - -from RecExConfig.RecAlgsFlags import recAlgs -recAlgs.doTrigger=True - -from TriggerJobOpts.TriggerFlags import TriggerFlags -TriggerFlags.doTriggerConfigOnly=True - -# read ESD and don't write anything -rec.readESD=True -rec.doWriteAOD=False -rec.doWriteESD=False -rec.doWriteTAG=False -rec.doAOD=False -rec.doDPD=False -rec.doESD=False -doTAG=False - -# switch off as much as possible -rec.doTruth=False -rec.doRecoTiming=False -# rec.doDetStatus=True -rec.doShowSizeStatistics=False -rec.readTAG=False -rec.readRDO=False -rec.doHist=False -rec.doContainerRemapping=False -rec.doJiveXML=False -rec.doEdmMonitor=False -rec.doDumpPoolInputContent=False -rec.doHeavyIon=False -rec.doHIP=False -rec.doWriteBS=False -rec.doPhysValMonHists=False -rec.doVP1=False -rec.doJiveXML=False -rec.doCheckDictionary=False -rec.doFileMetaData=False -rec.doAODCaloCells=False -recAlgs.doAtlfast=False -recAlgs.doMonteCarloReact=False -rec.doEgamma=False -rec.CBNTAthenaAware=False -rec.doAODSelect=False -rec.doWritexAOD=False -rec.doPerfMon=False -rec.doTagRawSummary=False -rec.doBTagging=False -rec.doSemiDetailedPerfMon=False -rec.doAODall=False -rec.doTau=False -rec.doJetMissingETTag=False -recAlgs.doCaloTrkMuId=False -recAlgs.doEFlow=False -recAlgs.doMissingET=False -recAlgs.doMuGirl=False -recAlgs.doMuTag=False -recAlgs.doMuonIDCombined=False -recAlgs.doMuonIDStandAlone=False -recAlgs.doStaco=False -recAlgs.doTileMuID=False -recAlgs.doTrackParticleCellAssociation=False -recAlgs.doTrackRecordFilter=False - -from AthenaCommon.DetFlags import DetFlags -DetFlags.detdescr.all_setOn() -# -# TGC CABLING -##from MuonCablingServers.MuonCablingServersConf import TGCcablingServerSvc -##ServiceMgr += TGCcablingServerSvc() -##theApp.CreateSvc += [ "TGCcablingServerSvc" ] -##ServiceMgr.TGCcablingServerSvc.Atlas=True -##ServiceMgr.TGCcablingServerSvc.forcedUse=True -##ServiceMgr.TGCcablingServerSvc.useMuonTGC_CablingSvc=True -##from TGC_CondCabling.TGC_CondCablingConf import TGCCablingDbTool -##ToolSvc += TGCCablingDbTool() -##from IOVDbSvc.CondDB import conddb -##conddb.addFolderSplitMC('TGC','/TGC/CABLING/MAP_SCHEMA','/TGC/CABLING/MAP_SCHEMA') - diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/esd2RpcMon_data_withGRL_triggerSel.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/esd2RpcMon_data_withGRL_triggerSel.py deleted file mode 100644 index 4636bbcfe50b3487b0bfc34e3c2b34d852a55054..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/esd2RpcMon_data_withGRL_triggerSel.py +++ /dev/null @@ -1,234 +0,0 @@ -#example of personal topOptions -# -# in 20.1.5.12 for run00272531f611 -# run with athena.py esd2RpcMon_fromMyTopOptions.py > log_esd2RpcMon_fromMyTopOptions & -# -# to use it -# RecExCommon_links.sh # once in a given directory -# athena >! athena.log -# ( myTopOptions.py is defaulted through jobOptions.py soft link) -# -# see RecExCommon/share/RecExCommon_flags.py for more available flags -# and https://twiki.cern.ch/twiki/bin/view/Atlas/RecExCommonFlags -# for more complete documentation. -# - -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags -from RecExConfig.RecFlags import rec -from RecExConfig.RecAlgsFlags import recAlgs -from InDetRecExample.InDetJobProperties import InDetFlags -InDetFlags.doSecVertexFinder.set_Value_and_Lock(False) - -#set input file. Note that this triggers autoconfiguration automatically (see RecExCommonAutoConfiguration wiki) -# here a MC RDO is specified, but this can also be a data BS, an ESD AOD or TAG -#if athenaCommonFlags.FilesInput.isDefault(): # check if not already set upstream -# athenaCommonFlags.FilesInput=["LFN:top_GEO-02-01-00_RDO_extract.pool"] - -# input is DESDM_MCP -athenaCommonFlags.FilesInput=["/einstein2/stefania/atlas/RunII_rpc/Perf/test/data15_13TeV.00281411.physics_Main.merge.DESDM_MCP.f629_m1508._0460.1"] -#athenaCommonFlags.FilesInput=["/tmp/stefspa/esdMuons100_trf.pool.root"] -#athenaCommonFlags.FilesInput=["/tmp/stefspa/esdGeantino100k_trf.pool.root"] -#athenaCommonFlags.FilesInput=["/tmp/stefspa/esdFromMaxRecoGeantino.pool.root"] -#athenaCommonFlags.FilesInput=["/tmp/stefspa/esd.pool.root"] -#athenaCommonFlags.FilesInput=["/afs/cern.ch/user/s/stefspa/atlas/SW/RPCdigTest/runtrf/ESD.pool.root"] -#athenaCommonFlags.FilesInput=["/afs/cern.ch/work/s/stefspa/ESD_GeantinoHits_test125k_condRun00281411.pool.root"] -#athenaCommonFlags.FilesInput=["/afs/cern.ch/work/s/stefspa/ESD_GeantinoHits_test100kFixed_avEffStep5.pool.root"] -#athenaCommonFlags.FilesInput=["/afs/cern.ch/user/s/stefspa/myAfsLinks/stefspaWork/group.det-muon.147407.PowhegPythia8.e3099_s2621.rel201411.RPCDigi010514.nomod.20150930.v01_EXT0/group.det-muon.6582837.EXT0._001189.ESD.pool.root"] -#athenaCommonFlags.FilesInput=["/afs/cern.ch/user/s/stefspa/atlas/SW/RPCdigTest/run/tryDigPrdOnly/restart/try/ESD.pool.root"] -#"root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/data15_13TeV/physics_Main/00278734/data15_13TeV.00278734.physics_Main.recon.ESD.f628/data15_13TeV.00278734.physics_Main.recon.ESD.f628._lb0005._SFO-6._0001_003.1"] -# -#/eos/atlas/atlastier0/rucio/data15_13TeV/physics_Main/00272531/data15_13TeV.00272531.physics_Main.merge.DESDM_MCP.f611_m1467/data15_13TeV.00272531.physics_Main.merge.DESDM_MCP.f611_m1467._0011.1"] -#athenaCommonFlags.FilesInput=["/tmp/stefspa/testCrash/group.det-muon.147407.PowhegPythia8.e3099_s2621.rel201411.RPCDigi010512.Only.20150913.v01_EXT0.42808390/group.det-muon.6472803.EXT0._001141.ESD.pool.root"] - -# input is ESD !! -#athenaCommonFlags.FilesInput=["root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/data15_13TeV/physics_Main/00272531/data15_13TeV.00272531.physics_Main.recon.ESD.f611/data15_13TeV.00272531.physics_Main.recon.ESD.f611._lb0130._SFO-6._0001._003.1"] -## -# -#/eos/atlas/atlastier0/rucio/data15_comm/physics_Main/00273391/data15_comm.00273391.physics_Main.recon.ESD.f611/data15_comm.00273391.physics_Main.recon.ESD.f611._lb0820._SFO-6._0001._003.1"] -# -#"root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/data15_cos/physics_CosmicMuons/00274784/data15_cos.00274784.physics_CosmicMuons.recon.ESD.x345/data15_cos.00274784.physics_CosmicMuons.recon.ESD.x345._lb0439._SFO-ALL._0001_000.1"] -# -#"root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/data15_13TeV/physics_Main/00271595/data15_13TeV.00271595.physics_Main.merge.DESDM_MCP.f611_m1467/data15_13TeV.00271595.physics_Main.merge.DESDM_MCP.f611_m1467._0074.1"] -# -#root://eosatlas.cern.ch//eos/atlas/atlastier0/rucio/data15_comm/physics_Main/00266766/data15_comm.00266766.physics_Main.recon.ESD.f594/data15_comm.00266766.physics_Main.recon.ESD.f594._lb0017._SFO-ALL._0001.1"]#/eos/atlas/atlastier0/rucio/data15_comm/physics_Main/00265573/data15_comm.00265573.physics_Main.recon.ESD.f581/data15_comm.00265573.physics_Main.recon.ESD.f581._lb0175._SFO-ALL._0001.1"] - -#athenaCommonFlags.jp.AthenaCommonFlags.EvtMax=-1 # number of events to process run on all file -#athenaCommonFlags.EvtMax=200000 # number of events to process run on all file -#athenaCommonFlags.EvtMax=-1 # number of events to process run on all File -athenaCommonFlags.EvtMax=1000 # number of events to process run on all file - - -rec.doTrigger=True -from TriggerJobOpts.TriggerFlags import TriggerFlags -TriggerFlags.doTriggerConfigOnly=True -## set up trigger decision tool -from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool -tdt = Trig__TrigDecisionTool("TrigDecisionTool") -ToolSvc += tdt -tdt.OutputLevel = INFO - - - -# switch off writing of standard reco output -rec.doWriteAOD=False -rec.doWritexAOD=False -rec.doWriteESD=False -rec.doWriteTAG=False -rec.doFileMetaData=False - -rec.doAOD=False -rec.doESD=False -rec.doAODCaloCells=False -rec.doAODall=False -rec.doDPD=False - - -# switch off detectors -rec.doForwardDet=False -# rec.doInDet=False # this will generate a meaningless FATAL error -rec.doCalo=False -# rec.doMuon=False -rec.doEgamma=False -rec.doJetMissingETTag=False -rec.doTau=False -rec.doBTagging=False -rec.doTagRawSummary=False -rec.doLucid=False -rec.doMuonCombined=False -rec.doTruth=False - -# ** Turn PerfMon off for valgrind usage ** -rec.doPerfMon.set_Value_and_Lock(False) -rec.doDetailedPerfMon.set_Value_and_Lock(False) -rec.doSemiDetailedPerfMon.set_Value_and_Lock(False) -#rec.doNameAuditor=True -rec.doNameAuditor=False - - - -# include my own algorithm(s). These jobo will be included at the end of topSequence configuration -# rec.UserAlgs=[ "MyPackage/MyAlgorithm_jobOptions.py" ] -# these lines will be executed at the end of topSequence configuration -# rec.UserExecs=[ "from MyPackage.myAlgConf import myAlg","topSequence+=myAlg()" ] -# these lines will be executed after RecExCommon_flags.py has been imported, last chance for flag modification -# note that flag locking mechanism has a better chance to yield consistent configuration -# see https://twiki.cern.ch/twiki/bin/view/Atlas/TriggerFlags -# see https://twiki.cern.ch/twiki/bin/view/Atlas/UserAnalysisTest#The_AOD_Production_Flags -# rec.UserFlags=[ "AODFlags.FastSimulation=False" ] - - -# autoconfiguration might trigger undesired feature -# rec.doESD.set_Value_and_Lock(False) # uncomment if do not run ESD making algorithms -# rec.doWriteESD.set_Value_and_Lock(False) # uncomment if do not write ESD -# rec.doAOD.set_Value_and_Lock(False) # uncomment if do not run AOD making algorithms -# rec.doWriteAOD.set_Value_and_Lock(False) # uncomment if do not write AOD -# rec.doWriteTAG.set_Value_and_Lock(False) # uncomment if do not write TAG -#rec.doDumpTES=True - -rec.doMonitoring.set_Value_and_Lock(True) -from AthenaMonitoring.DQMonFlags import DQMonFlags -DQMonFlags.monManEnvironment.set_Value_and_Lock('tier0ESD')#produces run directories -#DQMonFlags.monManEnvironment.set_Value_and_Lock('user')#doesn't produce run directories - -DQMonFlags.doInDetAlignMon.set_Value_and_Lock(False) -#disable all monitoring other than alignment (too susceptible to crashes) -DQMonFlags.doPixelMon.set_Value_and_Lock(False) -DQMonFlags.doSCTMon.set_Value_and_Lock(False) -DQMonFlags.doTRTMon.set_Value_and_Lock(False) -DQMonFlags.doInDetGlobalMon.set_Value_and_Lock(False) -DQMonFlags.doGlobalMon.set_Value_and_Lock(False) -DQMonFlags.doLVL1CaloMon.set_Value_and_Lock(False) -DQMonFlags.doCTPMon.set_Value_and_Lock(False) -DQMonFlags.doHLTMon.set_Value_and_Lock(False) -DQMonFlags.doTRTElectronMon.set_Value_and_Lock(False) -DQMonFlags.doTileMon.set_Value_and_Lock(False) -DQMonFlags.doLArMon.set_Value_and_Lock(False) -DQMonFlags.doCaloMon.set_Value_and_Lock(False) -DQMonFlags.doEgammaMon.set_Value_and_Lock(False) -DQMonFlags.doMissingEtMon.set_Value_and_Lock(False) -DQMonFlags.doJetMon.set_Value_and_Lock(False) -DQMonFlags.doTauMon.set_Value_and_Lock(False) -DQMonFlags.doJetTagMon.set_Value_and_Lock(False) -DQMonFlags.doLucidMon.set_Value_and_Lock(False) -DQMonFlags.doInDetPerfMon.set_Value_and_Lock(False) -# muon monitoring -DQMonFlags.doMuonSegmentMon.set_Value_and_Lock(False) -DQMonFlags.doMuonTrackMon.set_Value_and_Lock(False) -DQMonFlags.doMuonAlignMon.set_Value_and_Lock(False) -DQMonFlags.doMuonPhysicsMon.set_Value_and_Lock(False) -DQMonFlags.doMuonTrkPhysMon.set_Value_and_Lock(False) -DQMonFlags.doMuonCombinedMon.set_Value_and_Lock(False) -# muon raw monitoring -DQMonFlags.doMuonRawMon.set_Value_and_Lock(True) -# muon raw monitoring - all det off but RPC and RPCL1 -from MuonDQAMonFlags.MuonDQAProperFlags import MuonDQADetFlags -MuonDQADetFlags.doMDTMon.set_Value_and_Lock(False) -MuonDQADetFlags.doCSCMon.set_Value_and_Lock(False) -MuonDQADetFlags.doTGCMon.set_Value_and_Lock(False) -MuonDQADetFlags.doMDTRPCMon.set_Value_and_Lock(False) -MuonDQADetFlags.doMDTTGCL1Mon.set_Value_and_Lock(False) -MuonDQADetFlags.doTGCL1Mon.set_Value_and_Lock(False) -# -MuonDQADetFlags.doRPCMon.set_Value_and_Lock(True) -MuonDQADetFlags.doRPCL1Mon.set_Value_and_Lock(True) - - -############### -### try here GRL selection -# Configure the goodrunslist selector tool -from GoodRunsLists.GoodRunsListsConf import * -ToolSvc += GoodRunsListSelectorTool() -GoodRunsListSelectorTool.GoodRunsListVec = [ 'data15_13TeV.periodAllYear_DetStatus-v71-pro19-06_DQDefects-00-01-02_PHYS_StandardGRL_All_Good_25ns.xml' ] -GoodRunsListSelectorTool.PassThrough = False -## This Athena job consists of algorithms that loop over events; -## here, the (default) top sequence is used: -from AthenaCommon.AlgSequence import AlgSequence, AthSequencer -#job = AlgSequence() -seq = AthSequencer("AthMasterSeq") -## AthMasterSeq is always executed before the top sequence, and is configured such that -## any follow-up sequence (eg. top sequence) is not executed in case GRLTriggerAlg1 does -## not pass the event -## In short, the sequence AthMasterSeq makes sure that all algs in the job sequence -## are skipped when an event gets rejects -from GoodRunsListsUser.GoodRunsListsUserConf import * -seq += GRLTriggerSelectorAlg('GRLTriggerAlg1') -seq.GRLTriggerAlg1.GoodRunsListArray = ['PHYS_StandardGRL_All_Good_25ns'] ## pick up correct name from inside xml file! -#seq.GRLTriggerAlg1.TriggerSelectionRegistration = 'L1_MBTS_1' ## set this to your favorite trigger, eg. L1_MBTS_1_1 -#seq.GRLTriggerAlg1.OutputLevel=DEBUG -############### - - -# main jobOption -include ("RecExCommon/RecExCommon_topOptions.py") - - -# user modifier of properties should come here -#topSequence.myAlg.someProperty=3.14 -# -#from GeoModelSvc.GeoModelSvcConf import GeoModelSvc -#GeoModelSvc = GeoModelSvc() -#GeoModelSvc.IgnoreTagDifference=True -# -from RpcRawDataMonitoring.RpcRawDataMonitoringConf import RpcRawDataValAlg -# the following true to have strip profiles -RpcRawDataValAlg.doCoolDB = True -# -from RpcRawDataMonitoring.RpcRawDataMonitoringConf import RPCStandaloneTracksMon -# the following true to have tomography -# RPCStandaloneTracksMon.doRadiography = True -# the following true to have per strip timing and efficiency -RPCStandaloneTracksMon.doCoolDB = True -RPCStandaloneTracksMon.StandAloneMatchedWithTrack = True -RPCStandaloneTracksMon.selectTriggerChainGroup = True -RPCStandaloneTracksMon.deSelectTriggerChainGroup = False -#RPCStandaloneTracksMon.OutputLevel=DEBUG -#to select HLT muon triggers ------------------------------ -#RPCStandaloneTracksMon.triggerChainGroupRegExp='HLT_mu.*' -#to select ortogonal (to muons) triggers ------------------------------ -RPCStandaloneTracksMon.triggerChainGroupRegExp='HLT_(e[0-9]*_loose_L1EM[0-9]*|e[0-9]*_lhmedium_L1EM[0-9]*VH|g[0-9]*_loose|2g[0-9]*_tight|tau[0-9]*_medium1_tracktwo|j[0-9]*_320eta490|j[0-9]*|[0-9]j[0-9]*|xe[0-9]*|j[0-9]*_xe[0-9]*|j[0-9]*_bmedium_split|j[0-9]*_bloose_split)' - - -#svcMgr.MessageSvc.OutputLevel=VERBOSE -svcMgr.MessageSvc.defaultLimit=9999999 -#RPCStandaloneTracksMon.OutputLevel=DEBUG - diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runHLTEMPTY_jobOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runHLTEMPTY_jobOptions.py deleted file mode 100644 index 77eb9f59b2db07e4fef66ac40dabeec738764dcd..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runHLTEMPTY_jobOptions.py +++ /dev/null @@ -1,110 +0,0 @@ -############################################################################################################ -### Input stream -############################################################################################################ -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags - -import RpcRawDataMonitoring.RpcOccupancy_Config as AthRead # python/RpcOccupancy_Config - -import os - -if 'EvtMax' in dir(): - athenaCommonFlags.EvtMax = EvtMax -else: - athenaCommonFlags.EvtMax = -1 - -file_list = [] -if os.path.exists('input.txt'): - infile = open('input.txt', "r") - file_list = infile.readlines() - file_list = [ filename.strip() for filename in file_list ] - print "read files path from input.txt ." - print "files paths: \n", file_list -else: - file_list = ['/eos/atlas/atlascerngroupdisk/det-rpc/data/DESDM_MCP/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024._0967.1'] - print "file input.txt does not exist" - print "files paths: \n", file_list - - -# athenaCommonFlags.FilesInput = ['/eos/atlas/atlascerngroupdisk/det-rpc/data/DESDM_MCP/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024._0084.1'] -athenaCommonFlags.FilesInput = file_list - -if 'outfile' not in dir(): - outfile = 'rpcmon_HLTEMPTY' - -print '======================================================================' -print 'Output file name: %s\n' %(outfile+".root") -print '======================================================================' - -############################################################################################################ -### Configure tools and services -############################################################################################################ - -if 'writeGeo' not in dir(): - writeGeo = False - -if 'writeIDTracks' not in dir(): - writeIDTracks = True - -#-------------------------------------------------------------------------------------- -# Include and configure RecExCommon -# -include('RpcRawDataMonitoring/CommonConfig_RpcRawDataMonitoring.py') - -include('RecExCommon/RecExCommon_topOptions.py') - -#-------------------------------------------------------------------------------------- -# Must setup cabling services AFTER RecExCommon -# -import MuonCnvExample.MuonCablingConfig -import MuonRPC_Cabling.MuonRPC_CablingConfig - -#-------------------------------------------------------------------------------------- -# Configure region selector tools -# -from RegionSelector.RegSelSvcDefault import RegSelSvcDefault -theRegSelSvc = RegSelSvcDefault() -theRegSelSvc.enableMuon = True -theRegSelSvc.enableMDT = False -theRegSelSvc.enableCSC = False -theRegSelSvc.enableTGC = False -theRegSelSvc.enableRPC = True -ServiceMgr += theRegSelSvc - -#-------------------------------------------------------------------------------------- -# Set output using thistsvc -# -from GaudiSvc.GaudiSvcConf import THistSvc -svcMgr += THistSvc() -svcMgr.THistSvc.Output += [outfile+" DATAFILE='%s' OPT='RECREATE'" %(outfile+".root")] - -svcMgr.MessageSvc.OutputLevel = INFO -svcMgr.MessageSvc.infoLimit = 0 - -#-------------------------------------------------------------------------------------- -# Configure algorithm sequence -# -from AthenaCommon.AlgSequence import AlgSequence -job = AlgSequence() - -trig_decision_tool = CfgMgr.Trig__TrigDecisionTool('TrigDecisionTool', TrigDecisionKey = 'xTrigDecision') -ToolSvc += trig_decision_tool - -job += AthRead.histos_HLT_EMPTY(CfgMgr, outfile) - - -#-------------------------------------------------------------------------------------- -# Print debug info -print "if ServiceMgr==svcMgr: ", ServiceMgr==svcMgr - - -if 'debug' in dir(): - print ToolSvc - print "ServiceMgr --------" - print ServiceMgr - print "svcMgr ------------" - print svcMgr.MessageSvc - -if 'dumpSG' in dir(): - StoreGateSvc = Service('StoreGateSvc') - StoreGateSvc.Dump = dumpSG - diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runHLTMU26_jobOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runHLTMU26_jobOptions.py deleted file mode 100644 index 341a6661de96d9b9740888ac6a4cb755493de086..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runHLTMU26_jobOptions.py +++ /dev/null @@ -1,110 +0,0 @@ -############################################################################################################ -### Input stream -############################################################################################################ -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags - -import RpcRawDataMonitoring.RpcOccupancy_Config as AthRead # python/RpcOccupancy_Config - -import os - -if 'EvtMax' in dir(): - athenaCommonFlags.EvtMax = EvtMax -else: - athenaCommonFlags.EvtMax = -1 - -file_list = [] -if os.path.exists('input.txt'): - infile = open('input.txt', "r") - file_list = infile.readlines() - file_list = [ filename.strip() for filename in file_list ] - print "read files path from input.txt ." - print "files paths: \n", file_list -else: - file_list = ['/eos/atlas/atlascerngroupdisk/det-rpc/data/DESDM_MCP/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024._0967.1'] - print "file input.txt does not exist" - print "files paths: \n", file_list - - -# athenaCommonFlags.FilesInput = ['/eos/atlas/atlascerngroupdisk/det-rpc/data/DESDM_MCP/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024._0084.1'] -athenaCommonFlags.FilesInput = file_list - -if 'outfile' not in dir(): - outfile = 'rpcmon_HLTMU26' - -print '======================================================================' -print 'Output file name: %s\n' %(outfile+".root") -print '======================================================================' - -############################################################################################################ -### Configure tools and services -############################################################################################################ - -if 'writeGeo' not in dir(): - writeGeo = False - -if 'writeIDTracks' not in dir(): - writeIDTracks = True - -#-------------------------------------------------------------------------------------- -# Include and configure RecExCommon -# -include('RpcRawDataMonitoring/CommonConfig_RpcRawDataMonitoring.py') - -include('RecExCommon/RecExCommon_topOptions.py') - -#-------------------------------------------------------------------------------------- -# Must setup cabling services AFTER RecExCommon -# -import MuonCnvExample.MuonCablingConfig -import MuonRPC_Cabling.MuonRPC_CablingConfig - -#-------------------------------------------------------------------------------------- -# Configure region selector tools -# -from RegionSelector.RegSelSvcDefault import RegSelSvcDefault -theRegSelSvc = RegSelSvcDefault() -theRegSelSvc.enableMuon = True -theRegSelSvc.enableMDT = False -theRegSelSvc.enableCSC = False -theRegSelSvc.enableTGC = False -theRegSelSvc.enableRPC = True -ServiceMgr += theRegSelSvc - -#-------------------------------------------------------------------------------------- -# Set output using thistsvc -# -from GaudiSvc.GaudiSvcConf import THistSvc -svcMgr += THistSvc() -svcMgr.THistSvc.Output += [outfile+" DATAFILE='%s' OPT='RECREATE'" %(outfile+".root")] - -svcMgr.MessageSvc.OutputLevel = INFO -svcMgr.MessageSvc.infoLimit = 0 - -#-------------------------------------------------------------------------------------- -# Configure algorithm sequence -# -from AthenaCommon.AlgSequence import AlgSequence -job = AlgSequence() - -trig_decision_tool = CfgMgr.Trig__TrigDecisionTool('TrigDecisionTool', TrigDecisionKey = 'xTrigDecision') -ToolSvc += trig_decision_tool - -job += AthRead.histos_HLT_MU26(CfgMgr, outfile) - - -#-------------------------------------------------------------------------------------- -# Print debug info -print "if ServiceMgr==svcMgr: ", ServiceMgr==svcMgr - - -if 'debug' in dir(): - print ToolSvc - print "ServiceMgr --------" - print ServiceMgr - print "svcMgr ------------" - print svcMgr.MessageSvc - -if 'dumpSG' in dir(): - StoreGateSvc = Service('StoreGateSvc') - StoreGateSvc.Dump = dumpSG - diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runNoHLT_jobOptions.py b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runNoHLT_jobOptions.py deleted file mode 100644 index cc8d2562eaee0cd5f580e6cf5561e678819f0618..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/share/runNoHLT_jobOptions.py +++ /dev/null @@ -1,119 +0,0 @@ -############################################################################################################ -### Input stream -############################################################################################################ -from AthenaCommon.AthenaCommonFlags import athenaCommonFlags - -import RpcRawDataMonitoring.RpcOccupancy_Config as AthRead # python/RpcOccupancy_Config - -import os - -if 'EvtMax' in dir(): - athenaCommonFlags.EvtMax = EvtMax -else: - athenaCommonFlags.EvtMax = -1 - -file_list = [] -if os.path.exists('input.txt'): - infile = open('input.txt', "r") - file_list = infile.readlines() - file_list = [ filename.strip() for filename in file_list ] - print "read files path from input.txt ." - print "files paths: \n", file_list -else: - file_list = ['/eos/atlas/atlascerngroupdisk/det-rpc/data/DESDM_MCP/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024._0967.1'] - print "file input.txt does not exist" - print "files paths: \n", file_list - - -# athenaCommonFlags.FilesInput = ['/eos/atlas/atlascerngroupdisk/det-rpc/data/DESDM_MCP/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024/data18_13TeV.00358615.physics_Main.merge.DESDM_MCP.f961_m2024._0084.1'] -athenaCommonFlags.FilesInput = file_list - -if 'outfile' not in dir(): - outfile = 'rpcmon' - -print '======================================================================' -print 'Output file name: %s\n' %(outfile+".root") -print '======================================================================' - -############################################################################################################ -### Configure tools and services -############################################################################################################ - -if 'writeGeo' not in dir(): - writeGeo = False - -if 'writeIDTracks' not in dir(): - writeIDTracks = True - -#-------------------------------------------------------------------------------------- -# Include and configure RecExCommon -# -include('RpcRawDataMonitoring/CommonConfig_RpcRawDataMonitoring.py') - -include('RecExCommon/RecExCommon_topOptions.py') - -#-------------------------------------------------------------------------------------- -# Must setup cabling services AFTER RecExCommon -# -import MuonCnvExample.MuonCablingConfig -import MuonRPC_Cabling.MuonRPC_CablingConfig - -#-------------------------------------------------------------------------------------- -# Configure region selector tools -# -from RegionSelector.RegSelSvcDefault import RegSelSvcDefault -theRegSelSvc = RegSelSvcDefault() -theRegSelSvc.enableMuon = True -theRegSelSvc.enableMDT = False -theRegSelSvc.enableCSC = False -theRegSelSvc.enableTGC = False -theRegSelSvc.enableRPC = True -ServiceMgr += theRegSelSvc - -#-------------------------------------------------------------------------------------- -# Set output using thistsvc -# -from GaudiSvc.GaudiSvcConf import THistSvc -svcMgr += THistSvc() -svcMgr.THistSvc.Output += [outfile+" DATAFILE='%s' OPT='RECREATE'" %(outfile+".root")] - -svcMgr.MessageSvc.OutputLevel = INFO -svcMgr.MessageSvc.infoLimit = 0 - -#-------------------------------------------------------------------------------------- -# Configure algorithm sequence -# -from AthenaCommon.AlgSequence import AlgSequence -job = AlgSequence() - -trig_decision_tool = CfgMgr.Trig__TrigDecisionTool('TrigDecisionTool', TrigDecisionKey = 'xTrigDecision') -ToolSvc += trig_decision_tool - -job += AthRead.histos(CfgMgr, outfile) - - -#-------------------------------------------------------------------------------------- -# Print debug info -print "if ServiceMgr==svcMgr: ", ServiceMgr==svcMgr - -print "Test_____0" -athenaEventLoopMgr = Service('AthenaEventLoopMgr') - -print "Test_____1" -athenaEventLoopMgr.EventPrintoutInterval = 100 -print "Test_____2" - -theApp.ReflexPluginDebugLevel = 10000 -print "Test_____3" - -if 'debug' in dir(): - print ToolSvc - print "ServiceMgr --------" - print ServiceMgr - print "svcMgr ------------" - print svcMgr.MessageSvc - -if 'dumpSG' in dir(): - StoreGateSvc = Service('StoreGateSvc') - StoreGateSvc.Dump = dumpSG - diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RPCLv1AnaAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RPCLv1AnaAlg.cxx index 084f519d2418e897992e9d564b90c4d0c9c03d58..b54fb8e10d2c34cca2ef2364bcc8c6b3523b0fbb 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RPCLv1AnaAlg.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RPCLv1AnaAlg.cxx @@ -68,13 +68,13 @@ StatusCode RPCLv1AnaAlg::fillHistograms(const EventContext& ctx) const std::vector<const xAOD::MuonRoI*> roisBarrel; std::vector< std::vector<const xAOD::MuonRoI*> > roisBarrelThr1(6); + /* raw LVL1MuonRoIs */ SG::ReadHandle<xAOD::MuonRoIContainer> muonRoIs(m_l1RoiContainerKey, ctx); if(!muonRoIs.isValid()){ ATH_MSG_ERROR("evtStore() does not contain muon L1 ROI Collection with name "<< m_l1RoiContainerKey); return StatusCode::FAILURE; } - roiEtaVec.reserve(muonRoIs->size()); roiBarrelEtaVec.reserve(muonRoIs->size()); roiBarrelThrVec.reserve(muonRoIs->size()); @@ -104,6 +104,7 @@ StatusCode RPCLv1AnaAlg::fillHistograms(const EventContext& ctx) const fill(tool, roiBarrelEtaCollection); fill(tool, roiBarrelThrCollection); + // // match muon and roi // diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RPCMonitorAlgorithm.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RPCMonitorAlgorithm.cxx deleted file mode 100644 index e8a183ec2c2df0aa25f9e0dbcb81ccde9c18ea97..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RPCMonitorAlgorithm.cxx +++ /dev/null @@ -1,161 +0,0 @@ -/* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration -*/ - -#include "RpcRawDataMonitoring/RPCMonitorAlgorithm.h" - -//======================================================================================================== -RPCMonitorAlgorithm::RPCMonitorAlgorithm (const std::string& name, ISvcLocator* pSvcLocator) - :AthMonitorAlgorithm(name,pSvcLocator) -{} - -RPCMonitorAlgorithm::~RPCMonitorAlgorithm() {} - -//======================================================================================================== -StatusCode RPCMonitorAlgorithm::initialize() -{ - ATH_CHECK( m_MuonContainerKey .initialize()); - ATH_CHECK( m_rpcPadContainerKey.initialize()); - ATH_CHECK( m_l1RoiContainerKey .initialize(SG::AllowEmpty)); - - return AthMonitorAlgorithm::initialize(); -} - -//======================================================================================================== -StatusCode RPCMonitorAlgorithm::fillHistograms(const EventContext& ctx) const -{ - using namespace Monitored; - - //Declare the quantities which should be monitored - auto run = Monitored::Scalar<int>("run", 0); - auto nMu = Monitored::Scalar<int>("nMu", 0); - auto nMuBarrel = Monitored::Scalar<int>("nMuBarrel", 0); - - std::vector<double> muPtVec = {}; - std::vector<double> roiEtaVec = {}; - std::vector<double> roiBarrelEtaVec = {}; - - std::vector<int> roiBarrelThrVec = {}; - - ATH_MSG_VERBOSE("Events processed: "<<ctx.evt()); - - run = GetEventInfo(ctx)->runNumber(); - - // - // read muons - // - SG::ReadHandle<xAOD::MuonContainer> muons(m_MuonContainerKey, ctx); - - if(!muons.isValid()) { - ATH_MSG_ERROR("evtStore() does not contain muon Collection with name "<< m_MuonContainerKey); - return StatusCode::FAILURE; - } - - nMu = muons->size(); - - // - // fill muon Pt - // - for(const auto muonItr : *muons) { - muPtVec.push_back(muonItr->pt()); - } - auto muPtCollection = Collection("muPtCollection", muPtVec); - - // - // read rois - // - std::vector<const xAOD::MuonRoI*> roisBarrel; - std::vector<const xAOD::MuonRoI*> roisBarrelThr1; - - if (! m_l1RoiContainerKey.empty()) { - SG::ReadHandle<xAOD::MuonRoIContainer> muonRoIs(m_l1RoiContainerKey, ctx); - if(!muonRoIs.isValid()){ - ATH_MSG_ERROR("evtStore() does not contain muon L1 ROI Collection with name "<< m_l1RoiContainerKey); - return StatusCode::FAILURE; - } - - for(const auto roi : *muonRoIs) { - roiEtaVec.push_back(roi->eta()); - if(roi->getSource() != xAOD::MuonRoI::RoISource::Barrel) { - continue; - } - - roiBarrelEtaVec.push_back(roi->eta()); - roiBarrelThrVec.push_back(roi->getThrNumber()); - roisBarrel.push_back(roi); - // - // collect roi according to the threshold - // - int thr = roi->getThrNumber(); - if(thr >= 1) roisBarrelThr1.push_back(roi); - } - } - auto roiEtaCollection = Collection("roiEtaCollection", roiEtaVec); - auto roiBarrelEtaCollection = Collection("roiBarrelEtaCollection", roiBarrelEtaVec); - auto roiBarrelThrCollection = Collection("roiBarrelThrCollection", roiBarrelThrVec); - - // - // match muon and roi - // - for(const auto muon : *muons) { - - float pt = muon->pt(); - float eta = muon->eta(); - float phi = muon->phi(); - - xAOD::Muon::Quality quality = muon->quality(); - - if(std::abs(pt) < m_minPt || std::abs(eta) < m_minEta || std::abs(eta) > m_maxEta) { - continue; - } - if(!(quality <= m_quality)) { - continue; - } - // to add impact parameter cuts - nMuBarrel++; - // - // to fill denominator - // - auto ptDen = Monitored::Scalar<float>("ptDen", pt); - auto etaDen = Monitored::Scalar<float>("etaDen", eta); - auto phiDen = Monitored::Scalar<float>("phiDen", phi); - auto isPassed = Monitored::Scalar<bool>("isPassed", false); - - for(const auto& roi : roisBarrelThr1) { - - const double dphi = TVector2::Phi_mpi_pi(roi->phi() - phi); - const double deta = roi->eta() - eta; - const double dr = std::sqrt(dphi*dphi + deta*deta); - - if(dr > m_minRoIDR) { - continue; - } - isPassed = true; - } - - fill("RPCMonitorAlgorithm", ptDen, etaDen, phiDen, isPassed); - - if(isPassed) { - auto ptNumThr1 = Monitored::Scalar<float>("ptNumThr1", pt); - auto etaNumThr1 = Monitored::Scalar<float>("etaNumThr1", eta); - auto phiNumThr1 = Monitored::Scalar<float>("phiNumThr1", phi); - fill("RPCMonitorAlgorithm", ptNumThr1, etaNumThr1, phiNumThr1); - } - } - - // - // Fill histograms - // - auto tool = getGroup("RPCMonitorAlgorithm"); - - fill(tool, muPtCollection); - fill(tool, roiEtaCollection); - fill(tool, roiBarrelEtaCollection); - fill(tool, roiBarrelThrCollection); - - fill(tool, run); - fill(tool, nMu); - fill(tool, nMuBarrel); - - return StatusCode::SUCCESS; -} diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RpcOccupancyAnalysis.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RpcOccupancyAnalysis.cxx deleted file mode 100644 index cb858bbacc56a535b4ca0ad24c742b06ac04e8be..0000000000000000000000000000000000000000 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RpcOccupancyAnalysis.cxx +++ /dev/null @@ -1,276 +0,0 @@ -// C/C++ -#include <iostream> -#include <set> -#include <string> -#include <sstream> -#include <typeinfo> -#include <fstream> -// root -#include "TObjArray.h" - -// Athena -#include "MuonReadoutGeometry/RpcReadoutElement.h" -#include "MuonReadoutGeometry/RpcDetectorElement.h" - -// Local -#include "RpcRawDataMonitoring/RpcOccupancyAnalysis.h" - -//================================================================================================ -RpcOccupancyAnalysis::RpcOccupancyAnalysis (const std::string& name, ISvcLocator *pSvcLocator): - AthMonitorAlgorithm(name,pSvcLocator) -{} - -//================================================================================================ -RpcOccupancyAnalysis::~RpcOccupancyAnalysis () {} - -//================================================================================================ -StatusCode RpcOccupancyAnalysis::initialize () -{ - ATH_CHECK( AthMonitorAlgorithm::initialize()); - - ATH_CHECK( detStore()->retrieve(m_muonMgr) ); - ATH_CHECK( m_idHelperSvc.retrieve()); - ATH_CHECK( m_eventInfo.initialize() ); - ATH_CHECK( m_rpcPrdKey.initialize() ); - - m_dataType = dataTypeStringToEnum(m_dataTypeStr); - ATH_CHECK( m_lumiDataKey.initialize (m_useLumi) ); - ATH_CHECK( m_lbDurationDataKey.initialize (m_useLumi && m_dataType != DataType_t::monteCarlo) ); - - ATH_CHECK( initRpcPanel() ); - - // Time Tag - // All: whole range of readout window, 8BCs, = 200ns - // B3 : 3 BCs before BC0, = 75 ns - // C1 : BC0, = 25 ns - // A3 : 3 BCs after BC0, = 75 ns - std::vector<std::string> timeTags = {"All", "B3", "C1", "A3"}; - m_timeTagGroups = Monitored::buildToolMap<int>(m_tools, "RpcOccupancyAnalysis", timeTags); - - ATH_MSG_INFO(" RpcOccupancyAnalysis initialize END "); - return StatusCode::SUCCESS; -} - -//======================================================================================================== -StatusCode RpcOccupancyAnalysis::initRpcPanel() -{ - /* - Iterate over all RpcDetectorElements and RpcReadoutElements - and cache locally all panel - */ - ATH_MSG_INFO( name() << " - RpcOccupancyAnalysis::initRpcPanel - start" ); - const RpcIdHelper& rpcIdHelper = m_idHelperSvc->rpcIdHelper(); - - int nValidPanel = 0; - int panelIn = 0; - - for(unsigned idetEl = 0; idetEl < MuonGM::MuonDetectorManager::RpcDetElMaxHash; ++idetEl) { - const MuonGM::RpcDetectorElement *detEl = m_muonMgr->getRpcDetectorElement(idetEl); - - if(!detEl) { - continue; - } - - for(int doubletZ = 1; doubletZ <= 3; ++doubletZ) { - for(unsigned doubletPhi = 1; doubletPhi <= 2; ++doubletPhi) { - - const MuonGM::RpcReadoutElement *readoutEl = detEl->getRpcReadoutElement(doubletZ, doubletPhi); - - if(!readoutEl) { - continue; - } - - const Identifier readEl_id = readoutEl->identify(); - int doubletZMax = rpcIdHelper.doubletZMax(readEl_id); - - if (doubletZ > doubletZMax){ - continue; - } - - for(unsigned gasgap = 1; gasgap <= 2; ++gasgap) { - std::shared_ptr<RpcPanel> rpcPanel_eta = std::make_shared<RpcPanel>(*m_idHelperSvc, readoutEl, doubletZ, doubletPhi, gasgap, 0, panelIn); - std::shared_ptr<RpcPanel> rpcPanel_phi = std::make_shared<RpcPanel>(*m_idHelperSvc, readoutEl, doubletZ, doubletPhi, gasgap, 1, panelIn); - - if(rpcPanel_eta->panel_valid) { - m_rpcPanelMap.insert(std::map<Identifier, std::shared_ptr<RpcPanel>>::value_type(rpcPanel_eta->panelId, rpcPanel_eta)); - nValidPanel ++; - } - - if(rpcPanel_phi->panel_valid) { - m_rpcPanelMap.insert(std::map<Identifier, std::shared_ptr<RpcPanel>>::value_type(rpcPanel_phi->panelId, rpcPanel_phi)); - nValidPanel ++; - } - } - } - } - } - - ATH_MSG_INFO( "nValidPanel = "<<nValidPanel ); - - return StatusCode::SUCCESS; -} - -//================================================================================================ -StatusCode RpcOccupancyAnalysis::fillHistograms(const EventContext& ctx) const -{ - using namespace Monitored; - - SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfo, ctx); - int e_lumiBlock = eventInfo->lumiBlock(); - - if (!m_lumiDataKey.empty() && ! m_lbDurationDataKey.empty()) { - - SG::ReadCondHandle<LuminosityCondData> lumi(m_lumiDataKey, ctx); - SG::ReadCondHandle<LBDurationCondData> dur(m_lbDurationDataKey, ctx); - - double e_lbAverageLuminosity = lumi->lbAverageLuminosity(); - double e_lbDuration = dur->lbDuration(); - - if (e_lbAverageLuminosity < m_avrLumiThr || e_lbDuration < m_lbDuraThr ) { - ATH_MSG_DEBUG( " This Luminosity block doesn't pass lbAverageLuminosity and luminosity block duration selection. "); - - return StatusCode::SUCCESS; - } - } - - if(m_plotPRD) { - ATH_CHECK( fillHistPRD(ctx) ); - } - - auto tool = getGroup(m_packageName); - auto evtLB = Scalar<int>("evtLB", e_lumiBlock); - auto run = Scalar<int>("run", eventInfo->runNumber()); - fill(tool, evtLB, run); - - return StatusCode::SUCCESS; -} - -//================================================================================================ -StatusCode RpcOccupancyAnalysis::fillHistPRD(const EventContext& ctx) const -{ - using namespace Monitored; - // - // Read RPC Prepare data - // - - SG::ReadHandle<Muon::RpcPrepDataContainer> rpcContainer(m_rpcPrdKey, ctx); - const RpcIdHelper& rpcIdHelper = m_idHelperSvc->rpcIdHelper(); - - SG::ReadHandle<xAOD::EventInfo> eventInfo(m_eventInfo, ctx); - const int i_lb = eventInfo->lumiBlock(); - std::vector<double> v_prdTime = {}; - - auto prd_sec_all = Scalar<int>("prd_sec", 0 ); - auto prd_layer_all = Scalar<int>("prd_layer", 0 ); - auto prd_sec_1214 = Scalar<int>("prd_sec_1214", 0 ); - auto prd_layer_1214 = Scalar<int>("prd_layer_1214", 0 ); - - auto prd_sec_all_eta = Scalar<int>("prd_sec_eta", 0 ); - auto prd_layer_all_eta = Scalar<int>("prd_layer_eta", 0 ); - auto prd_sec_all_phi = Scalar<int>("prd_sec_phi", 0 ); - auto prd_layer_all_phi = Scalar<int>("prd_layer_phi", 0 ); - - auto i_prd_LB = Scalar<int>("LB", i_lb ); - auto i_panelIndex = Scalar<int>("panelInd", 0 ); - - auto i_panelIndex_geo = Scalar<int>("panelInd_geo", 0 ); - auto i_prd_stationName = Scalar<int>("StationName", 0 ); - auto i_prd_stationEta = Scalar<int>("StationEta", 0 ); - auto i_prd_stationPhi = Scalar<int>("StationPhi", 0 ); - auto i_prd_doubletR = Scalar<int>("DoubletR", 0 ); - auto i_prd_doubletZ = Scalar<int>("DoubletZ", 0 ); - auto i_prd_doubletPhi = Scalar<int>("DoubletPhi", 0 ); - auto i_prd_gasGap = Scalar<int>("GasGap", 0 ); - auto i_prd_measPhi = Scalar<int>("MeasPhi", -1); - - auto tool = getGroup(m_packageName); - - int panel_index; - std::pair<int, int> sec_layer; - - // - // loop on RpcPrepData container - // - for(const Muon::RpcPrepDataCollection *rpcCollection: *rpcContainer) { - if(!rpcCollection) { - continue; - } - - // - // loop on RpcPrepData - // - for(const Muon::RpcPrepData* rpcData: *rpcCollection) { - if(!rpcData) { - continue; - } - - Identifier id = rpcData->identify(); - const int measphi = rpcIdHelper.measuresPhi(id); - - auto temp_panel = std::make_unique<RpcPanel>(id, rpcIdHelper); - - std::map<Identifier, std::shared_ptr<RpcPanel>>::const_iterator i_panel=m_rpcPanelMap.find(temp_panel->panelId); - if (i_panel == m_rpcPanelMap.end()){ - ATH_MSG_WARNING( "The panelID corresponding prd hit does NOT link to a known Panel !!!" ); - continue; - } - else{ - panel_index = i_panel->second->panel_index; - } - - sec_layer = temp_panel->getSectorLayer(); - prd_sec_all = sec_layer.first; - prd_layer_all = sec_layer.second; - - if (std::abs(sec_layer.first)==12 || std::abs(sec_layer.first)==14){ - prd_sec_1214 = sec_layer.first; - prd_layer_1214 = sec_layer.second; - } - - fill(tool, prd_sec_all, prd_layer_all, prd_sec_1214, prd_layer_1214); - - if (measphi == 0){ - prd_sec_all_eta = sec_layer.first; - prd_layer_all_eta = sec_layer.second; - fill(tool, prd_sec_all_eta, prd_layer_all_eta); - } - else{ - prd_sec_all_phi = sec_layer.first; - prd_layer_all_phi = sec_layer.second; - fill(tool, prd_sec_all_phi, prd_layer_all_phi); - } - - i_panelIndex = panel_index; - fill(m_tools[m_timeTagGroups.at("All")], i_prd_LB, i_panelIndex); - - if(std::abs(rpcData->time()) < 12.5) { - fill(m_tools[m_timeTagGroups.at("C1")], i_prd_LB, i_panelIndex); - } - else if(-87.5 < rpcData->time() && rpcData->time() < -12.5) { - fill(m_tools[m_timeTagGroups.at("B3")], i_prd_LB, i_panelIndex); - } - else if (12.5 < rpcData->time() && rpcData->time() < 87.5) { - fill(m_tools[m_timeTagGroups.at("A3")], i_prd_LB, i_panelIndex); - } - - i_panelIndex_geo = panel_index; - i_prd_stationName = i_panel->second->stationName; - i_prd_stationEta = i_panel->second->stationEta ; - i_prd_stationPhi = i_panel->second->stationPhi ; - i_prd_doubletR = i_panel->second->doubletR ; - i_prd_doubletZ = i_panel->second->doubletZ ; - i_prd_doubletPhi = i_panel->second->doubletPhi ; - i_prd_gasGap = i_panel->second->gasGap ; - i_prd_measPhi = i_panel->second->measPhi ; - fill(tool, i_panelIndex_geo, i_prd_stationName, i_prd_stationEta, i_prd_stationPhi, i_prd_doubletR, i_prd_doubletZ, i_prd_doubletPhi, i_prd_gasGap, i_prd_measPhi); - - v_prdTime.push_back(rpcData->time()); - } // loop on RpcPrepData - } // loop on RpcPrepData container - - auto prdTimeCollection = Collection("prdTime", v_prdTime); - fill(tool, prdTimeCollection); - - ATH_MSG_DEBUG( " fillHistPRD finished " ); - return StatusCode::SUCCESS; -} diff --git a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RpcTrackAnaAlg.cxx b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RpcTrackAnaAlg.cxx index 57519d529272ea137d6a7238d5ef9ac8444fea31..e96132f3f3a76c6a70de0453388dd9bec2b9315e 100644 --- a/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RpcTrackAnaAlg.cxx +++ b/MuonSpectrometer/MuonValidation/MuonDQA/MuonRawDataMonitoring/RpcRawDataMonitoring/src/RpcTrackAnaAlg.cxx @@ -37,7 +37,7 @@ StatusCode RpcTrackAnaAlg::initialize () ATH_CHECK( m_lumiDataKey.initialize (m_useLumi) ); ATH_CHECK( m_lbDurationDataKey.initialize (m_useLumi && m_dataType != DataType_t::monteCarlo) ); - ATH_CHECK( m_MuonRoIContainerKey.initialize() ); + ATH_CHECK( m_MuonRoIContainerKey.initialize(SG::AllowEmpty) ); ATH_CHECK( m_MuonContainerKey.initialize() ); ATH_CHECK( m_rpcPrdKey.initialize() ); @@ -191,15 +191,14 @@ StatusCode RpcTrackAnaAlg::fillMuonExtrapolateEff(const EventContext& ctx) const using namespace Monitored; auto tool = getGroup(m_packageName); - xAOD::MuonRoIContainer rois; if (!m_MuonRoIContainerKey.empty()) { - /* raw LVL1MuonRoIs distributions */ - auto roisptr = SG::get<xAOD::MuonRoIContainer>(m_MuonRoIContainerKey, ctx); - if(! roisptr){ - ATH_MSG_ERROR("evtStore() does not contain muon RoI Collection with name "<< m_MuonRoIContainerKey); + /* raw LVL1MuonRoIs */ + SG::ReadHandle<xAOD::MuonRoIContainer > muonRoIs( m_MuonRoIContainerKey, ctx); + + if(!muonRoIs.isValid()){ + ATH_MSG_ERROR("evtStore() does not contain muon L1 ROI Collection with name "<< m_MuonRoIContainerKey); return StatusCode::FAILURE; } - rois = *roisptr; } SG::ReadHandle<xAOD::MuonContainer> muons(m_MuonContainerKey, ctx); @@ -253,7 +252,7 @@ StatusCode RpcTrackAnaAlg::fillMuonExtrapolateEff(const EventContext& ctx) const } } } - + if ( mu1_it->isolated && mu1_it->isZmumu ) { const xAOD::TrackParticle* track = mu1_it->muon->trackParticle(xAOD::Muon::MuonSpectrometerTrackParticle); if(!track) continue; @@ -428,7 +427,7 @@ StatusCode RpcTrackAnaAlg::extrapolate2RPC(const xAOD::TrackParticle *track, con -- Check that extrapolation result valid -- Check that extrapolated position is in the gas gap surface bounds if both within checks valid - then save RPC extrapolation result - */ + */ using namespace Monitored; auto tool = getGroup(m_packageName);