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
5 
6 # undo unapplicable settings
7 #del ctppsRPAlignmentCorrectionsDataESSourceXML
8 #del esPreferLocalAlignment
9 
10 #ctppsOpticalFunctionsESSource.configuration = cms.VPSet()
11 #del ctppsOpticalFunctionsESSource
12 #del esPreferLocalOptics
13 del ctppsInterpolatedOpticalFunctionsESSource
14 
15 # beam parameters as declared by LHC
16 ctppsLHCInfoESSource = cms.ESSource("CTPPSLHCInfoESSource",
17  label = cms.string(""),
18  validityRange = cms.EventRange("0:min - 999999:max"),
19  beamEnergy = cms.double(6500), # GeV
20  xangle = cms.double(-1), # murad
21  betaStar = cms.double(-1)
22 )
23 
24 # beam parameters as determined by PPS
25 ctppsBeamParametersESSource = cms.ESSource("CTPPSBeamParametersESSource",
26  setBeamPars = cms.bool(True),
27 
28  # beam momentum (GeV)
29  beamMom45 = cms.double(6500.),
30  beamMom56 = cms.double(6500.),
31 
32  # beta* (cm)
33  betaStarX45 = cms.double(0.),
34  betaStarX56 = cms.double(0.),
35  betaStarY45 = cms.double(0.),
36  betaStarY56 = cms.double(0.),
37 
38  # beam divergence (rad)
39  beamDivX45 = cms.double(30E-6),
40  beamDivX56 = cms.double(30E-6),
41  beamDivY45 = cms.double(30E-6),
42  beamDivY56 = cms.double(30E-6),
43 
44  # half crossing angle (rad)
45  halfXangleX45 = cms.double(-1),
46  halfXangleX56 = cms.double(-1),
47  halfXangleY45 = cms.double(0.),
48  halfXangleY56 = cms.double(0.),
49 
50  # vertex offset (cm)
51  vtxOffsetX45 = cms.double(0.),
52  vtxOffsetX56 = cms.double(0.),
53  vtxOffsetY45 = cms.double(0.),
54  vtxOffsetY56 = cms.double(0.),
55  vtxOffsetZ45 = cms.double(0.),
56  vtxOffsetZ56 = cms.double(0.),
57  vtxOffsetT45 = cms.double(0.),
58  vtxOffsetT56 = cms.double(0.),
59 
60  # vertex sigma (cm)
61  vtxStddevX = cms.double(10E-4),
62  vtxStddevY = cms.double(10E-4),
63  vtxStddevZ = cms.double(5),
64  vtxStddevT = cms.double(6)
65 )
66 
67 # particle-data table
69 
70 # random seeds
71 RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",
72  sourceSeed = cms.PSet(initialSeed = cms.untracked.uint32(98765)),
73  generator = cms.PSet(initialSeed = cms.untracked.uint32(98766)),
74  beamDivergenceVtxGenerator = cms.PSet(initialSeed = cms.untracked.uint32(3849)),
75  ctppsDirectProtonSimulation = cms.PSet(initialSeed = cms.untracked.uint32(4981))
76 )
77 
78 # default source
79 source = cms.Source("EmptySource",
80  firstRun = cms.untracked.uint32(1),
81  numberEventsInLuminosityBlock = cms.untracked.uint32(10)
82 )
83 
84 # particle generator
86 generator.xi_max = 0.25
87 generator.theta_x_sigma = 60E-6
88 generator.theta_y_sigma = 60E-6
89 
90 # beam smearing
92 
93 # direct simulation
95 ctppsDirectProtonSimulation.verbosity = 0
96 ctppsDirectProtonSimulation.hepMCTag = cms.InputTag('beamDivergenceVtxGenerator')
97 ctppsDirectProtonSimulation.roundToPitch = True
98 ctppsDirectProtonSimulation.pitchStrips = 66E-3 * 12 / 19 # effective value to reproduce real RP resolution
99 ctppsDirectProtonSimulation.pitchPixelsHor = 50E-3
100 ctppsDirectProtonSimulation.pitchPixelsVer = 80E-3
101 ctppsDirectProtonSimulation.produceHitsRelativeToBeam = True
102 ctppsDirectProtonSimulation.produceScoringPlaneHits = False
103 ctppsDirectProtonSimulation.produceRecHits = True
104 
105 # local reconstruction
110 
111 totemRPUVPatternFinder.tagRecHit = cms.InputTag('ctppsDirectProtonSimulation')
112 ctppsPixelLocalTracks.label = "ctppsDirectProtonSimulation"
113 ctppsDiamondLocalTracks.recHitsTag = cms.InputTag('ctppsDirectProtonSimulation')
114 
115 ctppsLocalTrackLiteProducer.includeDiamonds = False
116 
117 # proton reconstruction
118 ctppsProtons.tagLocalTrackLite = cms.InputTag('ctppsLocalTrackLiteProducer')
119 
120 #----------------------------------------------------------------------------------------------------
121 
123  obj.vtxStddevX = 0E-4
124  obj.vtxStddevZ = 0
125 
126  obj.beamDivX45 = 0E-6
127  obj.beamDivX56 = 0E-6
128  obj.beamDivY45 = 0E-6
129  obj.beamDivY56 = 0E-6
130 
131 def SetLevel1(process):
132  if hasattr(process, "ctppsBeamParametersESSource"):
133  SetSmearingLevel1(process.ctppsBeamParametersESSource)
134  else:
135  SetSmearingLevel1(process.ctppsBeamParametersFromLHCInfoESSource)
136 
137  process.ctppsDirectProtonSimulation.roundToPitch = False
138 
140  obj.beamDivX45 = 0E-6
141  obj.beamDivX56 = 0E-6
142  obj.beamDivY45 = 0E-6
143  obj.beamDivY56 = 0E-6
144 
145 def SetLevel2(process):
146  if hasattr(process, "ctppsBeamParametersESSource"):
147  SetSmearingLevel2(process.ctppsBeamParametersESSource)
148  else:
149  SetSmearingLevel2(process.ctppsBeamParametersFromLHCInfoESSource)
150 
151  process.ctppsDirectProtonSimulation.roundToPitch = False
152 
153 
154 def SetLevel3(process):
155  process.ctppsDirectProtonSimulation.roundToPitch = False
156 
157 
158 def SetLevel4(process):
159  pass
160 
161 
162 def SetLowTheta(process):
163  process.generator.theta_x_sigma = 0E-6
164  process.generator.theta_y_sigma = 0E-6
165 
166 
167 def SetLargeTheta(process):
168  pass
169 
170 # xangle in murad
171 def UseCrossingAngle(xangle, process):
172  process.ctppsLHCInfoESSource.xangle = xangle
173  process.ctppsBeamParametersESSource.halfXangleX45 = xangle * 1E-6
174  process.ctppsBeamParametersESSource.halfXangleX56 = xangle * 1E-6
175 
176 default_xangle_beta_star_file = "CalibPPS/ESProducers/data/xangle_beta_distributions/version1.root"
177 
178 def UseXangleBetaStarHistogram(process, f, obj):
179  process.load("CalibPPS.ESProducers.ctppsLHCInfoRandomXangleESSource_cfi")
180  process.ctppsLHCInfoRandomXangleESSource.generateEveryNEvents = 10 # this is to be synchronised with source.numberEventsInLuminosityBlock
181  process.ctppsLHCInfoRandomXangleESSource.xangleBetaStarHistogramFile = f
182  process.ctppsLHCInfoRandomXangleESSource.xangleBetaStarHistogramObject = obj
183  process.ctppsLHCInfoRandomXangleESSource.beamEnergy = ctppsLHCInfoESSource.beamEnergy
184 
185  del process.ctppsLHCInfoESSource
186 
187  process.load("CalibPPS.ESProducers.ctppsBeamParametersFromLHCInfoESSource_cfi")
188  process.ctppsBeamParametersFromLHCInfoESSource.beamDivX45 = process.ctppsBeamParametersESSource.beamDivX45
189  process.ctppsBeamParametersFromLHCInfoESSource.beamDivX56 = process.ctppsBeamParametersESSource.beamDivX56
190  process.ctppsBeamParametersFromLHCInfoESSource.beamDivY45 = process.ctppsBeamParametersESSource.beamDivY45
191  process.ctppsBeamParametersFromLHCInfoESSource.beamDivY56 = process.ctppsBeamParametersESSource.beamDivY56
192  process.ctppsBeamParametersFromLHCInfoESSource.vtxOffsetX45 = process.ctppsBeamParametersESSource.vtxOffsetX45
193  process.ctppsBeamParametersFromLHCInfoESSource.vtxOffsetX56 = process.ctppsBeamParametersESSource.vtxOffsetX56
194  process.ctppsBeamParametersFromLHCInfoESSource.vtxOffsetY45 = process.ctppsBeamParametersESSource.vtxOffsetY45
195  process.ctppsBeamParametersFromLHCInfoESSource.vtxOffsetY56 = process.ctppsBeamParametersESSource.vtxOffsetY56
196  process.ctppsBeamParametersFromLHCInfoESSource.vtxOffsetZ45 = process.ctppsBeamParametersESSource.vtxOffsetZ45
197  process.ctppsBeamParametersFromLHCInfoESSource.vtxOffsetZ56 = process.ctppsBeamParametersESSource.vtxOffsetZ56
198  process.ctppsBeamParametersFromLHCInfoESSource.vtxStddevX = process.ctppsBeamParametersESSource.vtxStddevX
199  process.ctppsBeamParametersFromLHCInfoESSource.vtxStddevY = process.ctppsBeamParametersESSource.vtxStddevY
200  process.ctppsBeamParametersFromLHCInfoESSource.vtxStddevZ = process.ctppsBeamParametersESSource.vtxStddevZ
201 
202  del process.ctppsBeamParametersESSource
base_cff.SetLevel1
def SetLevel1(process)
Definition: base_cff.py:131
base_cff.SetLargeTheta
def SetLargeTheta(process)
Definition: base_cff.py:167
base_cff.SetLowTheta
def SetLowTheta(process)
Definition: base_cff.py:162
ctppsPixelLocalReconstruction_cff
base_cff.SetSmearingLevel1
def SetSmearingLevel1(obj)
Definition: base_cff.py:122
ctppsLocalTrackLiteProducer_cff
base_cff.SetLevel4
def SetLevel4(process)
Definition: base_cff.py:158
randomXiThetaGunProducer_cfi
pythiapdt_cfi
base_cff.UseCrossingAngle
def UseCrossingAngle(xangle, process)
Definition: base_cff.py:171
base_cff.SetLevel2
def SetLevel2(process)
Definition: base_cff.py:145
base_cff.UseXangleBetaStarHistogram
def UseXangleBetaStarHistogram(process, f, obj)
Definition: base_cff.py:178
ctppsDirectProtonSimulation_cfi
totemRPLocalReconstruction_cff
beamDivergenceVtxGenerator_cfi
ctppsDiamondLocalReconstruction_cff
base_cff.SetSmearingLevel2
def SetSmearingLevel2(obj)
Definition: base_cff.py:139
ctppsProtons_cff
base_cff.SetLevel3
def SetLevel3(process)
Definition: base_cff.py:154