CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.

References enablePileUpCorrectionInPAT(), and enablePileUpCorrectionInPF2PAT().

31 
32 def enablePileUpCorrection( process, postfix, sequence='patPF2PATSequence'):
33  """
34  Enables the pile-up correction for jets in a PF2PAT+PAT sequence
35  to be called after the usePF2PAT function.
36  """
37 
38  enablePileUpCorrectionInPF2PAT( process, postfix, sequence)
39  enablePileUpCorrectionInPAT( process, postfix, sequence)
40 
41 
def enablePileUpCorrection.enablePileUpCorrectionInPAT (   process,
  postfix,
  sequence 
)

Definition at line 23 of file enablePileUpCorrection.py.

Referenced by enablePileUpCorrection().

23 
24 def enablePileUpCorrectionInPAT( process, postfix, sequence ):
25  # PAT specific stuff:
26 
27  jetCorrFactors = getattr(process,"patJetCorrFactors"+postfix)
28  # using non-pileup-charged-hadron-substracted kt6PFJets consistently with JetMET recommendation
29  jetCorrFactors.rho = cms.InputTag("fixedGridRhoFastjetAll")
30 
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.

References python.rootplot.root2matplotlib.replace().

Referenced by enablePileUpCorrection().

3 
4 def enablePileUpCorrectionInPF2PAT( process, postfix, sequence='PF2PAT'):
5  """
6  Modifies the PF2PAT sequence according to the recipe of JetMET:
7  """
8 
9  # pile up subtraction
10  getattr(process,"pfNoPileUp"+postfix).enable = True
11  getattr(process,"pfPileUp"+postfix).Enable = True
12  getattr(process,"pfPileUp"+postfix).checkClosestZVertex = False
13  getattr(process,"pfPileUp"+postfix).Vertices = 'goodOfflinePrimaryVertices'
14 
15  getattr(process,"pfJets"+postfix).doAreaFastjet = True
16  getattr(process,"pfJets"+postfix).doRhoFastjet = False
17 
18  # adding goodOfflinePrimaryVertices before pfPileUp
19  process.load('CommonTools.ParticleFlow.goodOfflinePrimaryVertices_cfi')
20  getattr(process, 'pfNoPileUpSequence'+postfix).replace( getattr(process,"pfPileUp"+postfix),
21  process.goodOfflinePrimaryVertices +
22  getattr(process,"pfPileUp"+postfix) )