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 31 of file enablePileUpCorrection.py.

00032                                                                            :
00033     """
00034     Enables the pile-up correction for jets in a PF2PAT+PAT sequence
00035     to be called after the usePF2PAT function.
00036     """
00037 
00038     enablePileUpCorrectionInPF2PAT( process, postfix, sequence)
00039     enablePileUpCorrectionInPAT( process, postfix, sequence)
00040 
00041 
def enablePileUpCorrection::enablePileUpCorrectionInPAT (   process,
  postfix,
  sequence 
)

Definition at line 23 of file enablePileUpCorrection.py.

00024                                                              :
00025     # PAT specific stuff:
00026 
00027     jetCorrFactors = getattr(process,"patJetCorrFactors"+postfix)
00028     # using non-pileup-charged-hadron-substracted kt6PFJets consistently with JetMET recommendation
00029     jetCorrFactors.rho = cms.InputTag("kt6PFJets", "rho")
00030 

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     # adding goodOfflinePrimaryVertices before pfPileUp
00019     process.load('CommonTools.ParticleFlow.goodOfflinePrimaryVertices_cfi')   
00020     getattr(process, 'pfNoPileUpSequence'+postfix).replace( getattr(process,"pfPileUp"+postfix),
00021                                                             process.goodOfflinePrimaryVertices +
00022                                                             getattr(process,"pfPileUp"+postfix) )