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 ##################### User floats producers, selectors ##########################
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), ## for the Higgs analysis
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 
49 rivetProducerHTXS = cms.EDProducer('HTXSRivetProducer',
50  HepMCCollection = cms.InputTag('genParticles2HepMCHiggsVtx','unsmeared'),
51  LHERunInfo = cms.InputTag('externalLHEProducer'),
52  ProductionMode = cms.string('AUTO'),
53 )
54 
55 
56 ##################### Tables for final output and docs ##########################
57 rivetLeptonTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
58  src = cms.InputTag("particleLevel:leptons"),
59  cut = cms.string(""),
60  name= cms.string("GenDressedLepton"),
61  doc = cms.string("Dressed leptons from Rivet-based ParticleLevelProducer"),
62  singleton = cms.bool(False), # the number of entries is variable
63  extension = cms.bool(False), # this is the main table
64  variables = cms.PSet(
65  P4Vars,
66  pdgId = Var("pdgId", int, doc="PDG id"),
67  )
68 )
69 
70 #rivetJetTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
71 # src = cms.InputTag("particleLevel:jets"),
72 # cut = cms.string(""),
73 # name= cms.string("RivetJet"),
74 # doc = cms.string("AK4 jets from Rivet-based ParticleLevelProducer"),
75 # singleton = cms.bool(False), # the number of entries is variable
76 # extension = cms.bool(False),
77 # variables = cms.PSet(
78 # # Identical to GenJets, so we just extend their flavor information
79 # P4Vars,
80 # hadronFlavour = Var("pdgId", int, doc="PDG id"),
81 # )
82 #)
83 
84 #rivetFatJetTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
85 # src = cms.InputTag("particleLevel:fatjets"),
86 # cut = cms.string(""),
87 # name= cms.string("GenFatJet"),
88 # doc = cms.string("AK8 jets from Rivet-based ParticleLevelProducer"),
89 # singleton = cms.bool(False), # the number of entries is variable
90 # extension = cms.bool(False), # this is the main table
91 # variables = cms.PSet(
92 # P4Vars,
93 # hadronFlavour = Var("pdgId", int, doc="PDG id"),
94 # )
95 #)
96 
97 #rivetTagTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
98 # src = cms.InputTag("particleLevel:tags"),
99 # cut = cms.string(""),
100 # name= cms.string("RivetTag"),
101 # doc = cms.string("Tag particles from Rivet-based ParticleLevelProducer, momenta scaled down by 10e-20"),
102 # singleton = cms.bool(False), # the number of entries is variable
103 # extension = cms.bool(False), # this is the main table
104 # variables = cms.PSet(
105 # P4Vars,
106 # pdgId = Var("pdgId", int, doc="PDG id"),
107 # )
108 #)
109 
110 rivetMetTable = cms.EDProducer("SimpleCandidateFlatTableProducer",
111  src = cms.InputTag("particleLevel:mets"),
112  name = cms.string("MET"),
113  doc = cms.string("MET from Rivet-based ParticleLevelProducer in fiducial volume abs(eta)<5"),
114  singleton = cms.bool(True), # there's always exactly one MET per event
115  extension = cms.bool(True), # this is the main table
116  variables = cms.PSet(
117  fiducialGenPt = Var("pt", float, precision=10),
118  fiducialGenPhi = Var("phi", float, precision=10),
119  ),
120 )
121 
122 HTXSCategoryTable = cms.EDProducer("SimpleHTXSFlatTableProducer",
123  src = cms.InputTag("rivetProducerHTXS","HiggsClassification"),
124  cut = cms.string(""),
125  name = cms.string("HTXS"),
126  doc = cms.string("HTXS classification"),
127  singleton = cms.bool(True),
128  extension = cms.bool(False),
129  variables=cms.PSet(
130  stage_0 = Var("stage0_cat",int, doc="HTXS stage-0 category"),
131  stage_1_pTjet30 = Var("stage1_cat_pTjet30GeV",int, doc="HTXS stage-1 category (jet pt>30 GeV)"),
132  stage_1_pTjet25 = Var("stage1_cat_pTjet25GeV",int, doc="HTXS stage-1 category (jet pt>25 GeV)"),
133  Higgs_pt = Var("higgs.Pt()",float, doc="pt of the Higgs boson as identified in HTXS", precision=14),
134  Higgs_y = Var("higgs.Rapidity()",float, doc="rapidity of the Higgs boson as identified in HTXS", precision=12),
135  njets30 = Var("jets30.size()","uint8", doc="number of jets with pt>30 GeV as identified in HTXS"),
136  njets25 = Var("jets25.size()","uint8", doc="number of jets with pt>25 GeV as identified in HTXS"),
137  )
138 )
139 
140 
141 particleLevelSequence = cms.Sequence(mergedGenParticles + genParticles2HepMC + particleLevel + genParticles2HepMCHiggsVtx + rivetProducerHTXS)
142 particleLevelTables = cms.Sequence(rivetLeptonTable + rivetMetTable + HTXSCategoryTable)
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
Definition: common_cff.py:20