test
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  XtalMat = cms.untracked.string('E_PbWO4'),
266  TestBeam = cms.untracked.bool(False),
267  NullNumbering = cms.untracked.bool(False),
268  StoreRadLength = cms.untracked.bool(False),
269  AgeingWithSlopeLY = cms.untracked.bool(False)
270  ),
271  HCalSD = cms.PSet(
272  common_UseLuminosity,
273  UseBirkLaw = cms.bool(True),
274  BirkC3 = cms.double(1.75),
275  BirkC2 = cms.double(0.142),
276  BirkC1 = cms.double(0.0052),
277  UseShowerLibrary = cms.bool(True),
278  UseParametrize = cms.bool(False),
279  UsePMTHits = cms.bool(False),
280  UseFibreBundleHits = cms.bool(False),
281  TestNumberingScheme = cms.bool(False),
282  EminHitHB = cms.double(0.0),
283  EminHitHE = cms.double(0.0),
284  EminHitHO = cms.double(0.0),
285  EminHitHF = cms.double(0.0),
286  BetaThreshold = cms.double(0.7),
287  TimeSliceUnit = cms.double(1),
288  IgnoreTrackID = cms.bool(False),
289  HEDarkening = cms.bool(False),
290  HFDarkening = cms.bool(False),
291  UseHF = cms.untracked.bool(True),
292  ForTBH2 = cms.untracked.bool(False),
293  UseLayerWt = cms.untracked.bool(False),
294  WtFile = cms.untracked.string('None')
295  ),
296  CaloTrkProcessing = cms.PSet(
297  TestBeam = cms.bool(False),
298  EminTrack = cms.double(0.01),
299  PutHistory = cms.bool(False)
300  ),
301  HFShower = cms.PSet(
302  common_UsePMT,
303  common_UseHF,
304  ProbMax = cms.double(1.0),
305  CFibre = cms.double(0.5),
306  PEPerGeV = cms.double(0.31),
307  TrackEM = cms.bool(False),
308  UseShowerLibrary = cms.bool(True),
309  UseHFGflash = cms.bool(False),
310  EminLibrary = cms.double(0.0),
311  OnlyLong = cms.bool(True),
312  LambdaMean = cms.double(350.0),
313  ApplyFiducialCut = cms.bool(True),
314  RefIndex = cms.double(1.459),
315  Aperture = cms.double(0.33),
316  ApertureTrapped = cms.double(0.22),
317  CosApertureTrapped= cms.double(0.5),
318  SinPsiMax = cms.untracked.double(0.5),
319  ParametrizeLast = cms.untracked.bool(False)
320  ),
321  HFShowerLibrary = cms.PSet(
322  FileName = cms.FileInPath('SimG4CMS/Calo/data/HFShowerLibrary_oldpmt_noatt_eta4_16en_v3.root'),
323  BackProbability = cms.double(0.2),
324  TreeEMID = cms.string('emParticles'),
325  TreeHadID = cms.string('hadParticles'),
326  Verbosity = cms.untracked.bool(False),
327  ApplyFiducialCut= cms.bool(True),
328  BranchPost = cms.untracked.string(''),
329  BranchEvt = cms.untracked.string(''),
330  BranchPre = cms.untracked.string('')
331  ),
332  HFShowerPMT = cms.PSet(
333  common_UsePMT,
334  common_UseHF,
335  PEPerGeVPMT = cms.double(1.0),
336  RefIndex = cms.double(1.52),
337  Aperture = cms.double(0.99),
338  ApertureTrapped = cms.double(0.22),
339  CosApertureTrapped= cms.double(0.5),
340  SinPsiMax = cms.untracked.double(0.5)
341  ),
342  HFShowerStraightBundle = 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  HFShowerConicalBundle = cms.PSet(
353  common_UsePMT,
354  common_UseHF,
355  FactorBundle = cms.double(1.0),
356  RefIndex = cms.double(1.459),
357  Aperture = cms.double(0.33),
358  ApertureTrapped = cms.double(0.22),
359  CosApertureTrapped= cms.double(0.5),
360  SinPsiMax = cms.untracked.double(0.5)
361  ),
362  HFGflash = cms.PSet(
363  BField = cms.untracked.double(3.8),
364  WatcherOn = cms.untracked.bool(True),
365  FillHisto = cms.untracked.bool(True)
366  ),
367  CastorSD = cms.PSet(
368  useShowerLibrary = cms.bool(True),
369  minEnergyInGeVforUsingSLibrary = cms.double(1.0),
370  nonCompensationFactor = cms.double(0.817),
371  Verbosity = cms.untracked.int32(0)
372  ),
373  CastorShowerLibrary = cms.PSet(
374  FileName = cms.FileInPath('SimG4CMS/Forward/data/CastorShowerLibrary_CMSSW500_Standard.root'),
375  BranchEvt = cms.untracked.string('hadShowerLibInfo.'),
376  BranchEM = cms.untracked.string('emParticles.'),
377  BranchHAD = cms.untracked.string('hadParticles.'),
378  Verbosity = cms.untracked.bool(False)
379  ),
380  BHMSD = cms.PSet(
381  Verbosity = cms.untracked.int32(0)
382  ),
383  FastTimerSD = cms.PSet(
384  Verbosity = cms.untracked.int32(0)
385  ),
386  HGCSD = cms.PSet(
387  Verbosity = cms.untracked.int32(0),
388  TimeSliceUnit = cms.double(1),
389  IgnoreTrackID = cms.bool(False),
390  EminHit = cms.double(0.0),
391  CheckID = cms.untracked.bool(True),
392  ),
393  TotemSD = cms.PSet(
394  Verbosity = cms.untracked.int32(0)
395  ),
396  ZdcSD = cms.PSet(
397  Verbosity = cms.int32(0),
398  UseShowerLibrary = cms.bool(True),
399  UseShowerHits = cms.bool(False),
400  FiberDirection = cms.double(45.0),
401  ZdcHitEnergyCut = cms.double(10.0)
402  ),
403  ZdcShowerLibrary = cms.PSet(
404  Verbosity = cms.untracked.int32(0)
405  ),
406  FP420SD = cms.PSet(
407  Verbosity = cms.untracked.int32(2)
408  ),
409  BscSD = cms.PSet(
410  Verbosity = cms.untracked.int32(0)
411  ),
412  PltSD = cms.PSet(
413  EnergyThresholdForPersistencyInGeV = cms.double(0.2),
414  EnergyThresholdForHistoryInGeV = cms.double(0.05)
415  ),
416  Bcm1fSD = cms.PSet(
417  EnergyThresholdForPersistencyInGeV = cms.double(0.010),
418  EnergyThresholdForHistoryInGeV = cms.double(0.005)
419  ),
420  HcalTB02SD = cms.PSet(
421  UseBirkLaw = cms.untracked.bool(False),
422  BirkC1 = cms.untracked.double(0.013),
423  BirkC3 = cms.untracked.double(1.75),
424  BirkC2 = cms.untracked.double(0.0568)
425  ),
426  EcalTBH4BeamSD = cms.PSet(
427  UseBirkLaw = cms.bool(False),
428  BirkC1 = cms.double(0.013),
429  BirkC3 = cms.double(1.75),
430  BirkC2 = cms.double(0.0568)
431  ),
432  HcalTB06BeamSD = cms.PSet(
433  UseBirkLaw = cms.bool(False),
434  BirkC1 = cms.double(0.013),
435  BirkC3 = cms.double(1.75),
436  BirkC2 = cms.double(0.0568)
437  )
438 )
439 
440 
441 ##
442 ## Change the HFShowerLibrary file used for Run 2
443 ##
444 eras.run2_common.toModify( g4SimHits.HFShowerLibrary, FileName = 'SimG4CMS/Calo/data/HFShowerLibrary_npmt_noatt_eta4_16en_v3.root' )