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 133 of file jetCollectionTools.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 137 of file jetCollectionTools.py.

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

Member Data Documentation

◆ doCalo

jetCollectionTools.RecoJetInfo.doCalo

Definition at line 167 of file jetCollectionTools.py.

◆ doCS

jetCollectionTools.RecoJetInfo.doCS

Definition at line 170 of file jetCollectionTools.py.

◆ doPF

jetCollectionTools.RecoJetInfo.doPF

Definition at line 168 of file jetCollectionTools.py.

◆ inputCollection

jetCollectionTools.RecoJetInfo.inputCollection

Definition at line 142 of file jetCollectionTools.py.

◆ jet

jetCollectionTools.RecoJetInfo.jet

Definition at line 138 of file jetCollectionTools.py.

◆ jetAlgo

jetCollectionTools.RecoJetInfo.jetAlgo

Definition at line 160 of file jetCollectionTools.py.

◆ jetCorrPayload

jetCollectionTools.RecoJetInfo.jetCorrPayload

Definition at line 173 of file jetCollectionTools.py.

◆ jetLower

jetCollectionTools.RecoJetInfo.jetLower

Definition at line 139 of file jetCollectionTools.py.

◆ jetPUMethod

jetCollectionTools.RecoJetInfo.jetPUMethod

Definition at line 163 of file jetCollectionTools.py.

◆ jetReco

jetCollectionTools.RecoJetInfo.jetReco

Definition at line 162 of file jetCollectionTools.py.

◆ jetSize

jetCollectionTools.RecoJetInfo.jetSize

Definition at line 161 of file jetCollectionTools.py.

◆ jetSizeNr

jetCollectionTools.RecoJetInfo.jetSizeNr

Definition at line 165 of file jetCollectionTools.py.

◆ jetTagName

jetCollectionTools.RecoJetInfo.jetTagName

Definition at line 141 of file jetCollectionTools.py.

◆ jetUpper

jetCollectionTools.RecoJetInfo.jetUpper

Definition at line 140 of file jetCollectionTools.py.

◆ patJetFinalCollection

jetCollectionTools.RecoJetInfo.patJetFinalCollection

Definition at line 184 of file jetCollectionTools.py.

◆ skipUserData

jetCollectionTools.RecoJetInfo.skipUserData

Definition at line 171 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:213