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
 
 inputCollection
 
 jet
 
 jetAlgo
 
 jetCorrPayload
 
 jetLower
 
 jetPUMethod
 
 jetReco
 
 jetSize
 
 jetSizeNr
 
 jetTagName
 
 jetUpper
 
 skipUserData
 

Detailed Description

Class to hold information of a recojet collection

Definition at line 151 of file jetCollectionTools.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 155 of file jetCollectionTools.py.

155  def __init__(self, jet, inputCollection):
156  self.jet = jet
157  self.jetLower = jet.lower()
158  self.jetUpper = jet.upper()
159  self.jetTagName = self.jetUpper
160  self.inputCollection = inputCollection
161  algoKey = 'algo'
162  sizeKey = 'size'
163  recoKey = 'reco'
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(
167  algo = algoKey,
168  algoList = '|'.join(supportedJetAlgos.keys()),
169  size = sizeKey,
170  reco = recoKey,
171  puMethod = puMethodKey,
172  )
173  )
174  jetMatch = jetRegex.match(jet.lower())
175  if not jetMatch:
176  raise RuntimeError('Invalid jet collection: %s' % jet)
177 
178  self.jetAlgo = jetMatch.group(algoKey)
179  self.jetSize = jetMatch.group(sizeKey)
180  self.jetReco = jetMatch.group(recoKey)
181  self.jetPUMethod = jetMatch.group(puMethodKey)
182 
183  self.jetSizeNr = float(self.jetSize) / 10.
184 
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 == "")
188 
189  self.jetCorrPayload = "{}{}{}".format(
190  self.jetAlgo.upper(), self.jetSize, "Calo" if self.doCalo else self.jetReco.upper()
191  )
192  if self.jetPUMethod == "puppi":
193  self.jetCorrPayload += "Puppi"
194  elif self.jetPUMethod in [ "cs", "sk" ]:
195  self.jetCorrPayload += "chs"
196  else:
197  self.jetCorrPayload += self.jetPUMethod.lower()
198 
199 #============================================
200 #
201 # RecoJetAdder
202 #
203 #============================================

Member Data Documentation

◆ doCalo

jetCollectionTools.RecoJetInfo.doCalo

Definition at line 185 of file jetCollectionTools.py.

◆ doCS

jetCollectionTools.RecoJetInfo.doCS

Definition at line 186 of file jetCollectionTools.py.

◆ inputCollection

jetCollectionTools.RecoJetInfo.inputCollection

Definition at line 160 of file jetCollectionTools.py.

◆ jet

jetCollectionTools.RecoJetInfo.jet

Definition at line 156 of file jetCollectionTools.py.

◆ jetAlgo

jetCollectionTools.RecoJetInfo.jetAlgo

Definition at line 178 of file jetCollectionTools.py.

◆ jetCorrPayload

jetCollectionTools.RecoJetInfo.jetCorrPayload

Definition at line 189 of file jetCollectionTools.py.

◆ jetLower

jetCollectionTools.RecoJetInfo.jetLower

Definition at line 157 of file jetCollectionTools.py.

◆ jetPUMethod

jetCollectionTools.RecoJetInfo.jetPUMethod

Definition at line 181 of file jetCollectionTools.py.

◆ jetReco

jetCollectionTools.RecoJetInfo.jetReco

Definition at line 180 of file jetCollectionTools.py.

◆ jetSize

jetCollectionTools.RecoJetInfo.jetSize

Definition at line 179 of file jetCollectionTools.py.

◆ jetSizeNr

jetCollectionTools.RecoJetInfo.jetSizeNr

Definition at line 183 of file jetCollectionTools.py.

◆ jetTagName

jetCollectionTools.RecoJetInfo.jetTagName

Definition at line 159 of file jetCollectionTools.py.

◆ jetUpper

jetCollectionTools.RecoJetInfo.jetUpper

Definition at line 158 of file jetCollectionTools.py.

◆ skipUserData

jetCollectionTools.RecoJetInfo.skipUserData

Definition at line 187 of file jetCollectionTools.py.

dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
join
static std::string join(char **cmd)
Definition: RemoteFile.cc:17
format
pileupCalc.upper
upper
Definition: pileupCalc.py:214