CMS 3D CMS Logo

protons_cff.py
Go to the documentation of this file.
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
9 
10 singleRPProtons = True
11 
12 filteredProtons = ppsFilteredProtonProducer.clone(
13  protons_single_rp = cms.PSet(
14  include = cms.bool(singleRPProtons)
15  )
16 )
17 
18 protonTable = cms.EDProducer("ProtonProducer",
19  tagRecoProtonsMulti = cms.InputTag("filteredProtons", "multiRP"),
20  tagTrackLite = cms.InputTag("ctppsLocalTrackLiteProducer"),
21  storeSingleRPProtons = cms.bool(singleRPProtons)
22 )
23 protonTable.tagRecoProtonsSingle = cms.InputTag("filteredProtons" if singleRPProtons else "ctppsProtons","singleRP")
24 
25 
26 multiRPTable = cms.EDProducer("SimpleProtonTrackFlatTableProducer",
27  src = cms.InputTag("filteredProtons","multiRP"),
28  cut = cms.string(""),
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),
34  variables = cms.PSet(
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),
41  ),
42  externalVariables = cms.PSet(
43  arm = ExtVar("protonTable:arm",int,doc="0 = sector45, 1 = sector56"),
44  ),
45 )
46 
47 singleRPTable = cms.EDProducer("SimpleProtonTrackFlatTableProducer",
48  src = cms.InputTag("filteredProtons","singleRP"),
49  cut = cms.string(""),
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),
55  variables = cms.PSet(
56  xi = Var("xi",float,doc="xi or dp/p",precision=12),
57  thetaY = Var("thetaY",float,doc="th y",precision=10),
58  ),
59  externalVariables = cms.PSet(
60  decRPId = ExtVar("protonTable:protonRPId",int,doc="Detector ID",precision=8),
61  ),
62 )
63 
64 protonTables = cms.Sequence(
65  filteredProtons
66  +protonTable
67  +multiRPTable
68 )
69 
70 if singleRPProtons: protonTables.insert(protonTables.index(multiRPTable),singleRPTable)
71 
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())
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
ppsFilteredProtonProducer_cfi