|
ATLAS Offline Software
|
|
ComponentAccumulator | VtxFittingToolCfg (ConfigFlags, **kwargs) |
|
ComponentAccumulator | DecorateReFitPrimaryVertexCfg (ConfigFlags, name="PrimaryVertexReFitter", lepton_type="", **kwargs) |
|
ComponentAccumulator | VtxItrMergingToolCfg (flags, name="VertexIterativeMergingTool", lepton_name="", **kwargs) |
|
ComponentAccumulator | DecorateNonPromptVertexCfg (flags, name="DecorateNonPromptVertex", lepton_name="", **kwargs) |
|
ComponentAccumulator | RNNToolCfg (flags, name="RNNTool", RNN_name="RNN_name", lepton_name="", **kwargs) |
|
ComponentAccumulator | DecoratePromptLeptonRNNCfg (flags, RNN_name="RNN_name", lepton_name="", name="DecoratePromptLeptonRNN", **kwargs) |
|
def | getStringIntVars (BDT_name) |
|
def | getStringFloatVars (BDT_name, part_type='') |
|
ComponentAccumulator | DecoratePLITCfg (flags, Tagger_name="", lepton_name="", **kwargs) |
|
ComponentAccumulator | DecoratePromptLeptonImprovedCfg (flags, BDT_name="", lepton_name="", track_jet_name="AntiKtVR30Rmax4Rmin02PV0TrackJets", **kwargs) |
|
ComponentAccumulator | DecorateImprovedPromptLeptonAlgsCfg (ConfigFlags, name="DecorateImprovedPromptLeptonAlgs", lepton_type="", **kwargs) |
|
ComponentAccumulator | DecoratePLITAlgsCfg (ConfigFlags, name="DecoratePLITAlgsCfg", lepton_type="", **kwargs) |
|
def | GetExtraPromptVariablesForDxAOD (name='', addSpectators=False, onlyBDT=True) |
|
def | GetExtraImprovedPromptVariablesForDxAOD (name='', onlyBDT=False) |
|
def | GetExtraPLITVariablesForDxAOD (name='') |
|
◆ DecorateImprovedPromptLeptonAlgsCfg()
ComponentAccumulator LeptonTaggersConfig.DecorateImprovedPromptLeptonAlgsCfg |
( |
|
ConfigFlags, |
|
|
|
name = "DecorateImprovedPromptLeptonAlgs" , |
|
|
|
lepton_type = "" , |
|
|
** |
kwargs |
|
) |
| |
CA to decorate with PLIV input algorithms
Definition at line 399 of file LeptonTaggersConfig.py.
400 ConfigFlags, name="DecorateImprovedPromptLeptonAlgs",
401 lepton_type="", **kwargs
402 ) -> ComponentAccumulator:
404 CA to decorate with PLIV input algorithms
406 valid_lepton_types = [
"",
"Electrons",
"Muons"]
407 if lepton_type
not in valid_lepton_types:
408 lep_tag_log.error(
"Requested lepton type: %s", lepton_type)
409 lep_tag_log.error(
"Allowed lepton types: %s", valid_lepton_types)
410 raise ValueError(
'DecorateImprovedPromptLeptonAlgsCfg - '
411 + f
'unknown lepton type: "{lepton_type}"')
415 if lepton_type
in [
"",
"Electrons"]:
419 RNN_name=
'PromptLeptonRNN',
420 lepton_name=
'Electrons'))
422 ConfigFlags, BDT_name=
"PromptLeptonImprovedVetoBARR",
423 lepton_name=
"Electrons", track_jet_name=
"AntiKtVR30Rmax4Rmin02PV0TrackJets"
426 ConfigFlags, BDT_name=
"PromptLeptonImprovedVetoECAP",
427 lepton_name=
"Electrons", track_jet_name=
"AntiKtVR30Rmax4Rmin02PV0TrackJets"
430 if lepton_type
in [
"",
"Muons"]:
434 RNN_name=
'PromptLeptonRNN',
435 lepton_name=
'Muons'))
437 ConfigFlags, BDT_name=
"PromptLeptonImprovedVeto",
438 lepton_name=
"Muons", track_jet_name=
"AntiKtVR30Rmax4Rmin02PV0TrackJets"
◆ DecorateNonPromptVertexCfg()
ComponentAccumulator LeptonTaggersConfig.DecorateNonPromptVertexCfg |
( |
|
flags, |
|
|
|
name = "DecorateNonPromptVertex" , |
|
|
|
lepton_name = "" , |
|
|
** |
kwargs |
|
) |
| |
Configure the non-prompt vertex decorator.
Definition at line 116 of file LeptonTaggersConfig.py.
117 lepton_name="", **kwargs) -> ComponentAccumulator:
119 Configure the non-prompt vertex decorator.
121 if lepton_name
not in [
'Electrons',
'Muons']:
122 raise ValueError(f
'DecorateNonPromptVertex - unknown lepton type: "{lepton_name}"')
128 kwargs.setdefault(
"VertexFittingTool",vertex_fitting_tool)
133 flags, lepton_name=lepton_name,
134 VertexFittingTool=vertex_fitting_tool
138 kwargs.setdefault(
"LeptonContainerName", lepton_name)
139 kwargs.setdefault(
"ReFitPriVtxContainerName", f
"RefittedPriVtx_{lepton_name}")
140 kwargs.setdefault(
"SVContainerName", f
"SecVtxContainer_{lepton_name}")
142 kwargs.setdefault(
"SecVtxLinksName",
"SecVtxLinks")
143 kwargs.setdefault(
"DeepMergedSecVtxLinksName",
"DeepMergedSecVtxLinks")
144 kwargs.setdefault(
"NoLeptonPriVtxLinkName", f
"RefittedPriVtxWithoutLepton_{lepton_name}")
145 kwargs.setdefault(
"IndexVectorName",
"PromptLeptonInput_SecondaryVertexIndexVector")
147 alg = CompFactory.Prompt.NonPromptLeptonVertexingAlg(
148 name=f
'NonPromptVtx_decorate_{lepton_name}',
152 acc.addEventAlgo(alg, primary=
True)
◆ DecoratePLITAlgsCfg()
ComponentAccumulator LeptonTaggersConfig.DecoratePLITAlgsCfg |
( |
|
ConfigFlags, |
|
|
|
name = "DecoratePLITAlgsCfg" , |
|
|
|
lepton_type = "" , |
|
|
** |
kwargs |
|
) |
| |
CA to decorate with PLIT input algorithms
Definition at line 443 of file LeptonTaggersConfig.py.
444 ConfigFlags, name="DecoratePLITAlgsCfg",
445 lepton_type="", **kwargs
446 ) -> ComponentAccumulator:
448 CA to decorate with PLIT input algorithms
450 valid_lepton_types = [
"",
"Electrons",
"Muons"]
451 if lepton_type
not in valid_lepton_types:
452 lep_tag_log.error(
"Requested lepton type: %s", lepton_type)
453 lep_tag_log.error(
"Allowed lepton types: %s", valid_lepton_types)
454 raise ValueError(
'DecoratePLITAlgsCfg - '
455 + f
'unknown lepton type: "{lepton_type}"')
459 if lepton_type
in [
"",
"Electrons"]:
460 acc.merge(
DecoratePLITCfg(ConfigFlags, Tagger_name=
"PLIT", lepton_name=
"Electrons"))
462 if lepton_type
in [
"",
"Muons"]:
463 acc.merge(
DecoratePLITCfg(ConfigFlags, Tagger_name=
"PLIT", lepton_name=
"Muons"))
◆ DecoratePLITCfg()
ComponentAccumulator LeptonTaggersConfig.DecoratePLITCfg |
( |
|
flags, |
|
|
|
Tagger_name = "" , |
|
|
|
lepton_name = "" , |
|
|
** |
kwargs |
|
) |
| |
Configure the PLIT decorator.
Definition at line 278 of file LeptonTaggersConfig.py.
279 flags, Tagger_name="", lepton_name="",
281 ) -> ComponentAccumulator:
283 Configure the PLIT decorator.
285 lep_tag_log.info(
"calling DecoratePLITCfg with BDT_name="+Tagger_name+
" lepton_name="+lepton_name)
292 kwargs.setdefault(
"LeptonContainerName", lepton_name)
293 kwargs.setdefault(
"TrackJetContainerKey",
"AntiKtVR30Rmax4Rmin02PV0TrackJets")
294 kwargs.setdefault(
"TracksContainerKey",
"InDetTrackParticles")
295 kwargs.setdefault(
"CaloClusterContainerKey",
"egammaClusters")
296 kwargs.setdefault(
"ConfigFileVersion",
'')
297 kwargs.setdefault(
"TaggerName", Tagger_name)
300 isRun3 = (flags.GeoModel.Run >= LHCPeriod.Run3)
304 kwargs[
"ConfigPath"] =
"IsolationSelection/2024-08-02/PLIT/"
305 if lepton_name ==
'Electrons':
306 kwargs[
"ConfigFileVersion"] =
'network_PLITel_barrel.onnx'
307 kwargs[
"ConfigFileVersion_endcap"] =
'network_PLITel_endcap.onnx'
308 elif lepton_name ==
'Muons':
310 kwargs[
"ConfigFileVersion"] =
'network_run3_muons.onnx'
312 kwargs[
"ConfigFileVersion"] =
'network_run2_muons.onnx'
314 raise ValueError(f
'Decorate{Tagger_name} - unknown lepton type: "{lepton_name}"')
316 alg = CompFactory.Prompt.DecoratePLIT(
317 f
'{lepton_name}_decorate{Tagger_name}', **kwargs
319 acc.addEventAlgo(alg, primary=
True)
322 'Decorate%s - prepared %s algorithm for: %s',
323 Tagger_name, Tagger_name, lepton_name
◆ DecoratePromptLeptonImprovedCfg()
ComponentAccumulator LeptonTaggersConfig.DecoratePromptLeptonImprovedCfg |
( |
|
flags, |
|
|
|
BDT_name = "" , |
|
|
|
lepton_name = "" , |
|
|
|
track_jet_name = "AntiKtVR30Rmax4Rmin02PV0TrackJets" , |
|
|
** |
kwargs |
|
) |
| |
Configure the PromptLeptonImproved decorator.
Definition at line 328 of file LeptonTaggersConfig.py.
329 flags, BDT_name="", lepton_name="", track_jet_name="AntiKtVR30Rmax4Rmin02PV0TrackJets",
331 ) -> ComponentAccumulator:
333 Configure the PromptLeptonImproved decorator.
335 lep_tag_log.info(
"calling DecoratePromptLeptonImprovedCfg with BDT_name="+BDT_name+
" lepton_name="+lepton_name+
" track_jet_name="+track_jet_name)
339 if track_jet_name !=
'AntiKtVR30Rmax4Rmin02PV0TrackJets':
340 raise ValueError(f
'Decorate{BDT_name} - unknown track jet collection: "{track_jet_name}"')
347 kwargs.setdefault(
"LeptonContainerName", lepton_name)
349 kwargs.setdefault(
"TrackJetContainerName", track_jet_name)
350 kwargs.setdefault(
"PrimaryVertexContainerName",
'PrimaryVertices')
351 kwargs.setdefault(
"ClusterContainerName",
'CaloCalTopoClusters')
353 kwargs.setdefault(
"BDTName", BDT_name)
354 kwargs.setdefault(
"InputVarDecoratePrefix",
'PromptLeptonImprovedInput_')
355 kwargs.setdefault(
"PrintTime",
False)
360 if lepton_name ==
'Electrons':
361 kwargs.setdefault(
"MethodTitleMVA", f
'BDT_Electron_{BDT_name}')
362 kwargs.setdefault(
"ConfigFileVersion",
'InputData-2020-02-25/BDT/Electron/' + BDT_name)
363 kwargs.setdefault(
"accessorRNNVars", [
'PromptLeptonRNN_prompt'])
364 elif lepton_name ==
'Muons':
365 kwargs.setdefault(
"MethodTitleMVA", f
'BDT_Muon_{BDT_name}')
366 kwargs.setdefault(
"ConfigFileVersion",
'InputData-2020-02-25/BDT/Muon/' + BDT_name)
367 kwargs.setdefault(
"accessorRNNVars", [
'PromptLeptonRNN_prompt'])
369 raise ValueError(f
'Decorate{BDT_name} - unknown lepton type: "{lepton_name}"')
373 kwargs.setdefault(
"extraDecoratorFloatVars", [
'RawPt'])
374 kwargs.setdefault(
"extraDecoratorShortVars", [
'CandVertex_NPassVtx'])
375 kwargs.setdefault(
"vetoDecoratorFloatVars", [
'PromptLeptonRNN_prompt'])
376 kwargs.setdefault(
"vetoDecoratorShortVars", [])
378 kwargs.setdefault(
"leptonPtBinsVector", [10.0e3, 15.0e3, 20.0e3, 25.0e3, 32.0e3, 43.0e3, 100.0e3])
384 kwargs.setdefault(
"VertexLinkName",
'DeepMergedSecVtxLinks')
386 alg = CompFactory.Prompt.DecoratePromptLeptonImproved(
387 f
'{lepton_name}_decorate{BDT_name}', **kwargs
389 acc.addEventAlgo(alg, primary=
True)
392 'Decorate%s - prepared %s algorithm for: %s, %s',
393 BDT_name, BDT_name, lepton_name, track_jet_name
◆ DecoratePromptLeptonRNNCfg()
ComponentAccumulator LeptonTaggersConfig.DecoratePromptLeptonRNNCfg |
( |
|
flags, |
|
|
|
RNN_name = "RNN_name" , |
|
|
|
lepton_name = "" , |
|
|
|
name = "DecoratePromptLeptonRNN" , |
|
|
** |
kwargs |
|
) |
| |
Configure the prompt lepton RNN decorator.
Definition at line 191 of file LeptonTaggersConfig.py.
192 name="DecoratePromptLeptonRNN",
193 **kwargs) -> ComponentAccumulator:
195 Configure the prompt lepton RNN decorator.
197 lep_tag_log.info(
"calling DecoratePromptLeptonRNNCfg with name"+RNN_name+
" with lepton_name="+lepton_name)
198 if lepton_name
not in [
"Electrons",
"Muons"]:
199 raise ValueError(f
'DecorateNonPromptVertex - unknown lepton type: "{lepton_name}"')
206 kwargs.setdefault(
"inputContainerLepton", lepton_name)
207 kwargs.setdefault(
"inputContainerTrack",
'InDetTrackParticles')
208 kwargs.setdefault(
"inputContainerTrackJet",
'AntiKtVR30Rmax4Rmin02PV0TrackJets')
209 kwargs.setdefault(
"inputContainerPrimaryVertices",
'PrimaryVertices')
211 kwargs.setdefault(
"decorationPrefixRNN",
'PromptLeptonRNN_')
213 kwargs.setdefault(
"debug",
False)
214 kwargs.setdefault(
"outputStream",
'out')
216 kwargs.setdefault(
"toolRNN", acc.popToolsAndMerge(
217 RNNToolCfg(flags, RNN_name=RNN_name, lepton_name=lepton_name)
220 alg = CompFactory.Prompt.DecoratePromptLeptonRNN(
221 name=f
'{lepton_name}_decorate_RNN_{RNN_name}', **kwargs
223 acc.addEventAlgo(alg, primary=
True)
225 lep_tag_log.info(
'Decorate%s - prepared %s algorithm for: %s',
226 RNN_name, RNN_name, lepton_name)
◆ DecorateReFitPrimaryVertexCfg()
ComponentAccumulator LeptonTaggersConfig.DecorateReFitPrimaryVertexCfg |
( |
|
ConfigFlags, |
|
|
|
name = "PrimaryVertexReFitter" , |
|
|
|
lepton_type = "" , |
|
|
** |
kwargs |
|
) |
| |
CA to run the PrimaryVertexReFitter algorithm.
Definition at line 59 of file LeptonTaggersConfig.py.
60 ConfigFlags, name="PrimaryVertexReFitter",
61 lepton_type="", **kwargs
62 ) -> ComponentAccumulator:
64 CA to run the PrimaryVertexReFitter algorithm.
67 if lepton_type
not in [
'Electrons',
'Muons']:
68 raise ValueError(f
'DecorateReFitPrimaryVertex - unknown lepton type: "{lepton_type}"')
72 kwargs.setdefault(
"ReFitPriVtxName", f
"RefittedPriVtx_{lepton_type}")
73 kwargs.setdefault(
"LeptonContainerName", lepton_type)
75 kwargs.setdefault(
"DistToRefittedPriVtxName",
"distToRefittedPriVtx")
76 kwargs.setdefault(
"NormDistToRefittedPriVtxName",
"normDistToRefittedPriVtx")
77 kwargs.setdefault(
"RefittedVtxLinkName",
"RefittedPriVtxLink")
78 kwargs.setdefault(
"RefittedVtxWithoutLeptonLinkName",
79 f
"RefittedPriVtxWithoutLepton_{lepton_type}")
81 alg_name = f
'PrimaryVertexReFitter_{lepton_type}_decoratePriVtx'
83 kwargs.setdefault(
"VertexFittingTool", acc.popToolsAndMerge(
87 the_alg = CompFactory.Prompt.PrimaryVertexReFitter(alg_name, **kwargs)
89 acc.addEventAlgo(the_alg, primary =
True)
90 lep_tag_log.info(
"end of DecorateReFitPrimaryVertexCfg")
◆ GetExtraImprovedPromptVariablesForDxAOD()
def LeptonTaggersConfig.GetExtraImprovedPromptVariablesForDxAOD |
( |
|
name = '' , |
|
|
|
onlyBDT = False |
|
) |
| |
Definition at line 522 of file LeptonTaggersConfig.py.
531 rawpt_vars =
"PromptLeptonImprovedInput_MVAXBin.PromptLeptonImprovedInput_RawPt"
533 if name ==
"" or name ==
"Electrons":
534 prompt_lep_vars += [
"Electrons.PromptLeptonImprovedVetoBARR.PromptLeptonImprovedVetoECAP.%s"%rawpt_vars]
536 if name ==
"" or name ==
"Muons":
537 prompt_lep_vars += [
"Muons.PromptLeptonImprovedVeto.%s"%rawpt_vars]
539 return prompt_lep_vars
541 prompt_vars =
"PromptLeptonImprovedInput_MVAXBin.PromptLeptonImprovedInput_RawPt."
542 prompt_vars +=
"PromptLeptonImprovedInput_PtFrac.PromptLeptonImprovedInput_DRlj."
543 prompt_vars +=
"PromptLeptonImprovedInput_topoetcone30rel.PromptLeptonImprovedInput_ptvarcone30rel."
545 if name ==
"" or name ==
"Electrons":
547 prompt_el_vars =
"PromptLeptonRNN_prompt.PromptLeptonRNN_non_prompt_b.PromptLeptonRNN_non_prompt_c.PromptLeptonRNN_conversion."
548 prompt_el_vars +=
"PromptLeptonImprovedVetoBARR.PromptLeptonImprovedVetoECAP.PromptLeptonImprovedInput_TrackJetNTrack.PromptLeptonImprovedInput_PtRel.PromptLeptonImprovedInput_CaloClusterSumEtRel.PromptLeptonImprovedInput_CandVertex_normDistToPriVtxLongitudinalBest_ThetaCutVtx"
550 prompt_lep_vars += [
"Electrons." + prompt_vars + prompt_el_vars]
552 if name ==
"" or name ==
"Muons":
554 prompt_mu_vars =
"PromptLeptonRNN_prompt.PromptLeptonRNN_non_prompt_b.PromptLeptonRNN_non_prompt_c."
555 prompt_mu_vars +=
"PromptLeptonImprovedVeto.PromptLeptonImprovedInput_ptvarcone30_TightTTVA_pt500rel.PromptLeptonImprovedInput_CaloClusterERel.PromptLeptonImprovedInput_CandVertex_normDistToPriVtxLongitudinalBest"
557 prompt_lep_vars += [
"Muons." + prompt_vars + prompt_mu_vars]
559 return prompt_lep_vars
◆ GetExtraPLITVariablesForDxAOD()
def LeptonTaggersConfig.GetExtraPLITVariablesForDxAOD |
( |
|
name = '' | ) |
|
Definition at line 562 of file LeptonTaggersConfig.py.
569 if name ==
"" or name ==
"Electrons":
570 prompt_lep_vars += [
"Electrons.PLIT_PLITel_pelxpromp",
"Electrons.PLIT_PLITel_pnpxall"]
572 if name ==
"" or name ==
"Muons":
573 prompt_lep_vars += [
"Muons.PLIT_TPLTmu_pmuxpromp",
"Muons.PLIT_TPLTmu_pnpxall"]
575 return prompt_lep_vars
◆ GetExtraPromptVariablesForDxAOD()
def LeptonTaggersConfig.GetExtraPromptVariablesForDxAOD |
( |
|
name = '' , |
|
|
|
addSpectators = False , |
|
|
|
onlyBDT = True |
|
) |
| |
Definition at line 468 of file LeptonTaggersConfig.py.
479 if name ==
"" or name ==
"Electrons":
480 prompt_lep_vars += [
"Electrons.PromptLeptonVeto.PromptLeptonIso.LowPtPLV."]
482 if name ==
"" or name ==
"Muons":
483 prompt_lep_vars += [
"Muons.PromptLeptonVeto.PromptLeptonIso.LowPtPLV."]
485 return prompt_lep_vars
488 prompt_vars =
"PromptLeptonVeto.PromptLeptonIso.LowPtPLV."
489 prompt_vars +=
"PromptLeptonInput_TrackJetNTrack.PromptLeptonInput_sv1_jf_ntrkv."
490 prompt_vars +=
"PromptLeptonInput_ip2.PromptLeptonInput_ip3."
491 prompt_vars +=
"PromptLeptonInput_LepJetPtFrac.PromptLeptonInput_DRlj."
492 prompt_vars +=
"PromptLeptonInput_PtFrac.PromptLeptonInput_PtRel."
493 prompt_vars +=
"PromptLeptonInput_DL1mu.PromptLeptonInput_rnnip."
494 prompt_vars +=
"PromptLeptonInput_topoetcone20rel.PromptLeptonInput_ptvarcone20rel."
495 prompt_vars +=
"PromptLeptonInput_topoetcone30rel.PromptLeptonInput_ptvarcone30rel."
497 prompt_vars +=
"PromptLeptonInput_SecondaryVertexIndexVector.PromptLeptonInput_SecondaryVertexIndexVectorInDet.PromptLeptonInput_SecondaryVertexIndexVectorMerge.PromptLeptonInput_SecondaryVertexIndexVectorDeepMerge."
498 prompt_vars +=
"rhocen.rhofor.SecVtxLinks.RefittedPriVtxLink.RefittedPriVtxWithoutLeptonLink."
501 secondaryvertex_vars =
"SVType.trackParticleLinks.trackWeights.neutralParticleLinks.neutralWeights.SecondaryVertexIndex.SecondaryVertexIndexVectorInput.chiSquared.numberDoF.x.y.z.covariance.vertexType.energyFraction.mass.normDist.ntrk.distToPriVtx.normDistToPriVtx.distToRefittedPriVtx.normDistToRefittedPriVtx.distToRefittedRmLepPriVtx.normDistToRefittedRmLepPriVtx"
504 prompt_vars +=
"PromptLeptonInput_JetPt.PromptLeptonInput_JetEta.PromptLeptonInput_JetPhi.PromptLeptonInput_JetM."
506 if name ==
"" or name ==
"Electrons":
507 prompt_el_vars =
"ptvarcone40.topoetcone20.topoetcone20ptCorrection.ptcone20_TightTTVA_pt500.ptcone20_TightTTVA_pt1000.ptvarcone20_TightTTVA_pt1000.ptvarcone30_TightTTVA_pt500.ptvarcone30_TightTTVA_pt1000.ptvarcone40_TightTTVALooseCone_pt500"
509 prompt_lep_vars += [
"Electrons." + prompt_vars + prompt_el_vars]
510 prompt_lep_vars += [
"SecVtxContainer_Electrons.%s" %secondaryvertex_vars]
511 prompt_lep_vars += [
"SecVtx_ConvVtxContainer_Electrons.%s" %secondaryvertex_vars]
513 if name ==
"" or name ==
"Muons":
514 prompt_mu_vars =
"ET_Core.ET_EMCore.ET_HECCore.ET_TileCore.EnergyLoss.EnergyLossSigma.MeasEnergyLoss.MeasEnergyLossSigma.ParamEnergyLoss.ParamEnergyLossSigmaMinus.ParamEnergyLossSigmaPlus.neflowisol20.neflowisol30.neflowisol40.ptvarcone20_TightTTVA_pt500.ptvarcone30_TightTTVA_pt500.ptvarcone40_TightTTVA_pt500.ptvarcone20_TightTTVA_pt1000.ptvarcone30_TightTTVA_pt1000.ptvarcone40_TightTTVA_pt1000.caloExt_Decorated.caloExt_eta.caloExt_phi"
516 prompt_lep_vars += [
"Muons." + prompt_vars + prompt_mu_vars]
517 prompt_lep_vars += [
"SecVtxContainer_Muons.%s" %secondaryvertex_vars]
519 return prompt_lep_vars
◆ getStringFloatVars()
def LeptonTaggersConfig.getStringFloatVars |
( |
|
BDT_name, |
|
|
|
part_type = '' |
|
) |
| |
Get the float variables for the BDT (I think)
Definition at line 248 of file LeptonTaggersConfig.py.
250 Get the float variables for the BDT (I think)
254 if BDT_name ==
'PromptLeptonImprovedVeto':
255 float_vars += [
'topoetcone30rel',
256 'ptvarcone30_TightTTVA_pt500rel',
257 'PromptLeptonRNN_prompt',
261 'CandVertex_normDistToPriVtxLongitudinalBest']
262 elif (BDT_name ==
'PromptLeptonImprovedVetoBARR'
263 or BDT_name ==
'PromptLeptonImprovedVetoECAP'):
264 float_vars += [
'topoetcone30rel',
266 'PromptLeptonRNN_prompt',
269 'CaloClusterSumEtRel',
271 'CandVertex_normDistToPriVtxLongitudinalBest_ThetaCutVtx']
273 raise ValueError(f
'getStringFloatVars - unknown alg: "{BDT_name}"')
◆ getStringIntVars()
def LeptonTaggersConfig.getStringIntVars |
( |
|
BDT_name | ) |
|
Get the integer variables for the BDT (I think)
Definition at line 231 of file LeptonTaggersConfig.py.
233 Get the integer variables for the BDT (I think)
237 if BDT_name ==
'PromptLeptonImprovedVeto':
238 int_vars += [
'MVAXBin']
239 elif (BDT_name ==
'PromptLeptonImprovedVetoBARR'
240 or BDT_name ==
'PromptLeptonImprovedVetoECAP'):
241 int_vars += [
'MVAXBin',
'TrackJetNTrack']
243 raise ValueError(f
'getStringIntVars - unknown alg: "{BDT_name}"')
◆ RNNToolCfg()
ComponentAccumulator LeptonTaggersConfig.RNNToolCfg |
( |
|
flags, |
|
|
|
name = "RNNTool" , |
|
|
|
RNN_name = "RNN_name" , |
|
|
|
lepton_name = "" , |
|
|
** |
kwargs |
|
) |
| |
Configure the RNN tool.
Definition at line 157 of file LeptonTaggersConfig.py.
158 RNN_name="RNN_name", lepton_name="",
159 **kwargs) -> ComponentAccumulator:
161 Configure the RNN tool.
163 lep_tag_log.info(
"calling RNNToolCfg with name"+RNN_name+
" with lepton_name="+lepton_name)
165 if lepton_name
not in [
"Electrons",
"Muons"]:
166 raise ValueError(f
'RNNTool - unknown lepton type: "{lepton_name}"')
173 if lepton_name ==
'Electrons':
174 kwargs.setdefault(
"configRNNVersion",
'InputData-2020-02-25/RNN/Electron')
175 kwargs.setdefault(
"configRNNJsonFile",
176 'elecs_feb20_fullrun2_linear_ptraw_ntk5_model_ndense10_nhidden50_nepoch10_nbatch256_use_weights_nn-config.json')
178 elif lepton_name ==
'Muons':
179 kwargs.setdefault(
"configRNNVersion",
'InputData-2020-02-25/RNN/Muon')
180 kwargs.setdefault(
"configRNNJsonFile",
181 'muons_feb19_fullrun2_linear_ptraw_ntk5_model_ndense10_nhidden50_nepoch10_nbatch256_use_weights_nn-config.json')
183 tool_rnn = CompFactory.Prompt.RNNTool(
184 name=f
'{RNN_name}_{lepton_name}_RNNTool', **kwargs
186 acc.setPrivateTools(tool_rnn)
◆ VtxFittingToolCfg()
ComponentAccumulator LeptonTaggersConfig.VtxFittingToolCfg |
( |
|
ConfigFlags, |
|
|
** |
kwargs |
|
) |
| |
Generate a vertex fitting tool.
Definition at line 27 of file LeptonTaggersConfig.py.
29 Generate a vertex fitting tool.
32 lep_tag_log.info(
"creating VtxFittingTool")
34 kwargs.setdefault(
"doSeedVertexFit",
False)
36 kwargs.setdefault(
"DistToPriVtxName",
"distToPriVtx")
37 kwargs.setdefault(
"NormDistToPriVtxName",
"normDistToPriVtx")
38 kwargs.setdefault(
"DistToRefittedPriVtxName",
"distToRefittedPriVtx")
39 kwargs.setdefault(
"NormDistToRefittedPriVtxName",
"normDistToRefittedPriVtx")
40 kwargs.setdefault(
"DistToRefittedRmLepPriVtxName",
"distToRefittedRmLepPriVtx")
41 kwargs.setdefault(
"NormDistToRefittedRmLepPriVtxName",
42 "normDistToRefittedRmLepPriVtx")
44 from TrkConfig.TrkVertexBilloirToolsConfig
import FastVertexFitterCfg
47 kwargs.setdefault(
"vertexFitterTool", fast_vtx_fitter)
48 kwargs.setdefault(
"seedVertexFitterTool", fast_vtx_fitter)
50 vertex_fitting_tool = CompFactory.Prompt.VertexFittingTool(
51 name=
"VertexFittingTool", **kwargs
54 acc.setPrivateTools(vertex_fitting_tool)
55 lep_tag_log.info(
"end of VtxFittingTool creation")
◆ VtxItrMergingToolCfg()
ComponentAccumulator LeptonTaggersConfig.VtxItrMergingToolCfg |
( |
|
flags, |
|
|
|
name = "VertexIterativeMergingTool" , |
|
|
|
lepton_name = "" , |
|
|
** |
kwargs |
|
) |
| |
Generate a VtxItrMergingTool configuration.
Definition at line 94 of file LeptonTaggersConfig.py.
95 lepton_name="", **kwargs) -> ComponentAccumulator:
97 Generate a VtxItrMergingTool configuration.
99 lep_tag_log.info(
"creating VtxItrMergingToolCfg configuration")
103 kwargs.setdefault(
"minFitProb", 0.03)
105 tool_name = f
'VtxIterFitMergingTool_{lepton_name}'
107 vtxItrMergingTool = CompFactory.Prompt.VertexIterativeFitMergingTool(
108 name=tool_name, **kwargs
111 acc.setPrivateTools(vtxItrMergingTool)
◆ ACC
LeptonTaggersConfig.ACC = MainServicesCfg(FLAGS) |
◆ Files
LeptonTaggersConfig.Files |
◆ FLAGS
LeptonTaggersConfig.FLAGS = initConfigFlags() |
◆ lep_tag_log
LeptonTaggersConfig.lep_tag_log = logging.getLogger('LeptonTaggersConfig') |
◆ MaxEvents
LeptonTaggersConfig.MaxEvents |
◆ ProductionStep
LeptonTaggersConfig.ProductionStep |
◆ status
LeptonTaggersConfig.status = ACC.run() |
◆ summariseProps
LeptonTaggersConfig.summariseProps |
◆ trigger_lists_helper
LeptonTaggersConfig.trigger_lists_helper = TriggerListsHelper(FLAGS) |
◆ True
◆ withDetails
LeptonTaggersConfig.withDetails |
ComponentAccumulator DecoratePromptLeptonImprovedCfg(flags, BDT_name="", lepton_name="", track_jet_name="AntiKtVR30Rmax4Rmin02PV0TrackJets", **kwargs)
ComponentAccumulator DecorateNonPromptVertexCfg(flags, name="DecorateNonPromptVertex", lepton_name="", **kwargs)
def getStringIntVars(BDT_name)
ComponentAccumulator VtxItrMergingToolCfg(flags, name="VertexIterativeMergingTool", lepton_name="", **kwargs)
def GetExtraPLITVariablesForDxAOD(name='')
def GetExtraImprovedPromptVariablesForDxAOD(name='', onlyBDT=False)
ComponentAccumulator VtxFittingToolCfg(ConfigFlags, **kwargs)
ComponentAccumulator DecorateReFitPrimaryVertexCfg(ConfigFlags, name="PrimaryVertexReFitter", lepton_type="", **kwargs)
ComponentAccumulator DecoratePLITCfg(flags, Tagger_name="", lepton_name="", **kwargs)
ComponentAccumulator DecoratePLITAlgsCfg(ConfigFlags, name="DecoratePLITAlgsCfg", lepton_type="", **kwargs)
ComponentAccumulator DecorateImprovedPromptLeptonAlgsCfg(ConfigFlags, name="DecorateImprovedPromptLeptonAlgs", lepton_type="", **kwargs)
def getStringFloatVars(BDT_name, part_type='')
def GetExtraPromptVariablesForDxAOD(name='', addSpectators=False, onlyBDT=True)
ComponentAccumulator DecoratePromptLeptonRNNCfg(flags, RNN_name="RNN_name", lepton_name="", name="DecoratePromptLeptonRNN", **kwargs)
ComponentAccumulator RNNToolCfg(flags, name="RNNTool", RNN_name="RNN_name", lepton_name="", **kwargs)