1 import FWCore.ParameterSet.Config
as cms
3 from PhysicsTools.NanoAOD.genProtonTable_cfi
import genProtonTable
as _genproton
4 from PhysicsTools.NanoAOD.simpleProtonTrackFlatTableProducer_cfi
import simpleProtonTrackFlatTableProducer
8 protonTable = cms.EDProducer(
"ProtonProducer",
9 tagRecoProtonsSingle = cms.InputTag(
"ctppsProtons",
"singleRP"),
10 tagRecoProtonsMulti = cms.InputTag(
"ctppsProtons",
"multiRP"),
11 tagTrackLite = cms.InputTag(
"ctppsLocalTrackLiteProducer"),
12 storeSingleRPProtons = cms.bool(singleRPProtons)
15 multiRPTable = simpleProtonTrackFlatTableProducer.clone(
16 src = cms.InputTag(
"ctppsProtons",
"multiRP"),
17 name = cms.string(
"Proton_multiRP"),
18 doc = cms.string(
"bon"),
19 skipNonExistingSrc = cms.bool(
True),
21 xi =
Var(
"xi",float,doc=
"xi or dp/p",precision=12),
22 thetaX =
Var(
"thetaX",float,doc=
"theta x",precision=13),
23 thetaY =
Var(
"thetaY",float,doc=
"theta y",precision=13),
24 t =
Var(
"t",float,doc=
"Mandelstam variable t",precision=13),
25 time =
Var(
"time()",float,doc=
"time",precision=16),
26 timeUnc =
Var(
"timeError",float,doc=
"time uncertainty",precision=13),
28 externalVariables = cms.PSet(
29 arm =
ExtVar(
"protonTable:arm",
"uint8", doc=
"0 = sector45, 1 = sector56"),
33 singleRPTable = simpleProtonTrackFlatTableProducer.clone(
34 src = cms.InputTag(
"ctppsProtons",
"singleRP"),
35 name = cms.string(
"Proton_singleRP"),
36 doc = cms.string(
"bon"),
37 skipNonExistingSrc = cms.bool(
True),
39 xi =
Var(
"xi",float,doc=
"xi or dp/p",precision=12),
40 thetaY =
Var(
"thetaY",float,doc=
"th y",precision=10),
42 externalVariables = cms.PSet(
43 decRPId =
ExtVar(
"protonTable:protonRPId",
"int16",doc=
"Detector ID"),
47 protonTablesTask = cms.Task(protonTable,multiRPTable)
48 if singleRPProtons: protonTablesTask.add(singleRPTable)
51 genProtonTable = _genproton.clone(
52 cut = cms.string(
'(pdgId == 2212) && (abs(pz) > 5200) && (abs(pz) < 6467.5)')
55 genProtonTablesTask = cms.Task(genProtonTable)
def ExtVar(tag, valtype, doc=None, precision=-1)
def Var(expr, valtype, doc=None, precision=-1)