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

Functions

 jetMonAlgConfig (jetName, inputFlags, truthJetName='', trigger='')
 standardJetMonitoring (inputFlags)

Variables

list commonHistoSpecs
list jvfHistosSpec
list topoHistosSpec
list pflowHistosSpec

Detailed Description

@file JetMonitoringExample.py
@author P-A. Delsart
@date 2019-03-12
@brief Main python configuration for the Run III Jet Monitoring

Function Documentation

◆ jetMonAlgConfig()

JetMonitoringStandard.jetMonAlgConfig ( jetName,
inputFlags,
truthJetName = '',
trigger = '' )
returns a specification of a JetMonitoringAlg (in the form of a JetMonAlgSpec dictionnary).

Definition at line 175 of file JetMonitoringStandard.py.

175def jetMonAlgConfig( jetName, inputFlags, truthJetName='', trigger=''):
176 """returns a specification of a JetMonitoringAlg (in the form of a JetMonAlgSpec dictionnary).
177 """
178
179 # we use a specialized dictionnary (JetMonAlgSpec) which will be translated into the final C++ tool
180 jetAlgConfig = JetMonAlgSpec(
181 jetName+"MonAlg",
182 JetContainerName = jetName,
183 TriggerChain = trigger ,
184 )
185
186 # the list of histos specifications
187 histoSpecs = []
188
189 # then add pre-defined lists as defined above :
190 histoSpecs += commonHistoSpecs
191
192 if inputFlags.DQ.DataType is not DQDataType.Cosmics:
193 histoSpecs += jvfHistosSpec
194
195 if 'Topo' in jetName:
196 histoSpecs += topoHistosSpec
197 if 'PFlow' in jetName:
198 histoSpecs += pflowHistosSpec
199
200
201 if truthJetName != "" :
202 # then add histos showing efficiency and pT responses vs True
203 from JetMonitoring.JetStandardHistoSpecs import responseAndEffSpecMap
204 if truthJetName not in responseAndEffSpecMap:
205 print( "ERROR !! can't schedule a JetHistoResponseAndEff for truth container : ",truthJetName, ". No specification available" )
206 return None
207
208 histoSpecs +=[ responseAndEffSpecMap[truthJetName] ]
209
210 # finally all all histos specs to our JetMonitoringAlg specification :
211 jetAlgConfig.appendHistos( * histoSpecs)
212
213 return jetAlgConfig
214
215
216
void print(char *figname, TCanvas *c1)

◆ standardJetMonitoring()

JetMonitoringStandard.standardJetMonitoring ( inputFlags)
Standard jet monitoring function to be inserted from top-level algs. 
returns an a component accumulator as given by AthMonitorCfgHelper.result()
Details of what goes into jet monitoring is implemented by dedicated functions such as jetMonAlgConfig().

Definition at line 217 of file JetMonitoringStandard.py.

217def standardJetMonitoring(inputFlags):
218 """Standard jet monitoring function to be inserted from top-level algs.
219 returns an a component accumulator as given by AthMonitorCfgHelper.result()
220 Details of what goes into jet monitoring is implemented by dedicated functions such as jetMonAlgConfig().
221 """
222
223 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
224 rv = ComponentAccumulator()
225
226 # do not run monitoring in RAWtoESD
227 if inputFlags.DQ.Environment == 'tier0Raw':
228 return rv
229
230 from AthenaMonitoring import AthMonitorCfgHelper
231 helper = AthMonitorCfgHelper(inputFlags,'JetMonitoring')
232
233 # create a list of JetMonitoringAlg specifications
234 jetAlgConfs = []
235
236 if inputFlags.Reco.EnableHI:
237 if inputFlags.Tracking.doUPC:
238 jetAlgConfs.append(jetMonAlgConfig( "AntiKt4EMPFlowJets", inputFlags))
239 else:
240 jetAlgConfs.append(jetMonAlgConfig( "AntiKt4HIJets", inputFlags))
241 else:
242 # use the helper function defined above :
243 #jetMonAlgConfig( "AntiKt4LCTopoJets", truthJetName="AntiKt4TruthJets"), #How can we make sure truth jets are available ??
244 jetAlgConfs.append(jetMonAlgConfig( "AntiKt4LCTopoJets", inputFlags))
245 jetAlgConfs.append(jetMonAlgConfig( "AntiKt4EMTopoJets", inputFlags))
246 jetAlgConfs.append(jetMonAlgConfig( "AntiKt4EMPFlowJets", inputFlags))
247
248 # Configure filter tools
249 from AthenaMonitoring.EventFlagFilterToolConfig import EventFlagFilterToolCfg
250# from AthenaMonitoring.AtlasReadyFilterConfig import AtlasReadyFilterCfg
251 from AthenaMonitoring.BadLBFilterToolConfig import LArBadLBFilterToolCfg
252# from AthenaMonitoring.FilledBunchFilterToolConfig import FilledBunchFilterToolCfg
253
254 # schedule each JetMonitoringAlg by invoking the toAlg() methods of the config specification
255 for conf in jetAlgConfs:
256 alg = conf.toAlg(helper)
257 alg.FilterTools = [ EventFlagFilterToolCfg(inputFlags),helper.resobj.popToolsAndMerge(LArBadLBFilterToolCfg(inputFlags))]
258
259 rv.merge(helper.result()) # the AthMonitorCfgHelper returns an accumulator to be used by the general configuration system.
260 return rv

Variable Documentation

◆ commonHistoSpecs

list JetMonitoringStandard.commonHistoSpecs

Definition at line 16 of file JetMonitoringStandard.py.

◆ jvfHistosSpec

list JetMonitoringStandard.jvfHistosSpec
Initial value:
1= [
2 SelectSpec( 'highJVF',
3 '0.3<JVF[0]', # JVF is a vector<float> for each jets. Here we cut on the 0th entry of this vector
4 FillerTools = ["pt","m","eta","phi",
5 ] ),
6]

Definition at line 129 of file JetMonitoringStandard.py.

◆ pflowHistosSpec

list JetMonitoringStandard.pflowHistosSpec
Initial value:
1= [
2 # histos common to all PFlow jets. These are defined in JetStandardHistoSpecs.py
3 "SumPtChargedPFOPt500[0]",
4 "SumPtTrkPt500[0]",
5 "NumTrkPt500[0]",
6 "NumTrkPt1000[0]",
7 "fCharged",
8]

Definition at line 164 of file JetMonitoringStandard.py.

◆ topoHistosSpec

list JetMonitoringStandard.topoHistosSpec
Initial value:
1= [
2 # histos common to all topo jets. Energy By Sampling layer plots.
3 HistoSpec("PreSamplerB",(100,0.,200.),title="Energy in PreSamplerB;E;Entries",xvar=VarSpec('EnergyPerSampling[0]')),
4 HistoSpec("EMB1",(100,0.,200.),title="Energy in EMB1;E;Entries",xvar=VarSpec('EnergyPerSampling[1]')),
5 HistoSpec("EMB2",(100,0.,200.),title="Energy in EMB2;E;Entries",xvar=VarSpec('EnergyPerSampling[2]')),
6 HistoSpec("EMB3",(100,0.,200.),title="Energy in EMB3;E;Entries",xvar=VarSpec('EnergyPerSampling[3]')),
7 HistoSpec("PreSamplerE",(100,0.,200.),title="Energy in PreSamplerE;E;Entries",xvar=VarSpec('EnergyPerSampling[4]')),
8 HistoSpec("EME1",(100,0.,200.),title="Energy in EME2;E;Entries",xvar=VarSpec('EnergyPerSampling[5]')),
9 HistoSpec("EME2",(100,0.,200.),title="Energy in EME2;E;Entries",xvar=VarSpec('EnergyPerSampling[6]')),
10 HistoSpec("EME3",(100,0.,200.),title="Energy in EME3;E;Entries",xvar=VarSpec('EnergyPerSampling[7]')),
11 HistoSpec("HEC0",(100,0.,200.),title="Energy in HEC0;E;Entries",xvar=VarSpec('EnergyPerSampling[8]')),
12 HistoSpec("HEC1",(100,0.,200.),title="Energy in HEC1;E;Entries",xvar=VarSpec('EnergyPerSampling[9]')),
13 HistoSpec("HEC2",(100,0.,200.),title="Energy in HEC2;E;Entries",xvar=VarSpec('EnergyPerSampling[10]')),
14 HistoSpec("HEC3",(100,0.,200.),title="Energy in HEC3;E;Entries",xvar=VarSpec('EnergyPerSampling[11]')),
15 HistoSpec("TileBar0",(100,0.,200.),title="Energy in TileBar0;E;Entries",xvar=VarSpec('EnergyPerSampling[12]')),
16 HistoSpec("TileBar1",(100,0.,200.),title="Energy in TileBar1;E;Entries",xvar=VarSpec('EnergyPerSampling[13]')),
17 HistoSpec("TileBar2",(100,0.,200.),title="Energy in TileBar1;E;Entries",xvar=VarSpec('EnergyPerSampling[14]')),
18 HistoSpec("TileGap1",(100,0.,200.),title="Energy in TileGap1;E;Entries",xvar=VarSpec('EnergyPerSampling[15]')),
19 HistoSpec("TileGap2",(100,0.,200.),title="Energy in TileGap2;E;Entries",xvar=VarSpec('EnergyPerSampling[16]')),
20 HistoSpec("TileGap3",(100,0.,200.),title="Energy in TileGap3;E;Entries",xvar=VarSpec('EnergyPerSampling[17]')),
21 HistoSpec("TileExt0",(100,0.,200.),title="Energy in TileExt0;E;Entries",xvar=VarSpec('EnergyPerSampling[18]')),
22 HistoSpec("TileExt1",(100,0.,200.),title="Energy in TileExt1;E;Entries",xvar=VarSpec('EnergyPerSampling[19]')),
23 HistoSpec("TileExt2",(100,0.,200.),title="Energy in TileExt2;E;Entries",xvar=VarSpec('EnergyPerSampling[20]')),
24 HistoSpec("FCAL0",(100,0.,200.),title="Energy in FCAL0;E;Entries",xvar=VarSpec('EnergyPerSampling[21]')),
25 HistoSpec("FCAL1",(100,0.,200.),title="Energy in FCAL1;E;Entries",xvar=VarSpec('EnergyPerSampling[22]')),
26 HistoSpec("FCAL2",(100,0.,200.),title="Energy in FCAL2;E;Entries",xvar=VarSpec('EnergyPerSampling[23]')),
27]

Definition at line 136 of file JetMonitoringStandard.py.