1 import FWCore.ParameterSet.Config
as cms
3 from PhysicsTools.NanoAOD.genProtonTable_cfi
import genProtonTable
as _genproton
9 filteredProtons = ppsFilteredProtonProducer.clone(
10 protons_single_rp = cms.PSet(
11 include = cms.bool(singleRPProtons)
15 protonTable = cms.EDProducer(
"ProtonProducer",
16 tagRecoProtonsMulti = cms.InputTag(
"filteredProtons",
"multiRP"),
17 tagTrackLite = cms.InputTag(
"ctppsLocalTrackLiteProducer"),
18 storeSingleRPProtons = cms.bool(singleRPProtons)
20 protonTable.tagRecoProtonsSingle = cms.InputTag(
"filteredProtons" if singleRPProtons
else "ctppsProtons",
"singleRP")
23 multiRPTable = cms.EDProducer(
"SimpleProtonTrackFlatTableProducer",
24 src = cms.InputTag(
"filteredProtons",
"multiRP"),
26 name = cms.string(
"Proton_multiRP"),
27 doc = cms.string(
"bon"),
28 singleton = cms.bool(
False),
29 extension = cms.bool(
False),
30 skipNonExistingSrc = cms.bool(
True),
32 xi =
Var(
"xi",float,doc=
"xi or dp/p",precision=12),
33 thetaX =
Var(
"thetaX",float,doc=
"theta x",precision=13),
34 thetaY =
Var(
"thetaY",float,doc=
"theta y",precision=13),
35 t =
Var(
"t",float,doc=
"Mandelstam variable t",precision=13),
36 time =
Var(
"time()",float,doc=
"time",precision=16),
37 timeUnc =
Var(
"timeError",float,doc=
"time uncertainty",precision=13),
39 externalVariables = cms.PSet(
40 arm =
ExtVar(
"protonTable:arm",int,doc=
"0 = sector45, 1 = sector56"),
44 singleRPTable = cms.EDProducer(
"SimpleProtonTrackFlatTableProducer",
45 src = cms.InputTag(
"filteredProtons",
"singleRP"),
47 name = cms.string(
"Proton_singleRP"),
48 doc = cms.string(
"bon"),
49 singleton = cms.bool(
False),
50 extension = cms.bool(
False),
51 skipNonExistingSrc = cms.bool(
True),
53 xi =
Var(
"xi",float,doc=
"xi or dp/p",precision=12),
54 thetaY =
Var(
"thetaY",float,doc=
"th y",precision=10),
56 externalVariables = cms.PSet(
57 decRPId =
ExtVar(
"protonTable:protonRPId",int,doc=
"Detector ID",precision=8),
61 protonTablesTask = cms.Task(filteredProtons,protonTable,multiRPTable)
62 if singleRPProtons: protonTablesTask.add(singleRPTable)
65 genProtonTable = _genproton.clone(
66 cut = cms.string(
'(pdgId == 2212) && (abs(pz) > 5200) && (abs(pz) < 6467.5)')
69 genProtonTablesTask = cms.Task(genProtonTable)
71 for modifier
in run2_miniAOD_80XLegacy, run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2, run2_nanoAOD_94X2016, run2_nanoAOD_102Xv1:
72 modifier.toReplaceWith(protonTablesTask, cms.Task())
74 modifier.toReplaceWith(genProtonTablesTask, cms.Task())
def ExtVar(tag, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)