Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:45:18

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