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 )
22 
23 # beam parameters as determined by PPS
24 ctppsBeamParametersESSource = cms.ESSource("CTPPSBeamParametersESSource",
25  setBeamPars = cms.bool(True),
26 
27  # beam momentum (GeV)
28  beamMom45 = cms.double(6500.),
29  beamMom56 = cms.double(6500.),
30 
31  # beta* (cm)
32  betaStarX45 = cms.double(0.),
33  betaStarX56 = cms.double(0.),
34  betaStarY45 = cms.double(0.),
35  betaStarY56 = cms.double(0.),
36 
37  # beam divergence (rad)
38  beamDivX45 = cms.double(30E-6),
39  beamDivX56 = cms.double(30E-6),
40  beamDivY45 = cms.double(30E-6),
41  beamDivY56 = cms.double(30E-6),
42 
43  # half crossing angle (rad)
44  halfXangleX45 = cms.double(-1),
45  halfXangleX56 = cms.double(-1),
46  halfXangleY45 = cms.double(0.),
47  halfXangleY56 = cms.double(0.),
48 
49  # vertex offset (cm)
50  vtxOffsetX45 = cms.double(0.),
51  vtxOffsetX56 = cms.double(0.),
52  vtxOffsetY45 = cms.double(0.),
53  vtxOffsetY56 = cms.double(0.),
54  vtxOffsetZ45 = cms.double(0.),
55  vtxOffsetZ56 = cms.double(0.),
56 
57  # vertex sigma (cm)
58  vtxStddevX = cms.double(10E-4),
59  vtxStddevY = cms.double(10E-4),
60  vtxStddevZ = cms.double(5)
61 )
62 
63 # particle-data table
65 
66 # random seeds
67 RandomNumberGeneratorService = cms.Service("RandomNumberGeneratorService",
68  sourceSeed = cms.PSet(initialSeed =cms.untracked.uint32(98765)),
69  generator = cms.PSet(initialSeed = cms.untracked.uint32(98766)),
70  beamDivergenceVtxGenerator = cms.PSet(initialSeed =cms.untracked.uint32(3849))
71 )
72 
73 # default source
74 source = cms.Source("EmptySource",
75  firstRun = cms.untracked.uint32(1)
76 )
77 
78 # particle generator
80 generator.xi_max = 0.25
81 generator.theta_x_sigma = 60E-6
82 generator.theta_y_sigma = 60E-6
83 
84 # beam smearing
86 
87 # direct simulation
89 ctppsDirectProtonSimulation.verbosity = 0
90 ctppsDirectProtonSimulation.hepMCTag = cms.InputTag('beamDivergenceVtxGenerator')
91 ctppsDirectProtonSimulation.roundToPitch = True
92 ctppsDirectProtonSimulation.pitchStrips = 66E-3 * 12 / 19 # effective value to reproduce real RP resolution
93 ctppsDirectProtonSimulation.pitchPixelsHor = 50E-3
94 ctppsDirectProtonSimulation.pitchPixelsVer = 80E-3
95 ctppsDirectProtonSimulation.produceHitsRelativeToBeam = True
96 ctppsDirectProtonSimulation.produceScoringPlaneHits = False
97 ctppsDirectProtonSimulation.produceRecHits = True
98 
99 # local reconstruction
103 
104 totemRPUVPatternFinder.tagRecHit = cms.InputTag('ctppsDirectProtonSimulation')
105 ctppsPixelLocalTracks.label = "ctppsDirectProtonSimulation"
106 ctppsLocalTrackLiteProducer.includeDiamonds = False
107 
108 # proton reconstruction
109 ctppsProtons.tagLocalTrackLite = cms.InputTag('ctppsLocalTrackLiteProducer')
110 
111 #----------------------------------------------------------------------------------------------------
112 
113 def SetLevel1(process):
114  process.ctppsBeamParametersESSource.vtxStddevX = 0E-4
115  process.ctppsBeamParametersESSource.vtxStddevZ = 0
116 
117  process.ctppsBeamParametersESSource.beamDivX45 = 0E-6
118  process.ctppsBeamParametersESSource.beamDivX56 = 0E-6
119  process.ctppsBeamParametersESSource.beamDivY45 = 0E-6
120  process.ctppsBeamParametersESSource.beamDivY56 = 0E-6
121 
122  process.ctppsDirectProtonSimulation.roundToPitch = False
123 
124 
125 def SetLevel2(process):
126  process.ctppsBeamParametersESSource.beamDivX45 = 0E-6
127  process.ctppsBeamParametersESSource.beamDivX56 = 0E-6
128  process.ctppsBeamParametersESSource.beamDivY45 = 0E-6
129  process.ctppsBeamParametersESSource.beamDivY56 = 0E-6
130 
131  process.ctppsDirectProtonSimulation.roundToPitch = False
132 
133 
134 def SetLevel3(process):
135  process.ctppsDirectProtonSimulation.roundToPitch = False
136 
137 
138 def SetLevel4(process):
139  pass
140 
141 
142 def SetLowTheta(process):
143  process.generator.theta_x_sigma = 0E-6
144  process.generator.theta_y_sigma = 0E-6
145 
146 
147 def SetLargeTheta(process):
148  pass
149 
150 # xangle in murad
151 def UseCrossingAngle(xangle, process):
152  process.ctppsLHCInfoESSource.xangle = xangle
153  process.ctppsBeamParametersESSource.halfXangleX45 = xangle * 1E-6
154  process.ctppsBeamParametersESSource.halfXangleX56 = xangle * 1E-6
def SetLevel3(process)
Definition: base_cff.py:134
def UseCrossingAngle(xangle, process)
Definition: base_cff.py:151
def SetLevel4(process)
Definition: base_cff.py:138
def SetLevel1(process)
Definition: base_cff.py:113
def SetLevel2(process)
Definition: base_cff.py:125
def SetLargeTheta(process)
Definition: base_cff.py:147
def SetLowTheta(process)
Definition: base_cff.py:142