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