Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
import FWCore.ParameterSet.Config as cms

from Configuration.Eras.Era_Run3_dd4hep_cff import Run3_dd4hep

process = cms.Process("GeometryTest", Run3_dd4hep)

process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
process.load('CondCore.CondDB.CondDB_cfi')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:upgrade2021', '')

process.load('FWCore.MessageLogger.MessageLogger_cfi')
if 'MessageLogger' in process.__dict__:
    process.MessageLogger.CaloGeom=dict()

process.source = cms.Source("EmptySource")

process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(4)
)

process.CondDB.timetype = cms.untracked.string('runnumber')
process.CondDB.connect = cms.string('sqlite_file:myfile.db')
process.PoolDBESSourceGeometry = cms.ESSource("PoolDBESSource",
                                              process.CondDB,
                                              toGet = cms.VPSet(cms.PSet(record = cms.string('PEcalBarrelRcd'),          tag = cms.string('EBRECO_Geometry_TagXX')),
                                                                cms.PSet(record = cms.string('PEcalEndcapRcd'),          tag = cms.string('EERECO_Geometry_TagXX')),
                                                                cms.PSet(record = cms.string('PEcalPreshowerRcd'),       tag = cms.string('EPRECO_Geometry_TagXX')),
                                                                cms.PSet(record = cms.string('PHcalRcd'),                tag = cms.string('HCALRECO_Geometry_TagXX')),
                                                                cms.PSet(record = cms.string('PCaloTowerRcd'),           tag = cms.string('CTRECO_Geometry_TagXX')),
                                                                cms.PSet(record = cms.string('PZdcRcd'),                 tag = cms.string('ZDCRECO_Geometry_TagXX')),
                                                                cms.PSet(record = cms.string('PCastorRcd'),              tag = cms.string('CASTORRECO_Geometry_TagXX')),
                                                                cms.PSet(record = cms.string('CSCRecoGeometryRcd'),      tag = cms.string('CSCRECO_Geometry_TagXX')),
                                                                cms.PSet(record = cms.string('CSCRecoDigiParametersRcd'),tag = cms.string('CSCRECODIGI_Geometry_TagXX')),
                                                                cms.PSet(record = cms.string('DTRecoGeometryRcd'),       tag = cms.string('DTRECO_Geometry_TagXX')),
                                                                cms.PSet(record = cms.string('IdealGeometryRecord'),     tag = cms.string('TKRECO_Geometry_TagXX')),
                                                                cms.PSet(record = cms.string('PZdcRcd'),                 tag = cms.string('ZDCRECO_Geometry_TagXX')),
                                                                cms.PSet(record = cms.string('RPCRecoGeometryRcd'),      tag = cms.string('RPCRECO_Geometry_TagXX'))
                                                                )
                                              )

process.es_prefer_geometry = cms.ESPrefer( "PoolDBESSource", "PoolDBESSourceGeometry" )

process.etta = cms.EDAnalyzer("DumpEcalTrigTowerMapping")

process.ctgw = cms.EDAnalyzer("TestEcalGetWindow")

process.cga = cms.EDAnalyzer("CaloGeometryAnalyzer",
                             fullEcalDump = cms.untracked.bool(True)
                             )

process.mfa = cms.EDAnalyzer("testMagneticField")

process.TFileService = cms.Service("TFileService",
                                   fileName = cms.string('calogeom.root')
                                   )

# process.p1 = cms.Path(process.etta*process.ctgw*process.cga*process.mfa)
process.p1 = cms.Path(process.etta*process.ctgw*process.cga)
# FIXME Restore magnetic field test. Code has to be added to read field record