ATLAS Offline Software
tauMonitorAlgorithm.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 #
4 
5 '''@file tauMonitorAlgorithm.py
6 @date 2018-01-11
7 @brief tau python configuration for the Run III AthenaMonitoring package
8 '''
9 
10 from math import pi
11 
12 def tauMonitoringConfig(inputFlags,**kwargs):
13  '''Function to configures some algorithms in the monitoring system.'''
14 
15 
16  if not (inputFlags.Common.isOnline == 'online' or inputFlags.Input.isMC):
17  kwargs.setdefault('useReadyFilterTool', True)
18  else:
19  kwargs.setdefault('useReadyFilterTool', False)
20 
21  from AthenaConfiguration.ComponentFactory import CompFactory
22  from AthenaMonitoring.BadLBFilterToolConfig import LArBadLBFilterToolCfg
23  from AthenaMonitoring.AtlasReadyFilterConfig import AtlasReadyFilterCfg
24 
25 
26 
27  # The following class will make a sequence, configure algorithms, and link
28  # them to GenericMonitoringTools
29  from AthenaMonitoring import AthMonitorCfgHelper
30  cfgHelper = AthMonitorCfgHelper(inputFlags, monName='tauMonitorAlgFamily')
31  cfg = cfgHelper.result()
32 
33  if kwargs['useReadyFilterTool'] and 'ReadyFilterTool' not in kwargs:
34  readyFilterTool = cfg.popToolsAndMerge(AtlasReadyFilterCfg(inputFlags))
35  kwargs['ReadyFilterTool'] = readyFilterTool
36 
37 
38 
44 
45 
46  tauMonitorAlgorithm = CompFactory.tauMonitorAlgorithm
47  tauMonAlgBA = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgBA', addFilterTools = [LArBadLBFilterToolCfg(inputFlags)])
48  tauMonAlgCR = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgCR', addFilterTools = [LArBadLBFilterToolCfg(inputFlags)])
49  tauMonAlgEC = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgEC', addFilterTools = [LArBadLBFilterToolCfg(inputFlags)])
50  tauMonAlgGlobal = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgGlobal', addFilterTools = [LArBadLBFilterToolCfg(inputFlags)])
51  tauMonAlgTauTrig1 = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgTauTrig1', addFilterTools = [LArBadLBFilterToolCfg(inputFlags)])
52  tauMonAlgTauTrig2 = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgTauTrig2', addFilterTools = [LArBadLBFilterToolCfg(inputFlags)])
53  tauMonAlgTauTrig3 = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgTauTrig3', addFilterTools = [LArBadLBFilterToolCfg(inputFlags)])
54  tauMonAlgTauTrig4 = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgTauTrig4', addFilterTools = [LArBadLBFilterToolCfg(inputFlags)])
55  tauMonAlgTauTrig5 = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgTauTrig5', addFilterTools = [LArBadLBFilterToolCfg(inputFlags)])
56  tauMonAlgTauTrig6 = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgTauTrig6', addFilterTools = [LArBadLBFilterToolCfg(inputFlags)])
57  tauMonAlgTauTrig7 = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgTauTrig7', addFilterTools = [LArBadLBFilterToolCfg(inputFlags)])
58  tauMonAlgTauTrig8 = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgTauTrig8', addFilterTools = [LArBadLBFilterToolCfg(inputFlags)])
59  tauMonAlgEleTrig = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgEleTrig', addFilterTools = [LArBadLBFilterToolCfg(inputFlags)])
60  tauMonAlgJetTrig = cfgHelper.addAlgorithm( tauMonitorAlgorithm, name='tauMonAlgJetTrig', addFilterTools = [LArBadLBFilterToolCfg(inputFlags)])
61 
62 
63 
64 
65 
71 
72  tauMonAlgTauTrig1.TriggerChain = "HLT_tau25_mediumRNN_tracktwoMVA_L1eTAU20"
73  tauMonAlgTauTrig2.TriggerChain = "HLT_tau25_mediumRNN_tracktwoMVA_L1cTAU20M"
74  tauMonAlgTauTrig3.TriggerChain = "HLT_tau160_mediumRNN_tracktwoMVA_L1eTAU140"
75  tauMonAlgTauTrig4.TriggerChain = "HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB30_L1cTAU30M_2cTAU20M_DR-eTAU30eTAU20-jJ55"
76  tauMonAlgTauTrig5.TriggerChain = "HLT_tau35_mediumRNN_tracktwoMVA_tau25_mediumRNN_tracktwoMVA_03dRAB_L1cTAU30M_2cTAU20M_4jJ30p0ETA25"
77  tauMonAlgTauTrig6.TriggerChain = "HLT_tau40_mediumRNN_tracktwoMVA_tau35_mediumRNN_tracktwoMVA_03dRAB_L1cTAU35M_2cTAU30M_2jJ55_3jJ50"
78  tauMonAlgTauTrig7.TriggerChain = "HLT_tau80_mediumRNN_tracktwoMVA_tau35_mediumRNN_tracktwoMVA_03dRAB30_L1eTAU80_2cTAU30M_DR-eTAU30eTAU20"
79  tauMonAlgTauTrig8.TriggerChain = "HLT_tau80_mediumRNN_tracktwoMVA_tau60_mediumRNN_tracktwoMVA_03dRAB_L1eTAU80_2eTAU60"
80 
81 
82  tauMonAlgEleTrig.TriggerChain = "HLT_e[2-9][0-9]_.*"
83  tauMonAlgJetTrig.TriggerChain = "HLT_j[2-9][0-9]_.*"
84 
85  tauMonAlgBA.etaMin = -1.
86  tauMonAlgBA.etaMax = 1.3
87  tauMonAlgCR.etaMin = 1.3
88  tauMonAlgCR.etaMax = 1.7
89  tauMonAlgEC.etaMin = 1.7
90  tauMonAlgEC.etaMax = 3.5
91  tauMonAlgGlobal.etaMin = -100
92  tauMonAlgGlobal.etaMax = 100
93  tauMonAlgTauTrig1.etaMin = -100
94  tauMonAlgTauTrig1.etaMax = 100
95  tauMonAlgTauTrig2.etaMin = -100
96  tauMonAlgTauTrig2.etaMax = 100
97  tauMonAlgTauTrig3.etaMin = -100
98  tauMonAlgTauTrig3.etaMax = 100
99  tauMonAlgTauTrig4.etaMin = -100
100  tauMonAlgTauTrig4.etaMax = 100
101  tauMonAlgTauTrig5.etaMin = -100
102  tauMonAlgTauTrig5.etaMax = 100
103  tauMonAlgTauTrig6.etaMin = -100
104  tauMonAlgTauTrig6.etaMax = 100
105  tauMonAlgTauTrig7.etaMin = -100
106  tauMonAlgTauTrig7.etaMax = 100
107  tauMonAlgTauTrig8.etaMin = -100
108  tauMonAlgTauTrig8.etaMax = 100
109 
110  tauMonAlgEleTrig.etaMin = -100
111  tauMonAlgEleTrig.etaMax = 100
112  tauMonAlgJetTrig.etaMin = -100
113  tauMonAlgJetTrig.etaMax = 100
114 
115  tauMonAlgBA.kinGroupName = 'tauMonKinGroupBA'
116  tauMonAlgCR.kinGroupName = 'tauMonKinGroupCR'
117  tauMonAlgEC.kinGroupName = 'tauMonKinGroupEC'
118  tauMonAlgGlobal.kinGroupName = 'tauMonKinGroupGlobal'
119  tauMonAlgTauTrig1.kinGroupName = 'tauMonKinGroupTauTrig1'
120  tauMonAlgTauTrig2.kinGroupName = 'tauMonKinGroupTauTrig2'
121  tauMonAlgTauTrig3.kinGroupName = 'tauMonKinGroupTauTrig3'
122  tauMonAlgTauTrig4.kinGroupName = 'tauMonKinGroupTauTrig4'
123  tauMonAlgTauTrig5.kinGroupName = 'tauMonKinGroupTauTrig5'
124  tauMonAlgTauTrig6.kinGroupName = 'tauMonKinGroupTauTrig6'
125  tauMonAlgTauTrig7.kinGroupName = 'tauMonKinGroupTauTrig7'
126  tauMonAlgTauTrig8.kinGroupName = 'tauMonKinGroupTauTrig8'
127 
128  tauMonAlgEleTrig.kinGroupName = 'tauMonKinGroupEleTrig'
129  tauMonAlgJetTrig.kinGroupName = 'tauMonKinGroupJetTrig'
130 
131 
134 
135  # Add a generic monitoring tool (a "group" in old language). The returned
136  # object here is the standard GenericMonitoringTool.
137  myKinGroupBA = cfgHelper.addGroup(alg=tauMonAlgBA, name='tauMonKinGroupBA', topPath='Tau/TauB/' )
138  myKinGroupCR = cfgHelper.addGroup(alg=tauMonAlgCR, name='tauMonKinGroupCR', topPath='Tau/TauCR/' )
139  myKinGroupEC = cfgHelper.addGroup(alg=tauMonAlgEC, name='tauMonKinGroupEC', topPath='Tau/TauE/' )
140  myKinGroupGlobal = cfgHelper.addGroup(alg=tauMonAlgGlobal, name='tauMonKinGroupGlobal', topPath='Tau/' )
141  myKinGroupTauTrig1 = cfgHelper.addGroup(alg=tauMonAlgTauTrig1, name='tauMonKinGroupTauTrig1', topPath='Tau/Trigger/tauTrigger1/' )
142  myKinGroupTauTrig2 = cfgHelper.addGroup(alg=tauMonAlgTauTrig2, name='tauMonKinGroupTauTrig2', topPath='Tau/Trigger/tauTrigger2/' )
143  myKinGroupTauTrig3 = cfgHelper.addGroup(alg=tauMonAlgTauTrig3, name='tauMonKinGroupTauTrig3', topPath='Tau/Trigger/tauTrigger3/' )
144  myKinGroupTauTrig4 = cfgHelper.addGroup(alg=tauMonAlgTauTrig4, name='tauMonKinGroupTauTrig4', topPath='Tau/Trigger/tauTrigger4/' )
145  myKinGroupTauTrig5 = cfgHelper.addGroup(alg=tauMonAlgTauTrig5, name='tauMonKinGroupTauTrig5', topPath='Tau/Trigger/tauTrigger5/' )
146  myKinGroupTauTrig6 = cfgHelper.addGroup(alg=tauMonAlgTauTrig6, name='tauMonKinGroupTauTrig6', topPath='Tau/Trigger/tauTrigger6/' )
147  myKinGroupTauTrig7 = cfgHelper.addGroup(alg=tauMonAlgTauTrig7, name='tauMonKinGroupTauTrig7', topPath='Tau/Trigger/tauTrigger7/' )
148  myKinGroupTauTrig8 = cfgHelper.addGroup(alg=tauMonAlgTauTrig8, name='tauMonKinGroupTauTrig8', topPath='Tau/Trigger/tauTrigger8/' )
149  myKinGroupEleTrig = cfgHelper.addGroup(alg=tauMonAlgEleTrig, name='tauMonKinGroupEleTrig', topPath='Tau/Trigger/EleTrig/' )
150  myKinGroupJetTrig = cfgHelper.addGroup(alg=tauMonAlgJetTrig, name='tauMonKinGroupJetTrig', topPath='Tau/Trigger/JetTrig/' )
151 
152 
153  naming= {
154  'BA': "Tau_TauB_",
155  'CR': "Tau_TauCR_",
156  'EC': "Tau_TauE_",
157  'Global': "",
158  'EleTrig': "emTriggered_",
159  'JetTrig': "jetTriggered_",
160  'TauTrig1': "tauTriggered1_",
161  'TauTrig2': "tauTriggered2_",
162  'TauTrig3': "tauTriggered3_",
163  'TauTrig4': "tauTriggered4_",
164  'TauTrig5': "tauTriggered5_",
165  'TauTrig6': "tauTriggered6_",
166  'TauTrig7': "tauTriggered7_",
167  'TauTrig8': "tauTriggered8_",
168 
169  }
170 
171  def namer(variables,histogramName, folder, algorithm):
172  if folder != "":
173  #This wouldn't have been necessary except the calo folder in the naming convention:
174  #This adds the Tau prefix to the histograms in the calo folder
175  if postfix == "Global" and (folder =="Calo" or folder=="Track" or folder=="Track_allTracks" or folder=="Track_leadTrack" or folder=="Cluster" ):
176  return variables+";"+"Tau_"+naming[algorithm]+folder+"_"+histogramName
177  else:
178  return variables+";"+naming[algorithm]+folder+"_"+histogramName
179  else:
180  return variables+";"+naming[algorithm]+folder+histogramName
181 
182  # Add a GMT for the other example monitor algorithm
183  # anotherGroup = cfgHelper.addGroup(anotherTauMonAlg,'tauMonitor')
184 
185 
187  for itup in [(myKinGroupBA,'BA'),
188  (myKinGroupCR,'CR'),
189  (myKinGroupEC,'EC'),
190  (myKinGroupGlobal,'Global'),
191  (myKinGroupEleTrig,'EleTrig'),
192  (myKinGroupJetTrig,'JetTrig'),
193  (myKinGroupTauTrig1, 'TauTrig1'),
194  (myKinGroupTauTrig2, 'TauTrig2'),
195  (myKinGroupTauTrig3, 'TauTrig3'),
196  (myKinGroupTauTrig4, 'TauTrig4'),
197  (myKinGroupTauTrig5, 'TauTrig5'),
198  (myKinGroupTauTrig6, 'TauTrig6'),
199  (myKinGroupTauTrig7, 'TauTrig7'),
200  (myKinGroupTauTrig8, 'TauTrig8')]:
201 
202  (igroup, postfix) = itup
203 
204  PHIMIN = -pi
205  PHIMAX = pi
206 
207  folder = ""
208 
209  if(postfix =="BA" or postfix =="CR" or postfix=="EC" or postfix == "Global" or postfix.startswith('TauTrig') or postfix=="EleTrig" or postfix =="JetTrig"):
210 
211 
212  #potentialHigh Pt replacement
213  igroup.defineHistogram(namer('tauEtaEt15,tauPhiEt15','tauPhiVsEta_et15','',postfix), type='TH2F', title='Eta Vs phi (Et>15GeV);Eta;Phi',
214  xbins=30,xmin=-2.55,xmax=2.55,ybins=32,ymin=PHIMIN,ymax=PHIMAX)
215 
216  igroup.defineHistogram(namer('nTauCandidates', 'nTauCandidates',"",postfix), title='Number of tau candidates;Number of Taus per Event',
217  xbins=61, xmin=-0.5, xmax=60.5,path=folder)
218 
219 
220  igroup.defineHistogram(namer('tauCharge','tauCharge','',postfix), title='Charge of tau candidates;Charge;Number of Candidates',
221  xbins=11, xmin=-5.5, xmax=5.5,path=folder)
222 
223 
224  igroup.defineHistogram(namer('RNNJetScore','RNNJetScore','',postfix), title='RNN Jet Score',
225  xbins=100, xmin=0, xmax=1,path=folder)
226 
227  igroup.defineHistogram(namer('RNNJetScoreSigTrans','RNNJetScoreSigTrans','',postfix), title='RNN Jet Score Sig Trans',
228  xbins=48, xmin=0, xmax=1.1,path=folder)
229 
230  igroup.defineHistogram(namer('RNNEleScore','RNNEleScore','',postfix), title='RNN Ele Score',
231  xbins=100, xmin=0, xmax=1,path=folder)
232 
233  igroup.defineHistogram(namer('RNNEleScoreSigTrans','RNNEleScoreSigTrans','',postfix), title='RNN Ele Score Sig Trans',
234  xbins=48, xmin=0, xmax=1.1,path=folder)
235 
236  igroup.defineHistogram(namer('tauEt','tauEt','',postfix), title='Et of tau candidates;Transverse Energy (GeV);Number of Candidates',
237  xbins=60, xmin=0., xmax=300.,path=folder)
238 
239  igroup.defineHistogram(namer('tauEtaEXP','tauEtaEXP','',postfix), title='Eta of tau candidates;Eta;Number of Candidates',
240  xbins=51, xmin=-2.55, xmax=2.55,path=folder)
241 
242 
243 
244  igroup.defineHistogram(namer('tauEta','tauEta','',postfix), title='Eta of tau candidates;Eta;Number of Candidates',
245  xbins=51, xmin=-2.55, xmax=2.55,path=folder)
246 
247  igroup.defineHistogram(namer('LB,tauEta','tauEtaVsLB','',postfix), type='TH2F', title='Tau Eta Vs Lumiblock;Lumiblock;eta',
248  xbins=1200,xmin=0,xmax=1200,ybins=51,ymin=-2.55,ymax=2.55,path=folder)
249 
250  igroup.defineHistogram(namer('tauPhi','tauPhi','',postfix), title='Phi of tau candidates;Phi;Number of Candidates',
251  xbins=65, xmin=PHIMIN-0.098174/2., xmax=PHIMAX+0.098174/2.,path=folder)
252 
253  igroup.defineHistogram(namer('tauEta,tauPhi','tauPhiVsEta','',postfix), type='TH2F', title='Phi Vs Eta;Eta;Phi',
254  xbins=30,xmin=-2.55,xmax=2.55,ybins=32,ymin=PHIMIN,ymax=PHIMAX,path=folder)
255 
256 
257  igroup.defineHistogram(namer('LB,tauPhi','tauPhiVsLB','',postfix), type='TH2F', title='Tau Phi vs Lumiblock;Lumiblock;Phi',
258  xbins=1200,xmin=0,xmax=1200,ybins=80,ymin=PHIMIN,ymax=PHIMAX,path=folder)
259 
260  if(postfix =="BA" or postfix =="CR" or postfix=="EC" or postfix.startswith('TauTrig')):
261 
262  igroup.defineHistogram(namer('tauPhiRNNLoose','phi','Identification_RNNLoose',postfix), title='Phi of tau candidates ( RNNLoose) ;Phi;Number of Candidates',
263  xbins=65, xmin=PHIMIN-0.098174/2., xmax=PHIMAX+0.098174/2., path=folder+"Identification/RNNLoose" )
264 
265  igroup.defineHistogram(namer('tauEtaRNNLoose','eta','Identification_RNNLoose',postfix), title='Eta of tau candidates ( RNNLoose) ;Eta;Number of Candidates',
266  xbins=51, xmin=-2.55, xmax=2.55, path=folder+"Identification/RNNLoose")
267 
268  igroup.defineHistogram(namer('tauEtRNNLoose','et','Identification_RNNLoose',postfix), title='Et of tau candidates;Transverse Energy (GeV);Number of Candidates',
269  xbins=60, xmin=0., xmax=300.,path=folder+"Identification/RNNLoose")
270 
271  igroup.defineHistogram(namer('NumTracksRNNLoose','NumTracks','Identification_RNNLoose',postfix), title='Number Of Tracks for Tau Candidates (RNNLoose);Number Of Tracks;Number Of Candidates',
272  xbins=21, xmin=-0.5, xmax=20.5,path=folder+"Identification/RNNLoose")
273 
274  igroup.defineHistogram(namer('tauPhiRNNMedium','phi','Identification_RNNMedium',postfix), title='Phi of tau candidates ( RNNMedium) ;Phi;Number of Candidates',
275  xbins=65, xmin=PHIMIN-0.098174/2., xmax=PHIMAX+0.098174/2., path=folder+"Identification/RNNMedium" )
276 
277  igroup.defineHistogram(namer('tauEtaRNNMedium','eta','Identification_RNNMedium',postfix), title='Eta of tau candidates ( RNNMedium) ;Eta;Number of Candidates',
278  xbins=51, xmin=-2.55, xmax=2.55, path=folder+"Identification/RNNMedium")
279 
280  igroup.defineHistogram(namer('tauEtRNNMedium','et','Identification_RNNMedium',postfix), title='Et of tau candidates;Transverse Energy (GeV);Number of Candidates',
281  xbins=60, xmin=0., xmax=300.,path=folder+"Identification/RNNMedium")
282 
283  igroup.defineHistogram(namer('NumTracksRNNMedium','NumTracks','Identification_RNNMedium',postfix), title='Number Of Tracks for Tau Candidates (RNNMedium);Number Of Tracks;Number Of Candidates',
284  xbins=21, xmin=-0.5, xmax=20.5,path=folder+"Identification/RNNMedium")
285 
286  igroup.defineHistogram(namer('tauPhiRNNTight','phi','Identification_RNNTight',postfix), title='Phi of tau candidates ( RNNTight) ;Phi;Number of Candidates',
287  xbins=65, xmin=PHIMIN-0.098174/2., xmax=PHIMAX+0.098174/2., path=folder+"Identification/RNNTight" )
288 
289  igroup.defineHistogram(namer('tauEtaRNNTight','eta','Identification_RNNTight',postfix), title='Eta of tau candidates ( RNNTight) ;Eta;Number of Candidates',
290  xbins=51, xmin=-2.55, xmax=2.55, path=folder+"Identification/RNNTight")
291 
292  igroup.defineHistogram(namer('tauEtRNNTight','et','Identification_RNNTight',postfix), title='Et of tau candidates;Transverse Energy (GeV);Number of Candidates',
293  xbins=60, xmin=0., xmax=300.,path=folder+"Identification/RNNTight")
294 
295  igroup.defineHistogram(namer('NumTracksRNNTight','NumTracks','Identification_RNNTight',postfix), title='Number Of Tracks for Tau Candidates (RNNTight);Number Of Tracks;Number Of Candidates',
296  xbins=21, xmin=-0.5, xmax=20.5,path=folder+"Identification/RNNTight")
297 
298 
299 
300 
301  igroup.defineHistogram(namer('tauPhiEt15RNNLoose','phi','Identification_RNNLoose15GeV',postfix), title='Phi of tau candidates (Et>15, RNNLoose) ;Phi;Number of Candidates',
302  xbins=65, xmin=PHIMIN-0.098174/2., xmax=PHIMAX+0.098174/2., path=folder+"Identification/RNNLoose15GeV" )
303 
304  igroup.defineHistogram(namer('tauEtaEt15RNNLoose','eta','Identification_RNNLoose15GeV',postfix), title='Eta of tau candidates (Et>15, RNNLoose) ;Eta;Number of Candidates',
305  xbins=51, xmin=-2.55, xmax=2.55, path=folder+"Identification/RNNLoose15GeV")
306 
307  igroup.defineHistogram(namer('nClustersEt15RNNLoose','nCluster','Identification_RNNLoose15GeV',postfix), title='Number Of CaloTopoClusters (Et>15,RNNLoose);Number Of Clusters;Number Of Candidates',
308  xbins=40, xmin=0., xmax=40.,path=folder+"Identification/RNNLoose15GeV" )
309 
310  igroup.defineHistogram(namer('NumTracksEt15RNNLoose','NumTracks','Identification_RNNLoose15GeV',postfix), title='Number Of Tracks for Tau Candidates (Et>15,RNNLoose);Number Of Tracks;Number Of Candidates',
311  xbins=21, xmin=-0.5, xmax=20.5,path=folder+"Identification/RNNLoose15GeV")
312 
313  igroup.defineHistogram(namer('tauEtEt15RNNLoose','et','Identification_RNNLoose15GeV',postfix), title='Et of tau candidates;Transverse Energy (GeV);Number of Candidates',
314  xbins=60, xmin=0., xmax=300.,path=folder+"Identification/RNNLoose15GeV")
315 
316  igroup.defineHistogram(namer('panModeEt15RNNLoose','panMode','Identification_RNNLoose15GeV',postfix), title='tau decay mode from panTau upon JetRNNSigMedium;mode',
317  xbins=5, xmin=0., xmax=5., path=folder+"Identification/RNNLoose15GeV", xlabels=["1p0n","1p1n","1pXn","3p0n","3pXn"])
318 
319  igroup.defineHistogram(namer('tauEtaEt15RNNLoose,tauPhiEt15RNNLoose','tauPhiVsEta_et15_RNNLoose','',postfix), type='TH2F', title='Phi vs Eta (Et>15, RNNLoose) ;Eta;Phi',
320  xbins=30,xmin=-2.55,xmax=2.55,ybins=32,ymin=PHIMIN,ymax=PHIMAX)
321 
322 
323  igroup.defineHistogram(namer('jetSeedEta','jetSeedEta','Calo',postfix), title='Calorimeter eta of tau candidates;Eta;Numbers of Candidates',path=folder+"Calo",
324  xbins=50, xmin=-2.5, xmax=2.5 )
325 
326  igroup.defineHistogram(namer('jetSeedPhi','jetSeedPhi','Calo',postfix), title='Calorimeter phi of tau candidates;Phi;Numbers of Candidates',path=folder+"Calo",
327  xbins=64, xmin=PHIMIN, xmax=PHIMAX )
328 
329  igroup.defineHistogram(namer('jetSeedPt','jetSeedPt','Calo',postfix), title='Calorimeter pt of tau candidates;Et;Numbers of Candidates',path=folder+"Calo",
330  xbins=100, xmin=0., xmax=300 )
331 
332  igroup.defineHistogram(namer('centFrac,LB','CentFracVsLB','Calo',postfix), type='TH2F', title='Centrality Fraction vs Lumiblock;Centrality Fraction;Lumiblock', path=folder+"Calo",
333  xbins=51,xmin=0,xmax=1.02,ybins=1200,ymin=0.,ymax=1200.)
334 
335  igroup.defineHistogram('isolFrac,LB', type='TH2F', title='Isolation Fraction vs Lumiblock;Isolation Fraction;Lumiblock', path=folder+"Calo",
336  xbins=51,xmin=0,xmax=1.02,ybins=1200,ymin=0.,ymax=1200.)
337 
338 
339 
340  igroup.defineHistogram(namer('muonVeto','muonVeto','Identification',postfix), title='Muon Veto',path=folder+"Identification",
341  xbins=2, xmin=-0.5, xmax=1.5, xlabels=["False","True"] )
342 
343  igroup.defineHistogram(namer('tauRNNLoose','tauRNNLoose','Identification',postfix), title='Identification Flag: tauRNNLoose',path=folder+"Identification",
344  xbins=2, xmin=-0.5, xmax=1.5 , xlabels=["False","True"])
345 
346  igroup.defineHistogram(namer('tauRNNMedium','tauRNNMedium','Identification',postfix), title='Identification Flag: tauRNNMedium',path=folder+"Identification",
347  xbins=2, xmin=-0.5, xmax=1.5 , xlabels=["False","True"])
348 
349  igroup.defineHistogram(namer('tauRNNTight','tauRNNTight','Identification',postfix), title='Identification Flag: tauRNNTight',path=folder+"Identification",
350  xbins=2, xmin=-0.5, xmax=1.5, xlabels=["False","True"])
351 
352 
353  #Substructure Histograms
354  igroup.defineHistogram(namer('panModeSubstructure','panMode','SubStructure',postfix), title='tau decay mode from PanTau upon JetBDTSigMedium;mode',
355  xbins=8, xmin=0., xmax=8., path=folder+"SubStructure")
356 
357  igroup.defineHistogram(namer('BDTScoreAsP0','BDTScoreAsP0','SubStructure',postfix), title='BDT score indentifying pion zero ; BDT score',path=folder+"SubStructure",
358  xbins=15, xmin=-0, xmax=1.2 )
359 
360  igroup.defineHistogram(namer('EMFracTrk','EMFracTrk','SubStructure',postfix), title='Ratio of pt to shot electromagnetic energy for associated tracks; track pt ratio in EM',path=folder+"SubStructure",
361  xbins=15, xmin=0, xmax=1.5 )
362 
363  igroup.defineHistogram(namer('EfracL2EffCluster','EfracL2EffCluster','SubStructure',postfix), title='Energy fraction of leading two effective clusters in shot; energy fraction',path=folder+"SubStructure",
364  xbins=15, xmin=0, xmax=1.5 )
365 
366  igroup.defineHistogram(namer('EisoEffCluster','EisoEffCluster','SubStructure',postfix), title='Isolation Energy after correction in effective clusters ; isolation energy (GeV)',path=folder+"SubStructure",
367  xbins=10, xmin=0, xmax=50. )
368 
369  igroup.defineHistogram(namer('InvMassEffClusters','InvMassEffClusters','SubStructure',postfix), title='Invariant mass of effective clusters in shot; invariant mass (GeV)',path=folder+"SubStructure",
370  xbins=40, xmin=0, xmax=8. )
371 
372  igroup.defineHistogram(namer('nNeutPFO','nNeutPFO','SubStructure',postfix), title='_NumNeutPFO;Number of neutral ParticleFlow objects ; PFO number',path=folder+"SubStructure",
373  xbins=20, xmin=0, xmax=20. )
374 
375  igroup.defineHistogram(namer('nShot','nShot','SubStructure',postfix), title='number of shots ; shot number ',path=folder+"SubStructure",
376  xbins=20, xmin=0, xmax=20. )
377 
378  igroup.defineHistogram(namer('panEta','panEta','SubStructure',postfix), title='tau Eta from PanTau ; substructure Eta',path=folder+"SubStructure",
379  xbins=16, xmin=-3.2, xmax=3.2 )
380 
381  igroup.defineHistogram(namer('panPhi','panPhi','SubStructure',postfix), title='tau Phi from PanTau ; substructure Phi',path=folder+"SubStructure",
382  xbins=16, xmin=PHIMIN, xmax=PHIMAX )
383 
384  igroup.defineHistogram(namer('panPt','panPt','SubStructure',postfix), title='tau Pt from PanTau ; substructure pt (GeV)',path=folder+"SubStructure",
385  xbins=20, xmin=0, xmax=200 )
386 
387  igroup.defineHistogram(namer('pt3','shots_pt3','SubStructure',postfix), title='weighted cell pt in 3x3 window in shots; pt3 (GeV) ',path=folder+"SubStructure",
388  xbins=24, xmin=0, xmax=12 )
389 
390  igroup.defineHistogram(namer('PSSFrac','PSSFracEffCluster','SubStructure',postfix), title='Energy fraction for PreSampling and sampling layers in effective clusters in shot;Sampling Energy Fraction',path=folder+"SubStructure",
391  xbins=10, xmin=0, xmax=1. )
392 
393  igroup.defineHistogram(namer('ptRatioEflowApprox','ptRatioApprox','SubStructure',postfix), title='Ratio of pt to shot total energy for associated tracks; track pt ratio',
394  xbins=20, xmin=0., xmax=2., path=folder+"SubStructure" )
395 
396 
397 
398 
399 
400 
401  if(postfix =="BA" or postfix =="CR" or postfix=="EC" or postfix.startswith('TauTrig') or postfix=="Global"):
402  #Cluster Histograms
403  igroup.defineHistogram(namer('clusterLogEt','logEt','Cluster',postfix), title='log(cluster E_{T});log(cluster E_{T});Entries',path=folder+"Cluster",
404  xbins=50, xmin=1.5, xmax=6.5 )
405  igroup.defineHistogram(namer('clusterEta','eta','Cluster',postfix), title='cluster eta;cluster eta;Entries',path=folder+"Cluster",
406  xbins=50, xmin=-2.6, xmax=2.6 )
407  igroup.defineHistogram(namer('clusterPhi','phi','Cluster',postfix), title='cluster phi;cluster phi;Entries',path=folder+"Cluster",
408  xbins=32, xmin=-3.2, xmax=3.2 )
409  igroup.defineHistogram(namer('clusterSecondR','secondR','Cluster',postfix), title='cluster SECOND_R;cluster SECOND_R;Entries',path=folder+"Cluster",
410  xbins=50, xmin=-1.0, xmax=6.0 )
411  igroup.defineHistogram(namer('clusterSecondLambda','secondLambda','Cluster',postfix), title='cluster SECOND_LAMBDA;cluster SECOND_LAMBDA;Entries',path=folder+"Cluster",
412  xbins=50, xmin=2.0, xmax=6.5 )
413  igroup.defineHistogram(namer('clusterCenterLambda','centerLambda','Cluster',postfix), title='cluster CENTER_LAMBDA;cluster CENTER_LAMBDA;Entries',path=folder+"Cluster",
414  xbins=50, xmin=1.0, xmax=4.0 )
415  igroup.defineHistogram(namer('clusterFirstEngDens','firstEngDens','Cluster',postfix), title='cluster FIRST_ENG_DENS;cluster FIRST_ENG_DENS;Entries',path=folder+"Cluster",
416  xbins=50, xmin=-6.0, xmax=1.0 )
417  igroup.defineHistogram(namer('clusterEMproba','EMproba','Cluster',postfix), title='cluster EM_PROBABILITY;cluster EM_PROBABILITY;Entries',path=folder+"Cluster",
418  xbins=20, xmin=0.0, xmax=1.0 )
419 
420  igroup.defineHistogram(namer('clustersMeanCenterLambda','meanCenterLambda','Cluster',postfix), title='clustersMeanCenterLambda;clustersMeanCenterLambda;Entries',path=folder+"Cluster",
421  xbins=40, xmin=0., xmax=2500.0 )
422  igroup.defineHistogram(namer('clustersMeanFirstEngDens','meanFirstEngDens','Cluster',postfix), title='clustersMeanFirstEngDens;clustersMeanFirstEngDens;Entries',path=folder+"Cluster",
423  xbins=40, xmin=-8.7, xmax=-5.5 )
424  igroup.defineHistogram(namer('clustersMeanEMProbability','meanEMProbability','Cluster',postfix), title='clustersMeanEMProbability;clustersMeanEMProbability;Entries',path=folder+"Cluster",
425  xbins=20, xmin=0.0, xmax=1.0 )
426  igroup.defineHistogram(namer('clustersMeanSecondLambda','meanSecondLambda','Cluster',postfix), title='clustersMeanSecondLambda;clustersMeanSecondLambda;Entries',path=folder+"Cluster",
427  xbins=20, xmin=0., xmax=600000 )
428  igroup.defineHistogram(namer('clustersMeanPresamplerFrac','meanPresamplerFrac','Cluster',postfix), title='clustersMeanPresamplerFrac;clustersMeanPresamplerFrac;Entries',path=folder+"Cluster",
429  xbins=20, xmin=0., xmax=0.2 )
430  igroup.defineHistogram(namer('clustersPFOEngRelDiff','PFOEngRelDiff','Cluster',postfix), title='PFOEngRelDiff;PFOEngRelDiff;Entries',path=folder+"Cluster",
431  xbins=20, xmin=-1.0, xmax=1.0 )
432  #Calo Histograms
433  igroup.defineHistogram(namer('EMRadius','EMRadius','Calo',postfix), title='Uncalibrated EM Radius;EM Radius;Number Of Candidates',path=folder+"Calo",
434  xbins=50, xmin=0., xmax=1.2 )
435 
436  igroup.defineHistogram(namer('hadRadius','hadRadius','Calo',postfix), title='Hadronic Radius of tau candidates;Hadronic Radius; Number Of Candidates',path=folder+"Calo",
437  xbins=50, xmin=0., xmax=1. )
438 
439  igroup.defineHistogram(namer('stripWidth2','stripWidth2','Calo',postfix), title='Strip Width of tau candidates;Strip Width;Number of Candidates',path=folder+"Calo",
440  xbins=50, xmin=-0.1, xmax=0.12 )
441 
442  igroup.defineHistogram(namer('isolFrac','isolFrac','Calo',postfix), title='Isolation Fraction;Et Isolation Fraction;Number of Candidates',path=folder+"Calo",
443  xbins=51, xmin=0.0, xmax=1.02 )
444 
445  igroup.defineHistogram(namer('nStrip','nStrip','Calo',postfix), title='Number of strip cells of tau candidates;Number of Strip Cells;Number of Candidates',path=folder+"Calo",
446  xbins=56, xmin=-0.5, xmax=55.5 )
447 
448  igroup.defineHistogram(namer('etEMAtEMScale','etEMAtEMScale','Calo',postfix), title='EM energy at the EM scale;EM Et (GeV) );Number of Candidates',path=folder+"Calo",
449  xbins=50, xmin=0., xmax=200. )
450 
451  igroup.defineHistogram(namer('etHadAtEMScale','etHadAtEMScale','Calo',postfix), title='Hadronic Energy at the EM Scale;Had Et (GeV) );Number of Candidates',path=folder+"Calo",
452  xbins=50, xmin=0., xmax=200. )
453 
454  igroup.defineHistogram(namer('centFrac,LB','centFracVsLB','Calo',postfix), type='TH2F', title='Centrality Fraction vs Lumiblock;Centrality Fraction;Lumiblock', path=folder+"Calo",
455  xbins=51,xmin=0,xmax=1.02,ybins=1200,ymin=0.,ymax=1200.)
456 
457  igroup.defineHistogram(namer('isolFrac,LB','isolFracVsLB','Calo',postfix), type='TH2F', title='Isolation Fraction vs Lumiblock;Isolation Fraction;Lumiblock', path=folder+"Calo",
458  xbins=51,xmin=0,xmax=1.02,ybins=1200,ymin=0.,ymax=1200.)
459 
460  igroup.defineHistogram(namer('centFrac',"centralityFraction","Calo",postfix), title='Centrality Fraction;Centrality Fraction;Number Of Candidates',
461  xbins=70, xmin=0., xmax=1.4, path=folder+"Calo")
462 
463  igroup.defineHistogram(namer('dRmax',"dRmax","Calo",postfix), title='Maximum delta R;delta R;Number of Candidates',
464  xbins=42, xmin=0., xmax=0.21, path=folder+"Calo" )
465 
466  igroup.defineHistogram(namer('tauEta','eta','Calo',postfix), title='Eta of tau candidates;Eta;Number of Candidates',
467  xbins=51, xmin=-2.55, xmax=2.55,path=folder+"Calo")
468 
469  igroup.defineHistogram(namer('tauPhi','phi','Calo',postfix), title='Phi of tau candidates;Phi;Number of Candidates',
470  xbins=65, xmin=PHIMIN, xmax=PHIMAX,path=folder+"Calo")
471 
472  igroup.defineHistogram(namer('trkAvgDist','trkAvgDist','Calo',postfix), title='Average Track Distance from Calorimeter Seed;Distance (mm);Number of Candidates',
473  xbins=20, xmin=0., xmax=1., path=folder+"Calo" )
474 
475  #Track Histograms!
476 
477  #track variables used for track classification and RNN tau ID
478  igroup.defineHistogram(namer('trackLogSeedJetPt','logSeedJetPt','Track_allTracks',postfix), title='log(ptJetSeed);log(ptJetSeed);Entries',path=folder+"Track/allTracks",
479  xbins=50, xmin=10.0, xmax=14.5 )
480  igroup.defineHistogram(namer('trackLogPt','logPt','Track_allTracks',postfix), title='track log(p_{T});track log(p_{T});Entries',path=folder+"Track/allTracks",
481  xbins=50, xmin=6.0, xmax=15.0 )
482  igroup.defineHistogram(namer('trackEta','eta','Track_allTracks',postfix), title='track eta;track eta;Entries',path=folder+"Track/allTracks",
483  xbins=50, xmin=-2.6, xmax=2.6 )
484  igroup.defineHistogram(namer('trackd0TJVA','d0TJVA','Track_allTracks',postfix), title='track tanh(d0TJVA);track tanh(d0TJVA);Entries',path=folder+"Track/allTracks",
485  xbins=50, xmin=-0.1, xmax=0.1 )
486  igroup.defineHistogram(namer('trackZ0SinthetaTJVA','Z0SinthetaTJVA','Track_allTracks',postfix), title='track z0SinthetaTJVA;track z0SinthetaTJVA;Entries',path=folder+"Track/allTracks",
487  xbins=50, xmin=-100.0, xmax=100.0 )
488  igroup.defineHistogram(namer('trackD0SigTJVA','d0SigTJVA','Track_allTracks',postfix), title='track d0SigTJVA;track d0SigTJVA;Entries',path=folder+"Track/allTracks",
489  xbins=50, xmin=-10.0, xmax=10.0 )
490  igroup.defineHistogram(namer('trackZ0sinthetaSigTJVA','Z0sinthetaSigTJVA','Track_allTracks',postfix), title='track z0sinthetaSigTJVA;track z0sinthetaSigTJVA;Entries',path=folder+"Track/allTracks",
491  xbins=50, xmin=-10.0, xmax=10.0 )
492  igroup.defineHistogram(namer('trackCharge','charge','Track_allTracks',postfix), title='track charge;track charge;Entries',path=folder+"Track/allTracks",
493  xbins=8, xmin=-4.0, xmax=4.0 )
494  igroup.defineHistogram(namer('trackqOverP','qOverP','Track_allTracks',postfix), title='track qOverP;track qOverP;Entries',path=folder+"Track/allTracks",
495  xbins=50, xmin=-2.0, xmax=2.0 )
496  igroup.defineHistogram(namer('trackLogRConv','logRConv','Track_allTracks',postfix), title='track log(rConv);track log(rConv);Entries',path=folder+"Track/allTracks",
497  xbins=50, xmin=0.0, xmax=7.0 )
498  igroup.defineHistogram(namer('trackTanhRConvII','tanhRConvII','Track_allTracks',postfix), title='track tanh(rConvII/500);track tanh(rConvII/500);Entries',path=folder+"Track/allTracks",
499  xbins=50, xmin=-0.4, xmax=0.4 )
500  igroup.defineHistogram(namer('trackPtRatioSeedJet','ptRatioSeedJet','Track_allTracks',postfix), title='(track p_{T})/(ptJetSeed);(track p_{T})/(ptJetSeed);Entries',path=folder+"Track/allTracks",
501  xbins=50, xmin=0.0, xmax=0.1 )
502  igroup.defineHistogram(namer('trackdRJetSeedAxis','dRJetSeedAxis','Track_allTracks',postfix), title='#DeltaR(tau,track);#DeltaR(tau,track);Entries',path=folder+"Track/allTracks",
503  xbins=50, xmin=0.0, xmax=0.5 )
504  igroup.defineHistogram(namer('trackNInnermostPixHits','nInnermostPixHits','Track_allTracks',postfix), title='track nInnermostPixHits;track nInnermostPixHits;Entries',path=folder+"Track/allTracks",
505  xbins=5, xmin=0, xmax=5.0 )
506  igroup.defineHistogram(namer('trackNPixHits','nPixHits','Track_allTracks',postfix), title='track nPixHits;track nPixHits;Entries',path=folder+"Track/allTracks",
507  xbins=10, xmin=0.0, xmax=10.0 )
508  #nPixelSharedHits;track
509  igroup.defineHistogram(namer('trackNSiHits','nSiHits','Track_allTracks',postfix), title='track nSiHits;track nSiHits;Entries',path=folder+"Track/allTracks",
510  xbins=20, xmin=0.0, xmax=20.0 )
511  #nSCTSharedHits
512  #nTRTHits
513  igroup.defineHistogram(namer('trackeProbabilityHT','eProbabilityHT','Track_allTracks',postfix), title='track eProbabilityHT;track eProbabilityHT;Entries',path=folder+"Track/allTracks",
514  xbins=50, xmin=0.0, xmax=1.0 )
515  igroup.defineHistogram(namer('trackeProbabilityNN','eProbabilityNN','Track_allTracks',postfix), title='track eProbabilityNN;track eProbabilityNN;Entries',path=folder+"Track/allTracks",
516  xbins=50, xmin=0.0, xmax=1.0 )
517  igroup.defineHistogram(namer('trackeProbabilityHTorNN','eProbabilityHTorNN','Track_allTracks',postfix), title='track eProbabilityHTorNN;track eProbabilityHTorNN;Entries',path=folder+"Track/allTracks",
518  xbins=50, xmin=0.0, xmax=1.0 )
519 
520  igroup.defineHistogram(namer('trackIdScoreCharged','idScoreCharged','Track_allTracks',postfix), title='track RNN idScoreCharged;track idScoreCharged;Entries',path=folder+"Track/allTracks",
521  xbins=50, xmin=0.0, xmax=1.0 )
522  igroup.defineHistogram(namer('trackIdScoreIso','idScoreIso','Track_allTracks',postfix), title='track RNN idScoreIso;track idScoreIso;Entries',path=folder+"Track/allTracks",
523  xbins=50, xmin=0.0, xmax=1.0 )
524  igroup.defineHistogram(namer('trackIdScoreConv','idScoreConv','Track_allTracks',postfix), title='track RNN idScoreConv;track idScoreConv;Entries',path=folder+"Track/allTracks",
525  xbins=50, xmin=0.0, xmax=1.0 )
526  igroup.defineHistogram(namer('trackIdScoreFake','idScoreFake','Track_allTracks',postfix), title='track RNN idScoreFake;track idScoreFake;Entries',path=folder+"Track/allTracks",
527  xbins=50, xmin=0.0, xmax=1.0 )
528 
529  #original Track Histograms
530  igroup.defineHistogram(namer('d0','d0','Track_leadTrack',postfix), title='Track d0;Transverse Impact Parameter (mm)',path=folder+"Track/leadTrack",
531  xbins=50, xmin=-5.0, xmax=5.0 )
532 
533  igroup.defineHistogram(namer('etaTrack','eta','Track_leadTrack',postfix), title='Track Eta;Eta',path=folder+"Track/leadTrack",
534  xbins=51, xmin=-2.55, xmax=2.55 )
535 
536  igroup.defineHistogram(namer('leadTrkPt','leadTrkPt','Track_leadTrack',postfix), title='Pt of Leading track;Transverse Momentum (GeV)',path=folder+"Track/leadTrack",
537  xbins=50, xmin=0., xmax=200. )
538 
539  igroup.defineHistogram(namer('nHighPtTaus','nHighPtTaus','Track',postfix), title='Number of High Pt tau candidates;Number of Taus per Event',
540  xbins=15, xmin=-0.5, xmax=14.5,path=folder+"Track")
541 
542  igroup.defineHistogram(namer('numberOfTRTHighThresholdHits','numberOfTRTHighThresholdHits','Track_leadTrack',postfix), title='Number of TRT High Threshold Hits;Number of High Threshold TRT Hits',path=folder+"Track/leadTrack",
543  xbins=15, xmin=-0.5, xmax=14.5 )
544 
545  igroup.defineHistogram(namer('numberOfTRTHighThresholdOutliers','numberOfTRTHighThresholdOutliers','Track_leadTrack',postfix), title="Number of TRT High Threshold Outliers;Number of TRT High Threshold Outliers",path=folder+"Track/leadTrack",
546  xbins=26, xmin=-0.5, xmax=25.5 )
547 
548  igroup.defineHistogram(namer('numberOfTRTHits','numberOfTRTHits','Track_leadTrack',postfix), title='Number of TRT Low Threshold Hits;Number of Low Threshold TRT Hits',path=folder+"Track/leadTrack",
549  xbins=101, xmin=-0.5, xmax=100.5 )
550 
551  igroup.defineHistogram(namer('numberOfTRTOutliers','numberOfTRTOutliers','Track_leadTrack',postfix), title="Number of TRT Low Threshold Outliers;Number of TRT Low Threshold Outliers",path=folder+"Track/leadTrack",
552  xbins=31, xmin=-0.5, xmax=25.5)
553 
554  igroup.defineHistogram(namer('ptTrack','pT','Track_leadTrack',postfix), title='Track pT;Transverse Momentum (GeV)',path=folder+"Track/leadTrack",
555  xbins=60, xmin=0, xmax=300 )
556 
557  igroup.defineHistogram(namer('phiTrack','phi','Track_leadTrack',postfix), title='Track Phi;Phi',path=folder+"Track/leadTrack",
558  xbins=64, xmin=PHIMIN, xmax=PHIMAX )
559 
560  igroup.defineHistogram(namer('trkWidth2','trkWidth2','Track',postfix), title='Weighted Track Width;Momentum-Weighted Width of Track System',path=folder+"Track",
561  xbins=50, xmin=0.0, xmax=0.1 )
562 
563  igroup.defineHistogram(namer('ipZ0SinThetaSigLeadTrk','ipZ0SinThetaSigLeadTrk','Track_leadTrack',postfix), title='Impact Parameter z0 Sine Theta Significance of Leading Track;Z0SinTheta Significance',path=folder+"Track/leadTrack",
564  xbins=50, xmin=-10.0, xmax=10.0 )
565 
566  igroup.defineHistogram(namer('numberOfPixelHits','numberOfPixelHits','Track_leadTrack',postfix), title='Number of Pixel Hits;Number of Pixel Hits',path=folder+"Track/leadTrack",
567  xbins=25, xmin=-0.5, xmax=25.5 )
568 
569  igroup.defineHistogram(namer('numberOfSCTHits','numberOfSCTHits','Track_leadTrack',postfix), title='Number of SCT Hits;Number of SCT Hits',path=folder+"Track/leadTrack",
570  xbins=26, xmin=0, xmax=26 )
571 
572  igroup.defineHistogram(namer('etOverPtLeadTrack','etOverPtLeadTrack','Track_leadTrack',postfix), title='Et over Pt of lead track of tau candidates;Et/Pt;Number of Candidates',
573  xbins=50, xmin=0., xmax=12., path=folder+"Track/leadTrack" )
574 
575  igroup.defineHistogram(namer('ipSigLeadTrk','ipSigLeadTrk','Track_leadTrack',postfix), title='Impact Parameter Significance of Leading Track;Transverse Impact Parameter Significance',
576  xbins=100, xmin=-5., xmax=5., path=folder+"Track/leadTrack" )
577 
578  igroup.defineHistogram(namer('massTrkSys','massTrkSys','Track',postfix), title='Mass of the Track System;Invariant Mass (GeV)',
579  xbins=30, xmin=-1., xmax=5., path=folder+"Track" )
580 
581  igroup.defineHistogram(namer('trFlightPathSig','trFlightPathSig','Track',postfix),title='Track Transverse Flight Path Significance;Transverse Flight Path Significance',
582  xbins=125, xmin=-4.5, xmax=8., path=folder+"Track" )
583 
584  igroup.defineHistogram(namer('z0','z0','Track_leadTrack',postfix), title='Track z0;Longitudinal Impact Parameter (mm)',path=folder+"Track/leadTrack",
585  xbins=50, xmin=-35.0, xmax=35.0 )
586 
587 
588 
589 
590  if postfix == 'Global' or postfix.startswith('TauTrig') or postfix == "EleTrig" or postfix=="JetTrig":
591  igroup.defineHistogram(namer('LB','nTauPerLB','',postfix), title='Total number of tau candidates per LB;Luminosity Block);Number of Candidates',
592  xbins=1000, xmin=0., xmax=1000. ,path=folder)
593 
594  igroup.defineHistogram(namer('nHighPtTauCandidates','nHightPtTauCandidates','',postfix), title='Number of High Pt tau candidates;Number of Taus per Event',
595  xbins=15, xmin=-0.5, xmax=14.5,path=folder)
596 
597  igroup.defineHistogram(namer('NumTracks','tauNumTracks','',postfix), title='Number Of Tracks for Tau Candidates;Number Of Tracks;Number Of Candidates',
598  xbins=21, xmin=-0.5, xmax=20.5,path=folder)
599 
600  igroup.defineHistogram(namer('nClusters','nCluster','',postfix), title='Number Of CaloTopoClusters;Number Of Clusters;Number Of Candidates',
601  xbins=40, xmin=0., xmax=40. ,path=folder)
602 
603  igroup.defineHistogram(namer('tauEta,tauEt','tauEtVsEta','',postfix), type='TH2F', title='Tau Et Vs Eta;#eta;Transverse Energy (Gev)',
604  xbins=40,xmin=-2.55,xmax=2.55 ,ybins=300,ymin=0,ymax=300,path=folder)
605 
606  igroup.defineHistogram(namer('tauPhi,tauEt','tauEtVsPhi','',postfix), type='TH2F', title='EtVsPhi;Phi;Transverse Energy (GeV);',
607  xbins=80,xmin=PHIMIN,xmax=PHIMAX,ybins=300,ymin=-0.,ymax=300.,path=folder)
608 
609 
610 
615 
616  accumulator = cfgHelper.result()
617  cfg.merge(accumulator)
618  return cfg
619 
620  # # Otherwise, merge with result object and return
621  # acc = cfgHelper.result()
622  # result.merge(acc)
623  # return result
624 
625 if __name__=='__main__':
626  # Setup logs
627  from AthenaCommon.Logging import log
628  from AthenaCommon.Constants import INFO
629  log.setLevel(INFO)
630 
631  # Set the Athena configuration flags
632  from AthenaConfiguration.AllConfigFlags import initConfigFlags
633  flags = initConfigFlags()
634 
635  nightly = '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/'
636  file = 'data16_13TeV.00311321.physics_Main.recon.AOD.r9264/AOD.11038520._000001.pool.root.1'
637  flags.Input.Files = [nightly+file]
638 
639  flags.Input.isMC = False
640  flags.Output.HISTFileName = 'tauRegions.root'
641 
642  flags.lock()
643 
644  # Initialize configuration object, add accumulator, merge, and run.
645  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
646  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
647  cfg = MainServicesCfg(flags)
648  cfg.merge(PoolReadCfg(flags))
649 
650  exampleMonitorAcc = tauMonitoringConfig(flags) # calls the main function above
651  cfg.merge(exampleMonitorAcc)
652 
653  # If you want to turn on more detailed messages ...
654  exampleMonitorAcc.getEventAlgo('tauMonAlgBA').OutputLevel = 2 # DEBUG
655  exampleMonitorAcc.getEventAlgo('tauMonAlgCR').OutputLevel = 2 # DEBUG
656  exampleMonitorAcc.getEventAlgo('tauMonAlgEC').OutputLevel = 2 # DEBUG
657  exampleMonitorAcc.getEventAlgo('tauMonAlgGlobal').OutputLevel = 2 # DEBUG
658  exampleMonitorAcc.getEventAlgo('tauMonAlgTauTrig1').OutputLevel = 2 # DEBUG
659  exampleMonitorAcc.getEventAlgo('tauMonAlgTauTrig2').OutputLevel = 2 # DEBUG
660  exampleMonitorAcc.getEventAlgo('tauMonAlgTauTrig3').OutputLevel = 2 # DEBUG
661  exampleMonitorAcc.getEventAlgo('tauMonAlgTauTrig4').OutputLevel = 2 # DEBUG
662  exampleMonitorAcc.getEventAlgo('tauMonAlgTauTrig5').OutputLevel = 2 # DEBUG
663  exampleMonitorAcc.getEventAlgo('tauMonAlgTauTrig6').OutputLevel = 2 # DEBUG
664  exampleMonitorAcc.getEventAlgo('tauMonAlgTauTrig7').OutputLevel = 2 # DEBUG
665  exampleMonitorAcc.getEventAlgo('tauMonAlgTauTrig8').OutputLevel = 2 # DEBUG
666  exampleMonitorAcc.getEventAlgo('tauMonAlgEleTrig').OutputLevel = 2 # DEBUG
667  exampleMonitorAcc.getEventAlgo('tauMonAlgJetTrig').OutputLevel = 2 # DEBUG
668 
669  cfg.printConfig(withDetails=True) # set True for exhaustive info
670 
671  cfg.run() #use cfg.run(20) to only run on first 20 events
python.BadLBFilterToolConfig.LArBadLBFilterToolCfg
def LArBadLBFilterToolCfg(inputFlags, origDbTag=None)
Definition: BadLBFilterToolConfig.py:100
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
Constants
some useful constants -------------------------------------------------—
python.AtlasReadyFilterConfig.AtlasReadyFilterCfg
def AtlasReadyFilterCfg(flags)
Definition: AtlasReadyFilterConfig.py:10
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:567
tauMonitorAlgorithm.tauMonitoringConfig
def tauMonitoringConfig(inputFlags, **kwargs)
Definition: tauMonitorAlgorithm.py:12
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69