the ConfigBlock for the tau working point
This may at some point be split into multiple blocks (16 Mar 22).
Definition at line 59 of file DiTauAnalysisConfig.py.
◆ __init__()
def python.DiTauAnalysisConfig.DiTauWorkingPointConfig.__init__ |
( |
|
self | ) |
|
Definition at line 64 of file DiTauAnalysisConfig.py.
65 super (DiTauWorkingPointConfig, self).__init__ ()
66 self.addOption (
'containerName',
'', type=str,
68 info=
"the name of the input container.")
69 self.addOption (
'selectionName',
'', type=str,
71 info=
"the name of the tau-jet selection to define (e.g. tight or "
73 self.addOption (
'postfix',
None, type=str,
74 info=
"a postfix to apply to decorations and algorithm names. "
75 "Typically not needed here as selectionName is used internally.")
76 self.addOption (
'quality',
None, type=str,
77 info=
"the ID WP (string) to use. Supported ID WPs: Tight, Medium, "
78 "Loose, VeryLoose, Baseline, BaselineForFakes.")
79 self.addOption (
'addSelectionToPreselection',
True, type=bool,
80 info=
"whether to retain only ditau-jets satisfying the working point "
81 "requirements. The default is True.")
◆ instanceName()
def python.DiTauAnalysisConfig.DiTauWorkingPointConfig.instanceName |
( |
|
self | ) |
|
Return the instance name for this block
Definition at line 83 of file DiTauAnalysisConfig.py.
83 def instanceName (self) :
84 """Return the instance name for this block"""
85 if self.postfix
is not None:
86 return self.containerName +
'_' + self.selectionName + self.postfix
88 return self.containerName +
'_' + self.selectionName
◆ makeAlgs()
def python.DiTauAnalysisConfig.DiTauWorkingPointConfig.makeAlgs |
( |
|
self, |
|
|
|
config |
|
) |
| |
Definition at line 90 of file DiTauAnalysisConfig.py.
90 def makeAlgs (self, config) :
92 selectionPostfix = self.selectionName
93 if selectionPostfix !=
'' and selectionPostfix[0] !=
'_' :
94 selectionPostfix =
'_' + selectionPostfix
96 postfix = self.postfix
98 postfix = self.selectionName
99 if postfix !=
'' and postfix[0] !=
'_' :
100 postfix =
'_' + postfix
104 if self.quality ==
'Tight' :
106 elif self.quality ==
'Medium' :
108 elif self.quality ==
'Loose' :
111 raise ValueError (
"invalid tau quality: \"" + self.quality +
112 "\", allowed values are Tight, Medium, Loose")
114 inputfile =
'TauAnalysisAlgorithms/ditau_selection_highpt.conf'
115 if "DiTauJetsLowPt" in self.containerName:
116 inputfile =
'TauAnalysisAlgorithms/ditau_selection_lowpt.conf'
119 alg = config.createAlgorithm(
'CP::AsgSelectionAlg',
'DiTauSelectionAlg' )
120 config.addPrivateTool(
'selectionTool',
'TauAnalysisTools::DiTauSelectionTool' )
121 alg.selectionTool.ConfigPath = inputfile
122 alg.selectionDecoration =
'selected_ditau' + selectionPostfix +
',as_char'
123 alg.particles = config.readName (self.containerName)
124 alg.preselection = config.getPreselection (self.containerName, self.selectionName)
125 config.addSelection (self.containerName, self.selectionName, alg.selectionDecoration,
126 preselection=self.addSelectionToPreselection)
131 if config.dataType()
is not DataType.Data:
132 alg = config.createAlgorithm(
'CP::DiTauEfficiencyCorrectionsAlg',
133 'DiTauEfficiencyCorrectionsAlg' )
134 config.addPrivateTool(
'efficiencyCorrectionsTool',
135 'TauAnalysisTools::DiTauEfficiencyCorrectionsTool' )
136 alg.efficiencyCorrectionsTool.JetIDLevel = IDLevel
137 alg.scaleFactorDecoration =
'tau_effSF' + postfix +
'_%SYS%'
140 alg.taus = config.readName (self.containerName)
141 alg.preselection = config.getPreselection (self.containerName, self.selectionName)
142 config.addOutputVar (self.containerName, alg.scaleFactorDecoration,
◆ quality
python.DiTauAnalysisConfig.DiTauWorkingPointConfig.quality |
The documentation for this class was generated from the following file: