CMS 3D CMS Logo

Functions
enablePileUpCorrection Namespace Reference

Functions

def enablePileUpCorrection (process, postfix, sequence='patPF2PATSequence')
 
def enablePileUpCorrectionInPAT (process, postfix, sequence)
 
def enablePileUpCorrectionInPF2PAT (process, postfix, sequence='PF2PAT')
 

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

Definition at line 23 of file enablePileUpCorrection.py.

Referenced by enablePileUpCorrection().

23 def enablePileUpCorrectionInPAT( process, postfix, sequence ):
24  # PAT specific stuff:
25 
26  jetCorrFactors = getattr(process,"patJetCorrFactors"+postfix)
27  # using non-pileup-charged-hadron-substracted kt6PFJets consistently with JetMET recommendation
28  jetCorrFactors.rho = cms.InputTag("fixedGridRhoFastjetAll")
29 
30 
def enablePileUpCorrectionInPAT(process, postfix, sequence)
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 def enablePileUpCorrectionInPF2PAT( process, postfix, sequence='PF2PAT'):
4  """
5  Modifies the PF2PAT sequence according to the recipe of JetMET:
6  """
7 
8  # pile up subtraction
9  getattr(process,"pfNoPileUp"+postfix).enable = True
10  getattr(process,"pfPileUp"+postfix).Enable = True
11  getattr(process,"pfPileUp"+postfix).checkClosestZVertex = False
12  getattr(process,"pfPileUp"+postfix).Vertices = 'goodOfflinePrimaryVertices'
13 
14  getattr(process,"pfJets"+postfix).doAreaFastjet = True
15  getattr(process,"pfJets"+postfix).doRhoFastjet = False
16 
17  # adding goodOfflinePrimaryVertices before pfPileUp
18  process.load('CommonTools.ParticleFlow.goodOfflinePrimaryVertices_cfi')
19  getattr(process, 'pfNoPileUpSequence'+postfix).replace( getattr(process,"pfPileUp"+postfix),
20  process.goodOfflinePrimaryVertices +
21  getattr(process,"pfPileUp"+postfix) )
22 
def enablePileUpCorrectionInPF2PAT(process, postfix, sequence='PF2PAT')
def replace(string, replacements)