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  puppiNoLep = cms.bool(False),
30  UseFromPVLooseTight = cms.bool(False),
31  UseDeltaZCut = cms.bool(True),
32  EtaMinUseDeltaZ = cms.double(2.4),
33  DeltaZCut = cms.double(0.3),
34  PtMaxCharged = cms.double(20.),
35  EtaMaxCharged = cms.double(99999.),
36  PtMaxPhotons = cms.double(-1.),
37  EtaMaxPhotons = cms.double(2.5),
38  PtMaxNeutrals = cms.double(200.),
39  PtMaxNeutralsStartSlope = cms.double(20.),
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  clonePackedCands = cms.bool(False), # should only be set to True for MiniAOD
50  vtxNdofCut = cms.int32(4),
51  vtxZCut = cms.double(24),
52  algos = cms.VPSet(
53  cms.PSet(
54  etaMin = cms.vdouble(0.),
55  etaMax = cms.vdouble(2.5),
56  ptMin = cms.vdouble(0.),
57  MinNeutralPt = cms.vdouble(0.2),
58  MinNeutralPtSlope = cms.vdouble(0.015),
59  RMSEtaSF = cms.vdouble(1.0),
60  MedEtaSF = cms.vdouble(1.0),
61  EtaMaxExtrap = cms.double(2.0),
62  puppiAlgos = puppiCentral
63  ),
64  cms.PSet(
65  etaMin = cms.vdouble( 2.5, 3.0),
66  etaMax = cms.vdouble( 3.0, 10.0),
67  ptMin = cms.vdouble( 0.0, 0.0),
68  MinNeutralPt = cms.vdouble( 1.7, 2.0),
69  MinNeutralPtSlope = cms.vdouble(0.08, 0.08),
70  RMSEtaSF = cms.vdouble(1.20, 0.95),
71  MedEtaSF = cms.vdouble(0.90, 0.75),
72  EtaMaxExtrap = cms.double( 2.0),
73  puppiAlgos = puppiForward
74  ),
75  # cms.PSet(
76  # etaMin = cms.double(3.0),
77  # etaMax = cms.double(10.0),
78  # ptMin = cms.double(0.0),
79  # MinNeutralPt = cms.double(2.0),
80  # MinNeutralPtSlope = cms.double(0.07),
81  # # RMSEtaSF = cms.double(1.18),
82  # # MedEtaSF = cms.double(0.4397),
83  # RMSEtaSF = cms.double(1.10),
84  # MedEtaSF = cms.double(0.90),
85  # EtaMaxExtrap = cms.double(2.0),
86  # puppiAlgos = puppiForward
87  # )
88  )
89 )
90 
91 from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
92 phase2_common.toModify(
93  puppi,
94  EtaMinUseDeltaZ = -1.,
95  PtMaxCharged = -1.,
96  PtMaxNeutralsStartSlope = 0.,
97  DeltaZCut = cms.double(0.1),
98  algos = cms.VPSet(
99  cms.PSet(
100  etaMin = cms.vdouble(0., 2.5),
101  etaMax = cms.vdouble(2.5, 3.5),
102  ptMin = cms.vdouble(0., 0.), #Normally 0
103  MinNeutralPt = cms.vdouble(0.2, 0.2),
104  MinNeutralPtSlope = cms.vdouble(0.015, 0.030),
105  RMSEtaSF = cms.vdouble(1.0, 1.0),
106  MedEtaSF = cms.vdouble(1.0, 1.0),
107  EtaMaxExtrap = cms.double(2.0),
108  puppiAlgos = puppiCentral
109  ), cms.PSet(
110  etaMin = cms.vdouble( 3.5),
111  etaMax = cms.vdouble(10.0),
112  ptMin = cms.vdouble( 0.), #Normally 0
113  MinNeutralPt = cms.vdouble( 2.0),
114  MinNeutralPtSlope = cms.vdouble(0.08),
115  RMSEtaSF = cms.vdouble(1.0 ),
116  MedEtaSF = cms.vdouble(0.75),
117  EtaMaxExtrap = cms.double( 2.0),
118  puppiAlgos = puppiForward
119  )
120  )
121 )
122 
123 puppiNoLep = puppi.clone(
124  puppiNoLep = True,
125  PtMaxPhotons = 20.
126  )