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
 
 jetGammaLepDR
 
 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,
 
 cleanFromLepAndGammaSimultaneously = False,
 
 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
 
float jetGammaDR = 0.4
 
float jetGammaLepDR = 0.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.

Member Function Documentation

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

Definition at line 121 of file JetAnalyzer.py.

def objects.JetAnalyzer.JetAnalyzer.declareHandles (   self)

Definition at line 113 of file JetAnalyzer.py.

def objects.JetAnalyzer.JetAnalyzer.jetFlavour (   self,
  event 
)

Definition at line 393 of file JetAnalyzer.py.

def objects.JetAnalyzer.JetAnalyzer.matchJets (   self,
  event,
  jets 
)

Definition at line 428 of file JetAnalyzer.py.

def objects.JetAnalyzer.JetAnalyzer.process (   self,
  event 
)

Definition at line 124 of file JetAnalyzer.py.

def objects.JetAnalyzer.JetAnalyzer.smearJets (   self,
  event,
  jets 
)

Definition at line 446 of file JetAnalyzer.py.

def objects.JetAnalyzer.JetAnalyzer.testJetID (   self,
  jet 
)

Definition at line 380 of file JetAnalyzer.py.

def objects.JetAnalyzer.JetAnalyzer.testJetNoID (   self,
  jet 
)

Definition at line 388 of file JetAnalyzer.py.

Member Data Documentation

objects.JetAnalyzer.JetAnalyzer.addJECShifts = False,
static

Definition at line 498 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.addJERShifts

Definition at line 118 of file JetAnalyzer.py.

int objects.JetAnalyzer.JetAnalyzer.addJERShifts = 0
static

Definition at line 505 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.allJetsUsedForMET

Definition at line 160 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.alwaysCleanPhotons = False,
static

Definition at line 509 of file JetAnalyzer.py.

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

Definition at line 495 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.attachNeutrinos = True,
static

Definition at line 515 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.bqObjects

Definition at line 402 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.calculateSeparateCorrections = False,
static

Definition at line 502 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.calculateType1METCorrection = False,
static

Definition at line 503 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.checkLeptonPFOverlap = True,
static

Definition at line 493 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.class_object = JetAnalyzer,
static

Definition at line 477 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.cleanFromLepAndGammaSimultaneously = False,
static

Definition at line 513 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.cleanGenJetsFromPhoton = False,
static

Definition at line 511 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.cleanJetsFromFirstPhoton = False,
static

Definition at line 506 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.cleanJetsFromIsoTracks = False,
static

Definition at line 508 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.cleanJetsFromTaus = False,
static

Definition at line 507 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.cleanSelectedLeptons = True,
static

Definition at line 487 of file JetAnalyzer.py.

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

Definition at line 517 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.copyJetsByValue = False,
static

Definition at line 479 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.cqObjects

Definition at line 403 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.deltaMetFromJEC

Read jets, if necessary recalibrate and shift MET.

Definition at line 141 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.do_mc_match = True,
static

Definition at line 510 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 491 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.doQG = False,
static

Definition at line 492 of file JetAnalyzer.py.

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

Definition at line 480 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.genJets

Definition at line 164 of file JetAnalyzer.py.

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

Definition at line 516 of file JetAnalyzer.py.

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

Definition at line 201 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.heaviestQCDFlavour

Definition at line 426 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 295 of file JetAnalyzer.py.

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

Definition at line 501 of file JetAnalyzer.py.

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

Definition at line 301 of file JetAnalyzer.py.

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

Definition at line 478 of file JetAnalyzer.py.

float objects.JetAnalyzer.JetAnalyzer.jetEta = 4.7
static

Definition at line 483 of file JetAnalyzer.py.

float objects.JetAnalyzer.JetAnalyzer.jetEtaCentral = 2.4
static

Definition at line 484 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.jetGammaDR

Definition at line 98 of file JetAnalyzer.py.

float objects.JetAnalyzer.JetAnalyzer.jetGammaDR = 0.4
static

Definition at line 512 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.jetGammaLepDR

Definition at line 99 of file JetAnalyzer.py.

float objects.JetAnalyzer.JetAnalyzer.jetGammaLepDR = 0.4
static

Definition at line 514 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 486 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 485 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 329 of file JetAnalyzer.py.

int objects.JetAnalyzer.JetAnalyzer.jetPt = 25
static

Definition at line 482 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 220 of file JetAnalyzer.py.

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

Definition at line 296 of file JetAnalyzer.py.

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

Definition at line 308 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 194 of file JetAnalyzer.py.

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

Definition at line 489 of file JetAnalyzer.py.

list JetAnalyzer.leptons = []
static

Sort Jets by pT.

Definition at line 179 of file JetAnalyzer.py.

int objects.JetAnalyzer.JetAnalyzer.minLepPt = 10
static

Definition at line 488 of file JetAnalyzer.py.

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

Definition at line 197 of file JetAnalyzer.py.

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

Definition at line 200 of file JetAnalyzer.py.

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

Definition at line 330 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.partons

Definition at line 405 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 245 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.qglcalc

Definition at line 110 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.recalibrateJets = False,
static

Definition at line 494 of file JetAnalyzer.py.

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

Definition at line 496 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.relaxJetId = False,
static

Definition at line 490 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.rho

Definition at line 127 of file JetAnalyzer.py.

Referenced by Lepton.Lepton.absIsoFromEA().

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

Definition at line 481 of file JetAnalyzer.py.

Referenced by Lepton.Lepton.absIsoFromEA().

objects.JetAnalyzer.JetAnalyzer.shiftJEC

Definition at line 71 of file JetAnalyzer.py.

int objects.JetAnalyzer.JetAnalyzer.shiftJEC = 0
static

Definition at line 497 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.shiftJER

Definition at line 117 of file JetAnalyzer.py.

int objects.JetAnalyzer.JetAnalyzer.shiftJER = 0
static

Definition at line 500 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.smearJets = True,
static

Definition at line 499 of file JetAnalyzer.py.

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

Associate jets to taus.

Definition at line 307 of file JetAnalyzer.py.

objects.JetAnalyzer.JetAnalyzer.type1METCorr

Definition at line 142 of file JetAnalyzer.py.

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

Definition at line 504 of file JetAnalyzer.py.