ATLAS Offline Software
Loading...
Searching...
No Matches
Run3AFPExampleMonitorAlgorithm Namespace Reference

Functions

 Run3AFPExampleMonitoringConfig (inputFlags)

Variables

 flags = initConfigFlags()
 Files
 isMC
 HISTFileName
 NumThreads
 NumConcurrentEvents
 cfg = MainServicesCfg(flags)
 exampleMonitorAcc = Run3AFPExampleMonitoringConfig(flags)

Detailed Description

@file Run3AFPExampleMonitorAlgorithm.py
@author N. Dikic
@date 2020-08-12

Function Documentation

◆ Run3AFPExampleMonitoringConfig()

Run3AFPExampleMonitorAlgorithm.Run3AFPExampleMonitoringConfig ( inputFlags)
Function to configures some algorithms in the monitoring system.

Definition at line 11 of file Run3AFPExampleMonitorAlgorithm.py.

11def Run3AFPExampleMonitoringConfig(inputFlags):
12 '''Function to configures some algorithms in the monitoring system.'''
13 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
14 result = ComponentAccumulator()
15
16 # don't run in RAWtoESD
17 if inputFlags.DQ.Environment in ('tier0Raw',):
18 return result
19
20 from LumiBlockComps.BunchCrossingCondAlgConfig import BunchCrossingCondAlgCfg
21 result.merge(BunchCrossingCondAlgCfg(inputFlags))
22
23 from AthenaMonitoring import AthMonitorCfgHelper
24 helper = AthMonitorCfgHelper(inputFlags,'Run3AFPMonitorCfg')
25
26 from AthenaConfiguration.ComponentFactory import CompFactory
27
28 #from Run3AFPMonitoring.Run3AFPMonitoringConf import AFPSiLayerAlgorithm
29 afpSiLayerAlgorithmFac = CompFactory.AFPSiLayerAlgorithm
30 afpSiLayerAlgorithm = helper.addAlgorithm(afpSiLayerAlgorithmFac,'AFPSiLayerAlg')
31
32 #from Run3AFPMonitoring.Run3AFPMonitoringConf import AFPToFAlgorithm
33 afpToFAlgorithmFac = CompFactory.AFPToFAlgorithm
34 afpToFAlgorithm = helper.addAlgorithm(afpToFAlgorithmFac,'AFPToFAlg')
35
36 afpToFSiTAlgorithmFac = CompFactory.AFPToFSiTAlgorithm
37 afpToFSiTAlgorithm = helper.addAlgorithm(afpToFSiTAlgorithmFac,'AFPToFSiTAlg')
38
39
40
41 # Add a generic monitoring tool (a "group" in old language).
42 # The returned object here is the standard GenericMonitoringTool.
43 AFPSiGroup = helper.addGroup(afpSiLayerAlgorithm, 'AFPSiLayerTool', 'AFP/')
44 AFPToFGroup = helper.addGroup(afpToFAlgorithm, 'AFPToFTool', 'AFP/')
45 AFPToFSiTGroup = helper.addGroup(afpToFSiTAlgorithm, 'AFPToFSiTTool', 'AFP/')
46
47 xLabelsStations = ['farAside', 'nearAside', 'nearCside', 'farCside']
48 xLabelsStationsPlanes = ['fA3','fA2','fA1','fA0','nA3','nA2','nA1','nA0','nC0','nC1','nC2','nC3','fC0','fC1','fC2','fC3']
49 xLabelsForEventsPerStation = [ 'fA', '-','-','-', 'nA', '-', '-', '-', 'nC', '-', '-', '-', 'fC', '-', '-', '-', ]
50 xLabelsHitBarVsTrain = [ 'A', 'B', 'C', 'D']
51 yLabelsHitBarVsTrain = [ '0', '1', '2', '3']
52 xLabelsToFEff = [ 'A', 'B', 'C', 'D', 'Tr']
53 yLabelsToFEff = [ '0', '1', '2', '3']
54 #xLabelsStationsPlanesProposed = ['fC3', 'fC2', 'fC1', 'fC0', 'nC3', 'nC2', 'nC1', 'nC0', 'nA0', 'nA1', 'nA2', 'nA3', 'fA0', 'fA1' 'fA2','fA3']
55
56 AFPSiGroup.defineHistogram('lb,nSiHits', title='Total number of hits divided by number of events;lumiblock;total number of hits', type='TProfile', path='SiT/', xbins=2000, xmin=0.5, xmax=2000.5)
57 AFPSiGroup.defineHistogram('eventsPerStation', title='Number of events per stations; station; events', type='TH1I', path='SiT/Aux/', xbins=16, xmin=-0.5, xmax=15.5, xlabels=xLabelsForEventsPerStation )
58 AFPSiGroup.defineHistogram('clustersInPlanes', title='Number of clusters per planes; plane; clusters', type='TH1I', path='SiT/Aux/', xbins=16, xmin=-0.5, xmax=15.5, xlabels=xLabelsStationsPlanes )
59 AFPSiGroup.defineHistogram('lb,muPerBX', title='<mu>;lumiBlock;<mu>', type='TProfile', path='SiT/', xbins=2000, xmin=0.5, xmax=2000.5)
60 AFPSiGroup.defineHistogram('planeHitsAllMU', title='Number of hits per plane divided by <mu>;plane; hits/<mu>', type='TH1F', path='SiT/HitsPerPlanes/', xbins=16, xmin=-0.5, xmax=15.5, weight = 'weightAllPlanes', xlabels=xLabelsStationsPlanes )
61 AFPSiGroup.defineHistogram('numberOfHitsPerStation', title='Number of hits per station; station; hits', type='TH1I', path='SiT/Aux/', xbins=4, xmin=-0.5, xmax=3.5, xlabels=xLabelsStations)
62 AFPSiGroup.defineHistogram('lbEvents;NumberOfEventsPerLumiblock',title='Number of events per lumiblock; lumiblock; events', type='TH1I', path='SiT/Aux/', xbins=2000, xmin=0.5, xmax=2000.5)
63 AFPSiGroup.defineHistogram('lbHits;NumberOfHitsPerLumiblock',title='Number of hits per lumiblock; lumiblock; hits', type='TH1I', path='SiT/Aux/', xbins=2000, xmin=0.5, xmax=2000.5)
64
65 #SIT: BCID histograms
66 AFPSiGroup.defineHistogram('bcidAll', title='(All) Paired bunches - SiT; BX; entries', type='TH1I', path='SiT/BCID_Mask', xbins=4000, xmin=-0.5, xmax=3999.5)
67 AFPSiGroup.defineHistogram('bcidFront', title='(Front) Paired bunches - SiT; BX; entries', type='TH1I', path='SiT/BCID_Mask', xbins=4000, xmin=-0.5, xmax=3999.5)
68 AFPSiGroup.defineHistogram('bcidMiddle', title='(Middle) Paired bunches - SiT; BX; entries', type='TH1I', path='SiT/BCID_Mask', xbins=4000, xmin=-0.5, xmax=3999.5)
69 AFPSiGroup.defineHistogram('bcidEnd', title='(End) Paired bunches - SiT; BX; entries', type='TH1I', path='SiT/BCID_Mask', xbins=4000, xmin=-0.5, xmax=3999.5)
70
71 AFPSiGroup.defineHistogram('lbEventsStationsAll', title='Number of events per lumiblock for all stations;lumiblock; events', type='TH1I', path='SiT/StationEvents/', xbins=2000, xmin=0.5, xmax=2000.5)
72 AFPSiGroup.defineHistogram('numberOfEventsPerLumiblockFront', title='(Front) Number of events per lumiblock for all stations;lumiblock; events', type='TH1I', path='SiT/Aux/', xbins=2000, xmin=0.5, xmax=2000.5)
73 AFPSiGroup.defineHistogram('numberOfEventsPerLumiblockMiddle', title='(Middle) Number of events per lumiblock for all stations;lumiblock; events', type='TH1I', path='SiT/Aux/', xbins=2000, xmin=0.5, xmax=2000.5)
74 AFPSiGroup.defineHistogram('numberOfEventsPerLumiblockEnd', title='(End) Number of events per lumiblock for all stations;lumiblock; events', type='TH1I', path='SiT/Aux/', xbins=2000, xmin=0.5, xmax=2000.5)
75
76
77 AFPToFGroup.defineHistogram('lb,nTofHits', title='Multiplicity;lumiblock;total number of Hits', type='TProfile', path='ToF/', xbins=2000, xmin=0.5, xmax=2000.5)
78 AFPToFGroup.defineHistogram('numberOfHit_S0', title='Number of hit per bar station 0;bar', path='ToF/', xbins=4, xmin=-0.5, xmax=3.5)
79 AFPToFGroup.defineHistogram('numberOfHit_S3', title='Number of hit per bar station 3;bar', path='ToF/', xbins=4, xmin=-0.5, xmax=3.5)
80 AFPToFGroup.defineHistogram('barInTrainAllA', title='Number of hits in bar per stationA; barInTrain;hits',type='TH1I', path='ToF/HitsPerBarsInTrain/', xbins=16, xmin=-0.5, xmax=15.5)
81 AFPToFGroup.defineHistogram('barInTrainAllC', title='Number of hits in bar per stationC; barInTrain;hits',type='TH1I', path='ToF/HitsPerBarsInTrain/', xbins=16, xmin=-0.5, xmax=15.5)
82
83 AFPToFGroup.defineHistogram('ToFHits_sideA', title='ToF hits per lumiblock divided by <mu>, side A; lb; hits', path='ToF/StationHits', type='TH1F', xbins=2000, xmin=0.5, xmax=2000.5, weight = 'ToFHits_MU_Weight')
84 AFPToFGroup.defineHistogram('ToFHits_sideC', title='ToF hits per lumiblock divided by <mu>, side C; lb; hits', path='ToF/StationHits', type='TH1F', xbins=2000, xmin=0.5, xmax=2000.5, weight = 'ToFHits_MU_Weight')
85 AFPToFGroup.defineHistogram('lb,muPerBXToF', title='<mu>;lumiblock;<mu>', type='TProfile', path='ToF/', xbins=2000, xmin=0.5, xmax=2000.5)
86
87 AFPToFGroup.defineHistogram('lbAandCToFEvents', title='Number of events in ToF stations A and C vs lb; lumiblock; events', type='TH1I', path='ToF/Events', xbins=2000, xmin=0.5, xmax=2000.5)
88 AFPToFGroup.defineHistogram('lbAToFEvents', title='Number of events in ToF station A vs lb; lumiblock; events', type='TH1I', path='ToF/Events', xbins=2000, xmin=0.5, xmax=2000.5)
89 AFPToFGroup.defineHistogram('lbCToFEvents', title='Number of events in ToF station C vs lb; lumiblock; events', type='TH1I', path='ToF/Events', xbins=2000, xmin=0.5, xmax=2000.5)
90
91 # TOF: BCID histograms
92 AFPToFGroup.defineHistogram('bcidAllToF', title='(All) Paired bunches - ToF; BX; entries', type='TH1I', path='ToF/BCID_Mask', xbins=4000, xmin=-0.5, xmax=3999.5)
93 AFPToFGroup.defineHistogram('bcidFrontToF', title='(Front) Paired bunches - ToF; BX; entries', type='TH1I', path='ToF/BCID_Mask', xbins=4000, xmin=-0.5, xmax=3999.5)
94 AFPToFGroup.defineHistogram('bcidMiddleToF', title='(Middle) Paired bunches - ToF; BX; entries', type='TH1I', path='ToF/BCID_Mask', xbins=4000, xmin=-0.5, xmax=3999.5)
95 AFPToFGroup.defineHistogram('bcidEndToF', title='(End) Paired bunches - ToF; BX; entries', type='TH1I', path='ToF/BCID_Mask', xbins=4000, xmin=-0.5, xmax=3999.5)
96
97 # TOF: Hits per trains histograms (side A):
98 AFPToFGroup.defineHistogram('lbAToF_T0', title='Number of hits per train (side A, train0) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/All/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TAll_Weight')
99 AFPToFGroup.defineHistogram('lbAToF_T1', title='Number of hits per train (side A, train1) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/All/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TAll_Weight')
100 AFPToFGroup.defineHistogram('lbAToF_T2', title='Number of hits per train (side A, train2) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/All/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TAll_Weight')
101 AFPToFGroup.defineHistogram('lbAToF_T3', title='Number of hits per train (side A, train3) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/All/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TAll_Weight')
102
103 #Front:
104 AFPToFGroup.defineHistogram('lbAToF_T0_Front', title='(Front) Number of hits per train (side A, train0) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/Front/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TFront_Weight')
105 AFPToFGroup.defineHistogram('lbAToF_T1_Front', title='(Front) Number of hits per train (side A, train1) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/Front/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TFront_Weight')
106 AFPToFGroup.defineHistogram('lbAToF_T2_Front', title='(Front) Number of hits per train (side A, train2) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/Front/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TFront_Weight')
107 AFPToFGroup.defineHistogram('lbAToF_T3_Front', title='(Front) Number of hits per train (side A, train3) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/Front/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TFront_Weight')
108
109 #Middle
110 AFPToFGroup.defineHistogram('lbAToF_T0_Middle', title='(Middle) Number of hits per train (side A, train0) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/Middle/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TMiddle_Weight')
111 AFPToFGroup.defineHistogram('lbAToF_T1_Middle', title='(Middle) Number of hits per train (side A, train1) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/Middle/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TMiddle_Weight')
112 AFPToFGroup.defineHistogram('lbAToF_T2_Middle', title='(Middle) Number of hits per train (side A, train2) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/Middle/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TMiddle_Weight')
113 AFPToFGroup.defineHistogram('lbAToF_T3_Middle', title='(Middle) Number of hits per train (side A, train3) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/Middle/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TMiddle_Weight')
114
115 #End
116 AFPToFGroup.defineHistogram('lbAToF_T0_End', title='(End) Number of hits per train (side A, train0) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/End/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TEnd_Weight')
117 AFPToFGroup.defineHistogram('lbAToF_T1_End', title='(End) Number of hits per train (side A, train1) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/End/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TEnd_Weight')
118 AFPToFGroup.defineHistogram('lbAToF_T2_End', title='(End) Number of hits per train (side A, train2) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/End/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TEnd_Weight')
119 AFPToFGroup.defineHistogram('lbAToF_T3_End', title='(End) Number of hits per train (side A, train3) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideA/End/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbAToF_TEnd_Weight')
120
121
122 # Hits per trains histograms (side C):
123 AFPToFGroup.defineHistogram('lbCToF_T0', title='Number of hits per train (side C, train0) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/All/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TAll_Weight')
124 AFPToFGroup.defineHistogram('lbCToF_T1', title='Number of hits per train (side C, train1) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/All/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TAll_Weight')
125 AFPToFGroup.defineHistogram('lbCToF_T2', title='Number of hits per train (side C, train2) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/All/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TAll_Weight')
126 AFPToFGroup.defineHistogram('lbCToF_T3', title='Number of hits per train (side C, train3) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/All/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TAll_Weight')
127
128 #Front
129 AFPToFGroup.defineHistogram('lbCToF_T0_Front', title='(Front) Number of hits per train (side C, train0) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/Front/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TFront_Weight')
130 AFPToFGroup.defineHistogram('lbCToF_T1_Front', title='(Front) Number of hits per train (side C, train1) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/Front/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TFront_Weight')
131 AFPToFGroup.defineHistogram('lbCToF_T2_Front', title='(Front) Number of hits per train (side C, train2) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/Front/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TFront_Weight')
132 AFPToFGroup.defineHistogram('lbCToF_T3_Front', title='(Front) Number of hits per train (side C, train3) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/Front/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TFront_Weight')
133
134 #Middle
135 AFPToFGroup.defineHistogram('lbCToF_T0_Middle', title='(Middle) Number of hits per train (side C, train0) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/Middle/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TMiddle_Weight')
136 AFPToFGroup.defineHistogram('lbCToF_T1_Middle', title='(Middle) Number of hits per train (side C, train1) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/Middle/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TMiddle_Weight')
137 AFPToFGroup.defineHistogram('lbCToF_T2_Middle', title='(Middle) Number of hits per train (side C, train2) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/Middle/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TMiddle_Weight')
138 AFPToFGroup.defineHistogram('lbCToF_T3_Middle', title='(Middle) Number of hits per train (side C, train3) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/Middle/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TMiddle_Weight')
139
140 #End
141 AFPToFGroup.defineHistogram('lbCToF_T0_End', title='(End) Number of hits per train (side C, train0) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/End/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TEnd_Weight')
142 AFPToFGroup.defineHistogram('lbCToF_T1_End', title='(End) Number of hits per train (side C, train1) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/End/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TEnd_Weight')
143 AFPToFGroup.defineHistogram('lbCToF_T2_End', title='(End) Number of hits per train (side C, train2) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/End/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TEnd_Weight')
144 AFPToFGroup.defineHistogram('lbCToF_T3_End', title='(End) Number of hits per train (side C, train3) divided by <mu>; lb; hits/<mu>', type='TH1F', path='ToF/ToFHitsVsLb/sideC/End/', xbins=2000, xmin=-0.5, xmax=1999.5, weight='lbCToF_TEnd_Weight')
145
146 AFPToFSiTGroup.defineHistogram('lqBar_tight_A,fsp0_rows_tight_A;ToFSiTCorrTightXA', title='LQBar vs FSP0 X dim with FSP2 Side A;Train;FSP0 x-pix [50 um]', type='TH2I', path='ToFSiTCorr/', xbins=20, xmin=-1, xmax=4, ybins=34, ymin=-0.05, ymax=335.5)
147 AFPToFSiTGroup.defineHistogram('lqBar_tight_C,fsp0_rows_tight_C;ToFSiTCorrTightXC', title='LQBar vs FSP0 X dim with FSP2 Side C;Train;FSP0 x-pix [50 um]', type='TH2I', path='ToFSiTCorr/', xbins=20, xmin=-1, xmax=4, ybins=34, ymin=-0.05, ymax=335.5)
148 AFPToFSiTGroup.defineHistogram('lqBar_tight_A,fsp0_columns_tight_A;ToFSiTCorrTightYA', title='LQBar vs FSP0 columns with FSP2 hit Side A;Train;FSP0 y-pix [250 um]', type='TH2I', path='ToFSiTCorr/', xbins=20, xmin=-1, xmax=4, ybins=80, ymin=-0.5, ymax=79.5)
149 AFPToFSiTGroup.defineHistogram('lqBar_tight_C,fsp0_columns_tight_C;ToFSiTCorrTightYC', title='LQBar vs FSP0 columns with FSP2 hit Side C;Train;FSP0 y-pix [250 um]', type='TH2I', path='ToFSiTCorr/', xbins=20, xmin=-1, xmax=4, ybins=80, ymin=-0.5, ymax=79.5)
150
151 AFPToFSiTGroup.defineHistogram('trainHits_A,fsp0_rows_tight_A;ToFSiTCorrTrainHitsXA', title='# hits in train vs FSP0 X dim with FSP2 Side A;Train hits (train+numHits/5);FSP0 x-pix [50 um]', type='TH2I', path='ToFSiTCorr/', xbins=25, xmin=-1, xmax=4, ybins=34, ymin=-0.05, ymax=335.5)
152 AFPToFSiTGroup.defineHistogram('trainHits_C,fsp0_rows_tight_C;ToFSiTCorrTrainHitsXC', title='# hits in train vs FSP0 X dim with FSP2 Side C;Train hits (train+numHits/5);FSP0 x-pix [50 um]', type='TH2I', path='ToFSiTCorr/', xbins=25, xmin=-1, xmax=4, ybins=34, ymin=-0.05, ymax=335.5)
153 AFPToFSiTGroup.defineHistogram('trainHits_A,fsp0_columns_tight_A;ToFSiTCorrTrainHitsYA', title='# hits in train vs FSP0 columns with FSP2 hit Side A;Train hits (train+numHits/5);FSP0 y-pix [250 um]', type='TH2I', path='ToFSiTCorr/', xbins=25, xmin=-1, xmax=4, ybins=80, ymin=-0.5, ymax=79.5)
154 AFPToFSiTGroup.defineHistogram('trainHits_C,fsp0_columns_tight_C;ToFSiTCorrTrainHitsYC', title='# hits in train vs FSP0 columns with FSP2 hit Side C;Train hits (train+numHits/5);FSP0 y-pix [250 um]', type='TH2I', path='ToFSiTCorr/', xbins=25, xmin=-1, xmax=4, ybins=80, ymin=-0.5, ymax=79.5)
155
156 AFPToFSiTGroup.defineHistogram('tofHits_A,fsp0Hits_A;ToFSiTNumHitsA', title='TOF vs FSP0 num. hits Side A;#Hit bars;FSP0 multiplicity', type='TH2F', path='ToFSiTCorr/', xbins=17, xmin=0, xmax=16, ybins=150, ymin=-0.5, ymax=149.5)
157 AFPToFSiTGroup.defineHistogram('tofHits_C,fsp0Hits_C;ToFSiTNumHitsC', title='TOF vs FSP0 num. hits Side C;#Hit bars;FSP0 multiplicity', type='TH2F', path='ToFSiTCorr/', xbins=17, xmin=0, xmax=16, ybins=150, ymin=-0.5, ymax=149.5)
158
159 AFPToFSiTGroup.defineHistogram('tof_eff_OFF_passed_A, tof_eff_OFF_bars_A, tof_eff_OFF_trains_A ;Efficiency_A', title='Efficiency ToF Side A;Bar;Train;Efficiency', type='TEfficiency', path='ToFSiT/Efficiency/', xbins=5, xmin=0, xmax=5, ybins=4, ymin=0, ymax=4, xlabels=xLabelsToFEff, ylabels=yLabelsToFEff)
160 AFPToFSiTGroup.defineHistogram('tof_eff_OFF_passed_C, tof_eff_OFF_bars_C, tof_eff_OFF_trains_C ;Efficiency_C', title='Efficiency ToF Side C;Bar;Train;Efficiency', type='TEfficiency', path='ToFSiT/Efficiency/', xbins=5, xmin=0, xmax=5, ybins=4, ymin=0, ymax=4, xlabels=xLabelsToFEff, ylabels=yLabelsToFEff)
161
162 AFPToFSiTGroup.defineHistogram('lqBar_A,fs_rows_full_A;ToFSiTCorr_FullXA', title='LQBar vs FS rows Full Side A;Train;FSP x-pix [50 um]', type='TH2F', path='ToFSiTCorr/', xbins=20, xmin=-1, xmax=4, ybins=346, ymin=-10.5, ymax=335.5)
163 AFPToFSiTGroup.defineHistogram('lqBar_C,fs_rows_full_C;ToFSiTCorr_FullXC', title='LQBar vs FS rows Full Side C;Train;FSP x-pix [50 um]', type='TH2F', path='ToFSiTCorr/', xbins=20, xmin=-1, xmax=4, ybins=346, ymin=-10.5, ymax=335.5)
164
165 planeList = ['P0', 'P1', 'P2', 'P3']
166 array_corr = helper.addArray([planeList], afpToFSiTAlgorithm, 'AFPToFSiTTool', topPath='AFP/ToFSiTCorr/')
167 array_corr.defineHistogram('lqBar_A,fs_rows_A;ToFSiTCorrXA_{0}', type='TH2F', title='LQBar vs FS{0} rows Side A;Train;FS{0} x-pix [50 um]', xbins=20, xmin=-1, xmax=4, ybins=346, ymin=-10.5, ymax=335.5)
168 array_corr.defineHistogram('lqBar_C,fs_rows_C;ToFSiTCorrXC_{0}', type='TH2F', title='LQBar vs FS{0} rows Side C;Train;FS{0} x-pix [50 um]', xbins=20, xmin=-1, xmax=4, ybins=346, ymin=-10.5, ymax=335.5)
169 array_corr.defineHistogram('lqBar_A,fs_columns_A;ToFSiTCorrYA_{0}', type='TH2F', title='LQBar vs FS{0} columns Side A;Train;FS{0} y-pix [250 um]', xbins=20, xmin=-1, xmax=4, ybins=85, ymin=-5.5, ymax=79.5)
170 array_corr.defineHistogram('lqBar_C,fs_columns_C;ToFSiTCorrYC_{0}', type='TH2F', title='LQBar vs FS{0} columns Side C;Train;FS{0} y-pix [250 um]', xbins=20, xmin=-1, xmax=4, ybins=85, ymin=-5.5, ymax=79.5)
171
172
173 # Using a map of groups
174 layerList = ['P0','P1', 'P2', 'P3']
175 stationList = ['farAside', 'nearAside', 'nearCside', 'farCside']
176 trainList = ['train0', 'train1', 'train2', 'train3']
177
178 array = helper.addArray([stationList,layerList], afpSiLayerAlgorithm, 'AFPSiLayerTool', topPath = 'AFP/SiT/')
179
180 array.defineHistogram('pixelColIDChip', title='Hits per column for station {0}, layer {1};ColID; entries', path='PixelColIDChip/{0}', xbins=80, xmin=0.5, xmax=80.5)
181 array.defineHistogram('pixelRowIDChip', title='Hits per row for station {0}, layer {1};RowID; entries', path='PixelRowIDChip/{0}', xbins=336, xmin=0.5, xmax=336.5)
182 array.defineHistogram('pixelRowIDChip,pixelColIDChip', title='Hitmap for station {0}, layer {1};RowID;ColID', type='TH2I', path='pixelColRow2D/{0}', xbins=336, xmin=0.5, xmax=336.5, ybins=80, ymin=0.5, ymax=80.5)
183 array.defineHistogram('timeOverThreshold', type='TH1I', title='Time over threshold for station {0}, layer {1};timeOverThreshold; entries', path='SiTimeOverThreshold/{0}', xbins=16, xmin=0.5, xmax=16.5)
184
185 array.defineHistogram('clusterY,clusterX', title='Cluster position in station {0} Layer {1};x [mm];y [mm]', type='TH2F', path='Cluster/{0}', xbins=336, xmin=0.0, xmax=17.0, ybins=80, ymin=0.0, ymax=20.0)
186 array.defineHistogram('sit_plane_eff_passed, sit_plane_eff_triedY, sit_plane_eff_triedX ;Efficiency', title='Efficiency for station {0} Layer {1};x [mm];y [mm]', type='TEfficiency', path='Efficiency/{0}', xbins=336, xmin=0.0, xmax=17.0, ybins=80, ymin=0.0, ymax=20.0)
187 #Sync clusters
188 array.defineHistogram('lbClustersPerPlanesAll,clustersPerPlaneAllPP', title='(All) Number of clusters in station {0}, plane {1} per lumiblock divided by <mu> per event;lumiblock;clusters/<mu> per event', type='TProfile', path='Synchronization/Clusters/', xbins=2000, xmin=0.5, xmax=2000.5)
189 array.defineHistogram('lbClustersPerPlanesFront,clustersPerPlaneFrontPP', title='(Front) Number of clusters in station {0}, plane {1} per lumiblock divided by <mu> per event;lumiblock; clusters/<mu> per event', type='TProfile', path='Synchronization/Clusters/Front/', xbins=2000, xmin=0.5, xmax=2000.5)
190 array.defineHistogram('lbClustersPerPlanesMiddle,clustersPerPlaneMiddlePP', title='(Middle) Number of clusters in station {0}, plane {1} per lumiblock divided by <mu> per event; lumiblock;clusters/<mu> per event', type='TProfile', path='Synchronization/Clusters/Middle/', xbins=2000, xmin=0.5, xmax=2000.5)
191 array.defineHistogram('lbClustersPerPlanesEnd,clustersPerPlaneEndPP', title='(End) Number of clusters in station {0}, plane {1} per lumiblock divided by <mu> per event; lumiblock;clusters/<mu> per event', type='TProfile', path='Synchronization/Clusters/End/', xbins=2000, xmin=0.5, xmax=2000.5)
192
193 array.defineHistogram('lbhitsPerPlaneProfile, hitsPerPlaneProfile', title='Number of hits in station {0}, plane {1} per lumiblock per event divided by <mu>;lumiblock; hits/<mu> per event', type='TProfile', path='HitsPerPlanesVsLb/', xbins=2000, xmin=0.5, xmax=2000.5)
194 array.defineHistogram('clusterToT', title='Sum of all hits\' ToT in each cluster, station {0}, layer {1};Cluster ToT; Counts', type='TH1I', path='ClusterToT/', xbins=18, xmin=0.5, xmax=18.5)
195
196 array = helper.addArray([stationList], afpSiLayerAlgorithm, 'AFPSiLayerTool', topPath='AFP/SiT/')
197
198 array.defineHistogram('planeHits', type='TH1I', title='Number of hits per plane, station {0};plane; hits', path='HitsPerPlanes', xbins=4, xmin=-0.5, xmax=3.5)
199 array.defineHistogram('trackY,trackX', title='Number of tracks in AFP station {0};x [mm];y [mm]', type='TH2F', path='Track', xbins=336, xmin=0.0, xmax=17.0, ybins=80, ymin=0.0, ymax=20.0)
200 array.defineHistogram('lbEventsStations', title='Number of events per lumiblock, station {0};lumiblock; events', type='TH1I', path='StationEvents/', xbins=2000, xmin=0.5, xmax=2000.5)
201
202 #Sync tracks
203 array.defineHistogram('lbTracksAll,Total_tracks_All_profile', title = '(All) Tracks vs lumiblock divided by <mu> per event, station {0};lumiblock;tracks/<mu> per event', type='TProfile', path='Synchronization/Tracks', xbins=2000, xmin=0.5, xmax=2000.5)
204 array.defineHistogram('lbTracksFront,Total_tracks_Front_profile', title = '(Front) Tracks vs lumiblock divided by <mu> per event, station {0}; lumiblock;tracks/<mu> per event', type='TProfile', path='Synchronization/Tracks/Front', xbins=2000, xmin=0.5, xmax=2000.5)
205 array.defineHistogram('lbTracksMiddle,Total_tracks_Middle_profile', title = '(Middle) Tracks vs lumiblock divided by <mu> per event, station {0}; lumiblock;tracks/<mu> per event', type='TProfile', path='Synchronization/Tracks/Middle', xbins=2000, xmin=0.5, xmax=2000.5)
206 array.defineHistogram('lbTracksEnd,Total_tracks_End_profile', title = '(End) Tracks vs lumiblock divided by <mu> per event, station {0}; lumiblock;tracks/<mu> per event', type='TProfile', path='Synchronization/Tracks/End', xbins=2000, xmin=0.5, xmax=2000.5)
207
208 arrayToF = helper.addArray([stationList], afpToFAlgorithm, 'AFPToFTool', topPath='AFP/ToF/')
209
210 arrayToF.defineHistogram('barInTrainID,trainID', title='ToF hit bar vs train {0};barInTrainID;trainID', type='TH2I', path='HitBarvsTrain/',xbins=4,xmin=-0.5,xmax=3.5,ybins=4,ymin=-0.5,ymax=3.5, xlabels = xLabelsHitBarVsTrain, ylabels = yLabelsHitBarVsTrain)
211 arrayToF = helper.addArray([trainList], afpToFAlgorithm, 'AFPToFTool', topPath='AFP/ToF/')
212 arrayToF.defineHistogram('barInTrainIDA', title='Total hits per bars in {}; barID; hits', type='TH1I', path='HitsPerBarsInTrain/farAside', xbins=4,xmin=-0.5,xmax=3.5)
213 arrayToF.defineHistogram('barInTrainIDC', title='Total hits per bars in {}; barID; hits', type='TH1I', path='HitsPerBarsInTrain/farCside', xbins=4,xmin=-0.5,xmax=3.5)
214
215 trainIDListToF = ['T0', 'T1', 'T2', 'T3']
216 barInTrainIDListToF = ['A', 'B', 'C', 'D']
217 arrayToF = helper.addArray([trainIDListToF, barInTrainIDListToF], afpToFAlgorithm, 'AFPToFTool', topPath = 'AFP/ToF/')
218 arrayToF.defineHistogram('lbAToF', title='ToF hits vs lumiblock divided by <mu> (train {0}, bar {1}), side A; lb; hits/<mu>', type='TH1F', path='ToFHitsVsLb/sideA', xbins=2000, xmin=0.5, xmax=2000.5, weight = 'lbAToF_Weight')
219 arrayToF.defineHistogram('lbCToF', title='ToF hits vs lumiblock divided by <mu> (train {0}, bar {1}), side C; lb; hits/<mu>', type='TH1F', path='ToFHitsVsLb/sideC', xbins=2000, xmin=0.5, xmax=2000.5, weight = 'lbCToF_Weight')
220
221 #array for ToF cross-bar delta t
222 chan_combinations_list = [ "0AB", "0AC", "0AD", "0BC", "0BD", "0CD", "1AB", "1AC", "1AD", "1BC", "1BD", "1CD",
223 "2AB", "2AC", "2AD", "2BC", "2BD", "2CD", "3AB", "3AC", "3AD", "3BC", "3BD", "3CD"]
224 arrayToFCrossBarDeltaT = helper.addArray([chan_combinations_list], afpToFAlgorithm, 'AFPToFTool', topPath='AFP/ToF/')
225 arrayToFCrossBarDeltaT.defineHistogram('crossBarDeltaT_A', title='ToF cross-bar <delta> time (channel combination {0}), side A; <delta> t, [ps]; events', type='TH1D', path='DeltaTime/sideA', xbins=400, xmin=-1500.0, xmax=1500.0)
226 arrayToFCrossBarDeltaT.defineHistogram('crossBarDeltaT_C', title='ToF cross-bar <delta> time (channel combination {0}), side C; <delta> t, [ps]; events', type='TH1D', path='DeltaTime/sideC', xbins=400, xmin=-1500.0, xmax=1500.0)
227 # Finalize. The return value should be a tuple of the ComponentAccumulator
228 result.merge(helper.result())
229 return result
230
231

Variable Documentation

◆ cfg

Run3AFPExampleMonitorAlgorithm.cfg = MainServicesCfg(flags)

Definition at line 252 of file Run3AFPExampleMonitorAlgorithm.py.

◆ exampleMonitorAcc

Run3AFPExampleMonitorAlgorithm.exampleMonitorAcc = Run3AFPExampleMonitoringConfig(flags)

Definition at line 255 of file Run3AFPExampleMonitorAlgorithm.py.

◆ Files

Run3AFPExampleMonitorAlgorithm.Files

Definition at line 237 of file Run3AFPExampleMonitorAlgorithm.py.

◆ flags

Run3AFPExampleMonitorAlgorithm.flags = initConfigFlags()

Definition at line 236 of file Run3AFPExampleMonitorAlgorithm.py.

◆ HISTFileName

Run3AFPExampleMonitorAlgorithm.HISTFileName

Definition at line 240 of file Run3AFPExampleMonitorAlgorithm.py.

◆ isMC

Run3AFPExampleMonitorAlgorithm.isMC

Definition at line 239 of file Run3AFPExampleMonitorAlgorithm.py.

◆ NumConcurrentEvents

Run3AFPExampleMonitorAlgorithm.NumConcurrentEvents

Definition at line 244 of file Run3AFPExampleMonitorAlgorithm.py.

◆ NumThreads

Run3AFPExampleMonitorAlgorithm.NumThreads

Definition at line 243 of file Run3AFPExampleMonitorAlgorithm.py.