File indexing completed on 2024-04-06 12:31:43
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
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
0023
0024 process.MessageLogger.cerr.enable = False
0025 process.MessageLogger.cout.enable = True
0026 labels = ["propAna", "geopro"]
0027 messageLogger = dict()
0028 for category in labels:
0029 main_key = '%sMessageLogger'%(category)
0030 category_key = 'Geant4e'
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
0038 setattr(process.MessageLogger.files, category, dict())
0039
0040 setattr(process.MessageLogger.files, category, messageLogger[main_key])
0041
0042
0043
0044
0045 process.source = cms.Source("PoolSource",
0046 fileNames = cms.untracked.vstring(
0047 '/store/relval/CMSSW_12_5_0_pre3/RelValSingleMuPt10/GEN-SIM-RECO/124X_mcRun3_2022_realistic_v8-v2/10000/6a6528c0-9d66-4358-bacc-158c40b439cf.root'
0048 )
0049 )
0050
0051 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(20) )
0052
0053
0054
0055
0056 from TrackPropagation.Geant4e.Geant4ePropagator_cfi import *
0057 from TrackingTools.TrackRefitter.TracksToTrajectories_cff import *
0058
0059
0060
0061
0062 from SimG4Core.Application.g4SimHits_cfi import g4SimHits as _g4SimHits
0063 process.geopro = cms.EDProducer("GeometryProducer",
0064 GeoFromDD4hep = cms.bool(False),
0065 UseMagneticField = cms.bool(True),
0066 UseSensitiveDetectors = cms.bool(False),
0067 MagneticField = _g4SimHits.MagneticField.clone()
0068 )
0069
0070 from Configuration.ProcessModifiers.dd4hep_cff import dd4hep
0071 dd4hep.toModify(process.geopro, GeoFromDD4hep = True )
0072
0073
0074
0075
0076 process.propAna = cms.EDAnalyzer("Geant4ePropagatorAnalyzer",
0077 G4VtxSrc = cms.InputTag("g4SimHits"),
0078 G4TrkSrc = cms.InputTag("g4SimHits"),
0079 RootFile = cms.string("Geant4e.root"),
0080 BeamCenter = cms.double(0),
0081 BeamInterval = cms.double(20),
0082 StudyStation = cms.int32(-1)
0083 )
0084
0085 process.g4AnalPath = cms.Path( process.geopro*process.propAna )
0086 process.schedule = cms.Schedule( process.g4AnalPath )