Definition at line 484 of file TauAnalysisConfig.py.
◆ __init__()
| def python.TauAnalysisConfig.TauTriggerAnalysisSFBlock.__init__ |
( |
|
self | ) |
|
Definition at line 486 of file TauAnalysisConfig.py.
487 super (TauTriggerAnalysisSFBlock, self).__init__ ()
489 self.addOption (
'triggerChainsPerYear', {}, type=
None,
490 info=
"a dictionary with key (string) the year and value (list of "
491 "strings) the trigger chains. The default is {} (empty dictionary).")
492 self.addOption (
'tauID',
'', type=str,
493 info=
"the tau quality WP (string) to use.")
494 self.addOption (
'prefixSF',
'trigEffSF', type=str,
495 info=
"the decoration prefix for trigger scale factors, "
496 "the default is 'trigEffSF'")
497 self.addOption (
'includeAllYearsPerRun',
False, type=bool,
498 info=
"if True, all configured years in the LHC run will "
499 "be included in all jobs. The default is False.")
500 self.addOption (
'removeHLTPrefix',
True, type=bool,
501 info=
"remove the HLT prefix from trigger chain names, "
502 "The default is True.")
503 self.addOption (
'containerName',
'', type=str,
504 info=
"the input tau container, with a possible selection, in "
505 "the format container or container.selection.")
◆ instanceName()
| def python.TauAnalysisConfig.TauTriggerAnalysisSFBlock.instanceName |
( |
|
self | ) |
|
Return the instance name for this block
Definition at line 507 of file TauAnalysisConfig.py.
507 def instanceName (self) :
508 """Return the instance name for this block"""
509 return self.containerName +
'_' + self.prefixSF +
'_' + self.tauID
◆ makeAlgs()
| def python.TauAnalysisConfig.TauTriggerAnalysisSFBlock.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 511 of file TauAnalysisConfig.py.
511 def makeAlgs (self, config) :
513 if config.dataType()
is not DataType.Data:
514 triggers =
trigger_set(config, self.triggerChainsPerYear,
515 self.includeAllYearsPerRun)
516 for chain
in triggers:
517 chain_noHLT = chain.replace(
"HLT_",
"")
518 chain_out = chain_noHLT
if self.removeHLTPrefix
else chain
519 alg = config.createAlgorithm(
'CP::TauEfficiencyCorrectionsAlg',
520 'TauTrigEfficiencyCorrectionsAlg_' + chain )
521 config.addPrivateTool(
'efficiencyCorrectionsTool',
522 'TauAnalysisTools::TauEfficiencyCorrectionsTool' )
525 alg.efficiencyCorrectionsTool.EfficiencyCorrectionTypes = [12]
526 if config.geometry()
is LHCPeriod.Run2:
527 alg.efficiencyCorrectionsTool.Campaign =
"mc20"
529 alg.efficiencyCorrectionsTool.Campaign = config.campaign().value
530 alg.efficiencyCorrectionsTool.TriggerName = chain
534 if self.tauID==
"Loose":
536 elif self.tauID==
"Medium":
538 elif self.tauID==
"Tight":
541 raise ValueError (
"invalid tauID: \"" + self.tauID +
"\". Allowed values are loose, medium, tight")
542 alg.efficiencyCorrectionsTool.JetIDLevel = JetIDLevel
543 alg.efficiencyCorrectionsTool.TriggerSFMeasurement =
"combined"
544 alg.efficiencyCorrectionsTool.useFastSim = config.dataType()
is DataType.FastSim
546 alg.scaleFactorDecoration = f
"tau_{self.prefixSF}_{chain_out}_%SYS%"
547 alg.outOfValidity = 2
548 alg.outOfValidityDeco = f
"bad_eff_tautrig_{chain_out}"
549 alg.taus = config.readName (self.containerName)
550 alg.preselection = config.getPreselection (self.containerName, self.tauID)
551 config.addOutputVar (self.containerName, alg.scaleFactorDecoration, f
"{self.prefixSF}_{chain_out}")
◆ tauID
| python.TauAnalysisConfig.TauTriggerAnalysisSFBlock.tauID |
The documentation for this class was generated from the following file: