CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Static Public Attributes
objects.JetAnalyzer.JetAnalyzer Class Reference
Inheritance diagram for objects.JetAnalyzer.JetAnalyzer:

Public Member Functions

def __init__
 
def beginLoop
 
def declareHandles
 
def jetFlavour
 
def matchJets
 
def process
 
def smearJets
 
def testJetID
 
def testJetNoID
 

Public Attributes

 addJERShifts
 
 allJetsUsedForMET
 
 bqObjects
 
 cqObjects
 
 deltaMetFromJEC
 Read jets, if necessary recalibrate and shift MET. More...
 
 doJEC
 
 genJets
 
 heaviestQCDFlavour
 
 jetGammaDR
 
 jetLepArbitration
 
 jetLepDR
 
 jetReCalibrator
 
 lepPtMin
 
 partons
 
 qglcalc
 
 rho
 
 shiftJEC
 
 shiftJER
 
 type1METCorr
 

Static Public Attributes

 addJECShifts = False,
 
int addJERShifts = 0
 
 alwaysCleanPhotons = False,
 
string applyL2L3Residual = 'Data'
 
 attachNeutrinos = True,
 
 calculateSeparateCorrections = False,
 
 calculateType1METCorrection = False,
 
 checkLeptonPFOverlap = True,
 
 class_object = JetAnalyzer,
 
 cleanGenJetsFromPhoton = False,
 
 cleanJetsFromFirstPhoton = False,
 
 cleanJetsFromIsoTracks = False,
 
 cleanJetsFromTaus = False,
 
 cleanSelectedLeptons = True,
 
string collectionPostFix = ""
 
 copyJetsByValue = False,
 
 do_mc_match = True,
 
 doPuId = False,
 
 doQG = False,
 
string genJetCol = 'slimmedGenJets'
 
 genNuSelection = lambdanu:True,
 
tuple has_overlaps = p1.key()
 
tuple incleptons = event.inclusiveLeptonsifhasattr(event, 'inclusiveLeptons')
 Jet Id, after jet/lepton cleaning. More...
 
string jecPath = ""
 
list jet = jlpairs[lep]
 
string jetCol = 'slimmedJets'
 
float jetEta = 4.7
 
float jetEtaCentral = 2.4
 
tuple jetLepArbitration = (lambda jet,lepton : lepton)
 
float jetLepDR = 0.4
 
list jetNus = [x for x in event.genParticles if abs(x.pdgId()) in [12,14,16] and self.cfg_ana.genNuSelection(x) ]
 
int jetPt = 25
 
list jetsEtaCut = [j for j in self.jets if abs(j.eta()) < self.cfg_ana.jetEta ]
 
tuple jlpairs = matchObjectCollection(incleptons, allJets, self.jetLepDR**2)
 
tuple jtaupairs = matchObjectCollection( taus, allJets, self.jetLepDR**2)
 
list leps_with_overlaps = []
 Apply jet selection. More...
 
 lepSelCut = lambdalep:True,
 
list leptons = []
 Sort Jets by pT. More...
 
int minLepPt = 10
 
tuple p1 = jet.sourceCandidatePtr(i)
 
tuple p2 = lep.sourceCandidatePtr(j)
 
tuple pairs = matchObjectCollection(jetNus, self.genJets, 0.4**2)
 
list photons = []
 First cleaning, then Jet Id. More...
 
 recalibrateJets = False,
 
string recalibrationType = "AK4PFchs"
 
 relaxJetId = False,
 
tuple rho = ('fixedGridRhoFastjetAll','','')
 
int shiftJEC = 0
 
int shiftJER = 0
 
 smearJets = True,
 
tuple taus = getattr(event,'selectedTaus',[])
 Associate jets to taus. More...
 
dictionary type1METParams = { 'jetPtThreshold':15., 'skipEMfractionThreshold':0.9, 'skipMuons':True }
 

Detailed Description

Taken from RootTools.JetAnalyzer, simplified, modified, added corrections    

Definition at line 65 of file JetAnalyzer.py.

Constructor & Destructor Documentation

def objects.JetAnalyzer.JetAnalyzer.__init__ (   self,
  cfg_ana,
  cfg_comp,
  looperName 
)

Definition at line 67 of file JetAnalyzer.py.

67 
68  def __init__(self, cfg_ana, cfg_comp, looperName):
69  super(JetAnalyzer,self).__init__(cfg_ana, cfg_comp, looperName)
70  mcGT = cfg_ana.mcGT if hasattr(cfg_ana,'mcGT') else "PHYS14_25_V2"
71  dataGT = cfg_ana.dataGT if hasattr(cfg_ana,'dataGT') else "GR_70_V2_AN1"
72  self.shiftJEC = self.cfg_ana.shiftJEC if hasattr(self.cfg_ana, 'shiftJEC') else 0
73  self.recalibrateJets = self.cfg_ana.recalibrateJets
74  self.addJECShifts = self.cfg_ana.addJECShifts if hasattr(self.cfg_ana, 'addJECShifts') else 0
75  if self.recalibrateJets == "MC" : self.recalibrateJets = self.cfg_comp.isMC
76  elif self.recalibrateJets == "Data": self.recalibrateJets = not self.cfg_comp.isMC
77  elif self.recalibrateJets not in [True,False]: raise RuntimeError, "recalibrateJets must be any of { True, False, 'MC', 'Data' }, while it is %r " % self.recalibrateJets
78 
79  calculateSeparateCorrections = getattr(cfg_ana,"calculateSeparateCorrections", False);
80  calculateType1METCorrection = getattr(cfg_ana,"calculateType1METCorrection", False);
81  self.doJEC = self.recalibrateJets or (self.shiftJEC != 0) or self.addJECShifts or calculateSeparateCorrections or calculateType1METCorrection
82  if self.doJEC:
83  doResidual = getattr(cfg_ana, 'applyL2L3Residual', 'Data')
84  if doResidual == "MC": doResidual = self.cfg_comp.isMC
85  elif doResidual == "Data": doResidual = not self.cfg_comp.isMC
86  elif doResidual not in [True,False]: raise RuntimeError, "If specified, applyL2L3Residual must be any of { True, False, 'MC', 'Data'(default)}"
87  GT = mcGT if self.cfg_comp.isMC else dataGT
88  # Now take care of the optional arguments
89  kwargs = { 'calculateSeparateCorrections':calculateSeparateCorrections,
90  'calculateType1METCorrection' :calculateType1METCorrection, }
91  if kwargs['calculateType1METCorrection']: kwargs['type1METParams'] = cfg_ana.type1METParams
92  # instantiate the jet re-calibrator
93  self.jetReCalibrator = JetReCalibrator(GT, cfg_ana.recalibrationType, doResidual, cfg_ana.jecPath, **kwargs)
94  self.doPuId = getattr(self.cfg_ana, 'doPuId', True)
95  self.jetLepDR = getattr(self.cfg_ana, 'jetLepDR', 0.4)
96  self.jetLepArbitration = getattr(self.cfg_ana, 'jetLepArbitration', lambda jet,lepton: lepton)
97  self.lepPtMin = getattr(self.cfg_ana, 'minLepPt', -1)
98  self.lepSelCut = getattr(self.cfg_ana, 'lepSelCut', lambda lep : True)
99  self.jetGammaDR = getattr(self.cfg_ana, 'jetGammaDR', 0.4)
100  if(self.cfg_ana.doQG):
101  qgdefname="{CMSSW_BASE}/src/PhysicsTools/Heppy/data/pdfQG_AK4chs_13TeV_v2b.root"
102  self.qglcalc = QGLikelihoodCalculator(getattr(self.cfg_ana,"QGpath",qgdefname).format(CMSSW_BASE= os.environ['CMSSW_BASE']))
103  if not hasattr(self.cfg_ana ,"collectionPostFix"):self.cfg_ana.collectionPostFix=""
if(c.getParameter< edm::InputTag >("puppiValueMap").label().size()!=0)

Member Function Documentation

def objects.JetAnalyzer.JetAnalyzer.beginLoop (   self,
  setup 
)

Definition at line 112 of file JetAnalyzer.py.

113  def beginLoop(self, setup):
114  super(JetAnalyzer,self).beginLoop(setup)
def objects.JetAnalyzer.JetAnalyzer.declareHandles (   self)

Definition at line 104 of file JetAnalyzer.py.

References core.AutoHandle.AutoHandle.handles, core.Analyzer.Analyzer.handles, and HTTP.RequestManager.handles.

105  def declareHandles(self):
106  super(JetAnalyzer, self).declareHandles()
107  self.handles['jets'] = AutoHandle( self.cfg_ana.jetCol, 'std::vector<pat::Jet>' )
108  self.handles['genJet'] = AutoHandle( self.cfg_ana.genJetCol, 'vector<reco::GenJet>' )
109  self.shiftJER = self.cfg_ana.shiftJER if hasattr(self.cfg_ana, 'shiftJER') else 0
110  self.addJERShifts = self.cfg_ana.addJERShifts if hasattr(self.cfg_ana, 'addJERShifts') else 0
111  self.handles['rho'] = AutoHandle( self.cfg_ana.rho, 'double' )
def objects.JetAnalyzer.JetAnalyzer.jetFlavour (   self,
  event 
)

Definition at line 373 of file JetAnalyzer.py.

References funct.abs().

374  def jetFlavour(self,event):
375  def isFlavour(x,f):
376  id = abs(x.pdgId())
377  if id > 999: return (id/1000)%10 == f
378  if id > 99: return (id/100)%10 == f
379  return id % 100 == f
380 
381 
383  self.bqObjects = [ p for p in event.genParticles if (p.status() == 2 and isFlavour(p,5)) ]
384  self.cqObjects = [ p for p in event.genParticles if (p.status() == 2 and isFlavour(p,4)) ]
386  self.partons = [ p for p in event.genParticles if ((p.status() == 23 or p.status() == 3) and abs(p.pdgId())>0 and (abs(p.pdgId()) in [1,2,3,4,5,21]) ) ]
387  match = matchObjectCollection2(self.cleanJetsAll,
388  self.partons,
389  deltaRMax = 0.3)
390 
391  for jet in self.cleanJetsAll:
392  parton = match[jet]
393  jet.partonId = (parton.pdgId() if parton != None else 0)
394  jet.partonMotherId = (parton.mother(0).pdgId() if parton != None and parton.numberOfMothers()>0 else 0)
395 
396  for jet in self.jets:
397  (bmatch, dr) = bestMatch(jet, self.bqObjects)
398  if dr < 0.4:
399  jet.mcFlavour = 5
400  else:
401  (cmatch, dr) = bestMatch(jet, self.cqObjects)
402  if dr < 0.4:
403  jet.mcFlavour = 4
404  else:
405  jet.mcFlavour = 0
407  self.heaviestQCDFlavour = 5 if len(self.bqObjects) else (4 if len(self.cqObjects) else 1);
def bestMatch
Definition: deltar.py:139
def matchObjectCollection2
Definition: deltar.py:167
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def objects.JetAnalyzer.JetAnalyzer.matchJets (   self,
  event,
  jets 
)

Definition at line 408 of file JetAnalyzer.py.

References funct.abs(), EVTColContainer.genJets, objects.JetAnalyzer.JetAnalyzer.genJets, and deltar.matchObjectCollection2().

409  def matchJets(self, event, jets):
410  match = matchObjectCollection2(jets,
411  event.genbquarks + event.genwzquarks,
412  deltaRMax = 0.3)
413  for jet in jets:
414  gen = match[jet]
415  jet.mcParton = gen
416  jet.mcMatchId = (gen.sourceId if gen != None else 0)
417  jet.mcMatchFlav = (abs(gen.pdgId()) if gen != None else 0)
418 
419  match = matchObjectCollection2(jets,
420  self.genJets,
421  deltaRMax = 0.3)
422  for jet in jets:
423  jet.mcJet = match[jet]
424 
425 
def matchObjectCollection2
Definition: deltar.py:167
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def objects.JetAnalyzer.JetAnalyzer.process (   self,
  event 
)

Definition at line 115 of file JetAnalyzer.py.

References core.AutoHandle.AutoHandle.handles, core.Analyzer.Analyzer.handles, HTTP.RequestManager.handles, and core.Analyzer.Analyzer.readCollections().

Referenced by ConfigBuilder.ConfigBuilder.addExtraStream(), ConfigBuilder.ConfigBuilder.completeInputCommand(), ConfigBuilder.ConfigBuilder.doNotInlineEventContent(), ConfigBuilder.ConfigBuilder.PrintAllModules.leave(), ConfigBuilder.ConfigBuilder.prepare_HLT(), ConfigBuilder.ConfigBuilder.prepare_LHE(), ConfigBuilder.ConfigBuilder.prepare_PATFILTER(), ConfigBuilder.ConfigBuilder.prepare_VALIDATION(), ConfigBuilder.ConfigBuilder.renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder.renameInputTagsInSequence(), and ConfigBuilder.ConfigBuilder.scheduleSequence().

116  def process(self, event):
117  self.readCollections( event.input )
118  rho = float(self.handles['rho'].product()[0])
119  self.rho = rho
120 
121  ## Read jets, if necessary recalibrate and shift MET
122  if self.cfg_ana.copyJetsByValue:
123  import ROOT
124  allJets = map(lambda j:Jet(ROOT.pat.Jet(ROOT.edm.Ptr(ROOT.pat.Jet)(ROOT.edm.ProductID(),j,0))), self.handles['jets'].product()) #copy-by-value is safe if JetAnalyzer is ran more than once
125  else:
126  allJets = map(Jet, self.handles['jets'].product())
127 
128  #set dummy MC flavour for all jets in case we want to ntuplize discarded jets later
129  for jet in allJets:
130  jet.mcFlavour = 0
132  self.deltaMetFromJEC = [0.,0.]
133  self.type1METCorr = [0.,0.,0.]
134 # print "before. rho",self.rho,self.cfg_ana.collectionPostFix,'allJets len ',len(allJets),'pt', [j.pt() for j in allJets]
135  if self.doJEC:
136  if not self.recalibrateJets: # check point that things won't change
137  jetsBefore = [ (j.pt(),j.eta(),j.phi(),j.rawFactor()) for j in allJets ]
138  self.jetReCalibrator.correctAll(allJets, rho, delta=self.shiftJEC,
139  addCorr=True, addShifts=self.addJECShifts,
140  metShift=self.deltaMetFromJEC, type1METCorr=self.type1METCorr )
141  if not self.recalibrateJets:
142  jetsAfter = [ (j.pt(),j.eta(),j.phi(),j.rawFactor()) for j in allJets ]
143  if len(jetsBefore) != len(jetsAfter):
144  print "ERROR: I had to recompute jet corrections, and they rejected some of the jets:\nold = %s\n new = %s\n" % (jetsBefore,jetsAfter)
145  else:
146  for (told, tnew) in zip(jetsBefore,jetsAfter):
147  if (deltaR2(told[1],told[2],tnew[1],tnew[2])) > 0.0001:
148  print "ERROR: I had to recompute jet corrections, and one jet direction moved: old = %s, new = %s\n" % (told, tnew)
149  elif abs(told[0]-tnew[0])/(told[0]+tnew[0]) > 0.5e-3 or abs(told[3]-tnew[3]) > 0.5e-3:
150  print "ERROR: I had to recompute jet corrections, and one jet pt or corr changed: old = %s, new = %s\n" % (told, tnew)
151  self.allJetsUsedForMET = allJets
152 # print "after. rho",self.rho,self.cfg_ana.collectionPostFix,'allJets len ',len(allJets),'pt', [j.pt() for j in allJets]
153 
154  if self.cfg_comp.isMC:
155  self.genJets = [ x for x in self.handles['genJet'].product() ]
156  if self.cfg_ana.do_mc_match:
157  for igj, gj in enumerate(self.genJets):
158  gj.index = igj
159  self.matchJets(event, allJets)
160  if getattr(self.cfg_ana, 'smearJets', False):
161  self.smearJets(event, allJets)
162 
163 
164 
deltaMetFromJEC
Read jets, if necessary recalibrate and shift MET.
Definition: JetAnalyzer.py:131
Definition: Jet.py:1
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double deltaR2(const T1 &t1, const T2 &t2)
Definition: deltaR.h:36
def objects.JetAnalyzer.JetAnalyzer.smearJets (   self,
  event,
  jets 
)

Definition at line 426 of file JetAnalyzer.py.

References objects.JetAnalyzer.JetAnalyzer.smearJets.

427  def smearJets(self, event, jets):
428  # https://twiki.cern.ch/twiki/bin/viewauth/CMS/TWikiTopRefSyst#Jet_energy_resolution
429  for jet in jets:
430  gen = jet.mcJet
431  if gen != None:
432  genpt, jetpt, aeta = gen.pt(), jet.pt(), abs(jet.eta())
433  # from https://twiki.cern.ch/twiki/bin/view/CMS/JetResolution
434  #8 TeV tables
435  factor = shiftJERfactor(self.shiftJER, aeta)
436  ptscale = max(0.0, (jetpt + (factor-1)*(jetpt-genpt))/jetpt)
437  #print "get with pt %.1f (gen pt %.1f, ptscale = %.3f)" % (jetpt,genpt,ptscale)
438  jet.deltaMetFromJetSmearing = [ -(ptscale-1)*jet.rawFactor()*jet.px(), -(ptscale-1)*jet.rawFactor()*jet.py() ]
439  if ptscale != 0:
440  jet.setP4(jet.p4()*ptscale)
441  # leave the uncorrected unchanged for sync
442  jet.setRawFactor(jet.rawFactor()/ptscale)
443  #else: print "jet with pt %.1d, eta %.2f is unmatched" % (jet.pt(), jet.eta())
444  if (self.shiftJER==0) and (self.addJERShifts):
445  setattr(jet, "corrJER", ptscale )
446  factorJERUp= shiftJERfactor(1, aeta)
447  ptscaleJERUp = max(0.0, (jetpt + (factorJERUp-1)*(jetpt-genpt))/jetpt)
448  setattr(jet, "corrJERUp", ptscaleJERUp)
449  factorJERDown= shiftJERfactor(-1, aeta)
450  ptscaleJERDown = max(0.0, (jetpt + (factorJERDown-1)*(jetpt-genpt))/jetpt)
451  setattr(jet, "corrJERDown", ptscaleJERDown)
452 
453 
454 
455 
456 
setattr(JetAnalyzer,"defaultConfig", cfg.Analyzer(
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
def objects.JetAnalyzer.JetAnalyzer.testJetID (   self,
  jet 
)

Definition at line 360 of file JetAnalyzer.py.

References objects.JetAnalyzer.JetAnalyzer.doPuId.

361  def testJetID(self, jet):
362  jet.puJetIdPassed = jet.puJetId()
363  jet.pfJetIdPassed = jet.jetID('POG_PFID_Loose')
364  if self.cfg_ana.relaxJetId:
365  return True
366  else:
367  return jet.pfJetIdPassed and (jet.puJetIdPassed or not(self.doPuId))
def objects.JetAnalyzer.JetAnalyzer.testJetNoID (   self,
  jet 
)

Definition at line 368 of file JetAnalyzer.py.

References funct.abs().

369  def testJetNoID( self, jet ):
370  # 2 is loose pile-up jet id
371  return jet.pt() > self.cfg_ana.jetPt and \
372  abs( jet.eta() ) < self.cfg_ana.jetEta;
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

Member Data Documentation

objects.JetAnalyzer.JetAnalyzer.addJECShifts = False,
static

Definition at line 478 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.addJERShifts

Definition at line 109 of file JetAnalyzer.py.

int objects.JetAnalyzer.JetAnalyzer.addJERShifts = 0
static

Definition at line 485 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.allJetsUsedForMET

Definition at line 150 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.alwaysCleanPhotons = False,
static

Definition at line 489 of file JetAnalyzer.py.

string objects.JetAnalyzer.JetAnalyzer.applyL2L3Residual = 'Data'
static

Definition at line 475 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.attachNeutrinos = True,
static

Definition at line 492 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.bqObjects

Definition at line 382 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.calculateSeparateCorrections = False,
static

Definition at line 482 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.calculateType1METCorrection = False,
static

Definition at line 483 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.checkLeptonPFOverlap = True,
static

Definition at line 473 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.class_object = JetAnalyzer,
static

Definition at line 457 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.cleanGenJetsFromPhoton = False,
static

Definition at line 491 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.cleanJetsFromFirstPhoton = False,
static

Definition at line 486 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.cleanJetsFromIsoTracks = False,
static

Definition at line 488 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.cleanJetsFromTaus = False,
static

Definition at line 487 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.cleanSelectedLeptons = True,
static

Definition at line 467 of file JetAnalyzer.py.

string objects.JetAnalyzer.JetAnalyzer.collectionPostFix = ""
static

Definition at line 494 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.copyJetsByValue = False,
static

Definition at line 459 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.cqObjects

Definition at line 383 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.deltaMetFromJEC

Read jets, if necessary recalibrate and shift MET.

Definition at line 131 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.do_mc_match = True,
static

Definition at line 490 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.doJEC

Definition at line 80 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.doPuId = False,
static

Definition at line 471 of file JetAnalyzer.py.

Referenced by objects.JetAnalyzer.JetAnalyzer.testJetID().

objects.JetAnalyzer.JetAnalyzer.doQG = False,
static

Definition at line 472 of file JetAnalyzer.py.

string objects.JetAnalyzer.JetAnalyzer.genJetCol = 'slimmedGenJets'
static

Definition at line 460 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.genJets

Definition at line 154 of file JetAnalyzer.py.

Referenced by objects.JetAnalyzer.JetAnalyzer.matchJets().

objects.JetAnalyzer.JetAnalyzer.genNuSelection = lambdanu:True,
static

Definition at line 493 of file JetAnalyzer.py.

tuple objects.JetAnalyzer.JetAnalyzer.has_overlaps = p1.key()
static

Definition at line 190 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.heaviestQCDFlavour

Definition at line 406 of file JetAnalyzer.py.

tuple objects.JetAnalyzer.JetAnalyzer.incleptons = event.inclusiveLeptonsifhasattr(event, 'inclusiveLeptons')
static

Jet Id, after jet/lepton cleaning.

Jet Id, after jet/photon cleaning Associate jets to leptons

Definition at line 275 of file JetAnalyzer.py.

string objects.JetAnalyzer.JetAnalyzer.jecPath = ""
static

Definition at line 481 of file JetAnalyzer.py.

list objects.JetAnalyzer.JetAnalyzer.jet = jlpairs[lep]
static

Definition at line 281 of file JetAnalyzer.py.

string objects.JetAnalyzer.JetAnalyzer.jetCol = 'slimmedJets'
static

Definition at line 458 of file JetAnalyzer.py.

float objects.JetAnalyzer.JetAnalyzer.jetEta = 4.7
static

Definition at line 463 of file JetAnalyzer.py.

float objects.JetAnalyzer.JetAnalyzer.jetEtaCentral = 2.4
static

Definition at line 464 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.jetGammaDR

Definition at line 98 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.jetLepArbitration

Definition at line 95 of file JetAnalyzer.py.

tuple objects.JetAnalyzer.JetAnalyzer.jetLepArbitration = (lambda jet,lepton : lepton)
static

Definition at line 466 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.jetLepDR

Definition at line 94 of file JetAnalyzer.py.

float objects.JetAnalyzer.JetAnalyzer.jetLepDR = 0.4
static

Definition at line 465 of file JetAnalyzer.py.

list objects.JetAnalyzer.JetAnalyzer.jetNus = [x for x in event.genParticles if abs(x.pdgId()) in [12,14,16] and self.cfg_ana.genNuSelection(x) ]
static

Definition at line 309 of file JetAnalyzer.py.

int objects.JetAnalyzer.JetAnalyzer.jetPt = 25
static

Definition at line 462 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.jetReCalibrator

Definition at line 92 of file JetAnalyzer.py.

list objects.JetAnalyzer.JetAnalyzer.jetsEtaCut = [j for j in self.jets if abs(j.eta()) < self.cfg_ana.jetEta ]
static

Definition at line 209 of file JetAnalyzer.py.

tuple objects.JetAnalyzer.JetAnalyzer.jlpairs = matchObjectCollection(incleptons, allJets, self.jetLepDR**2)
static

Definition at line 276 of file JetAnalyzer.py.

tuple objects.JetAnalyzer.JetAnalyzer.jtaupairs = matchObjectCollection( taus, allJets, self.jetLepDR**2)
static

Definition at line 288 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.lepPtMin

Definition at line 96 of file JetAnalyzer.py.

list objects.JetAnalyzer.JetAnalyzer.leps_with_overlaps = []
static

Apply jet selection.

Definition at line 183 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.lepSelCut = lambdalep:True,
static

Definition at line 469 of file JetAnalyzer.py.

list JetAnalyzer.leptons = []
static

Sort Jets by pT.

Definition at line 168 of file JetAnalyzer.py.

int objects.JetAnalyzer.JetAnalyzer.minLepPt = 10
static

Definition at line 468 of file JetAnalyzer.py.

tuple objects.JetAnalyzer.JetAnalyzer.p1 = jet.sourceCandidatePtr(i)
static

Definition at line 186 of file JetAnalyzer.py.

tuple objects.JetAnalyzer.JetAnalyzer.p2 = lep.sourceCandidatePtr(j)
static

Definition at line 189 of file JetAnalyzer.py.

tuple objects.JetAnalyzer.JetAnalyzer.pairs = matchObjectCollection(jetNus, self.genJets, 0.4**2)
static

Definition at line 310 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.partons

Definition at line 385 of file JetAnalyzer.py.

list JetAnalyzer.photons = []
static

First cleaning, then Jet Id.

Clean Jets from photons (first cleaning, then Jet Id)

Definition at line 234 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.qglcalc

Definition at line 101 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.recalibrateJets = False,
static

Definition at line 474 of file JetAnalyzer.py.

string objects.JetAnalyzer.JetAnalyzer.recalibrationType = "AK4PFchs"
static

Definition at line 476 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.relaxJetId = False,
static

Definition at line 470 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.rho

Definition at line 118 of file JetAnalyzer.py.

Referenced by Lepton.Lepton.absIsoFromEA(), Muon.Muon.absIsoWithFSR(), Electron.Electron.absIsoWithFSR(), Photon.Photon.chargedHadronIso(), Electron.Electron.electronID(), Electron.Electron.mvaNonTrigV0(), Electron.Electron.mvaRun2(), Electron.Electron.mvaTrigNoIPV0(), Electron.Electron.mvaTrigV0(), Photon.Photon.neutralHadronIso(), and Photon.Photon.photonIso().

tuple objects.JetAnalyzer.JetAnalyzer.rho = ('fixedGridRhoFastjetAll','','')
static

Definition at line 461 of file JetAnalyzer.py.

Referenced by Lepton.Lepton.absIsoFromEA(), Muon.Muon.absIsoWithFSR(), Electron.Electron.absIsoWithFSR(), Photon.Photon.chargedHadronIso(), Electron.Electron.electronID(), Electron.Electron.mvaNonTrigV0(), Electron.Electron.mvaRun2(), Electron.Electron.mvaTrigNoIPV0(), Electron.Electron.mvaTrigV0(), Photon.Photon.neutralHadronIso(), and Photon.Photon.photonIso().

objects.JetAnalyzer.JetAnalyzer.shiftJEC

Definition at line 71 of file JetAnalyzer.py.

int objects.JetAnalyzer.JetAnalyzer.shiftJEC = 0
static

Definition at line 477 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.shiftJER

Definition at line 108 of file JetAnalyzer.py.

int objects.JetAnalyzer.JetAnalyzer.shiftJER = 0
static

Definition at line 480 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.smearJets = True,
static

Definition at line 479 of file JetAnalyzer.py.

Referenced by objects.JetAnalyzer.JetAnalyzer.smearJets().

tuple objects.JetAnalyzer.JetAnalyzer.taus = getattr(event,'selectedTaus',[])
static

Associate jets to taus.

Definition at line 287 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.type1METCorr

Definition at line 132 of file JetAnalyzer.py.

dictionary objects.JetAnalyzer.JetAnalyzer.type1METParams = { 'jetPtThreshold':15., 'skipEMfractionThreshold':0.9, 'skipMuons':True }
static

Definition at line 484 of file JetAnalyzer.py.

Referenced by JetReCalibrator.JetReCalibrator.correct(), and JetReCalibrator.JetReCalibrator.rawP4forType1MET_().