Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-29 01:21:48

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("CastorTest")
0004 
0005 process.load("SimGeneral.HepPDTESSource.pdt_cfi")
0006 
0007 process.load("IOMC.EventVertexGenerators.VtxSmearedGauss_cfi")
0008 process.load('Configuration/StandardSequences/Generator_cff')
0009 
0010 process.load("Configuration.StandardSequences.GeometryExtended_cff")
0011 process.load("Configuration.Geometry.GeometryReco_cff")
0012 
0013 process.load("IOMC.RandomEngine.IOMC_cff")
0014 process.RandomNumberGeneratorService.generator.initialSeed = 456789
0015 process.RandomNumberGeneratorService.g4SimHits.initialSeed = 9876
0016 process.RandomNumberGeneratorService.VtxSmeared.initialSeed = 123456789
0017 
0018 process.load("SimG4Core.Application.g4SimHits_cfi")
0019 
0020 process.MessageLogger = cms.Service("MessageLogger",
0021     cerr = cms.untracked.PSet(
0022         enable = cms.untracked.bool(False)
0023     ),
0024     cout = cms.untracked.PSet(
0025         CaloSim = cms.untracked.PSet(
0026             limit = cms.untracked.int32(0)
0027         ),
0028         DEBUG = cms.untracked.PSet(
0029             limit = cms.untracked.int32(0)
0030         ),
0031         ForwardSim = cms.untracked.PSet(
0032             limit = cms.untracked.int32(0)
0033         ),
0034         INFO = cms.untracked.PSet(
0035             limit = cms.untracked.int32(0)
0036         ),
0037         enable = cms.untracked.bool(True),
0038         threshold = cms.untracked.string('INFO')
0039     ),
0040     debugModules = cms.untracked.vstring('*')
0041 )
0042 
0043 process.maxEvents = cms.untracked.PSet(
0044     input = cms.untracked.int32(1000)
0045 )
0046 
0047 process.source = cms.Source("EmptySource")
0048 
0049 process.generator = cms.EDProducer("FlatRandomEGunProducer",
0050     PGunParameters = cms.PSet(
0051         PartID = cms.vint32(211),    # 11 => el , 211 => pi
0052         MinEta = cms.double(-6.2),   # -6.2
0053         MaxEta = cms.double(-5.6),   # -5.6
0054         MinPhi = cms.double(0.),     #  0.
0055         MaxPhi = cms.double(0.7854), #  0.7854
0056         MinE = cms.double(45.00),
0057         MaxE = cms.double(45.00)
0058     ),
0059     AddAntiParticle = cms.bool(False),
0060     Verbosity = cms.untracked.int32(0)
0061 
0062 )
0063 
0064 process.o1 = cms.OutputModule("PoolOutputModule",
0065     fileName = cms.untracked.string('/tmp/sim_pion_SL_1000evts_E45_eta-6.2--5.6_phi0-0.7854_370_NSH_FG_ppONtrkproj.root')
0066 )
0067 
0068 process.common_maximum_timex = cms.PSet( # need to be localy redefined
0069    MaxTrackTime  = cms.double(500.0),  # need to be localy redefined
0070    MaxTrackTimeForward = cms.double(2000.0), # ns
0071    MaxTimeNames  = cms.vstring('ZDCRegion','QuadRegion','InterimRegion'), # need to be localy redefined
0072    MaxTrackTimes = cms.vdouble(2000.0,0.,0.),  # need to be localy redefined
0073    MaxZCentralCMS = cms.double(50.0), # m
0074    DeadRegions   = cms.vstring('QuadRegion','InterimRegion'),
0075    CriticalEnergyForVacuum = cms.double(2.0),   # MeV
0076    CriticalDensity         = cms.double(1e-15)  # g/cm3
0077 )
0078 process.p1 = cms.Path(process.generator*process.VtxSmeared*process.generatorSmeared*process.g4SimHits)
0079 process.outpath = cms.EndPath(process.o1)
0080 
0081 process.g4SimHits.UseMagneticField = False
0082 process.g4SimHits.Physics.DefaultCutValue = 10.
0083 process.g4SimHits.Generator.ApplyEtaCuts = False
0084 process.g4SimHits.CaloTrkProcessing.TestBeam = True
0085 process.g4SimHits.CastorSD.useShowerLibrary = True
0086 process.g4SimHits.CastorSD.minEnergyInGeVforUsingSLibrary = 1.0   # default = 1.0
0087 #process.g4SimHits.CastorShowerLibrary.FileName = 'SimG4CMS/Forward/data/castorShowerLibrary.root'
0088 process.g4SimHits.CastorShowerLibrary.BranchEvt = 'hadShowerLibInfo.'
0089 process.g4SimHits.CastorShowerLibrary.BranchEM  = 'emParticles.'
0090 process.g4SimHits.CastorShowerLibrary.BranchHAD = 'hadParticles.'
0091 
0092 process.g4SimHits.StackingAction = cms.PSet(
0093    process.common_heavy_suppression,
0094    process.common_maximum_timex,        # need to be localy redefined
0095    KillDeltaRay  = cms.bool(False),
0096    TrackNeutrino = cms.bool(False),
0097    KillHeavy     = cms.bool(False),
0098    KillGamma     = cms.bool(True),
0099    GammaThreshold = cms.double(0.0001), ## (MeV)
0100    SaveFirstLevelSecondary = cms.untracked.bool(True),
0101    SavePrimaryDecayProductsAndConversionsInTracker = cms.untracked.bool(True),
0102    SavePrimaryDecayProductsAndConversionsInCalo    = cms.untracked.bool(True),
0103    SavePrimaryDecayProductsAndConversionsInMuon    = cms.untracked.bool(True),
0104    RusRoGammaEnergyLimit  = cms.double(5.0), ## (MeV)
0105    RusRoEcalGamma         = cms.double(0.3),
0106    RusRoHcalGamma         = cms.double(0.3),
0107    RusRoMuonIronGamma     = cms.double(0.3),
0108    RusRoPreShowerGamma    = cms.double(0.3),
0109    RusRoCastorGamma       = cms.double(0.3),
0110    RusRoWorldGamma        = cms.double(0.3),
0111    RusRoNeutronEnergyLimit  = cms.double(10.0), ## (MeV)
0112    RusRoEcalNeutron         = cms.double(0.1),
0113    RusRoHcalNeutron         = cms.double(0.1),
0114    RusRoMuonIronNeutron     = cms.double(0.1),
0115    RusRoPreShowerNeutron    = cms.double(0.1),
0116    RusRoCastorNeutron       = cms.double(0.1),
0117    RusRoWorldNeutron        = cms.double(0.1),
0118    RusRoProtonEnergyLimit  = cms.double(0.0),
0119    RusRoEcalProton         = cms.double(1.0),
0120    RusRoHcalProton         = cms.double(1.0),
0121    RusRoMuonIronProton     = cms.double(1.0),
0122    RusRoPreShowerProton    = cms.double(1.0),
0123    RusRoCastorProton       = cms.double(1.0),
0124    RusRoWorldProton        = cms.double(1.0)
0125 )
0126 
0127 process.g4SimHits.SteppingAction = cms.PSet(
0128    process.common_maximum_timex, # need to be localy redefined
0129    MaxNumberOfSteps        = cms.int32(50000),
0130    EkinNames               = cms.vstring(),
0131    EkinThresholds          = cms.vdouble(),
0132    EkinParticles           = cms.vstring(),
0133    Verbosity               = cms.untracked.int32(1)
0134 )
0135 
0136 process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
0137     type = cms.string('CastorTestAnalysis'),
0138     CastorTestAnalysis = cms.PSet(
0139         EventNtupleFlag = cms.int32(1),
0140         StepNtupleFlag  = cms.int32(0),
0141         EventNtupleFileName = cms.string('eventNtuple.root'),
0142         StepNtupleFileName  = cms.string('stepNtuple.root'),
0143         Verbosity = cms.int32(0),
0144     )
0145 ))