Class to hold information of a recojet collection
Definition at line 129 of file jetCollectionTools.py.
◆ __init__()
def jetCollectionTools.RecoJetInfo.__init__ |
( |
|
self, |
|
|
|
jet, |
|
|
|
inputCollection |
|
) |
| |
Definition at line 133 of file jetCollectionTools.py.
133 def __init__(self, jet, inputCollection):
135 self.jetLower = jet.lower()
136 self.jetUpper = jet.upper()
137 self.jetTagName = self.jetUpper
138 self.inputCollection = inputCollection
142 puMethodKey =
'puMethod'
143 jetRegex = re.compile(
144 r'(?P<{algo}>({algoList}))(?P<{size}>[0-9]+)(?P<{reco}>(pf|calo))(?P<{puMethod}>(chs|puppi|sk|cs|))'.
format(
146 algoList =
'|'.
join(supportedJetAlgos.keys()),
149 puMethod = puMethodKey,
152 jetMatch = jetRegex.match(jet.lower())
154 raise RuntimeError(
'Invalid jet collection: %s' % jet)
156 self.jetAlgo = jetMatch.group(algoKey)
157 self.jetSize = jetMatch.group(sizeKey)
158 self.jetReco = jetMatch.group(recoKey)
159 self.jetPUMethod = jetMatch.group(puMethodKey)
161 self.jetSizeNr =
float(self.jetSize) / 10.
163 self.doCalo = self.jetReco ==
"calo"
164 self.doPF = self.jetReco ==
"pf"
166 self.doCS = self.jetPUMethod ==
"cs"
167 self.skipUserData = self.doCalo
or (self.jetPUMethod
in [
"puppi",
"sk" ]
and inputCollection ==
"")
169 self.jetCorrPayload =
"{}{}{}".
format(
170 self.jetAlgo.
upper(), self.jetSize,
"Calo" if self.doCalo
else self.jetReco.
upper()
173 if self.jetPUMethod ==
"puppi":
174 self.jetCorrPayload +=
"Puppi"
175 elif self.jetPUMethod
in [
"cs",
"sk" ]:
176 self.jetCorrPayload +=
"chs"
178 self.jetCorrPayload += self.jetPUMethod.lower()
◆ 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 |
◆ skipUserData
jetCollectionTools.RecoJetInfo.skipUserData |