CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Puppi_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 puppiCentral = cms.VPSet(
4  cms.PSet(
5  algoId = cms.int32(5), #0 is default Puppi
6  useCharged = cms.bool(True),
7  applyLowPUCorr = cms.bool(True),
8  combOpt = cms.int32(0),
9  cone = cms.double(0.4),
10  rmsPtMin = cms.double(0.1),
11  rmsScaleFactor = cms.double(1.0)
12  )
13  )
14 
15 puppiForward = cms.VPSet(
16  cms.PSet(
17  algoId = cms.int32(5), #0 is default Puppi
18  useCharged = cms.bool(False),
19  applyLowPUCorr = cms.bool(True),
20  combOpt = cms.int32(0),
21  cone = cms.double(0.4),
22  rmsPtMin = cms.double(0.5),
23  rmsScaleFactor = cms.double(1.0)
24  )
25  )
26 
27 # from cfipython/, generated by PuppiProducer::fillDescriptions
28 import CommonTools.PileupAlgos.PuppiProducer_cfi as _mod
29 puppi = _mod.PuppiProducer.clone(
30  EtaMinUseDeltaZ = 2.4,
31  NumOfPUVtxsForCharged = 2,
32  PtMaxCharged = 20.,
33  PtMaxNeutralsStartSlope = 20.,
34  useVertexAssociation = True,
35  vertexAssociationQuality = 6,
36  vertexAssociation = ('primaryVertexAssociationJME','original'),
37  clonePackedCands = False, # should only be set to True for MiniAOD
38  algos = {
39  0: dict(
40  puppiAlgos = puppiCentral
41  )
42  } #only one PSet is defined in reference
43 )
44 puppi.algos.append(cms.PSet(
45  etaMin = cms.vdouble( 2.5, 3.0),
46  etaMax = cms.vdouble( 3.0, 10.0),
47  ptMin = cms.vdouble( 0.0, 0.0),
48  MinNeutralPt = cms.vdouble( 1.7, 2.0),
49  MinNeutralPtSlope = cms.vdouble(0.08, 0.08),
50  RMSEtaSF = cms.vdouble(1.20, 0.95),
51  MedEtaSF = cms.vdouble(0.90, 0.75),
52  EtaMaxExtrap = cms.double( 2.0),
53  puppiAlgos = puppiForward
54  )
55 )
56  # cms.PSet(
57  # etaMin = cms.double(3.0),
58  # etaMax = cms.double(10.0),
59  # ptMin = cms.double(0.0),
60  # MinNeutralPt = cms.double(2.0),
61  # MinNeutralPtSlope = cms.double(0.07),
62  # # RMSEtaSF = cms.double(1.18),
63  # # MedEtaSF = cms.double(0.4397),
64  # RMSEtaSF = cms.double(1.10),
65  # MedEtaSF = cms.double(0.90),
66  # EtaMaxExtrap = cms.double(2.0),
67  # puppiAlgos = puppiForward
68  # )
69 
70 from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
71 phase2_common.toModify(
72  puppi,
73  EtaMinUseDeltaZ = 4.0,
74  DeltaZCut = 0.1,
75  algos = cms.VPSet(
76  cms.PSet(
77  etaMin = cms.vdouble(0., 2.5),
78  etaMax = cms.vdouble(2.5, 3.5),
79  ptMin = cms.vdouble(0., 0.), #Normally 0
80  MinNeutralPt = cms.vdouble(0.2, 0.2),
81  MinNeutralPtSlope = cms.vdouble(0.015, 0.030),
82  RMSEtaSF = cms.vdouble(1.0, 1.0),
83  MedEtaSF = cms.vdouble(1.0, 1.0),
84  EtaMaxExtrap = cms.double(2.0),
85  puppiAlgos = puppiCentral
86  ), cms.PSet(
87  etaMin = cms.vdouble( 3.5),
88  etaMax = cms.vdouble(10.0),
89  ptMin = cms.vdouble( 0.), #Normally 0
90  MinNeutralPt = cms.vdouble( 2.0),
91  MinNeutralPtSlope = cms.vdouble(0.08),
92  RMSEtaSF = cms.vdouble(1.0 ),
93  MedEtaSF = cms.vdouble(0.75),
94  EtaMaxExtrap = cms.double( 2.0),
95  puppiAlgos = puppiForward
96  )
97  )
98 )
99 
100 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
101 pp_on_AA.toModify(puppi, algos = [])
102 from Configuration.ProcessModifiers.run2_miniAOD_pp_on_AA_103X_cff import run2_miniAOD_pp_on_AA_103X
103 run2_miniAOD_pp_on_AA_103X.toModify(puppi,useVertexAssociation = False) # because the association is only run on cleanedParticleFlow
104 
105 puppiNoLep = puppi.clone(
106  puppiNoLep = True,
107  PtMaxPhotons = 20.
108  )