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  # string HepMCProductLabel = "generatorSmeared"
159  HepMCProductLabel = cms.string('generatorSmeared'),
160  ApplyPCuts = cms.bool(True),
161  ApplyPtransCut = cms.bool(False),
162  MinPCut = cms.double(0.04), ## the cut is in GeV
163  MaxPCut = cms.double(99999.0), ## the pmax=99.TeV
164  ApplyEtaCuts = cms.bool(True),
165  MinEtaCut = cms.double(-5.5),
166  MaxEtaCut = cms.double(5.5),
167  RDecLenCut = cms.double(2.9), ## (cm) the cut on vertex radius
168  LDecLenCut = cms.double(30.0), ## (cm) decay volume length
169  ApplyPhiCuts = cms.bool(False),
170  MinPhiCut = cms.double(-3.14159265359), ## (radians)
171  MaxPhiCut = cms.double(3.14159265359), ## according to CMS conventions
172  ApplyLumiMonitorCuts = cms.bool(False), ## primary for lumi monitors
173  Verbosity = cms.untracked.int32(0)
174  ),
175  RunAction = cms.PSet(
176  StopFile = cms.string('StopRun')
177  ),
178  EventAction = cms.PSet(
179  debug = cms.untracked.bool(False),
180  StopFile = cms.string('StopRun'),
181  PrintRandomSeed = cms.bool(False),
182  CollapsePrimaryVertices = cms.bool(False)
183  ),
184  StackingAction = cms.PSet(
185  common_heavy_suppression,
186  common_maximum_time,
187  KillDeltaRay = cms.bool(False),
188  TrackNeutrino = cms.bool(False),
189  KillHeavy = cms.bool(False),
190  KillGamma = cms.bool(True),
191  GammaThreshold = cms.double(0.0001), ## (MeV)
192  SaveFirstLevelSecondary = cms.untracked.bool(False),
193  SavePrimaryDecayProductsAndConversionsInTracker = cms.untracked.bool(False),
194  SavePrimaryDecayProductsAndConversionsInCalo = cms.untracked.bool(False),
195  SavePrimaryDecayProductsAndConversionsInMuon = cms.untracked.bool(False),
196  SaveAllPrimaryDecayProductsAndConversions = cms.untracked.bool(True),
197  RusRoGammaEnergyLimit = cms.double(5.0), ## (MeV)
198  RusRoEcalGamma = cms.double(0.3),
199  RusRoHcalGamma = cms.double(0.3),
200  RusRoMuonIronGamma = cms.double(0.3),
201  RusRoPreShowerGamma = cms.double(0.3),
202  RusRoCastorGamma = cms.double(0.3),
203  RusRoWorldGamma = cms.double(0.3),
204  RusRoNeutronEnergyLimit = cms.double(10.0), ## (MeV)
205  RusRoEcalNeutron = cms.double(0.1),
206  RusRoHcalNeutron = cms.double(0.1),
207  RusRoMuonIronNeutron = cms.double(0.1),
208  RusRoPreShowerNeutron = cms.double(0.1),
209  RusRoCastorNeutron = cms.double(0.1),
210  RusRoWorldNeutron = cms.double(0.1),
211  RusRoProtonEnergyLimit = cms.double(0.0),
212  RusRoEcalProton = cms.double(1.0),
213  RusRoHcalProton = cms.double(1.0),
214  RusRoMuonIronProton = cms.double(1.0),
215  RusRoPreShowerProton = cms.double(1.0),
216  RusRoCastorProton = cms.double(1.0),
217  RusRoWorldProton = cms.double(1.0)
218  ),
219  TrackingAction = cms.PSet(
220  DetailedTiming = cms.untracked.bool(False),
221  CheckTrack = cms.untracked.bool(False)
222  ),
223  SteppingAction = cms.PSet(
224  common_maximum_time,
225  EkinNames = cms.vstring(),
226  EkinThresholds = cms.vdouble(),
227  EkinParticles = cms.vstring()
228  ),
229  TrackerSD = cms.PSet(
230  ZeroEnergyLoss = cms.bool(False),
231  PrintHits = cms.bool(False),
232  ElectronicSigmaInNanoSeconds = cms.double(12.06),
233  NeverAccumulate = cms.bool(False),
234  EnergyThresholdForPersistencyInGeV = cms.double(0.2),
235  EnergyThresholdForHistoryInGeV = cms.double(0.05)
236  ),
237  MuonSD = cms.PSet(
238  EnergyThresholdForPersistency = cms.double(1.0),
239  PrintHits = cms.bool(False),
240  AllMuonsPersistent = cms.bool(True)
241  ),
242  CaloSD = cms.PSet(
243  common_heavy_suppression,
244  SuppressHeavy = cms.bool(False),
245  EminTrack = cms.double(1.0),
246  TmaxHit = cms.double(1000.0),
247  HCNames = cms.vstring('EcalHitsEB','EcalHitsEE','EcalHitsES','HcalHits','ZDCHITS'),
248  EminHits = cms.vdouble(0.015,0.010,0.0,0.0,0.0),
249  EminHitsDepth = cms.vdouble(0.0,0.0,0.0,0.0,0.0),
250  TmaxHits = cms.vdouble(500.0,500.0,500.0,500.0,2000.0),
251  UseResponseTables = cms.vint32(0,0,0,0,0),
252  BeamPosition = cms.double(0.0),
253  CorrectTOFBeam = cms.bool(False),
254  DetailedTiming = cms.untracked.bool(False),
255  UseMap = cms.untracked.bool(False),
256  Verbosity = cms.untracked.int32(0),
257  CheckHits = cms.untracked.int32(25)
258  ),
259  CaloResponse = cms.PSet(
260  UseResponseTable = cms.bool(True),
261  ResponseScale = cms.double(1.0),
262  ResponseFile = cms.FileInPath('SimG4CMS/Calo/data/responsTBpim50.dat')
263  ),
264  ECalSD = cms.PSet(
265  common_UseLuminosity,
266  UseBirkLaw = cms.bool(True),
267  BirkL3Parametrization = cms.bool(True),
268  BirkSlope = cms.double(0.253694),
269  BirkCut = cms.double(0.1),
270  BirkC1 = cms.double(0.03333),
271  BirkC3 = cms.double(1.0),
272  BirkC2 = cms.double(0.0),
273  SlopeLightYield = cms.double(0.02),
274  StoreSecondary = cms.bool(False),
275  TimeSliceUnit = cms.double(1),
276  IgnoreTrackID = cms.bool(False),
277  XtalMat = cms.untracked.string('E_PbWO4'),
278  TestBeam = cms.untracked.bool(False),
279  NullNumbering = cms.untracked.bool(False),
280  StoreRadLength = cms.untracked.bool(False),
281  AgeingWithSlopeLY = cms.untracked.bool(False)
282  ),
283  HCalSD = cms.PSet(
284  common_UseLuminosity,
285  UseBirkLaw = cms.bool(True),
286  BirkC3 = cms.double(1.75),
287  BirkC2 = cms.double(0.142),
288  BirkC1 = cms.double(0.0052),
289  UseShowerLibrary = cms.bool(True),
290  UseParametrize = cms.bool(False),
291  UsePMTHits = cms.bool(False),
292  UseFibreBundleHits = cms.bool(False),
293  TestNumberingScheme = cms.bool(False),
294  doNeutralDensityFilter = cms.bool(False),
295  EminHitHB = cms.double(0.0),
296  EminHitHE = cms.double(0.0),
297  EminHitHO = cms.double(0.0),
298  EminHitHF = cms.double(0.0),
299  BetaThreshold = cms.double(0.7),
300  TimeSliceUnit = cms.double(1),
301  IgnoreTrackID = cms.bool(False),
302  HBDarkening = cms.bool(False),
303  HEDarkening = cms.bool(False),
304  HFDarkening = cms.bool(False),
305  UseHF = cms.untracked.bool(True),
306  ForTBH2 = cms.untracked.bool(False),
307  UseLayerWt = cms.untracked.bool(False),
308  WtFile = cms.untracked.string('None'),
309  TestNS = cms.untracked.bool(False),
310  HFDarkeningParameterBlock = HFDarkeningParameterBlock
311  ),
312  CaloTrkProcessing = cms.PSet(
313  TestBeam = cms.bool(False),
314  EminTrack = cms.double(0.01),
315  PutHistory = cms.bool(False)
316  ),
317  HFShower = cms.PSet(
318  common_UsePMT,
319  common_UseHF,
320  ProbMax = cms.double(1.0),
321  CFibre = cms.double(0.5),
322  PEPerGeV = cms.double(0.31),
323  TrackEM = cms.bool(False),
324  UseShowerLibrary = cms.bool(True),
325  UseHFGflash = cms.bool(False),
326  EminLibrary = cms.double(0.0),
327  OnlyLong = cms.bool(True),
328  LambdaMean = cms.double(350.0),
329  ApplyFiducialCut = cms.bool(True),
330  RefIndex = cms.double(1.459),
331  Aperture = cms.double(0.33),
332  ApertureTrapped = cms.double(0.22),
333  CosApertureTrapped= cms.double(0.5),
334  SinPsiMax = cms.untracked.double(0.5),
335  ParametrizeLast = cms.untracked.bool(False)
336  ),
337  HFShowerLibrary = cms.PSet(
338  FileName = cms.FileInPath('SimG4CMS/Calo/data/HFShowerLibrary_oldpmt_noatt_eta4_16en_v3.root'),
339  BackProbability = cms.double(0.2),
340  TreeEMID = cms.string('emParticles'),
341  TreeHadID = cms.string('hadParticles'),
342  Verbosity = cms.untracked.bool(False),
343  ApplyFiducialCut= cms.bool(True),
344  BranchPost = cms.untracked.string(''),
345  BranchEvt = cms.untracked.string(''),
346  BranchPre = cms.untracked.string('')
347  ),
348  HFShowerPMT = cms.PSet(
349  common_UsePMT,
350  common_UseHF,
351  PEPerGeVPMT = cms.double(1.0),
352  RefIndex = cms.double(1.52),
353  Aperture = cms.double(0.99),
354  ApertureTrapped = cms.double(0.22),
355  CosApertureTrapped= cms.double(0.5),
356  SinPsiMax = cms.untracked.double(0.5)
357  ),
358  HFShowerStraightBundle = cms.PSet(
359  common_UsePMT,
360  common_UseHF,
361  FactorBundle = cms.double(1.0),
362  RefIndex = cms.double(1.459),
363  Aperture = cms.double(0.33),
364  ApertureTrapped = cms.double(0.22),
365  CosApertureTrapped= cms.double(0.5),
366  SinPsiMax = cms.untracked.double(0.5)
367  ),
368  HFShowerConicalBundle = cms.PSet(
369  common_UsePMT,
370  common_UseHF,
371  FactorBundle = cms.double(1.0),
372  RefIndex = cms.double(1.459),
373  Aperture = cms.double(0.33),
374  ApertureTrapped = cms.double(0.22),
375  CosApertureTrapped= cms.double(0.5),
376  SinPsiMax = cms.untracked.double(0.5)
377  ),
378  HFGflash = cms.PSet(
379  BField = cms.untracked.double(3.8),
380  WatcherOn = cms.untracked.bool(True),
381  FillHisto = cms.untracked.bool(True)
382  ),
383  CastorSD = cms.PSet(
384  useShowerLibrary = cms.bool(True),
385  minEnergyInGeVforUsingSLibrary = cms.double(1.0),
386  nonCompensationFactor = cms.double(0.817),
387  Verbosity = cms.untracked.int32(0)
388  ),
389  CastorShowerLibrary = cms.PSet(
390  FileName = cms.FileInPath('SimG4CMS/Forward/data/CastorShowerLibrary_CMSSW500_Standard.root'),
391  BranchEvt = cms.untracked.string('hadShowerLibInfo.'),
392  BranchEM = cms.untracked.string('emParticles.'),
393  BranchHAD = cms.untracked.string('hadParticles.'),
394  Verbosity = cms.untracked.bool(False)
395  ),
396  BHMSD = cms.PSet(
397  Verbosity = cms.untracked.int32(0)
398  ),
399  FastTimerSD = cms.PSet(
400  Verbosity = cms.untracked.int32(0),
401  TimeSliceUnit = cms.double(0.001), #stepping = 1 ps (for timing)
402  IgnoreTrackID = cms.bool(False),
403  EminHit = cms.double(0.0),
404  CheckID = cms.untracked.bool(True),
405  ),
406  HGCSD = cms.PSet(
407  Verbosity = cms.untracked.int32(0),
408  TimeSliceUnit = cms.double(0.001), #stepping = 1 ps (for timing)
409  IgnoreTrackID = cms.bool(False),
410  EminHit = cms.double(0.0),
411  RejectMouseBite = cms.bool(False),
412  RotatedWafer = cms.bool(False),
413  WaferAngles = cms.untracked.vdouble(90.0,30.0),
414  WaferSize = cms.untracked.double(123.7),
415  MouseBite = cms.untracked.double(2.5),
416  CheckID = cms.untracked.bool(True),
417  ),
418  TotemSD = cms.PSet(
419  Verbosity = cms.untracked.int32(0)
420  ),
421  ZdcSD = cms.PSet(
422  Verbosity = cms.int32(0),
423  UseShowerLibrary = cms.bool(True),
424  UseShowerHits = cms.bool(False),
425  FiberDirection = cms.double(45.0),
426  ZdcHitEnergyCut = cms.double(10.0)
427  ),
428  ZdcShowerLibrary = cms.PSet(
429  Verbosity = cms.untracked.int32(0)
430  ),
431  FP420SD = cms.PSet(
432  Verbosity = cms.untracked.int32(2)
433  ),
434  BscSD = cms.PSet(
435  Verbosity = cms.untracked.int32(0)
436  ),
437  PltSD = cms.PSet(
438  EnergyThresholdForPersistencyInGeV = cms.double(0.2),
439  EnergyThresholdForHistoryInGeV = cms.double(0.05)
440  ),
441  Bcm1fSD = cms.PSet(
442  EnergyThresholdForPersistencyInGeV = cms.double(0.010),
443  EnergyThresholdForHistoryInGeV = cms.double(0.005)
444  ),
445  HcalTB02SD = cms.PSet(
446  UseBirkLaw = cms.untracked.bool(False),
447  BirkC1 = cms.untracked.double(0.013),
448  BirkC3 = cms.untracked.double(1.75),
449  BirkC2 = cms.untracked.double(0.0568)
450  ),
451  EcalTBH4BeamSD = cms.PSet(
452  UseBirkLaw = cms.bool(False),
453  BirkC1 = cms.double(0.013),
454  BirkC3 = cms.double(1.75),
455  BirkC2 = cms.double(0.0568)
456  ),
457  HGCalTestBeamSD = cms.PSet(
458  Material = cms.string('Scintillator'),
459  UseBirkLaw = cms.bool(False),
460  BirkC1 = cms.double(0.013),
461  BirkC3 = cms.double(1.75),
462  BirkC2 = cms.double(0.0568),
463  ),
464  HcalTB06BeamSD = cms.PSet(
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  AHCalSD = cms.PSet(
471  UseBirkLaw = cms.bool(True),
472  BirkC3 = cms.double(1.75),
473  BirkC2 = cms.double(0.142),
474  BirkC1 = cms.double(0.0052),
475  EminHit = cms.double(0.0),
476  TimeSliceUnit = cms.double(1),
477  IgnoreTrackID = cms.bool(False),
478  ),
479 )
480 
481 
482 
485 from Configuration.Eras.Modifier_run2_common_cff import run2_common
486 run2_common.toModify( g4SimHits.HFShowerLibrary, FileName = 'SimG4CMS/Calo/data/HFShowerLibrary_npmt_noatt_eta4_16en_v4.root' )
487 from Configuration.Eras.Modifier_run2_HCAL_2017_cff import run2_HCAL_2017
488 run2_HCAL_2017.toModify( g4SimHits, HCalSD = dict( TestNumberingScheme = True ) )
489 from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing
490 phase2_timing.toModify( g4SimHits.ECalSD,
491  StoreLayerTimeSim = cms.untracked.bool(True),
492  TimeSliceUnit = cms.double(0.001) )
HF Raddam Dose Class in /SimG4CMS/Calo.