139 def __init__(self, jet, inputCollection):
141 self.jetLower = jet.lower()
142 self.jetUpper = jet.upper()
143 self.jetTagName = self.jetUpper
144 self.inputCollection = inputCollection
148 puMethodKey =
'puMethod' 149 jetRegex = re.compile(
150 r'(?P<{algo}>({algoList}))(?P<{size}>[0-9]+)(?P<{reco}>(pf|calo))(?P<{puMethod}>(chs|puppi|sk|cs|))'.
format(
152 algoList =
'|'.
join(supportedJetAlgos.keys()),
155 puMethod = puMethodKey,
158 jetMatch = jetRegex.match(jet.lower())
160 raise RuntimeError(
'Invalid jet collection: %s' % jet)
162 self.jetAlgo = jetMatch.group(algoKey)
163 self.jetSize = jetMatch.group(sizeKey)
164 self.jetReco = jetMatch.group(recoKey)
165 self.jetPUMethod = jetMatch.group(puMethodKey)
167 self.jetSizeNr =
float(self.jetSize) / 10.
169 self.doCalo = self.jetReco ==
"calo" 170 self.doPF = self.jetReco ==
"pf" 172 self.doCS = self.jetPUMethod ==
"cs" 173 self.skipUserData = self.doCalo
or (self.jetPUMethod
in [
"puppi",
"sk" ]
and inputCollection ==
"")
175 self.jetCorrPayload =
"{}{}{}".
format(
176 self.jetAlgo.upper(), self.jetSize,
"Calo" if self.doCalo
else self.jetReco.upper()
179 if self.jetPUMethod ==
"puppi":
180 self.jetCorrPayload +=
"Puppi" 181 elif self.jetPUMethod
in [
"cs",
"sk" ]:
182 self.jetCorrPayload +=
"chs" 184 self.jetCorrPayload += self.jetPUMethod.lower()
186 self.patJetFinalCollection =
"" def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)
static std::string join(char **cmd)