CMS 3D CMS Logo

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 puppi = cms.EDProducer("PuppiProducer",#cms.PSet(#"PuppiProducer",
28  puppiDiagnostics = cms.bool(False),
29  puppiForLeptons = cms.bool(False),
30  UseFromPVLooseTight = cms.bool(False),
31  UseDeltaZCut = cms.bool(True),
32  EtaMinUseDeltaZ = cms.double(0.),
33  DeltaZCut = cms.double(0.3),
34  NumOfPUVtxsForCharged = cms.uint32(0),
35  DeltaZCutForChargedFromPUVtxs = cms.double(0.2),
36  PtMaxCharged = cms.double(0.),
37  EtaMaxCharged = cms.double(99999.),
38  PtMaxNeutrals = cms.double(200.),
39  PtMaxNeutralsStartSlope = cms.double(0.),
40  candName = cms.InputTag('particleFlow'),
41  vertexName = cms.InputTag('offlinePrimaryVertices'),
42  #candName = cms.string('packedPFCandidates'),
43  #vertexName = cms.string('offlineSlimmedPrimaryVertices'),
44  applyCHS = cms.bool (True),
45  invertPuppi = cms.bool (False),
46  useExp = cms.bool (False),
47  MinPuppiWeight = cms.double(0.01),
48  useExistingWeights = cms.bool(False),
49  useWeightsNoLep = cms.bool(False),
50  clonePackedCands = cms.bool(False), # should only be set to True for MiniAOD
51  vtxNdofCut = cms.int32(4),
52  vtxZCut = cms.double(24),
53  algos = cms.VPSet(
54  cms.PSet(
55  etaMin = cms.vdouble(0.),
56  etaMax = cms.vdouble(2.5),
57  ptMin = cms.vdouble(0.),
58  MinNeutralPt = cms.vdouble(0.2),
59  MinNeutralPtSlope = cms.vdouble(0.015),
60  RMSEtaSF = cms.vdouble(1.0),
61  MedEtaSF = cms.vdouble(1.0),
62  EtaMaxExtrap = cms.double(2.0),
63  puppiAlgos = puppiCentral
64  ),
65  cms.PSet(
66  etaMin = cms.vdouble( 2.5, 3.0),
67  etaMax = cms.vdouble( 3.0, 10.0),
68  ptMin = cms.vdouble( 0.0, 0.0),
69  MinNeutralPt = cms.vdouble( 1.7, 2.0),
70  MinNeutralPtSlope = cms.vdouble(0.08, 0.08),
71  RMSEtaSF = cms.vdouble(1.20, 0.95),
72  MedEtaSF = cms.vdouble(0.90, 0.75),
73  EtaMaxExtrap = cms.double( 2.0),
74  puppiAlgos = puppiForward
75  ),
76  # cms.PSet(
77  # etaMin = cms.double(3.0),
78  # etaMax = cms.double(10.0),
79  # ptMin = cms.double(0.0),
80  # MinNeutralPt = cms.double(2.0),
81  # MinNeutralPtSlope = cms.double(0.07),
82  # # RMSEtaSF = cms.double(1.18),
83  # # MedEtaSF = cms.double(0.4397),
84  # RMSEtaSF = cms.double(1.10),
85  # MedEtaSF = cms.double(0.90),
86  # EtaMaxExtrap = cms.double(2.0),
87  # puppiAlgos = puppiForward
88  # )
89  )
90 )
91 
92 from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
93 phase2_common.toModify(
94  puppi,
95  DeltaZCut = cms.double(0.1),
96  algos = cms.VPSet(
97  cms.PSet(
98  etaMin = cms.vdouble(0., 2.5),
99  etaMax = cms.vdouble(2.5, 3.5),
100  ptMin = cms.vdouble(0., 0.), #Normally 0
101  MinNeutralPt = cms.vdouble(0.2, 0.2),
102  MinNeutralPtSlope = cms.vdouble(0.015, 0.030),
103  RMSEtaSF = cms.vdouble(1.0, 1.0),
104  MedEtaSF = cms.vdouble(1.0, 1.0),
105  EtaMaxExtrap = cms.double(2.0),
106  puppiAlgos = puppiCentral
107  ), cms.PSet(
108  etaMin = cms.vdouble( 3.5),
109  etaMax = cms.vdouble(10.0),
110  ptMin = cms.vdouble( 0.), #Normally 0
111  MinNeutralPt = cms.vdouble( 2.0),
112  MinNeutralPtSlope = cms.vdouble(0.08),
113  RMSEtaSF = cms.vdouble(1.0 ),
114  MedEtaSF = cms.vdouble(0.75),
115  EtaMaxExtrap = cms.double( 2.0),
116  puppiAlgos = puppiForward
117  )
118  )
119 )
120 
121 from Configuration.ProcessModifiers.run2_miniAOD_UL_cff import run2_miniAOD_UL
122 run2_miniAOD_UL.toModify(
123  puppi,
124  EtaMinUseDeltaZ = 2.4,
125  PtMaxCharged = 20.,
126  PtMaxNeutralsStartSlope = 20.,
127  NumOfPUVtxsForCharged = 2,
128  algos = { 0 : dict(etaMin = {-0.01}) } # include particles with eta==0 (proper fix is in #31174)
129 )