Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:05:48

0001 import FWCore.ParameterSet.Config as cms
0002 from Configuration.Eras.Era_Run3_cff import Run3
0003 
0004 process = cms.Process("PROPAGATORTEST",Run3)
0005 
0006 ####################################################
0007 # Message Logger 
0008 ####################################################  
0009 process.load("FWCore.MessageService.MessageLogger_cfi")
0010 process.load('Configuration.StandardSequences.Services_cff')
0011 process.load('Configuration.StandardSequences.GeometryDB_cff')
0012 process.load("Configuration.EventContent.EventContent_cff")
0013 process.load("Configuration.StandardSequences.Reconstruction_cff")
0014 process.load('Configuration.StandardSequences.MagneticField_38T_cff')
0015 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0016 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0017 
0018 from Configuration.AlCa.GlobalTag import GlobalTag
0019 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2022_realistic', '')
0020 
0021 ####################################################
0022 # MessageLogger customizations
0023 ####################################################
0024 process.MessageLogger.cerr.enable = False
0025 process.MessageLogger.cout.enable = True
0026 labels = ["propTest", "geopro"] # Python module's label
0027 messageLogger = dict()
0028 for category in labels:
0029       main_key = '%sMessageLogger'%(category)
0030       category_key = 'Geant4e' # C++ EDProducer type
0031       messageLogger[main_key] = dict(
0032               filename = '%s_%s.log' % ("debugG4e", category),
0033               threshold = 'DEBUG',
0034               default = dict(limit=0)
0035               )
0036       messageLogger[main_key][category_key] = dict(limit=-1)
0037       # First create defaults
0038       setattr(process.MessageLogger.files, category, dict())
0039       # Then modify them
0040       setattr(process.MessageLogger.files, category, messageLogger[main_key])
0041 
0042 process.source = cms.Source("EmptySource")
0043 process.maxEvents = cms.untracked.PSet(
0044     input = cms.untracked.int32(1)
0045 )
0046 
0047 ####################################################
0048 ## Set up geometry
0049 ####################################################
0050 from SimG4Core.Application.g4SimHits_cfi import g4SimHits as _g4SimHits
0051 process.geopro = cms.EDProducer("GeometryProducer",
0052      GeoFromDD4hep = cms.bool(False),
0053      UseMagneticField = cms.bool(True),
0054      UseSensitiveDetectors = cms.bool(False),
0055      MagneticField =  _g4SimHits.MagneticField.clone()
0056 )
0057 
0058 from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
0059 dd4hep.toModify(process.geopro, GeoFromDD4hep = True )
0060 
0061 ####################################################
0062 # Extrapolator
0063 ####################################################
0064 process.propTest = cms.EDAnalyzer("SimpleGeant4ePropagatorTest",
0065 )
0066 
0067 process.g4TestPath = cms.Path( process.geopro*process.propTest )
0068 process.schedule = cms.Schedule( process.g4TestPath )