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 # 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  #candName = cms.string('packedPFCandidates'),
35  #vertexName = cms.string('offlineSlimmedPrimaryVertices'),
36  clonePackedCands = False, # should only be set to True for MiniAOD
37  algos = {
38  0: dict(
39  puppiAlgos = puppiCentral
40  )
41  } #only one PSet is defined in reference
42 )
43 puppi.algos.append(cms.PSet(
44  etaMin = cms.vdouble( 2.5, 3.0),
45  etaMax = cms.vdouble( 3.0, 10.0),
46  ptMin = cms.vdouble( 0.0, 0.0),
47  MinNeutralPt = cms.vdouble( 1.7, 2.0),
48  MinNeutralPtSlope = cms.vdouble(0.08, 0.08),
49  RMSEtaSF = cms.vdouble(1.20, 0.95),
50  MedEtaSF = cms.vdouble(0.90, 0.75),
51  EtaMaxExtrap = cms.double( 2.0),
52  puppiAlgos = puppiForward
53  )
54 )
55  # cms.PSet(
56  # etaMin = cms.double(3.0),
57  # etaMax = cms.double(10.0),
58  # ptMin = cms.double(0.0),
59  # MinNeutralPt = cms.double(2.0),
60  # MinNeutralPtSlope = cms.double(0.07),
61  # # RMSEtaSF = cms.double(1.18),
62  # # MedEtaSF = cms.double(0.4397),
63  # RMSEtaSF = cms.double(1.10),
64  # MedEtaSF = cms.double(0.90),
65  # EtaMaxExtrap = cms.double(2.0),
66  # puppiAlgos = puppiForward
67  # )
68 
69 from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
70 phase2_common.toModify(
71  puppi,
72  EtaMinUseDeltaZ = 4.0,
73  DeltaZCut = 0.1,
74  algos = cms.VPSet(
75  cms.PSet(
76  etaMin = cms.vdouble(0., 2.5),
77  etaMax = cms.vdouble(2.5, 3.5),
78  ptMin = cms.vdouble(0., 0.), #Normally 0
79  MinNeutralPt = cms.vdouble(0.2, 0.2),
80  MinNeutralPtSlope = cms.vdouble(0.015, 0.030),
81  RMSEtaSF = cms.vdouble(1.0, 1.0),
82  MedEtaSF = cms.vdouble(1.0, 1.0),
83  EtaMaxExtrap = cms.double(2.0),
84  puppiAlgos = puppiCentral
85  ), cms.PSet(
86  etaMin = cms.vdouble( 3.5),
87  etaMax = cms.vdouble(10.0),
88  ptMin = cms.vdouble( 0.), #Normally 0
89  MinNeutralPt = cms.vdouble( 2.0),
90  MinNeutralPtSlope = cms.vdouble(0.08),
91  RMSEtaSF = cms.vdouble(1.0 ),
92  MedEtaSF = cms.vdouble(0.75),
93  EtaMaxExtrap = cms.double( 2.0),
94  puppiAlgos = puppiForward
95  )
96  )
97 )
98 
99 puppiNoLep = puppi.clone(
100  puppiNoLep = True,
101  PtMaxPhotons = 20.
102  )
103 
104 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
105 pp_on_AA.toModify(puppi, algos = [])