CMS 3D CMS Logo

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