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