ATLAS Offline Software
Functions
LArNoisyROMonAlg Namespace Reference

Functions

def LArNoisyROMonConfig (flags, inKey="", NoisyFEBDefStr="(>30 chan with Q>4000)", MNBTightFEBDefStr="", MNBTight_PsVetoFEBDefStr="", MNBLooseFEBDefStr="")
 
def LArNoisyROMonConfigCore (helper, algoinstance, flags, inKey="", NoisyFEBDefStr="(>30 chan with Q>4000)", MNBTightFEBDefStr="", MNBTight_PsVetoFEBDefStr="", MNBLooseFEBDefStr="")
 

Function Documentation

◆ LArNoisyROMonConfig()

def LArNoisyROMonAlg.LArNoisyROMonConfig (   flags,
  inKey = "",
  NoisyFEBDefStr = "(>30 chan with Q>4000)",
  MNBTightFEBDefStr = "",
  MNBTight_PsVetoFEBDefStr = "",
  MNBLooseFEBDefStr = "" 
)

Definition at line 5 of file LArNoisyROMonAlg.py.

5 def LArNoisyROMonConfig(flags, inKey="",
6  NoisyFEBDefStr="(>30 chan with Q>4000)", MNBTightFEBDefStr="",
7  MNBTight_PsVetoFEBDefStr="",
8  MNBLooseFEBDefStr=""):
9 
10  from AthenaMonitoring import AthMonitorCfgHelper
11  helper = AthMonitorCfgHelper(flags,'LArNoisyROMonAlgCfg')
12 
13  from AthenaConfiguration.ComponentFactory import CompFactory
14  NoisyFEBDefStr="(>"+str(flags.LAr.NoisyRO.BadChanPerFEB)+" chan with Q>"+str(flags.LAr.NoisyRO.CellQuality)+")"
15  MNBTightFEBDefStr="(>"+str(flags.LAr.NoisyRO.MNBTightCut)+" chan with Q>"+str(flags.LAr.NoisyRO.CellQuality)+")"
16  MNBTight_PsVetoFEBDefStr="(>"+str(flags.LAr.NoisyRO.MNBTight_PsVetoCut[0])+" chan with Q>"+str(flags.LAr.NoisyRO.CellQuality)+") + PS veto (<"+str(flags.LAr.NoisyRO.MNBTight_PsVetoCut[1])+" channels)"
17  MNBLooseFEBDefStr="(>"+str(flags.LAr.NoisyRO.MNBLooseCut)+" chan with Q>"+str(flags.LAr.NoisyRO.CellQuality)+")"
18 
19  return LArNoisyROMonConfigCore(helper,CompFactory.LArNoisyROMonAlg, flags, inKey, NoisyFEBDefStr, MNBTightFEBDefStr, MNBTight_PsVetoFEBDefStr, MNBLooseFEBDefStr)
20 
21 
22 

◆ LArNoisyROMonConfigCore()

def LArNoisyROMonAlg.LArNoisyROMonConfigCore (   helper,
  algoinstance,
  flags,
  inKey = "",
  NoisyFEBDefStr = "(>30 chan with Q>4000)",
  MNBTightFEBDefStr = "",
  MNBTight_PsVetoFEBDefStr = "",
  MNBLooseFEBDefStr = "" 
)

Definition at line 23 of file LArNoisyROMonAlg.py.

23 def LArNoisyROMonConfigCore(helper,algoinstance,flags,
24  inKey="",
25  NoisyFEBDefStr="(>30 chan with Q>4000)",
26  MNBTightFEBDefStr="",
27  MNBTight_PsVetoFEBDefStr="",
28  MNBLooseFEBDefStr=""):
29 
30  # first configure known bad FEBs
31  from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
33  from LArBadChannelTool.LArBadFebsConfig import LArKnownBadFebCfg, LArKnownMNBFebCfg
34  cfg.merge(LArKnownBadFebCfg(flags))
35  cfg.merge(LArKnownMNBFebCfg(flags))
36 
37  larNoisyROMonAlg = helper.addAlgorithm(algoinstance,'larNoisyROMonAlg')
38 
39  NoisyROMonGroupName="LArNoisyROMonGroup"
40 
41  from LArMonitoring.GlobalVariables import lArDQGlobals
42 
43  larNoisyROMonAlg.NoisyROGroupName=NoisyROMonGroupName
44  larNoisyROMonAlg.SubDetNames=lArDQGlobals.SubDet[0:2]
45  larNoisyROMonAlg.PartitionNames=lArDQGlobals.Partitions[0:4]
46 
47  larNoisyROMonAlg.storeLooseMNBFEBs=True
48  if inKey != "":
49  larNoisyROMonAlg.inputKey=inKey
50 
51  # variable for testing on ESD
52  try:
53  LArNoisyROMonForceTrigger
54  except NameError:
55  LArNoisyROMonForceTrigger = False
56 
57  EFNoiseBurstTriggersList=[
58  "HLT_larnoiseburst_L1XE60",
59  "HLT_larnoiseburst_L1XE70",
60  "HLT_larnoiseburst_L1XE80",
61  "HLT_larnoiseburst_L1J100",
62  "HLT_larnoiseburst_L1J40_XE60",
63  "HLT_larnoiseburst_L1J40_XE50",
64  "HLT_larpsall_L1J12_FIRSTEMPTY",
65  "HLT_larpsall_L1J30_FIRSTEMPTY",
66  "HLT_larpsallem_L1EM7_FIRSTEMPTY"
67  ]
68  L1NoiseBurstTriggersList = [
69  "L1_J75",
70  "L1_J100",
71  "L1_J40_XE50",
72  "L1_J40_XE60",
73  "L1_J10_EMPTY",
74  "L1_J30_EMPTY",
75  "L1_EM7_FIRSTEMPTY",
76  "L1_J12_FIRSTEMPTY",
77  "L1_J30_FIRSTEMPTY",
78  "L1_XE60",
79  "L1_XE70",
80  "L1_XE80"
81  ]
82 
83  if flags.DQ.useTrigger or LArNoisyROMonForceTrigger:
84  larNoisyROMonAlg.doTrigger = True
85  larNoisyROMonAlg.EFNoiseBurstTriggers = EFNoiseBurstTriggersList
86  larNoisyROMonAlg.L1NoiseBurstTriggers = L1NoiseBurstTriggersList
87  else:
88  larNoisyROMonAlg.doTrigger = False
89  larNoisyROMonAlg.EFNoiseBurstTriggers = []
90  larNoisyROMonAlg.L1NoiseBurstTriggers = []
91 
92  noisyROGroup = helper.addGroup(
93  larNoisyROMonAlg,
94  NoisyROMonGroupName,
95  '/LAr/NoisyRO/'
96  )
97 
98 
99  larNoisyRO_hist_path='Summary/'
100 
101  # first trees
102  noisyROGroup.defineTree('time,time_ns,algo;LArNoise',path=larNoisyRO_hist_path,
103  treedef='time/i:time_ns/i:algo/b')
104 
105  noisyROGroup.defineTree('candidate_MNB_time,candidate_MNB_time_ns,n_candidate_MNBTight_FEB,n_candidate_MNBTight_PsVeto_FEB,n_candidate_MNBLoose_FEB,v_candidate_MNBTightFEB,v_candidate_MNBTight_PsVetoFEB,v_candidate_MNBLooseFEB;CandidateMNBFebs',path=larNoisyRO_hist_path,
106  treedef='candidate_MNB_time/i:candidate_MNB_time_ns/i:n_candidate_MNBTight_FEB/i:n_candidate_MNBTight_PsVeto_FEB/i:n_candidate_MNBLoose_FEB/i:v_candidate_MNBTightFEB/vector<int>:v_candidate_MNBTight_PsVetoFEB/vector<int>:v_candidate_MNBLooseFEB/vector<int>')
107 
108  #then global histo
109  noisyROGroup.defineHistogram('n_noisyFEBs;NoisyFEB',
110  title='Number of noisy FEB '+ NoisyFEBDefStr + ' per event;# of noisy FEB',
111  type='TH1I',
112  path=larNoisyRO_hist_path,
113  xbins=lArDQGlobals.noisyFEB_Bins,xmin=lArDQGlobals.noisyFEB_Min,xmax=lArDQGlobals.noisyFEB_Max)
114  noisyROGroup.defineHistogram('LBN;LBN',type='TH1I',
115  title='Event counter per LB',
116  path=larNoisyRO_hist_path,
117  xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
118 
119  for subdet in range(0,2):
120  hist_path='/LAr/NoisyRO/'+lArDQGlobals.SubDet[subdet]+'/'
121  slot_low = lArDQGlobals.FEB_Slot[lArDQGlobals.Partitions[subdet*2]][0] - 0.5
122  slot_up = lArDQGlobals.FEB_Slot[lArDQGlobals.Partitions[subdet*2]][1] + 0.5
123  slot_n = int(slot_up - slot_low)
124  ft_low = lArDQGlobals.FEB_Feedthrough[lArDQGlobals.Partitions[subdet*2]][0] - 0.5
125  ft_up = lArDQGlobals.FEB_Feedthrough[lArDQGlobals.Partitions[subdet*2]][1] + 0.5
126  ft_n = int(ft_up - ft_low)
127 
128  darray = helper.addArray([lArDQGlobals.Partitions[2*subdet:2*subdet+2]],larNoisyROMonAlg,lArDQGlobals.SubDet[subdet],topPath='/')
129 
130  # Known bad FEBS
131  darray.defineHistogram('slotBad,FTBad;KnownBadFEB', title='Known Bad FEBs {0} ; Slot ; FT',
132  type='TH2I', path=hist_path,
133  xbins=slot_n,xmin=slot_low,xmax=slot_up,
134  ybins=ft_n, ymin=ft_low, ymax=ft_up,
135  merge='identical')
136 
137  darray.defineHistogram('slotMNB,FTMNB;MNBKnownFEB', title='Known MNB FEBs {0} ; Slot ; FT',
138  type='TH2I', path=hist_path,
139  xbins=slot_n,xmin=slot_low,xmax=slot_up,
140  ybins=ft_n, ymin=ft_low, ymax=ft_up,
141  merge='identical')
142 
143  # 2D plots of noisy FEBs with various cuts
144  darray.defineHistogram('slotNoisy,FTNoisy;NoisyFEBPerEvt', title='Yield of events with {0} FEB noisy -'+NoisyFEBDefStr+' (only vetoed events) ; Slot ; FT',
145  type='TH2I', path=hist_path,
146  xbins=slot_n,xmin=slot_low,xmax=slot_up,
147  ybins=ft_n, ymin=ft_low, ymax=ft_up)
148 
149  darray.defineHistogram('slotTight,FTTight;MNBTightFEBPerEvt', title='Yield of events with {0} FEB noisy -'+MNBTightFEBDefStr+' (only vetoed events) ; Slot ; FT',
150  type='TH2I', path=hist_path,
151  xbins=slot_n,xmin=slot_low,xmax=slot_up,
152  ybins=ft_n, ymin=ft_low, ymax=ft_up)
153 
154  darray.defineHistogram('slotTightCan,FTTightCan;CandidateMNBTightFEBPerEvt', title='Yield of events with {0} FEB noisy -'+MNBTightFEBDefStr+' (only vetoed events) ; Slot ; FT',
155  type='TH2I', path=hist_path,
156  xbins=slot_n,xmin=slot_low,xmax=slot_up,
157  ybins=ft_n, ymin=ft_low, ymax=ft_up)
158 
159  darray.defineHistogram('slot_PsVetoTight,FT_PsVetoTight;MNBTight_PsVetoFEBPerEvt', title='Yield of events with {0} FEB noisy -'+MNBTight_PsVetoFEBDefStr+' (only vetoed events) ; Slot ; FT',
160  type='TH2I', path=hist_path,
161  xbins=slot_n,xmin=slot_low,xmax=slot_up,
162  ybins=ft_n, ymin=ft_low, ymax=ft_up)
163 
164  darray.defineHistogram('slot_PsVetoTightCan,FT_PsVetoTightCan;CandidateMNBTight_PsVetoFEBPerEvt', title='Yield of events with {0} FEB noisy -'+MNBTight_PsVetoFEBDefStr+' (only vetoed events) ; Slot ; FT',
165  type='TH2I', path=hist_path,
166  xbins=slot_n,xmin=slot_low,xmax=slot_up,
167  ybins=ft_n, ymin=ft_low, ymax=ft_up)
168 
169  darray.defineHistogram('slotLoose,FTLoose;MNBLooseFEBPerEvt', title='Yield of events with {0} FEB noisy -'+MNBLooseFEBDefStr+' (only vetoed events) ; Slot ; FT',
170  type='TH2I', path=hist_path,
171  xbins=slot_n,xmin=slot_low,xmax=slot_up,
172  ybins=ft_n, ymin=ft_low, ymax=ft_up)
173 
174  darray.defineHistogram('slotLooseCan,FTLooseCan;CandidateMNBLooseFEBPerEvt', title='Yield of events with {0} FEB noisy -'+MNBLooseFEBDefStr+' (only vetoed events) ; Slot ; FT',
175  type='TH2I', path=hist_path,
176  xbins=slot_n,xmin=slot_low,xmax=slot_up,
177  ybins=ft_n, ymin=ft_low, ymax=ft_up)
178 
179  # 1D plots of noisy events of various type
180  darray.defineHistogram('LBStd;NoisyEvent',type='TH1I', path=hist_path,
181  title='Yield of events flagged as RNB-Standard - {0} ; Luminosity Block; Number of events',
182  xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
183 
184  darray.defineHistogram('LBSat;SaturatedNoisyEvent',type='TH1I', path=hist_path,
185  title='Yield of events flagged as RNB-Saturated - {0} ; Luminosity Block',
186  xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
187 
188  darray.defineHistogram('LBMNBTight;MNBTightEvent',type='TH1I', path=hist_path,
189  title='Yield of events flagged as MNB-Tight - {0} ; Luminosity Block',
190  xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
191 
192  darray.defineHistogram('LBMNBTight_PsVeto;MNBTight_PsVetoEvent',type='TH1I', path=hist_path,
193  title='Yield of events flagged as MNB-Tight_PsVeto - {0} ; Luminosity Block',
194  xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
195 
196  darray.defineHistogram('LBMNBLoose;MNBLooseEvent',type='TH1I', path=hist_path,
197  title='Yield of events flagged as MNB-Loose - {0} ; Luminosity Block',
198  xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
199 
200  # 1D plots of events still noisy after EventVeto
201  darray.defineHistogram('LBStd_Veto;NoisyEvent_TimeVeto',type='TH1I', path=hist_path,
202  title='Yield of events flagged as RNB-Standard not vetoed by time window - {0} ; Luminosity Block',
203  xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
204 
205  darray.defineHistogram('LBSat_Veto;SaturatedNoisyEvent_TimeVeto',type='TH1I', path=hist_path,
206  title='Yield of events flagged as RNB-Saturated not vetoed by time window - {0} ; Luminosity Block',
207  xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
208 
209  darray.defineHistogram('LBMNBTight_Veto;MNBTightEvent_TimeVeto',type='TH1I', path=hist_path,
210  title='Yield of events flagged as MNB-Tight not vetoed by time window - {0} ; Luminosity Block',
211  xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
212 
213  darray.defineHistogram('LBMNBTight_PsVeto_Veto;MNBTight_PsVetoEvent_TimeVeto',type='TH1I', path=hist_path,
214  title='Yield of events flagged as MNB-Tight_PsVeto not vetoed by time window - {0} ; Luminosity Block',
215  xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
216 
217  darray.defineHistogram('LBMNBLoose_Veto;MNBLooseEvent_TimeVeto',type='TH1I', path=hist_path,
218  title='Yield of events flagged as MNB-Loose not vetoed by time window - {0} ; Luminosity Block',
219  xbins=lArDQGlobals.LB_Bins,xmin=lArDQGlobals.LB_Min,xmax=lArDQGlobals.LB_Max)
220 
221  # Trigger histos
222  if larNoisyROMonAlg.doTrigger:
223  siz=len(larNoisyROMonAlg.EFNoiseBurstTriggers)
224  darray.defineHistogram('Triggers;NoisyEventTrigger',type='TH1I', path=hist_path,
225  title='Trigger fired for RNB flagged events - {0} ; Special trigger fired',
226  xbins=siz+1,xmin=0.5,xmax=siz+1.5,
227  xlabels=larNoisyROMonAlg.EFNoiseBurstTriggers.append("NONE"))
228 
229  l1siz=len(larNoisyROMonAlg.L1NoiseBurstTriggers)
230  darray.defineHistogram('L1Triggers;NoisyEventL1Term',type='TH1I', path=hist_path,
231  title='L1 term fired for RNB flagged events - {0} ; Special trigger fired',
232  xbins=l1siz+1,xmin=0.5,xmax=l1siz+1.5,
233  xlabels=larNoisyROMonAlg.L1NoiseBurstTriggers.append("NONE"))
234 
235  cfg.merge(helper.result())
236  return cfg
237 
238 
python.LArBadFebsConfig.LArKnownMNBFebCfg
def LArKnownMNBFebCfg(configFlags, tag=None)
Definition: LArBadFebsConfig.py:25
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
LArNoisyROMonAlg.LArNoisyROMonConfigCore
def LArNoisyROMonConfigCore(helper, algoinstance, flags, inKey="", NoisyFEBDefStr="(>30 chan with Q>4000)", MNBTightFEBDefStr="", MNBTight_PsVetoFEBDefStr="", MNBLooseFEBDefStr="")
Definition: LArNoisyROMonAlg.py:23
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
python.LArBadFebsConfig.LArKnownBadFebCfg
def LArKnownBadFebCfg(configFlags, tag=None)
Definition: LArBadFebsConfig.py:11
LArNoisyROMonAlg.LArNoisyROMonConfig
def LArNoisyROMonConfig(flags, inKey="", NoisyFEBDefStr="(>30 chan with Q>4000)", MNBTightFEBDefStr="", MNBTight_PsVetoFEBDefStr="", MNBLooseFEBDefStr="")
Definition: LArNoisyROMonAlg.py:5
str
Definition: BTagTrackIpAccessor.cxx:11