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
dict calibToolConfigurations

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 179 of file JetMonitoringStandard.py.

179def jetMonAlgConfig( jetName, inputFlags, truthJetName='', trigger=''):
180 """returns a specification of a JetMonitoringAlg (in the form of a JetMonAlgSpec dictionnary).
181 """
182
183 # Just a protection in case PhysVal is using this as well
184 if not inputFlags.Input.isMC and jetName != "AntiKt4HIJets":
185 from AthenaConfiguration.ComponentFactory import CompFactory
186 configfile, calibArea, calibseq_def = calibToolConfigurations[jetName]
187 toolname = "jetcalib_DQ_{0}".format(jetName)
188 jct = CompFactory.JetCalibrationTool(toolname,
189 JetCollection = jetName.replace('Jets',''),
190 ConfigFile = configfile,
191 CalibArea = calibArea,
192 CalibSequence = calibseq_def,
193 IsData = True)
194
195 # we use a specialized dictionnary (JetMonAlgSpec) which will be translated into the final C++ tool
196 jetAlgConfig = JetMonAlgSpec(
197 jetName+"MonAlg",
198 JetContainerName = jetName,
199 applyLatestCalibration = True,
200 JetCalibTool = jct,
201 TriggerChain = trigger,
202 )
203 else:
204 jetAlgConfig = JetMonAlgSpec(
205 jetName+"MonAlg",
206 JetContainerName = jetName,
207 applyLatestCalibration = False,
208 TriggerChain = trigger,
209 )
210
211
212 # the list of histos specifications
213 histoSpecs = []
214
215 # then add pre-defined lists as defined above :
216 histoSpecs += commonHistoSpecs
217
218 if inputFlags.DQ.DataType is not DQDataType.Cosmics:
219 histoSpecs += jvfHistosSpec
220
221 if 'Topo' in jetName:
222 histoSpecs += topoHistosSpec
223 if 'PFlow' in jetName:
224 histoSpecs += pflowHistosSpec
225
226
227 if truthJetName != "" :
228 # then add histos showing efficiency and pT responses vs True
229 from JetMonitoring.JetStandardHistoSpecs import responseAndEffSpecMap
230 if truthJetName not in responseAndEffSpecMap:
231 print( "ERROR !! can't schedule a JetHistoResponseAndEff for truth container : ",truthJetName, ". No specification available" )
232 return None
233
234 histoSpecs +=[ responseAndEffSpecMap[truthJetName] ]
235
236 # finally all all histos specs to our JetMonitoringAlg specification :
237 jetAlgConfig.appendHistos( * histoSpecs)
238
239 return jetAlgConfig
240
241
242
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 243 of file JetMonitoringStandard.py.

243def standardJetMonitoring(inputFlags):
244 """Standard jet monitoring function to be inserted from top-level algs.
245 returns an a component accumulator as given by AthMonitorCfgHelper.result()
246 Details of what goes into jet monitoring is implemented by dedicated functions such as jetMonAlgConfig().
247 """
248
249 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
250 rv = ComponentAccumulator()
251
252 # do not run monitoring in RAWtoESD
253 if inputFlags.DQ.Environment == 'tier0Raw':
254 return rv
255
256 from AthenaMonitoring import AthMonitorCfgHelper
257 helper = AthMonitorCfgHelper(inputFlags,'JetMonitoring')
258
259 # create a list of JetMonitoringAlg specifications
260 jetAlgConfs = []
261
262 if inputFlags.Reco.EnableHI:
263 if inputFlags.Tracking.doUPC:
264 jetAlgConfs.append(jetMonAlgConfig( "AntiKt4EMPFlowJets", inputFlags))
265 else:
266 jetAlgConfs.append(jetMonAlgConfig( "AntiKt4HIJets", inputFlags))
267 else:
268 # use the helper function defined above :
269 #jetMonAlgConfig( "AntiKt4LCTopoJets", truthJetName="AntiKt4TruthJets"), #How can we make sure truth jets are available ??
270 jetAlgConfs.append(jetMonAlgConfig( "AntiKt4LCTopoJets", inputFlags))
271 jetAlgConfs.append(jetMonAlgConfig( "AntiKt4EMTopoJets", inputFlags))
272 jetAlgConfs.append(jetMonAlgConfig( "AntiKt4EMPFlowJets", inputFlags))
273
274 # Configure filter tools
275 from AthenaMonitoring.EventFlagFilterToolConfig import EventFlagFilterToolCfg
276# from AthenaMonitoring.AtlasReadyFilterConfig import AtlasReadyFilterCfg
277 from AthenaMonitoring.BadLBFilterToolConfig import LArBadLBFilterToolCfg
278# from AthenaMonitoring.FilledBunchFilterToolConfig import FilledBunchFilterToolCfg
279
280 # schedule each JetMonitoringAlg by invoking the toAlg() methods of the config specification
281 for conf in jetAlgConfs:
282 alg = conf.toAlg(helper)
283 alg.FilterTools = [ EventFlagFilterToolCfg(inputFlags),helper.resobj.popToolsAndMerge(LArBadLBFilterToolCfg(inputFlags))]
284
285 rv.merge(helper.result()) # the AthMonitorCfgHelper returns an accumulator to be used by the general configuration system.
286 return rv

Variable Documentation

◆ calibToolConfigurations

dict JetMonitoringStandard.calibToolConfigurations
Initial value:
1= {
2 "AntiKt4EMPFlowJets":("AntiKt4EMPFlow_MC23a_PreRecR22_Phase2_CalibConfig_ResPU_EtaJES_GSC_241208_InSitu.config","00-04-83","JetArea_Residual_EtaJES"),
3 "AntiKt4EMTopoJets":("PreRec_R22_EMTopo_ResPU_EtaJES_October23_231024.config","00-04-82","JetArea_Residual_EtaJES"),
4 "AntiKt4LCTopoJets":("JES_MC16Recommendation_28Nov2017.config","00-04-81","JetArea_Residual_EtaJES")
5}

Definition at line 173 of file JetMonitoringStandard.py.

◆ 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.