CMS 3D CMS Logo

particlelevel_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
3 
4 
5 
6 
7 
8 mergedGenParticles = cms.EDProducer("MergedGenParticleProducer",
9  inputPruned = cms.InputTag("prunedGenParticles"),
10  inputPacked = cms.InputTag("packedGenParticles"),
11 )
12 
13 genParticles2HepMC = cms.EDProducer("GenParticles2HepMCConverter",
14  genParticles = cms.InputTag("mergedGenParticles"),
15  genEventInfo = cms.InputTag("generator"),
16  signalParticlePdgIds = cms.vint32(),
17 )
18 
19 genParticles2HepMCHiggsVtx = cms.EDProducer("GenParticles2HepMCConverter",
20  genParticles = cms.InputTag("mergedGenParticles"),
21  genEventInfo = cms.InputTag("generator"),
22  signalParticlePdgIds = cms.vint32(25),
23 )
24 
25 
26 particleLevel = cms.EDProducer("ParticleLevelProducer",
27  src = cms.InputTag("genParticles2HepMC:unsmeared"),
28 
29  usePromptFinalStates = cms.bool(True), # for leptons, photons, neutrinos
30  excludePromptLeptonsFromJetClustering = cms.bool(False),
31  excludeNeutrinosFromJetClustering = cms.bool(True),
32 
33  particleMinPt = cms.double(0.),
34  particleMaxEta = cms.double(5.), # HF range. Maximum 6.0 on MiniAOD
35 
36  lepConeSize = cms.double(0.1), # for photon dressing
37  lepMinPt = cms.double(15.),
38  lepMaxEta = cms.double(2.5),
39 
40  jetConeSize = cms.double(0.4),
41  jetMinPt = cms.double(10.),
42  jetMaxEta = cms.double(999.),
43 
44  fatJetConeSize = cms.double(0.8),
45  fatJetMinPt = cms.double(170.),
46  fatJetMaxEta = cms.double(999.),
47 
48  phoIsoConeSize = cms.double(0.4),
49  phoMaxRelIso = cms.double(0.5),
50  phoMinPt = cms.double(10),
51  phoMaxEta = cms.double(2.5),
52 )
53 
54 rivetProducerHTXS = cms.EDProducer('HTXSRivetProducer',
55  HepMCCollection = cms.InputTag('genParticles2HepMCHiggsVtx','unsmeared'),
56  LHERunInfo = cms.InputTag('externalLHEProducer'),
57  ProductionMode = cms.string('AUTO'),
58 )
59 
60 
61 
62 rivetLeptonTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
63  src = cms.InputTag("particleLevel:leptons"),
64  cut = cms.string(""),
65  name= cms.string("GenDressedLepton"),
66  doc = cms.string("Dressed leptons from Rivet-based ParticleLevelProducer"),
67  singleton = cms.bool(False), # the number of entries is variable
68  extension = cms.bool(False), # this is the main table
69  externalVariables = cms.PSet(
70  hasTauAnc = ExtVar(cms.InputTag("tautagger"),bool, doc="true if Dressed lepton has a tau as ancestor"),
71  ),
72  variables = cms.PSet(
73  P4Vars,
74  pdgId = Var("pdgId", int, doc="PDG id"),
75  )
76 )
77 
78 rivetPhotonTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
79  src = cms.InputTag("particleLevel:photons"),
80  cut = cms.string(""),
81  name= cms.string("GenIsolatedPhoton"),
82  doc = cms.string("Isolated photons from Rivet-based ParticleLevelProducer"),
83  singleton = cms.bool(False), # the number of entries is variable
84  extension = cms.bool(False), # this is the main table
85  variables = cms.PSet(
86  P4Vars
87  )
88 )
89 
90 tautagger = cms.EDProducer("GenJetTauTaggerProducer",
91  src = rivetLeptonTable.src,
92 )
93 
94 #rivetJetTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
95 # src = cms.InputTag("particleLevel:jets"),
96 # cut = cms.string(""),
97 # name= cms.string("RivetJet"),
98 # doc = cms.string("AK4 jets from Rivet-based ParticleLevelProducer"),
99 # singleton = cms.bool(False), # the number of entries is variable
100 # extension = cms.bool(False),
101 # variables = cms.PSet(
102 # # Identical to GenJets, so we just extend their flavor information
103 # P4Vars,
104 # hadronFlavour = Var("pdgId", int, doc="PDG id"),
105 # )
106 #)
107 
108 #rivetFatJetTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
109 # src = cms.InputTag("particleLevel:fatjets"),
110 # cut = cms.string(""),
111 # name= cms.string("GenFatJet"),
112 # doc = cms.string("AK8 jets from Rivet-based ParticleLevelProducer"),
113 # singleton = cms.bool(False), # the number of entries is variable
114 # extension = cms.bool(False), # this is the main table
115 # variables = cms.PSet(
116 # P4Vars,
117 # hadronFlavour = Var("pdgId", int, doc="PDG id"),
118 # )
119 #)
120 
121 #rivetTagTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
122 # src = cms.InputTag("particleLevel:tags"),
123 # cut = cms.string(""),
124 # name= cms.string("RivetTag"),
125 # doc = cms.string("Tag particles from Rivet-based ParticleLevelProducer, momenta scaled down by 10e-20"),
126 # singleton = cms.bool(False), # the number of entries is variable
127 # extension = cms.bool(False), # this is the main table
128 # variables = cms.PSet(
129 # P4Vars,
130 # pdgId = Var("pdgId", int, doc="PDG id"),
131 # )
132 #)
133 
134 rivetMetTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
135  src = cms.InputTag("particleLevel:mets"),
136  name = cms.string("MET"),
137  doc = cms.string("MET from Rivet-based ParticleLevelProducer in fiducial volume abs(eta)<5"),
138  singleton = cms.bool(True), # there's always exactly one MET per event
139  extension = cms.bool(True), # this is the main table
140  variables = cms.PSet(
141  fiducialGenPt = Var("pt", float, precision=10),
142  fiducialGenPhi = Var("phi", float, precision=10),
143  ),
144 )
145 
146 HTXSCategoryTable = cms.EDProducer("SimpleHTXSFlatTableProducer",
147  src = cms.InputTag("rivetProducerHTXS","HiggsClassification"),
148  cut = cms.string(""),
149  name = cms.string("HTXS"),
150  doc = cms.string("HTXS classification"),
151  singleton = cms.bool(True),
152  extension = cms.bool(False),
153  variables=cms.PSet(
154  stage_0 = Var("stage0_cat",int, doc="HTXS stage-0 category"),
155  stage_1_pTjet30 = Var("stage1_cat_pTjet30GeV",int, doc="HTXS stage-1 category (jet pt>30 GeV)"),
156  stage_1_pTjet25 = Var("stage1_cat_pTjet25GeV",int, doc="HTXS stage-1 category (jet pt>25 GeV)"),
157  stage1_1_cat_pTjet30GeV = Var("stage1_1_cat_pTjet30GeV",int,doc="HTXS stage-1.1 category(jet pt>30 GeV)"),
158  stage1_1_cat_pTjet25GeV = Var("stage1_1_cat_pTjet25GeV",int,doc="HTXS stage-1.1 category(jet pt>25 GeV)"),
159  stage1_1_fine_cat_pTjet30GeV = Var("stage1_1_fine_cat_pTjet30GeV",int,doc="HTXS stage-1.1-fine category(jet pt>30 GeV)"),
160  stage1_1_fine_cat_pTjet25GeV = Var("stage1_1_fine_cat_pTjet25GeV",int,doc="HTXS stage-1.1-fine category(jet pt>25 GeV)"),
161  stage1_2_cat_pTjet30GeV = Var("stage1_2_cat_pTjet30GeV",int,doc="HTXS stage-1.2 category(jet pt>30 GeV)"),
162  stage1_2_cat_pTjet25GeV = Var("stage1_2_cat_pTjet25GeV",int,doc="HTXS stage-1.2 category(jet pt>25 GeV)"),
163  stage1_2_fine_cat_pTjet30GeV = Var("stage1_2_fine_cat_pTjet30GeV",int,doc="HTXS stage-1.2-fine category(jet pt>30 GeV)"),
164  stage1_2_fine_cat_pTjet25GeV = Var("stage1_2_fine_cat_pTjet25GeV",int,doc="HTXS stage-1.2-fine category(jet pt>25 GeV)"),
165  Higgs_pt = Var("higgs.Pt()",float, doc="pt of the Higgs boson as identified in HTXS", precision=14),
166  Higgs_y = Var("higgs.Rapidity()",float, doc="rapidity of the Higgs boson as identified in HTXS", precision=12),
167  njets30 = Var("jets30.size()","uint8", doc="number of jets with pt>30 GeV as identified in HTXS"),
168  njets25 = Var("jets25.size()","uint8", doc="number of jets with pt>25 GeV as identified in HTXS"),
169  )
170 )
171 
172 
173 particleLevelSequence = cms.Sequence(mergedGenParticles + genParticles2HepMC + particleLevel + tautagger + genParticles2HepMCHiggsVtx + rivetProducerHTXS)
174 particleLevelTables = cms.Sequence(rivetLeptonTable + rivetPhotonTable + rivetMetTable + HTXSCategoryTable)
common_cff
common_cff.Var
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
Definition: common_cff.py:20
common_cff.ExtVar
def ExtVar(tag, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
Definition: common_cff.py:31