CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
protons_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
5 
6 singleRPProtons = True
7 
8 filteredProtons = ppsFilteredProtonProducer.clone(
9  protons_single_rp = cms.PSet(
10  include = cms.bool(singleRPProtons)
11  )
12 )
13 
14 protonTable = cms.EDProducer("ProtonProducer",
15  tagRecoProtonsMulti = cms.InputTag("filteredProtons", "multiRP"),
16  tagTrackLite = cms.InputTag("ctppsLocalTrackLiteProducer"),
17  storeSingleRPProtons = cms.bool(singleRPProtons)
18 )
19 protonTable.tagRecoProtonsSingle = cms.InputTag("filteredProtons" if singleRPProtons else "ctppsProtons","singleRP")
20 
21 
22 multiRPTable = cms.EDProducer("SimpleProtonTrackFlatTableProducer",
23  src = cms.InputTag("filteredProtons","multiRP"),
24  cut = cms.string(""),
25  name = cms.string("Proton_multiRP"),
26  doc = cms.string("bon"),
27  singleton = cms.bool(False),
28  extension = cms.bool(False),
29  skipNonExistingSrc = cms.bool(True),
30  variables = cms.PSet(
31  xi = Var("xi",float,doc="xi or dp/p",precision=12),
32  thetaX = Var("thetaX",float,doc="theta x",precision=13),
33  thetaY = Var("thetaY",float,doc="theta y",precision=13),
34  t = Var("t",float,doc="Mandelstam variable t",precision=13),
35  time = Var("time()",float,doc="time",precision=16),
36  timeUnc = Var("timeError",float,doc="time uncertainty",precision=13),
37  ),
38  externalVariables = cms.PSet(
39  arm = ExtVar("protonTable:arm",int,doc="0 = sector45, 1 = sector56"),
40  ),
41 )
42 
43 singleRPTable = cms.EDProducer("SimpleProtonTrackFlatTableProducer",
44  src = cms.InputTag("filteredProtons","singleRP"),
45  cut = cms.string(""),
46  name = cms.string("Proton_singleRP"),
47  doc = cms.string("bon"),
48  singleton = cms.bool(False),
49  extension = cms.bool(False),
50  skipNonExistingSrc = cms.bool(True),
51  variables = cms.PSet(
52  xi = Var("xi",float,doc="xi or dp/p",precision=12),
53  thetaY = Var("thetaY",float,doc="th y",precision=10),
54  ),
55  externalVariables = cms.PSet(
56  decRPId = ExtVar("protonTable:protonRPId",int,doc="Detector ID",precision=8),
57  ),
58 )
59 
60 protonTablesTask = cms.Task(filteredProtons,protonTable,multiRPTable)
61 if singleRPProtons: protonTablesTask.add(singleRPTable)
62 
63 for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2, run2_nanoAOD_94X2016, run2_nanoAOD_102Xv1:
64  modifier.toReplaceWith(protonTablesTask, cms.Task())
def ExtVar
Definition: common_cff.py:31