CMS 3D CMS Logo

base_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # load standard files (on top so as settings can be overwritten below)
5 
6 # configuration for composite source of alignment, optics, ...
8 ctppsCompositeESSource.generateEveryNEvents = 100
9 
10 profile_base = cms.PSet(
11  L_int = cms.double(1),
12 
13  # LHCInfo
14  ctppsLHCInfo = cms.PSet(
15  xangle = cms.double(-1),
16  betaStar = cms.double(-1),
17  beamEnergy = cms.double(0),
18  xangleBetaStarHistogramFile = cms.string("CalibPPS/ESProducers/data/xangle_beta_distributions/version1.root"),
19  xangleBetaStarHistogramObject = cms.string("")
20  ),
21 
22  # optics
23  ctppsOpticalFunctions = cms.PSet(
24  opticalFunctions = cms.VPSet(),
25  scoringPlanes = cms.VPSet()
26  ),
27 
28  # alignment
29  ctppsRPAlignmentCorrectionsDataXML = cms.PSet(
30  MeasuredFiles = cms.vstring(),
31  RealFiles = cms.vstring(),
32  MisalignedFiles = cms.vstring()
33  ),
34 
35  # direct simu data
36  ctppsDirectSimuData = cms.PSet(
37  empiricalAperture45 = cms.string(""),
38  empiricalAperture56 = cms.string(""),
39 
40  timeResolutionDiamonds45 = cms.string("999"),
41  timeResolutionDiamonds56 = cms.string("999"),
42 
43  efficienciesPerRP = cms.VPSet(),
44  efficienciesPerPlane = cms.VPSet()
45  )
46 )
47 
48 # beam parameters as determined by PPS
49 ctppsBeamParametersFromLHCInfoESSource = cms.ESProducer("CTPPSBeamParametersFromLHCInfoESSource",
50  lhcInfoLabel = cms.string(""),
51 
52  # beam divergence (rad)
53  beamDivX45 = cms.double(30E-6),
54  beamDivX56 = cms.double(30E-6),
55  beamDivY45 = cms.double(30E-6),
56  beamDivY56 = cms.double(30E-6),
57 
58  # vertex offset (cm)
59  vtxOffsetX45 = cms.double(0.),
60  vtxOffsetX56 = cms.double(0.),
61  vtxOffsetY45 = cms.double(0.),
62  vtxOffsetY56 = cms.double(0.),
63  vtxOffsetZ45 = cms.double(0.),
64  vtxOffsetZ56 = cms.double(0.),
65 
66  # vertex sigma (cm)
67  vtxStddevX = cms.double(10E-4),
68  vtxStddevY = cms.double(10E-4),
69  vtxStddevZ = cms.double(5)
70 )
71 
72 # particle-data table
74 
75 # random seeds
76 RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",
77  sourceSeed = cms.PSet(initialSeed = cms.untracked.uint32(98765)),
78  generator = cms.PSet(initialSeed = cms.untracked.uint32(98766)),
79  beamDivergenceVtxGenerator = cms.PSet(initialSeed = cms.untracked.uint32(3849)),
80  ctppsDirectProtonSimulation = cms.PSet(initialSeed = cms.untracked.uint32(4981))
81 )
82 
83 # default source
84 source = cms.Source("EmptySource",
85  firstRun = cms.untracked.uint32(1),
86  numberEventsInLuminosityBlock = ctppsCompositeESSource.generateEveryNEvents
87 )
88 
89 # particle generator
91 generator.xi_max = 0.25
92 generator.theta_x_sigma = 60E-6
93 generator.theta_y_sigma = 60E-6
94 
95 # beam smearing
97 
98 # direct simulation
100 ctppsDirectProtonSimulation.verbosity = 0
101 ctppsDirectProtonSimulation.hepMCTag = cms.InputTag('beamDivergenceVtxGenerator')
102 ctppsDirectProtonSimulation.roundToPitch = True
103 ctppsDirectProtonSimulation.pitchStrips = 66E-3 * 12 / 19 # effective value to reproduce real RP resolution
104 ctppsDirectProtonSimulation.pitchPixelsHor = 50E-3
105 ctppsDirectProtonSimulation.pitchPixelsVer = 80E-3
106 ctppsDirectProtonSimulation.useEmpiricalApertures = True
107 ctppsDirectProtonSimulation.produceHitsRelativeToBeam = True
108 ctppsDirectProtonSimulation.produceScoringPlaneHits = False
109 ctppsDirectProtonSimulation.produceRecHits = True
110 
111 # local reconstruction
113 
118 
119 totemRPUVPatternFinder.tagRecHit = cms.InputTag('ctppsDirectProtonSimulation')
120 ctppsPixelLocalTracks.tag = cms.InputTag('ctppsDirectProtonSimulation')
121 ctppsDiamondLocalTracks.recHitsTag = cms.InputTag('ctppsDirectProtonSimulation')
122 
123 ctppsLocalTrackLiteProducer.includeDiamonds = False
124 
125 # proton reconstruction
126 ctppsProtons.tagLocalTrackLite = cms.InputTag('ctppsLocalTrackLiteProducer')
127 
128 #----------------------------------------------------------------------------------------------------
129 # utility functions
130 
132  obj.vtxStddevX = 0E-4
133  obj.vtxStddevZ = 0
134 
135  obj.beamDivX45 = 0E-6
136  obj.beamDivX56 = 0E-6
137  obj.beamDivY45 = 0E-6
138  obj.beamDivY56 = 0E-6
139 
140 def SetLevel1(process):
141  SetSmearingLevel1(process.ctppsBeamParametersFromLHCInfoESSource)
142 
143  process.ctppsDirectProtonSimulation.roundToPitch = False
144 
146  obj.beamDivX45 = 0E-6
147  obj.beamDivX56 = 0E-6
148  obj.beamDivY45 = 0E-6
149  obj.beamDivY56 = 0E-6
150 
151 def SetLevel2(process):
152  SetSmearingLevel2(process.ctppsBeamParametersFromLHCInfoESSource)
153 
154  process.ctppsDirectProtonSimulation.roundToPitch = False
155 
156 def SetLevel3(process):
157  process.ctppsDirectProtonSimulation.roundToPitch = False
158 
159 def SetLevel4(process):
160  pass
161 
162 def SetLowTheta(process):
163  process.generator.theta_x_sigma = 0E-6
164  process.generator.theta_y_sigma = 0E-6
165 
166 def SetLargeTheta(process):
167  pass
168 
169 def UseConstantXangleBetaStar(process, xangle, betaStar):
170  for p in ctppsCompositeESSource.periods:
171  p.ctppsLHCInfo.xangle = xangle
172  p.ctppsLHCInfo.betaStar = betaStar
173 
174 def UseXangleBetaStarHistogram(process, f="", obj=""):
175  for p in ctppsCompositeESSource.periods:
176  p.ctppsLHCInfo.xangle = -1 # negative value indicates to use the xangle/beta* histogram
177 
178  if f:
179  p.ctppsLHCInfo.xangleBetaStarHistogramFile = f
180  if obj:
181  p.ctppsLHCInfo.xangleBetaStarHistogramObject = obj
base_cff.SetLevel1
def SetLevel1(process)
Definition: base_cff.py:140
base_cff.UseConstantXangleBetaStar
def UseConstantXangleBetaStar(process, xangle, betaStar)
Definition: base_cff.py:169
base_cff.SetLargeTheta
def SetLargeTheta(process)
Definition: base_cff.py:166
base_cff.UseXangleBetaStarHistogram
def UseXangleBetaStarHistogram(process, f="", obj="")
Definition: base_cff.py:174
base_cff.SetLowTheta
def SetLowTheta(process)
Definition: base_cff.py:162
ctppsPixelLocalReconstruction_cff
base_cff.SetSmearingLevel1
def SetSmearingLevel1(obj)
Definition: base_cff.py:131
ctppsLocalTrackLiteProducer_cff
ppsTopology_cff
base_cff.SetLevel4
def SetLevel4(process)
Definition: base_cff.py:159
randomXiThetaGunProducer_cfi
pythiapdt_cfi
base_cff.SetLevel2
def SetLevel2(process)
Definition: base_cff.py:151
ctppsDirectProtonSimulation_cfi
totemRPLocalReconstruction_cff
beamDivergenceVtxGenerator_cfi
ctppsCompositeESSource_cfi
ctppsDiamondLocalReconstruction_cff
base_cff.SetSmearingLevel2
def SetSmearingLevel2(obj)
Definition: base_cff.py:145
ctppsProtons_cff
base_cff.SetLevel3
def SetLevel3(process)
Definition: base_cff.py:156