Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 23:31:28

0001 #! /usr/bin/env cmsRun
0002 # cmsRun trackingMaterialAnalyser fromDB=False
0003 
0004 import FWCore.ParameterSet.Config as cms
0005 from FWCore.ParameterSet.VarParsing import VarParsing
0006 
0007 process = cms.Process("MaterialAnalyser")
0008 
0009 options = VarParsing('analysis')
0010 
0011 options.register('fromDB',
0012                  False,
0013                  VarParsing.multiplicity.singleton,
0014                  VarParsing.varType.bool,
0015                  'Read Geometry from DB?',
0016 )
0017 
0018 options.parseArguments()
0019 
0020 if options.fromDB :
0021    process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0022    from Configuration.AlCa.GlobalTag import GlobalTag
0023    process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '')
0024 else:
0025    process.load('Configuration.Geometry.GeometryExtended2026D49Reco_cff')
0026 
0027 process.load('FWCore.MessageService.MessageLogger_cfi')
0028 process.MessageLogger.files.LogTrackingMaterialAnalysis = dict()
0029 process.MessageLogger.TrackingMaterialAnalysis=dict()
0030 
0031 # Add our custom detector grouping to DDD
0032 process.XMLIdealGeometryESSource.geomXMLFiles.extend(['SimTracker/TrackerMaterialAnalysis/data/trackingMaterialGroups_ForPhaseII.xml'])
0033 
0034 # Analyze and plot the tracking material
0035 process.load("SimTracker.TrackerMaterialAnalysis.trackingMaterialAnalyser_ForPhaseII_cff")
0036 process.trackingMaterialAnalyser.SplitMode         = "NearestLayer"
0037 process.trackingMaterialAnalyser.SaveParameters    = True
0038 process.trackingMaterialAnalyser.SaveXML           = True
0039 process.trackingMaterialAnalyser.SaveDetailedPlots = True
0040 
0041 process.source = cms.Source("PoolSource",
0042     fileNames = cms.untracked.vstring('file:material.root')
0043 )
0044 
0045 process.path = cms.Path(process.trackingMaterialAnalyser)
0046 
0047