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