Class to hold information of a recojet collection
Definition at line 133 of file jetCollectionTools.py.
◆ __init__()
def jetCollectionTools.RecoJetInfo.__init__ |
( |
|
self, |
|
|
|
jet, |
|
|
|
inputCollection |
|
) |
| |
Definition at line 137 of file jetCollectionTools.py.
137 def __init__(self, jet, inputCollection):
139 self.jetLower = jet.lower()
140 self.jetUpper = jet.upper()
141 self.jetTagName = self.jetUpper
142 self.inputCollection = inputCollection
146 puMethodKey =
'puMethod'
147 jetRegex = re.compile(
148 r'(?P<{algo}>({algoList}))(?P<{size}>[0-9]+)(?P<{reco}>(pf|calo))(?P<{puMethod}>(chs|puppi|sk|cs|))'.
format(
150 algoList =
'|'.
join(supportedJetAlgos.keys()),
153 puMethod = puMethodKey,
156 jetMatch = jetRegex.match(jet.lower())
158 raise RuntimeError(
'Invalid jet collection: %s' % jet)
160 self.jetAlgo = jetMatch.group(algoKey)
161 self.jetSize = jetMatch.group(sizeKey)
162 self.jetReco = jetMatch.group(recoKey)
163 self.jetPUMethod = jetMatch.group(puMethodKey)
165 self.jetSizeNr =
float(self.jetSize) / 10.
167 self.doCalo = self.jetReco ==
"calo"
168 self.doPF = self.jetReco ==
"pf"
170 self.doCS = self.jetPUMethod ==
"cs"
171 self.skipUserData = self.doCalo
or (self.jetPUMethod
in [
"puppi",
"sk" ]
and inputCollection ==
"")
173 self.jetCorrPayload =
"{}{}{}".
format(
174 self.jetAlgo.
upper(), self.jetSize,
"Calo" if self.doCalo
else self.jetReco.
upper()
177 if self.jetPUMethod ==
"puppi":
178 self.jetCorrPayload +=
"Puppi"
179 elif self.jetPUMethod
in [
"cs",
"sk" ]:
180 self.jetCorrPayload +=
"chs"
182 self.jetCorrPayload += self.jetPUMethod.lower()
184 self.patJetFinalCollection =
""
◆ doCalo
jetCollectionTools.RecoJetInfo.doCalo |
◆ doCS
jetCollectionTools.RecoJetInfo.doCS |
◆ doPF
jetCollectionTools.RecoJetInfo.doPF |
◆ inputCollection
jetCollectionTools.RecoJetInfo.inputCollection |
◆ jet
jetCollectionTools.RecoJetInfo.jet |
◆ jetAlgo
jetCollectionTools.RecoJetInfo.jetAlgo |
◆ jetCorrPayload
jetCollectionTools.RecoJetInfo.jetCorrPayload |
◆ jetLower
jetCollectionTools.RecoJetInfo.jetLower |
◆ jetPUMethod
jetCollectionTools.RecoJetInfo.jetPUMethod |
◆ jetReco
jetCollectionTools.RecoJetInfo.jetReco |
◆ jetSize
jetCollectionTools.RecoJetInfo.jetSize |
◆ jetSizeNr
jetCollectionTools.RecoJetInfo.jetSizeNr |
◆ jetTagName
jetCollectionTools.RecoJetInfo.jetTagName |
◆ jetUpper
jetCollectionTools.RecoJetInfo.jetUpper |
◆ patJetFinalCollection
jetCollectionTools.RecoJetInfo.patJetFinalCollection |
◆ skipUserData
jetCollectionTools.RecoJetInfo.skipUserData |