CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
g4SimHits_cfi.py
Go to the documentation of this file.
2 
4 
5 ## This object is used to customise g4SimHits for different running scenarios
6 from Configuration.StandardSequences.Eras import eras
7 
8 common_heavy_suppression = cms.PSet(
9  NeutronThreshold = cms.double(30.0),
10  ProtonThreshold = cms.double(30.0),
11  IonThreshold = cms.double(30.0)
12 )
13 
14 common_maximum_time = cms.PSet(
15  MaxTrackTime = cms.double(500.0),
16  MaxTimeNames = cms.vstring('ZDCRegion'),
17  MaxTrackTimes = cms.vdouble(2000.0),
18  #DeadRegions = cms.vstring('QuadRegion','CastorRegion','InterimRegion'),
19  DeadRegions = cms.vstring('QuadRegion','InterimRegion'),
20  CriticalEnergyForVacuum = cms.double(2.0),
21  CriticalDensity = cms.double(1e-15)
22 )
23 
24 common_UsePMT = cms.PSet(
25  UseR7600UPMT = cms.bool(False)
26 )
27 
28 common_UseHF = cms.PSet(
29  Lambda1 = cms.double(280.0),
30  Lambda2 = cms.double(700.0),
31  Gain = cms.double(0.33),
32  CheckSurvive = cms.bool(False),
33  FibreR = cms.untracked.double(0.3)
34 )
35 
36 common_UseLuminosity = cms.PSet(
37  InstLuminosity = cms.double(0.),
38  DelivLuminosity = cms.double(5000.)
39 )
40 
41 g4SimHits = cms.EDProducer("OscarProducer",
42  NonBeamEvent = cms.bool(False),
43  G4EventManagerVerbosity = cms.untracked.int32(0),
44  G4StackManagerVerbosity = cms.untracked.int32(0),
45  G4TrackingManagerVerbosity = cms.untracked.int32(0),
46  UseMagneticField = cms.bool(True),
47  StoreRndmSeeds = cms.bool(False),
48  RestoreRndmSeeds = cms.bool(False),
49  PhysicsTablesDirectory = cms.string('PhysicsTables'),
50  StorePhysicsTables = cms.bool(False),
51  RestorePhysicsTables = cms.bool(False),
52  CheckOverlap = cms.untracked.bool(False),
53  G4Commands = cms.vstring(''),
54  FileNameField = cms.untracked.string(''),
55  FileNameGDML = cms.untracked.string(''),
56  Watchers = cms.VPSet(),
57  HepMCProductLabel = cms.InputTag("generator"),
58  theLHCTlinkTag = cms.InputTag("LHCTransport"),
59  CustomUIsession = cms.untracked.PSet(
60  Type = cms.untracked.string("MessageLogger"), # MessageLoggerThreadPrefix, FilePerThread; the non-default ones are meant only for MT debugging
61  ThreadPrefix = cms.untracked.string("W"), # For MessageLoggerThreadPrefix
62  ThreadFile = cms.untracked.string("sim_output_thread"), # For FilePerThread
63  ),
64  MagneticField = cms.PSet(
65  UseLocalMagFieldManager = cms.bool(False),
66  Verbosity = cms.untracked.bool(False),
67  ConfGlobalMFM = cms.PSet(
68  Volume = cms.string('OCMS'),
69  OCMS = cms.PSet(
70  Stepper = cms.string('G4ClassicalRK4'),
71  Type = cms.string('CMSIMField'),
72  StepperParam = cms.PSet(
73  MaximumEpsilonStep = cms.untracked.double(0.01), ## in mm
74  DeltaOneStep = cms.double(0.001), ## in mm
75  MaximumLoopCounts = cms.untracked.double(1000.0),
76  DeltaChord = cms.double(0.001), ## in mm
77  MinStep = cms.double(0.1), ## in mm
78  DeltaIntersectionAndOneStep = cms.untracked.double(-1.0),
79  DeltaIntersection = cms.double(0.0001), ## in mm
80  MinimumEpsilonStep = cms.untracked.double(1e-05) ## in mm
81  )
82  )
83  ),
84  delta = cms.double(1.0)
85  ),
86  Physics = cms.PSet(
87  common_maximum_time,
88  # NOTE : if you want EM Physics only,
89  # please select "SimG4Core/Physics/DummyPhysics" for type
90  # and turn ON DummyEMPhysics
91  #
92  type = cms.string('SimG4Core/Physics/QGSP_FTFP_BERT_EML'),
93  DummyEMPhysics = cms.bool(False),
94  CutsPerRegion = cms.bool(True),
95  CutsOnProton = cms.untracked.bool(True),
96  DefaultCutValue = cms.double(1.0), ## cuts in cm
97  G4BremsstrahlungThreshold = cms.double(0.5), ## cut in GeV
98  Verbosity = cms.untracked.int32(0),
99  # 1 will print cuts as they get set from DD
100  # 2 will do as 1 + will dump Geant4 table of cuts
101  MonopoleCharge = cms.untracked.int32(1),
102  MonopoleDeltaRay = cms.untracked.bool(True),
103  MonopoleMultiScatter = cms.untracked.bool(False),
104  MonopoleTransport = cms.untracked.bool(True),
105  MonopoleMass = cms.untracked.double(0),
106  Region = cms.string(' '),
107  TrackingCut = cms.bool(False),
108  SRType = cms.bool(True),
109  FlagMuNucl = cms.bool(False),
110  FlagFluo = cms.bool(False),
111  EMPhysics = cms.untracked.bool(True),
112  HadPhysics = cms.untracked.bool(True),
113  FlagBERT = cms.untracked.bool(False),
114  GflashEcal = cms.bool(False),
115  GflashHcal = cms.bool(False),
116  GflashEcalHad = cms.bool(False),
117  GflashHcalHad = cms.bool(False),
118  bField = cms.double(3.8),
119  energyScaleEB = cms.double(1.032),
120  energyScaleEE = cms.double(1.024),
121  ExoticaPhysicsSS = cms.untracked.bool(False),
122  RusRoElectronEnergyLimit = cms.double(0.0),
123  RusRoEcalElectron = cms.double(1.0),
124  RusRoHcalElectron = cms.double(1.0),
125  RusRoMuonIronElectron = cms.double(1.0),
126  RusRoPreShowerElectron = cms.double(1.0),
127  RusRoCastorElectron = cms.double(1.0),
128  RusRoWorldElectron = cms.double(1.0),
129  ElectronStepLimit = cms.bool(False),
130  ElectronRangeTest = cms.bool(False),
131  PositronStepLimit = cms.bool(False),
132  MinStepLimit = cms.double(1.0)
133  ),
134  Generator = cms.PSet(
135  HectorEtaCut,
136  # string HepMCProductLabel = "VtxSmeared"
137  HepMCProductLabel = cms.string('generator'),
138  ApplyPCuts = cms.bool(True),
139  ApplyPtransCut = cms.bool(False),
140  MinPCut = cms.double(0.04), ## the cut is in GeV
141  MaxPCut = cms.double(99999.0), ## the pmax=99.TeV
142  ApplyEtaCuts = cms.bool(True),
143  MinEtaCut = cms.double(-5.5),
144  MaxEtaCut = cms.double(5.5),
145  RDecLenCut = cms.double(2.9), ## (cm) the cut on vertex radius
146  LDecLenCut = cms.double(30.0), ## (cm) decay volume length
147  ApplyPhiCuts = cms.bool(False),
148  MinPhiCut = cms.double(-3.14159265359), ## (radians)
149  MaxPhiCut = cms.double(3.14159265359), ## according to CMS conventions
150  ApplyLumiMonitorCuts = cms.bool(False), ## primary for lumi monitors
151  Verbosity = cms.untracked.int32(0)
152  ),
153  RunAction = cms.PSet(
154  StopFile = cms.string('StopRun')
155  ),
156  EventAction = cms.PSet(
157  debug = cms.untracked.bool(False),
158  StopFile = cms.string('StopRun'),
159  PrintRandomSeed = cms.bool(False),
160  CollapsePrimaryVertices = cms.bool(False)
161  ),
162  StackingAction = cms.PSet(
163  common_heavy_suppression,
164  common_maximum_time,
165  KillDeltaRay = cms.bool(False),
166  TrackNeutrino = cms.bool(False),
167  KillHeavy = cms.bool(False),
168  KillGamma = cms.bool(True),
169  GammaThreshold = cms.double(0.0001), ## (MeV)
170  SaveFirstLevelSecondary = cms.untracked.bool(False),
171  SavePrimaryDecayProductsAndConversionsInTracker = cms.untracked.bool(False),
172  SavePrimaryDecayProductsAndConversionsInCalo = cms.untracked.bool(False),
173  SavePrimaryDecayProductsAndConversionsInMuon = cms.untracked.bool(False),
174  SaveAllPrimaryDecayProductsAndConversions = cms.untracked.bool(True),
175  RusRoGammaEnergyLimit = cms.double(5.0), ## (MeV)
176  RusRoEcalGamma = cms.double(0.3),
177  RusRoHcalGamma = cms.double(0.3),
178  RusRoMuonIronGamma = cms.double(0.3),
179  RusRoPreShowerGamma = cms.double(0.3),
180  RusRoCastorGamma = cms.double(0.3),
181  RusRoWorldGamma = cms.double(0.3),
182  RusRoNeutronEnergyLimit = cms.double(10.0), ## (MeV)
183  RusRoEcalNeutron = cms.double(0.1),
184  RusRoHcalNeutron = cms.double(0.1),
185  RusRoMuonIronNeutron = cms.double(0.1),
186  RusRoPreShowerNeutron = cms.double(0.1),
187  RusRoCastorNeutron = cms.double(0.1),
188  RusRoWorldNeutron = cms.double(0.1),
189  RusRoProtonEnergyLimit = cms.double(0.0),
190  RusRoEcalProton = cms.double(1.0),
191  RusRoHcalProton = cms.double(1.0),
192  RusRoMuonIronProton = cms.double(1.0),
193  RusRoPreShowerProton = cms.double(1.0),
194  RusRoCastorProton = cms.double(1.0),
195  RusRoWorldProton = cms.double(1.0)
196  ),
197  TrackingAction = cms.PSet(
198  DetailedTiming = cms.untracked.bool(False),
199  CheckTrack = cms.untracked.bool(False)
200  ),
201  SteppingAction = cms.PSet(
202  common_maximum_time,
203  EkinNames = cms.vstring(),
204  EkinThresholds = cms.vdouble(),
205  EkinParticles = cms.vstring()
206  ),
207  TrackerSD = cms.PSet(
208  ZeroEnergyLoss = cms.bool(False),
209  PrintHits = cms.bool(False),
210  ElectronicSigmaInNanoSeconds = cms.double(12.06),
211  NeverAccumulate = cms.bool(False),
212  EnergyThresholdForPersistencyInGeV = cms.double(0.2),
213  EnergyThresholdForHistoryInGeV = cms.double(0.05)
214  ),
215  MuonSD = cms.PSet(
216  EnergyThresholdForPersistency = cms.double(1.0),
217  PrintHits = cms.bool(False),
218  AllMuonsPersistent = cms.bool(True)
219  ),
220  CaloSD = cms.PSet(
221  common_heavy_suppression,
222  SuppressHeavy = cms.bool(False),
223  EminTrack = cms.double(1.0),
224  TmaxHit = cms.double(1000.0),
225  HCNames = cms.vstring('EcalHitsEB','EcalHitsEE','EcalHitsES','HcalHits','ZDCHITS'),
226  EminHits = cms.vdouble(0.015,0.010,0.0,0.0,0.0),
227  EminHitsDepth = cms.vdouble(0.0,0.0,0.0,0.0,0.0),
228  TmaxHits = cms.vdouble(500.0,500.0,500.0,500.0,2000.0),
229  UseResponseTables = cms.vint32(0,0,0,0,0),
230  BeamPosition = cms.double(0.0),
231  CorrectTOFBeam = cms.bool(False),
232  DetailedTiming = cms.untracked.bool(False),
233  UseMap = cms.untracked.bool(False),
234  Verbosity = cms.untracked.int32(0),
235  CheckHits = cms.untracked.int32(25)
236  ),
237  CaloResponse = cms.PSet(
238  UseResponseTable = cms.bool(True),
239  ResponseScale = cms.double(1.0),
240  ResponseFile = cms.FileInPath('SimG4CMS/Calo/data/responsTBpim50.dat')
241  ),
242  ECalSD = cms.PSet(
243  common_UseLuminosity,
244  UseBirkLaw = cms.bool(True),
245  BirkL3Parametrization = cms.bool(True),
246  BirkSlope = cms.double(0.253694),
247  BirkCut = cms.double(0.1),
248  BirkC1 = cms.double(0.03333),
249  BirkC3 = cms.double(1.0),
250  BirkC2 = cms.double(0.0),
251  SlopeLightYield = cms.double(0.02),
252  StoreSecondary = cms.bool(False),
253  TimeSliceUnit = cms.int32(1),
254  IgnoreTrackID = cms.bool(False),
255  XtalMat = cms.untracked.string('E_PbWO4'),
256  TestBeam = cms.untracked.bool(False),
257  NullNumbering = cms.untracked.bool(False),
258  StoreRadLength = cms.untracked.bool(False),
259  AgeingWithSlopeLY = cms.untracked.bool(False)
260  ),
261  HCalSD = cms.PSet(
262  common_UseLuminosity,
263  UseBirkLaw = cms.bool(True),
264  BirkC3 = cms.double(1.75),
265  BirkC2 = cms.double(0.142),
266  BirkC1 = cms.double(0.0052),
267  UseShowerLibrary = cms.bool(True),
268  UseParametrize = cms.bool(False),
269  UsePMTHits = cms.bool(False),
270  UseFibreBundleHits = cms.bool(False),
271  TestNumberingScheme = cms.bool(False),
272  EminHitHB = cms.double(0.0),
273  EminHitHE = cms.double(0.0),
274  EminHitHO = cms.double(0.0),
275  EminHitHF = cms.double(0.0),
276  BetaThreshold = cms.double(0.7),
277  TimeSliceUnit = cms.int32(1),
278  IgnoreTrackID = cms.bool(False),
279  HEDarkening = cms.bool(False),
280  HFDarkening = cms.bool(False),
281  UseHF = cms.untracked.bool(True),
282  ForTBH2 = cms.untracked.bool(False),
283  UseLayerWt = cms.untracked.bool(False),
284  WtFile = cms.untracked.string('None')
285  ),
286  CaloTrkProcessing = cms.PSet(
287  TestBeam = cms.bool(False),
288  EminTrack = cms.double(0.01),
289  PutHistory = cms.bool(False)
290  ),
291  HFShower = cms.PSet(
292  common_UsePMT,
293  common_UseHF,
294  ProbMax = cms.double(1.0),
295  CFibre = cms.double(0.5),
296  PEPerGeV = cms.double(0.31),
297  TrackEM = cms.bool(False),
298  UseShowerLibrary = cms.bool(True),
299  UseHFGflash = cms.bool(False),
300  EminLibrary = cms.double(0.0),
301  OnlyLong = cms.bool(True),
302  LambdaMean = cms.double(350.0),
303  ApplyFiducialCut = cms.bool(True),
304  RefIndex = cms.double(1.459),
305  Aperture = cms.double(0.33),
306  ApertureTrapped = cms.double(0.22),
307  CosApertureTrapped= cms.double(0.5),
308  SinPsiMax = cms.untracked.double(0.5),
309  ParametrizeLast = cms.untracked.bool(False)
310  ),
311  HFShowerLibrary = cms.PSet(
312  FileName = cms.FileInPath('SimG4CMS/Calo/data/HFShowerLibrary_oldpmt_noatt_eta4_16en_v3.root'),
313  BackProbability = cms.double(0.2),
314  TreeEMID = cms.string('emParticles'),
315  TreeHadID = cms.string('hadParticles'),
316  Verbosity = cms.untracked.bool(False),
317  ApplyFiducialCut= cms.bool(True),
318  BranchPost = cms.untracked.string(''),
319  BranchEvt = cms.untracked.string(''),
320  BranchPre = cms.untracked.string('')
321  ),
322  HFShowerPMT = cms.PSet(
323  common_UsePMT,
324  common_UseHF,
325  PEPerGeVPMT = cms.double(1.0),
326  RefIndex = cms.double(1.52),
327  Aperture = cms.double(0.99),
328  ApertureTrapped = cms.double(0.22),
329  CosApertureTrapped= cms.double(0.5),
330  SinPsiMax = cms.untracked.double(0.5)
331  ),
332  HFShowerStraightBundle = cms.PSet(
333  common_UsePMT,
334  common_UseHF,
335  FactorBundle = cms.double(1.0),
336  RefIndex = cms.double(1.459),
337  Aperture = cms.double(0.33),
338  ApertureTrapped = cms.double(0.22),
339  CosApertureTrapped= cms.double(0.5),
340  SinPsiMax = cms.untracked.double(0.5)
341  ),
342  HFShowerConicalBundle = cms.PSet(
343  common_UsePMT,
344  common_UseHF,
345  FactorBundle = cms.double(1.0),
346  RefIndex = cms.double(1.459),
347  Aperture = cms.double(0.33),
348  ApertureTrapped = cms.double(0.22),
349  CosApertureTrapped= cms.double(0.5),
350  SinPsiMax = cms.untracked.double(0.5)
351  ),
352  HFGflash = cms.PSet(
353  BField = cms.untracked.double(3.8),
354  WatcherOn = cms.untracked.bool(True),
355  FillHisto = cms.untracked.bool(True)
356  ),
357  CastorSD = cms.PSet(
358  useShowerLibrary = cms.bool(True),
359  minEnergyInGeVforUsingSLibrary = cms.double(1.0),
360  nonCompensationFactor = cms.double(0.85),
361  Verbosity = cms.untracked.int32(0)
362  ),
363  CastorShowerLibrary = cms.PSet(
364  FileName = cms.FileInPath('SimG4CMS/Forward/data/CastorShowerLibrary_CMSSW500_Standard.root'),
365  BranchEvt = cms.untracked.string('hadShowerLibInfo.'),
366  BranchEM = cms.untracked.string('emParticles.'),
367  BranchHAD = cms.untracked.string('hadParticles.'),
368  Verbosity = cms.untracked.bool(False)
369  ),
370  TotemSD = cms.PSet(
371  Verbosity = cms.untracked.int32(0)
372  ),
373  ZdcSD = cms.PSet(
374  Verbosity = cms.int32(0),
375  UseShowerLibrary = cms.bool(True),
376  UseShowerHits = cms.bool(False),
377  FiberDirection = cms.double(45.0),
378  ZdcHitEnergyCut = cms.double(10.0)
379  ),
380  ZdcShowerLibrary = cms.PSet(
381  Verbosity = cms.untracked.int32(0)
382  ),
383  FP420SD = cms.PSet(
384  Verbosity = cms.untracked.int32(2)
385  ),
386  BscSD = cms.PSet(
387  Verbosity = cms.untracked.int32(0)
388  ),
389  PltSD = cms.PSet(
390  EnergyThresholdForPersistencyInGeV = cms.double(0.2),
391  EnergyThresholdForHistoryInGeV = cms.double(0.05)
392  ),
393  Bcm1fSD = cms.PSet(
394  EnergyThresholdForPersistencyInGeV = cms.double(0.010),
395  EnergyThresholdForHistoryInGeV = cms.double(0.005)
396  ),
397  HcalTB02SD = cms.PSet(
398  UseBirkLaw = cms.untracked.bool(False),
399  BirkC1 = cms.untracked.double(0.013),
400  BirkC3 = cms.untracked.double(1.75),
401  BirkC2 = cms.untracked.double(0.0568)
402  ),
403  EcalTBH4BeamSD = cms.PSet(
404  UseBirkLaw = cms.bool(False),
405  BirkC1 = cms.double(0.013),
406  BirkC3 = cms.double(1.75),
407  BirkC2 = cms.double(0.0568)
408  ),
409  HcalTB06BeamSD = cms.PSet(
410  UseBirkLaw = cms.bool(False),
411  BirkC1 = cms.double(0.013),
412  BirkC3 = cms.double(1.75),
413  BirkC2 = cms.double(0.0568)
414  )
415 )
416 
417 
418 ##
419 ## Change the HFShowerLibrary file used for Run 2
420 ##
421 eras.run2_common.toModify( g4SimHits.HFShowerLibrary, FileName = 'SimG4CMS/Calo/data/HFShowerLibrary_npmt_noatt_eta4_16en_v3.root' )