5 from .CscMonUtils
import getCSCLabelx
9 '''Function to configures some algorithms in the monitoring system.'''
15 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
19 from MuonConfig.MuonGeometryConfig
import MuonGeoModelCfg
24 from AthenaMonitoring
import AthMonitorCfgHelper
25 helper = AthMonitorCfgHelper(inputFlags,
'CscAthMonitorCfg')
27 from AthenaConfiguration.ComponentFactory
import CompFactory
28 cscRdoMonAlg = helper.addAlgorithm(CompFactory.CscRdoValMonAlg,
'CscRdoMonAlg')
30 cscRdoMonAlg.cscNoiseCut = 100
36 from MuonConfig.MuonCSC_CnvToolsConfig
import MuonCscRDODecoderCfg
38 cscRdoMonAlg.CscRDODecoder = decodertool
40 cscRdoGroup = helper.addGroup(cscRdoMonAlg,
'CscRdoMonitor',
'Muon/MuonRawDataMonitoring/CSC/')
43 cscRdoGroup.defineHistogram(
'raw_clus_width,secLayer;h2csc_rdo_etacluswidth',cutmask=
'measuresEta',type=
'TH2F',title=
'ROD precision-cluster width;no.of strips;[sector] + [0.2 #times layer]',
44 path=
'RDO/Expert',xbins=192,xmin=0.,xmax=192.,ybins=175,ymin=-17.,ymax=18.)
45 cscRdoGroup.defineHistogram(
'raw_clus_width,secLayer;h2csc_rdo_phicluswidth',cutmask=
'measuresPhi_mon',type=
'TH2F',title=
'ROD transverse-cluster width;width(no.of strips);[sector] + [0.2 #times layer]',
46 path=
'RDO/Expert',xbins=48,xmin=0.,xmax=48.,ybins=175,ymin=-17.,ymax=18.)
47 cscRdoGroup.defineHistogram(
'stripId,secLayer;h2csc_rdo_hitmap',type=
'TH2F',title=
'Hit Occupancy;channel;[sector] + [0.2 #times layer]',
48 path=
'RDO/Expert',xbins=242,xmin=-49.,xmax=193.,ybins=175,ymin=-17.,ymax=18.)
49 cscRdoGroup.defineHistogram(
'diff_max_mon;h1csc_rdo_maxdiffamp',type=
'TH1F',title=
'Max Amplitude in ROD Cluster;ADC counts;;',
50 path=
'RDO/Shift',xbins=500,xmin=0.,xmax=5000)
51 cscRdoGroup.defineHistogram(
'tmp_xVals_signal_mon,tmp_secLayer_sig_mon;h2csc_rdo_hitmap_signal',cutmask=
'isSignal',type=
'TH2F',title=
'Signal Occupancy;channel;[sector] + [0.2 #times layer]',
52 path=
'RDO/Shift',xbins=242,xmin=-49.,xmax=193.,ybins=175,ymin=-17.,ymax=18.)
53 cscRdoGroup.defineHistogram(
'tmp_xVals_signal_mon,tmp_secLayer_sig_mon;h2csc_rdo_hitmap_signal_EC',cutmask=
'sideC_signal',type=
'TH2F',title=
'EndCap C: Signal Occupancy;channel;[sector] + [0.2 #times layer]',
54 path=
'Overview/CSCEC/RDO',xbins=242,xmin=-49.,xmax=193.,ybins=85,ymin=-17.,ymax=0.)
55 cscRdoGroup.defineHistogram(
'tmp_xVals_signal_mon;h1csc_rdo_hitmap_signal_EC_count',cutmask=
'sideC_signal',type=
'TH1F',title=
'EndCap C: Signal Occupancy;channel;entries/channel',
56 path=
'Overview/CSCEC/RDO',xbins=242,xmin=-49.,xmax=193.)
58 cscRdoGroup.defineHistogram(
'tmp_secLayer_sig_mon;h1csc_rdo_hitmap_signal_EC_occupancy',cutmask=
'sideC_signal',type=
'TH1F',title=
'EndCap C: Signal Occupancy;;entries/layer',
59 path=
'Overview/CSCEC/RDO',xbins=85,xmin=-17.,xmax=0.,xlabels=thisLabelx)
60 cscRdoGroup.defineHistogram(
'tmp_xVals_signal_mon,tmp_secLayer_sig_mon;h2csc_rdo_hitmap_signal_EA',cutmask=
'sideA_signal',type=
'TH2F',title=
'EndCap A: Signal Occupancy;channel;[sector] + [0.2 #times layer]',
61 path=
'Overview/CSCEA/RDO',xbins=242,xmin=-49.,xmax=193.,ybins=90,ymin=0.,ymax=18.)
62 cscRdoGroup.defineHistogram(
'tmp_xVals_signal_mon;h1csc_rdo_hitmap_signal_EA_count',cutmask=
'sideA_signal',type=
'TH1F',title=
'EndCap A: Signal Occupancy;channel;entries/channel',
63 path=
'Overview/CSCEA/RDO',xbins=242,xmin=-49.,xmax=193.)
65 cscRdoGroup.defineHistogram(
'tmp_secLayer_sig_mon;h1csc_rdo_hitmap_signal_EA_occupancy',cutmask=
'sideA_signal',type=
'TH1F',title=
'EndCap A: Signal Occupancy;;[sector] + [0.2 #times layer];',
66 path=
'Overview/CSCEA/RDO',xbins=90,xmin=0.,xmax=18.,xlabels=thisLabelx)
67 cscRdoGroup.defineHistogram(
'raw_clus_width,secLayer;h2csc_rdo_etacluswidth_signal',cutmask=
'signal_measuresEta',type=
'TH2F',title=
'ROD precision-cluster width;no.of strips;[sector] + [0.2 #times layer]',
68 path=
'RDO/Shift',xbins=192,xmin=0.,xmax=192.,ybins=175,ymin=-17.,ymax=18.)
69 cscRdoGroup.defineHistogram(
'raw_clus_width,secLayer;h2csc_rdo_etacluswidth_signal_EC',cutmask=
'signal_measuresEta_sideC',type=
'TH2F',title=
'EndCap C: ROD precision-cluster width;no.of strips;[sector] + [0.2 #times layer]',
70 path=
'Overview/CSCEC/RDO',xbins=192,xmin=0.,xmax=192.,ybins=85,ymin=-17.,ymax=0.)
71 cscRdoGroup.defineHistogram(
'raw_clus_width;h1csc_rdo_etacluswidth_signal_EC_count',cutmask=
'signal_measuresEta_sideC',type=
'TH1F',title=
'EndCap C: ROD precision-cluster width;width(no.of strips);entries',
72 path=
'Overview/CSCEC/RDO',xbins=192,xmin=0.,xmax=192.)
74 cscRdoGroup.defineHistogram(
'secLayer;h1csc_rdo_etacluswidth_signal_EC_occupancy',cutmask=
'signal_measuresEta_sideC',type=
'TH1F',title=
'EndCap C: ROD precision-cluster width;;entries/layer',
75 path=
'Overview/CSCEC/RDO',xbins=85,xmin=-17.,xmax=0.,xlabels=thisLabelx)
76 cscRdoGroup.defineHistogram(
'raw_clus_width,secLayer;h2csc_rdo_etacluswidth_signal_EA',cutmask=
'signal_measuresEta_sideA',type=
'TH2F',title=
'EndCap A: ROD precision-cluster width;no.of strips;',
77 path=
'Overview/CSCEA/RDO',xbins=192,xmin=0.,xmax=192.,ybins=90,ymin=0.,ymax=18.)
78 cscRdoGroup.defineHistogram(
'raw_clus_width;h1csc_rdo_etacluswidth_signal_EA_count',cutmask=
'signal_measuresEta_sideA',type=
'TH1F',title=
'EndCap A: ROD precision-cluster width;width(no.of strips);entries',
79 path=
'Overview/CSCEA/RDO',xbins=192,xmin=0.,xmax=192.)
81 cscRdoGroup.defineHistogram(
'secLayer;h1csc_rdo_etacluswidth_signal_EA_occupancy',cutmask=
'signal_measuresEta_sideA',type=
'TH1F',title=
'EndCap A: ROD precision-cluster width;;entries/layer',
82 path=
'Overview/CSCEA/RDO',xbins=90,xmin=0.,xmax=18.,xlabels=thisLabelx)
83 cscRdoGroup.defineHistogram(
'raw_clus_width,secLayer;h2csc_rdo_phicluswidth_signal',cutmask=
'signal_measuresPhi',type=
'TH2F',title=
'ROD transverse-cluster width;width(no.of strips);',
84 path=
'RDO/Shift',xbins=48,xmin=0,xmax=48,ybins=175,ymin=-17.,ymax=18.)
85 cscRdoGroup.defineHistogram(
'raw_clus_width,secLayer;h2csc_rdo_phicluswidth_signal_EC',cutmask=
'signal_measuresPhi_sideC',type=
'TH2F',title=
'EndCap C: ROD transverse-cluster width;width(no.of strips);[sector] + [0.2 #times layer]',
86 path=
'Overview/CSCEC/RDO',xbins=48,xmin=0.,xmax=48.,ybins=85,ymin=-17.,ymax=0.)
87 cscRdoGroup.defineHistogram(
'raw_clus_width;h1csc_rdo_phicluswidth_signal_EC_count',cutmask=
'signal_measuresPhi_sideC',type=
'TH1F',title=
'EndCap C: ROD transverse-cluster width;width(no.of strips);entries',
88 path=
'Overview/CSCEC/RDO',xbins=48,xmin=0.,xmax=48.)
90 cscRdoGroup.defineHistogram(
'secLayer;h1csc_rdo_phicluswidth_signal_EC_occupancy',cutmask=
'signal_measuresPhi_sideC',type=
'TH1F',title=
'EndCap C: ROD transverse-cluster width;;entries/layer',
91 path=
'Overview/CSCEC/RDO',xbins=85,xmin=-17.,xmax=0.,xlabels=thisLabelx)
92 cscRdoGroup.defineHistogram(
'raw_clus_width,secLayer;h2csc_rdo_phicluswidth_signal_EA',cutmask=
'signal_measuresPhi_sideA',type=
'TH2F',title=
'EndCap A: ROD transverse-cluster width;width(no.of strips);[sector] + [0.2 #times layer]',
93 path=
'Overview/CSCEA/RDO',xbins=48,xmin=0.,xmax=48.,ybins=90,ymin=0.,ymax=18.)
94 cscRdoGroup.defineHistogram(
'raw_clus_width;h1csc_rdo_phicluswidth_signal_EA_count',cutmask=
'signal_measuresPhi_sideA',type=
'TH1F',title=
'EndCap A: ROD transverse-cluster width;width(no.of strips);entries',
95 path=
'Overview/CSCEA/RDO',xbins=48,xmin=0.,xmax=48.)
97 cscRdoGroup.defineHistogram(
'secLayer;h1csc_rdo_phicluswidth_signal_EA_occupancy',cutmask=
'signal_measuresPhi_sideA',type=
'TH1F',title=
'EndCap A: ROD transverse-cluster width;;entries/layer',
98 path=
'Overview/CSCEA/RDO',xbins=90,xmin=0.,xmax=18.,xlabels=thisLabelx)
99 cscRdoGroup.defineHistogram(
'tmp_xVals_noise_mon,tmp_secLayer_noise_mon;h2csc_rdo_hitmap_noise',cutmask=
'isNoise',type=
'TH2F',title=
'Noise Occupancy;channel;[sector] + [0.2 #times layer]',
100 path=
'RDO/Expert',xbins=242,xmin=-49.,xmax=193.,ybins=175,ymin=-17.,ymax=18.)
101 cscRdoGroup.defineHistogram(
'raw_clus_width,secLayer;h2csc_rdo_etacluswidth_noise',cutmask=
'noise_measuresEta',type=
'TH2F',title=
'ROD precision-cluster width;no.of strips;[sector] + [0.2 #times layer]',
102 path=
'RDO/Expert',xbins=192,xmin=0.,xmax=192,ybins=175,ymin=-17.,ymax=18.)
103 cscRdoGroup.defineHistogram(
'raw_clus_width,secLayer;h2csc_rdo_phicluswidth_noise',cutmask=
'noise_measuresPhi',type=
'TH2F',title=
'ROD precision-cluster width;no.of strips;[sector] + [0.2 #times layer]',
104 path=
'RDO/Expert',xbins=48,xmin=0.,xmax=48,ybins=175,ymin=-17.,ymax=18.)
105 cscRdoGroup.defineHistogram(
'nPhiClusWidthCnt_mon,nEtaClusWidthCnt_mon;h2csc_rdo_eta_vs_phi_cluswidth',type=
'TH2F',title=
'Eta vs. Phi Cluster width correlation;#varphi-cluster width;#eta-cluster width',
106 path=
'RDO/Expert',xbins=100,xmin=0.,xmax=100.,ybins=100,ymin=0.,ymax=100.)
107 cscRdoGroup.defineHistogram(
'count_mon,secLayer_count;h2csc_rdo_phicluscount',cutmask=
'mphi_mon',type=
'TH2F',title=
'ROD transverse-cluster count;no.of clusters;[sector] + [0.2 #times layer]',
108 path=
'RDO/Expert',xbins=20,xmin=0.,xmax=20.,ybins=175,ymin=-17.,ymax=18.)
109 cscRdoGroup.defineHistogram(
'scount_mon,secLayer_count;h2csc_rdo_phicluscount_signal',cutmask=
'mphi_scount',type=
'TH2F',title=
'ROD transverse-cluster count;no.of clusters;[sector] + [0.2 #times layer]',
110 path=
'RDO/Shift',xbins=20,xmin=0.,xmax=20.,ybins=175,ymin=-17.,ymax=18.)
111 cscRdoGroup.defineHistogram(
'tmp_counts_phi_mon,secLayer_count;h2csc_rdo_phicluscount_noise',cutmask=
'mphi_mon',type=
'TH2F',title=
'ROD transverse-cluster count;no.of clusters;[sector] + [0.2 #times layer]',
112 path=
'RDO/Expert',xbins=20,xmin=0.,xmax=20.,ybins=175,ymin=-17.,ymax=18.)
114 cscRdoGroup.defineHistogram(
'count_mon,secLayer_count;h2csc_rdo_etacluscount',cutmask=
'mphi_inv',type=
'TH2F',title=
'ROD precision-cluster count;no.of clusters;[sector] + [0.2 #times layer]',
115 path=
'RDO/Expert',xbins=20,xmin=0.,xmax=20.,ybins=175,ymin=-17.,ymax=18.)
116 cscRdoGroup.defineHistogram(
'scount_mon,secLayer_count;h2csc_rdo_etacluscount_signal',cutmask=
'mphi_inv_scount',type=
'TH2F',title=
'ROD precision-cluster count;no.of clusters;[sector] + [0.2 #times layer]',
117 path=
'RDO/Shift',xbins=20,xmin=0.,xmax=20.,ybins=175,ymin=-17.,ymax=18.)
118 cscRdoGroup.defineHistogram(
'tmp_counts_eta_mon,secLayer_count;h2csc_rdo_etacluscount_noise',cutmask=
'mphi_inv',type=
'TH2F',title=
'ROD precision-cluster count;no.of clusters;[sector] + [0.2 #times layer]',
119 path=
'RDO/Expert',xbins=20,xmin=0.,xmax=20.,ybins=175,ymin=-17.,ymax=18.)
120 cscRdoGroup.defineHistogram(
'numphi_mon,numeta_mon;h2csc_rdo_eta_vs_phi_cluscount',type=
'TH2F',title=
'Eta vs. Phi Cluster count correlation;#varphi-cluster count;#eta-cluster count',
121 path=
'RDO/Expert',xbins=100,xmin=0,xmax=100,ybins=100,ymin=0.,ymax=100.)
122 cscRdoGroup.defineHistogram(
'numphisignal_mon,numetasignal_mon;h2csc_rdo_eta_vs_phi_cluscount_signal',type=
'TH2F',title=
'Eta vs. Phi Signal-Cluster count correlation;#varphi-cluster count;#eta-cluster count',
123 path=
'RDO/Expert',xbins=100,xmin=0,xmax=100,ybins=100,ymin=0.,ymax=100.)
124 cscRdoGroup.defineHistogram(
'diffnumphi,diffnumeta;h2csc_rdo_eta_vs_phi_cluscount_noise',type=
'TH2F',title=
'Eta vs. Phi Noise-Cluster count correlation;#varphi-cluster count;#eta-cluster count',
125 path=
'RDO/Expert',xbins=100,xmin=0,xmax=100,ybins=100,ymin=0.,ymax=100.)
127 acc = helper.result()
131 if __name__==
'__main__':
133 from AthenaCommon.Logging
import log
138 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
139 from AthenaConfiguration.TestDefaults
import defaultTestFiles
141 flags.Input.Files = defaultTestFiles.RAW_RUN2
143 flags.Output.HISTFileName =
'CscRDOMonitorOutput.root'
144 flags.Detector.GeometryMuon=
False
145 flags.Detector.GeometryCSC=
True
146 flags.Detector.GeometryRPC=
False
147 flags.Detector.GeometryTGC=
False
148 flags.Detector.GeometryMM=
False
149 flags.Detector.GeometryMDT=
False
151 flags.Muon.Align.UseILines =
False
153 flags.Muon.Align.UseALines =
False
154 flags.Muon.Align.UseBLines =
False
155 flags.DQ.enableLumiAccess =
True
156 flags.DQ.useTrigger =
False
157 flags.DQ.Environment =
'tier0Raw'
163 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
164 from ByteStreamCnvSvc.ByteStreamConfig
import ByteStreamReadCfg
168 from MuonConfig.MuonBytestreamDecodeConfig
import CscBytestreamDecodeCfg
172 cfg.merge(cscMonitorAcc)
174 cfg.printConfig(withDetails=
True)