CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
jetCollectionTools.RecoJetInfo Class Reference
Inheritance diagram for jetCollectionTools.RecoJetInfo:

Public Member Functions

def __init__ (self, jet, inputCollection)
 

Public Attributes

 doCalo
 
 doCS
 
 doPF
 
 inputCollection
 
 jet
 
 jetAlgo
 
 jetCorrPayload
 
 jetLower
 
 jetPUMethod
 
 jetReco
 
 jetSize
 
 jetSizeNr
 
 jetTagName
 
 jetUpper
 
 patJetFinalCollection
 
 skipUserData
 

Detailed Description

Class to hold information of a recojet collection

Definition at line 135 of file jetCollectionTools.py.

Constructor & Destructor Documentation

◆ __init__()

def jetCollectionTools.RecoJetInfo.__init__ (   self,
  jet,
  inputCollection 
)

Definition at line 139 of file jetCollectionTools.py.

139  def __init__(self, jet, inputCollection):
140  self.jet = jet
141  self.jetLower = jet.lower()
142  self.jetUpper = jet.upper()
143  self.jetTagName = self.jetUpper
144  self.inputCollection = inputCollection
145  algoKey = 'algo'
146  sizeKey = 'size'
147  recoKey = 'reco'
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(
151  algo = algoKey,
152  algoList = '|'.join(supportedJetAlgos.keys()),
153  size = sizeKey,
154  reco = recoKey,
155  puMethod = puMethodKey,
156  )
157  )
158  jetMatch = jetRegex.match(jet.lower())
159  if not jetMatch:
160  raise RuntimeError('Invalid jet collection: %s' % jet)
161 
162  self.jetAlgo = jetMatch.group(algoKey)
163  self.jetSize = jetMatch.group(sizeKey)
164  self.jetReco = jetMatch.group(recoKey)
165  self.jetPUMethod = jetMatch.group(puMethodKey)
166 
167  self.jetSizeNr = float(self.jetSize) / 10.
168 
169  self.doCalo = self.jetReco == "calo"
170  self.doPF = self.jetReco == "pf"
171 
172  self.doCS = self.jetPUMethod == "cs"
173  self.skipUserData = self.doCalo or (self.jetPUMethod in [ "puppi", "sk" ] and inputCollection == "")
174 
175  self.jetCorrPayload = "{}{}{}".format(
176  self.jetAlgo.upper(), self.jetSize, "Calo" if self.doCalo else self.jetReco.upper()
177  )
178 
179  if self.jetPUMethod == "puppi":
180  self.jetCorrPayload += "Puppi"
181  elif self.jetPUMethod in [ "cs", "sk" ]:
182  self.jetCorrPayload += "chs"
183  else:
184  self.jetCorrPayload += self.jetPUMethod.lower()
185 
186  self.patJetFinalCollection = ""
187 
188 #============================================
189 #
190 # RecoJetAdder
191 #
192 #============================================
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)
Definition: RemoteFile.cc:21

Member Data Documentation

◆ doCalo

jetCollectionTools.RecoJetInfo.doCalo

Definition at line 169 of file jetCollectionTools.py.

◆ doCS

jetCollectionTools.RecoJetInfo.doCS

Definition at line 172 of file jetCollectionTools.py.

◆ doPF

jetCollectionTools.RecoJetInfo.doPF

Definition at line 170 of file jetCollectionTools.py.

◆ inputCollection

jetCollectionTools.RecoJetInfo.inputCollection

Definition at line 144 of file jetCollectionTools.py.

◆ jet

jetCollectionTools.RecoJetInfo.jet

Definition at line 140 of file jetCollectionTools.py.

◆ jetAlgo

jetCollectionTools.RecoJetInfo.jetAlgo

Definition at line 162 of file jetCollectionTools.py.

◆ jetCorrPayload

jetCollectionTools.RecoJetInfo.jetCorrPayload

Definition at line 175 of file jetCollectionTools.py.

◆ jetLower

jetCollectionTools.RecoJetInfo.jetLower

Definition at line 141 of file jetCollectionTools.py.

◆ jetPUMethod

jetCollectionTools.RecoJetInfo.jetPUMethod

Definition at line 165 of file jetCollectionTools.py.

◆ jetReco

jetCollectionTools.RecoJetInfo.jetReco

Definition at line 164 of file jetCollectionTools.py.

◆ jetSize

jetCollectionTools.RecoJetInfo.jetSize

Definition at line 163 of file jetCollectionTools.py.

◆ jetSizeNr

jetCollectionTools.RecoJetInfo.jetSizeNr

Definition at line 167 of file jetCollectionTools.py.

◆ jetTagName

jetCollectionTools.RecoJetInfo.jetTagName

Definition at line 143 of file jetCollectionTools.py.

◆ jetUpper

jetCollectionTools.RecoJetInfo.jetUpper

Definition at line 142 of file jetCollectionTools.py.

◆ patJetFinalCollection

jetCollectionTools.RecoJetInfo.patJetFinalCollection

Definition at line 186 of file jetCollectionTools.py.

◆ skipUserData

jetCollectionTools.RecoJetInfo.skipUserData

Definition at line 173 of file jetCollectionTools.py.