Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-25 02:29:03

0001 ##########################################################################
0002 # Creates the TrackerTree.root file.
0003 # Configuration file from TrackerAlignment/test/trackerTreeGenerator_cfg.py
0004 ##
0005 
0006 import FWCore.ParameterSet.Config as cms
0007 import os
0008 
0009 from FWCore.ParameterSet.VarParsing import VarParsing
0010 
0011 # argument parsing
0012 options = VarParsing ("analysis")
0013 options.register("globalTag",
0014                  "auto:phase1_2017_design",
0015                  VarParsing.multiplicity.singleton,
0016                  VarParsing.varType.string,
0017                  "Global tag -> provides tracker geometry")
0018 options.register("firstRun",
0019                  1,
0020                  VarParsing.multiplicity.singleton,
0021                  VarParsing.varType.int,
0022                  "run to define tracker-geometry IOV")
0023 options.parseArguments()
0024 
0025 # Process definition
0026 process = cms.Process("TrackerTreeGeneration")
0027 
0028 # MessageLogger
0029 process.load("FWCore.MessageService.MessageLogger_cfi")
0030 process.MessageLogger.cerr.threshold = 'INFO'
0031 process.MessageLogger.TrackerTreeGenerator=dict()
0032 process.MessageLogger.cerr.INFO.limit = 0
0033 process.MessageLogger.cerr.default.limit = -1
0034 process.MessageLogger.cerr.TrackerTreeGenerator = cms.untracked.PSet(limit = cms.untracked.int32(-1))
0035 
0036 # Process options
0037 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
0038 
0039 # Input source
0040 process.source = cms.Source("EmptySource",
0041                             firstRun = cms.untracked.uint32(options.firstRun))
0042 
0043 # Number of events
0044 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) )
0045 
0046 # Geometry
0047 process.load("Configuration.Geometry.GeometryRecoDB_cff")
0048 
0049 # Conditions
0050 # use always ideal conditions to get no influence from Alignment on absolute Positions, Orientations...
0051 # so it is clear that when choosing special regions in e.g. globalPhi, Modules of the same Rod are contained in the same region
0052 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0053 from Configuration.AlCa.GlobalTag import GlobalTag
0054 process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag)
0055 print("Using global tag:", process.GlobalTag.globaltag.value())
0056 
0057 # Analyzer
0058 process.load("Alignment.TrackerAlignment.TrackerTreeGenerator_cfi")
0059 
0060 # Output File Configuration
0061 process.TFileService = cms.Service(
0062     "TFileService",
0063     fileName = cms.string(options.outputFile)
0064 )
0065 
0066 # Path
0067 process.p = cms.Path(process.TrackerTreeGenerator)