7 '''Function to configures some algorithms in the monitoring system.'''
12 from AthenaMonitoring.AthMonitorCfgHelper
import AthMonitorCfgHelper
13 helper = AthMonitorCfgHelper(flags,
'LArCosmicsMonAlgCfg')
15 from AthenaConfiguration.ComponentFactory
import CompFactory
18 return helper.result()
24 from LArMonitoring.GlobalVariables
import lArDQGlobals
26 larCosmicsMonAlg = helper.addAlgorithm(algoinstance,
'larCosmicsMonAlg')
28 larCosmicsMonAlg.CosmicsMonGroupName =
'LarCosmicsMonGroup'
29 larCosmicsMonAlg.MuonADCthreshold_EM_barrel = 30
30 larCosmicsMonAlg.MuonADCthreshold_EM_endcap = 40
31 larCosmicsMonAlg.MuonADCthreshold_HEC = 40
32 larCosmicsMonAlg.MuonADCthreshold_FCAL = 40
33 larCosmicsMonAlg.ProblemsToMask=[
"deadReadout",
"deadPhys",
"short",
"almostDead",
"highNoiseHG",
"highNoiseMG",
"highNoiseLG",
"sporadicBurstNoise"]
37 cosmicMonGroup = helper.addGroup(
39 larCosmicsMonAlg.CosmicsMonGroupName,
44 cosmic_path=
"Cosmics/"
46 EM_bins=
sorted(
list(
set(lArDQGlobals.Cell_Variables[
"etaRange"][
"EMEC"][
"C"][
"2"]+lArDQGlobals.Cell_Variables[
"etaRange"][
"EMB"][
"C"][
"2"]+lArDQGlobals.Cell_Variables[
"etaRange"][
"EMB"][
"A"][
"2"]+lArDQGlobals.Cell_Variables[
"etaRange"][
"EMEC"][
"A"][
"2"])))
47 cosmicMonGroup.defineHistogram(
'mon_eta_EM,mon_phi;Muon2DHitsECAL',
50 title=
'Cosmics Seeds - Digit Max > '+
str(
int(larCosmicsMonAlg.MuonADCthreshold_EM_barrel))+
'/'+
str(
int(larCosmicsMonAlg.MuonADCthreshold_EM_endcap))+
' [ADC] in S2 Barrel/Endcap - EM;#eta cell;#phi cell;Number of Hits',
52 ybins=lArDQGlobals.Cell_Variables[
"phiRange"][
"EMB"][
"A"][
"2"])
54 HEC_bins=
sorted(
list(
set(lArDQGlobals.Cell_Variables[
"etaRange"][
"HEC"][
"C"][
"1"]+lArDQGlobals.Cell_Variables[
"etaRange"][
"HEC"][
"A"][
"1"])))
55 cosmicMonGroup.defineHistogram(
'mon_eta_HEC,mon_phi;Muon2DHitsHCAL',
58 title=
'Cosmics Seeds - Digit Max > '+
str(
int(larCosmicsMonAlg.MuonADCthreshold_HEC))+
' [ADC] in S1 HEC;#eta cell;#phi cell;Number of Hits',
60 ybins=lArDQGlobals.Cell_Variables[
"phiRange"][
"HEC"][
"A"][
"1"])
62 FCal_bins=
sorted(
list(
set(lArDQGlobals.Cell_Variables[
"etaRange"][
"FCal"][
"C"][
"2"]+lArDQGlobals.Cell_Variables[
"etaRange"][
"FCal"][
"A"][
"2"])))
63 cosmicMonGroup.defineHistogram(
'mon_eta_FCal,mon_phi;Muon2DHitsFCAL',
66 title=
'Cosmics Seeds - Digit Max > '+
str(
int(larCosmicsMonAlg.MuonADCthreshold_FCAL))+
' [ADC] in S2 FCal;#eta cell;#phi cell;Number of Hits',
68 ybins=lArDQGlobals.Cell_Variables[
"phiRange"][
"FCal"][
"A"][
"2"])
73 if __name__==
'__main__':
75 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
78 from AthenaCommon.Logging
import log
82 from LArMonitoring.LArMonConfigFlags
import addLArMonFlags
83 flags.addFlagsCategory(
"LArMon", addLArMonFlags)
85 from AthenaConfiguration.TestDefaults
import defaultTestFiles
86 flags.Input.Files = defaultTestFiles.RAW_RUN2
88 flags.Output.HISTFileName =
'LArCosmicsMonOutput.root'
89 flags.DQ.enableLumiAccess =
False
90 flags.DQ.useTrigger =
False
93 from CaloRec.CaloRecoConfig
import CaloRecoCfg
96 from LArCellRec.LArNoisyROSummaryConfig
import LArNoisyROSummaryCfg
103 f=
open(
"LArCosmicsMon.pkl",
"wb")