CMS 3D CMS Logo

Functions

enablePileUpCorrection Namespace Reference

Functions

def enablePileUpCorrection
def enablePileUpCorrectionInPAT
def enablePileUpCorrectionInPF2PAT

Function Documentation

def enablePileUpCorrection::enablePileUpCorrection (   process,
  postfix,
  sequence = 'patPF2PATSequence' 
)
Enables the pile-up correction for jets in a PF2PAT+PAT sequence
to be called after the usePF2PAT function.

Definition at line 45 of file enablePileUpCorrection.py.

00046                                                                            :
00047     """
00048     Enables the pile-up correction for jets in a PF2PAT+PAT sequence
00049     to be called after the usePF2PAT function.
00050     """
00051 
00052     enablePileUpCorrectionInPF2PAT( process, postfix, sequence)
00053     enablePileUpCorrectionInPAT( process, postfix, sequence)
00054 
00055 
def enablePileUpCorrection::enablePileUpCorrectionInPAT (   process,
  postfix,
  sequence 
)

Definition at line 38 of file enablePileUpCorrection.py.

00039                                                              :
00040     # PAT specific stuff:
00041 
00042     jetCorrFactors = getattr(process,"patJetCorrFactors"+postfix)
00043     jetCorrFactors.rho = cms.InputTag("kt6PFJets"+postfix, "rho")
00044 

def enablePileUpCorrection::enablePileUpCorrectionInPF2PAT (   process,
  postfix,
  sequence = 'PF2PAT' 
)
Modifies the PF2PAT sequence according to the recipe of JetMET:

Definition at line 3 of file enablePileUpCorrection.py.

00004                                                                         :
00005     """
00006     Modifies the PF2PAT sequence according to the recipe of JetMET:
00007     """
00008 
00009     # pile up subtraction
00010     getattr(process,"pfNoPileUp"+postfix).enable = True 
00011     getattr(process,"pfPileUp"+postfix).Enable = True 
00012     getattr(process,"pfPileUp"+postfix).checkClosestZVertex = False 
00013     getattr(process,"pfPileUp"+postfix).Vertices = 'goodOfflinePrimaryVertices'
00014 
00015     getattr(process,"pfJets"+postfix).doAreaFastjet = True
00016     getattr(process,"pfJets"+postfix).doRhoFastjet = False
00017         
00018     from RecoJets.JetProducers.kt4PFJets_cfi import kt4PFJets
00019     
00020     setattr( process, 'kt6PFJets'+postfix, kt4PFJets.clone( rParam = cms.double(0.6),
00021                                                             src = cms.InputTag('pfNoElectron'+postfix),
00022                                                             doAreaFastjet = cms.bool(True),
00023                                                             doRhoFastjet = cms.bool(True)
00024                                                             # voronoiRfact = cms.double(0.9)
00025                                                             )
00026              )
00027 
00028     # adding kt6PFJets
00029     getattr(process,'pfJetSequence'+postfix).replace( getattr(process,"pfJets"+postfix),
00030                                                       getattr(process,"kt6PFJets"+postfix) +
00031                                                       getattr(process,"pfJets"+postfix) )
00032         
00033     # adding goodOfflinePrimaryVertices before pfPileUp
00034     process.load('CommonTools.ParticleFlow.goodOfflinePrimaryVertices_cfi')   
00035     getattr(process, 'pfNoPileUpSequence'+postfix).replace( getattr(process,"pfPileUp"+postfix),
00036                                                             process.goodOfflinePrimaryVertices +
00037                                                             getattr(process,"pfPileUp"+postfix) )