Class to hold information of a recojet collection
Definition at line 151 of file jetCollectionTools.py.
◆ __init__()
def jetCollectionTools.RecoJetInfo.__init__ |
( |
|
self, |
|
|
|
jet, |
|
|
|
inputCollection |
|
) |
| |
Definition at line 155 of file jetCollectionTools.py.
155 def __init__(self, jet, inputCollection):
157 self.jetLower = jet.lower()
158 self.jetUpper = jet.upper()
159 self.jetTagName = self.jetUpper
160 self.inputCollection = inputCollection
164 puMethodKey =
'puMethod'
165 jetRegex = re.compile(
166 r'(?P<{algo}>({algoList}))(?P<{size}>[0-9]+)(?P<{reco}>(pf|calo))(?P<{puMethod}>(chs|puppi|sk|cs|))'.
format(
168 algoList =
'|'.
join(supportedJetAlgos.keys()),
171 puMethod = puMethodKey,
174 jetMatch = jetRegex.match(jet.lower())
176 raise RuntimeError(
'Invalid jet collection: %s' % jet)
178 self.jetAlgo = jetMatch.group(algoKey)
179 self.jetSize = jetMatch.group(sizeKey)
180 self.jetReco = jetMatch.group(recoKey)
181 self.jetPUMethod = jetMatch.group(puMethodKey)
183 self.jetSizeNr =
float(self.jetSize) / 10.
185 self.doCalo = self.jetReco ==
"calo"
186 self.doCS = self.jetPUMethod ==
"cs"
187 self.skipUserData = self.doCalo
or (self.jetPUMethod
in [
"puppi",
"sk" ]
and inputCollection ==
"")
189 self.jetCorrPayload =
"{}{}{}".
format(
190 self.jetAlgo.
upper(), self.jetSize,
"Calo" if self.doCalo
else self.jetReco.
upper()
192 if self.jetPUMethod ==
"puppi":
193 self.jetCorrPayload +=
"Puppi"
194 elif self.jetPUMethod
in [
"cs",
"sk" ]:
195 self.jetCorrPayload +=
"chs"
197 self.jetCorrPayload += self.jetPUMethod.lower()
◆ doCalo
jetCollectionTools.RecoJetInfo.doCalo |
◆ doCS
jetCollectionTools.RecoJetInfo.doCS |
◆ 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 |
◆ skipUserData
jetCollectionTools.RecoJetInfo.skipUserData |