Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-06-22 02:24:14

0001 import FWCore.ParameterSet.Config as cms
0002 from Configuration.Eras.Modifier_hgcaltb_cff import hgcaltb
0003 
0004 process = cms.Process('SIM', hgcaltb)
0005 
0006 # import of standard configurations
0007 process.load("FWCore.MessageService.MessageLogger_cfi")
0008 process.load('Configuration.StandardSequences.Services_cff')
0009 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0010 process.load('Configuration.EventContent.EventContent_cff')
0011 process.load('Geometry.HGCalTBCommonData.testTB230SepXML_cfi')
0012 process.load('Geometry.HGCalCommonData.hgcalEENumberingInitialization_cfi')
0013 process.load('Geometry.HGCalCommonData.hgcalEEParametersInitialization_cfi')
0014 process.load('Geometry.HcalTestBeamData.hcalTB06Parameters_cff')
0015 process.load('Configuration.StandardSequences.MagneticField_0T_cff')
0016 process.load('Configuration.StandardSequences.Generator_cff')
0017 process.load('IOMC.EventVertexGenerators.VtxSmearedFlat_cfi')
0018 process.load('GeneratorInterface.Core.genFilterSummary_cff')
0019 process.load('Configuration.StandardSequences.SimIdeal_cff')
0020 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0021 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0022 process.load('SimG4CMS.HGCalTestBeam.HGCalTB23Analyzer_cfi')
0023 
0024 process.maxEvents = cms.untracked.PSet(
0025     input = cms.untracked.int32(5)
0026 )
0027 
0028 if 'MessageLogger' in process.__dict__:
0029     process.MessageLogger.G4cerr=dict()
0030     process.MessageLogger.G4cout=dict()
0031     process.MessageLogger.HGCSim=dict()
0032     process.MessageLogger.CaloSim=dict()
0033     process.MessageLogger.FlatThetaGun=dict()
0034     process.MessageLogger.FlatEvtVtx=dict()
0035     process.MessageLogger.HGCalGeom=dict()
0036     process.MessageLogger.HGCalGeomX=dict()
0037 
0038 # Input source
0039 process.source = cms.Source("EmptySource")
0040 
0041 process.options = cms.untracked.PSet(
0042 )
0043 
0044 # Production Info
0045 process.configurationMetadata = cms.untracked.PSet(
0046     annotation = cms.untracked.string('SingleMuonE200_cfi nevts:10'),
0047     name = cms.untracked.string('Applications'),
0048     version = cms.untracked.string('$Revision: 1.19 $')
0049 )
0050 
0051 # Output definition
0052 
0053 process.RAWSIMoutput = cms.OutputModule("PoolOutputModule",
0054     SelectEvents = cms.untracked.PSet(
0055         SelectEvents = cms.vstring('generation_step')
0056     ),
0057     dataset = cms.untracked.PSet(
0058         dataTier = cms.untracked.string('GEN-SIM'),
0059         filterName = cms.untracked.string('')
0060     ),
0061     eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
0062     fileName = cms.untracked.string('file:gensim.root'),
0063     outputCommands = process.RAWSIMEventContent.outputCommands,
0064     splitLevel = cms.untracked.int32(0)
0065 )
0066 
0067 # Additional output definition
0068 process.TFileService = cms.Service("TFileService",
0069                                    fileName = cms.string('TBGenSimSep.root')
0070                                    )
0071 
0072 # Other statements
0073 process.genstepfilter.triggerConditions=cms.vstring("generation_step")
0074 from Configuration.AlCa.GlobalTag import GlobalTag
0075 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0076 
0077 process.generator = cms.EDProducer("FlatRandomEThetaGunProducer",
0078     AddAntiParticle = cms.bool(False),
0079     PGunParameters = cms.PSet(
0080         MinE = cms.double(199.99),
0081         MaxE = cms.double(200.01),
0082         MinTheta = cms.double(0.0),
0083         MaxTheta = cms.double(0.0),
0084         MinPhi = cms.double(-3.14159265359),
0085         MaxPhi = cms.double(3.14159265359),
0086         PartID = cms.vint32(11)
0087     ),
0088     Verbosity = cms.untracked.int32(1),
0089     firstRun = cms.untracked.uint32(1),
0090     psethack = cms.string('single electron E 10')
0091 )
0092 process.VtxSmeared.MinZ = -100.0
0093 process.VtxSmeared.MaxZ = -100.0
0094 #process.VtxSmeared.MinX = -1.0
0095 #process.VtxSmeared.MaxX =  1.0
0096 #process.VtxSmeared.MinY = -1.0
0097 #process.VtxSmeared.MaxY =  1.0
0098 process.g4SimHits.OnlySDs = ['HGCalSensitiveDetector', 'HcalTB06BeamDetector']
0099 process.g4SimHits.HGCSD.Detectors = 1
0100 process.g4SimHits.HGCSD.RejectMouseBite = False
0101 process.g4SimHits.HGCSD.RotatedWafer    = False
0102 
0103 process.g4SimHits.CaloTrkProcessing.TestBeam = True
0104 process.g4SimHits.HCalSD.ForTBHCAL = True
0105 process.g4SimHits.NonBeamEvent = True
0106 process.g4SimHits.UseMagneticField = False
0107 
0108 process.g4SimHits.EventVerbose = 2
0109 process.g4SimHits.SteppingVerbosity = 2
0110 process.g4SimHits.StepVerboseThreshold= 0.1
0111 process.g4SimHits.VerboseEvents = [1]
0112 process.g4SimHits.VertexNumber = []
0113 process.g4SimHits.VerboseTracks =[]
0114 
0115 # Path and EndPath definitions
0116 process.generation_step = cms.Path(process.pgen)
0117 process.simulation_step = cms.Path(process.psim)
0118 process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
0119 process.analysis_step = cms.Path(process.HGCalTB23Analyzer)
0120 process.endjob_step = cms.EndPath(process.endOfProcess)
0121 process.RAWSIMoutput_step = cms.EndPath(process.RAWSIMoutput)
0122 
0123 process.g4SimHits.Physics.type = 'SimG4Core/Physics/FTFP_BERT_EMN'
0124 
0125 # Schedule definition
0126 process.schedule = cms.Schedule(process.generation_step,
0127                 process.simulation_step,
0128                         process.analysis_step,
0129                 process.endjob_step,
0130                 process.RAWSIMoutput_step,
0131                 )
0132 # filter all path with the production filter sequence
0133 for path in process.paths:
0134     getattr(process,path)._seq = process.generator * getattr(process,path)._seq 
0135 
0136