1 import FWCore.ParameterSet.Config
as cms
3 from Configuration.Eras.Modifier_run2_miniAOD_80XLegacy_cff
import run2_miniAOD_80XLegacy
4 from Configuration.Eras.Modifier_run2_nanoAOD_94XMiniAODv1_cff
import run2_nanoAOD_94XMiniAODv1
5 from Configuration.Eras.Modifier_run2_nanoAOD_94XMiniAODv2_cff
import run2_nanoAOD_94XMiniAODv2
6 from Configuration.Eras.Modifier_run2_nanoAOD_94X2016_cff
import run2_nanoAOD_94X2016
7 from Configuration.Eras.Modifier_run2_nanoAOD_102Xv1_cff
import run2_nanoAOD_102Xv1
10 singleRPProtons =
True
12 filteredProtons = ppsFilteredProtonProducer.clone(
13 protons_single_rp = cms.PSet(
14 include = cms.bool(singleRPProtons)
18 protonTable = cms.EDProducer(
"ProtonProducer",
19 tagRecoProtonsMulti = cms.InputTag(
"filteredProtons",
"multiRP"),
20 tagTrackLite = cms.InputTag(
"ctppsLocalTrackLiteProducer"),
21 storeSingleRPProtons = cms.bool(singleRPProtons)
23 protonTable.tagRecoProtonsSingle = cms.InputTag(
"filteredProtons" if singleRPProtons
else "ctppsProtons",
"singleRP")
26 multiRPTable = cms.EDProducer(
"SimpleProtonTrackFlatTableProducer",
27 src = cms.InputTag(
"filteredProtons",
"multiRP"),
29 name = cms.string(
"Proton_multiRP"),
30 doc = cms.string(
"bon"),
31 singleton = cms.bool(
False),
32 extension = cms.bool(
False),
33 skipNonExistingSrc = cms.bool(
True),
35 xi =
Var(
"xi",float,doc=
"xi or dp/p",precision=12),
36 thetaX =
Var(
"thetaX",float,doc=
"theta x",precision=13),
37 thetaY =
Var(
"thetaY",float,doc=
"theta y",precision=13),
38 t =
Var(
"t",float,doc=
"Mandelstam variable t",precision=13),
39 time =
Var(
"time()",float,doc=
"time",precision=16),
40 timeUnc =
Var(
"timeError",float,doc=
"time uncertainty",precision=13),
42 externalVariables = cms.PSet(
43 arm =
ExtVar(
"protonTable:arm",int,doc=
"0 = sector45, 1 = sector56"),
47 singleRPTable = cms.EDProducer(
"SimpleProtonTrackFlatTableProducer",
48 src = cms.InputTag(
"filteredProtons",
"singleRP"),
50 name = cms.string(
"Proton_singleRP"),
51 doc = cms.string(
"bon"),
52 singleton = cms.bool(
False),
53 extension = cms.bool(
False),
54 skipNonExistingSrc = cms.bool(
True),
56 xi =
Var(
"xi",float,doc=
"xi or dp/p",precision=12),
57 thetaY =
Var(
"thetaY",float,doc=
"th y",precision=10),
59 externalVariables = cms.PSet(
60 decRPId =
ExtVar(
"protonTable:protonRPId",int,doc=
"Detector ID",precision=8),
64 protonTables = cms.Sequence(
70 if singleRPProtons: protonTables.insert(protonTables.index(multiRPTable),singleRPTable)
72 for modifier
in run2_miniAOD_80XLegacy, run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2, run2_nanoAOD_94X2016, run2_nanoAOD_102Xv1:
73 modifier.toReplaceWith(protonTables, cms.Sequence())