Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-05-05 03:16:17

0001 from __future__ import print_function
0002 # Auto generated configuration file
0003 # using:
0004 # Revision: 1.19
0005 # Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
0006 # with command line options: step3 --conditions auto:run2_mc -s RAW2DIGI,RECO:reconstruction_trackingOnly,VALIDATION:@trackingOnlyValidation,DQM:@trackingOnlyDQM --datatier GEN-SIM-RECO,DQMIO -n 10 --era Run2_2016 --eventcontent RECOSIM,DQM --filein file:step2.root --fileout file:step3.root
0007 import FWCore.ParameterSet.Config as cms
0008 
0009 from FWCore.ParameterSet.VarParsing import VarParsing
0010 
0011 
0012 options = VarParsing ('analysis')
0013 options.register('inputFile',
0014                  None,
0015                  VarParsing.multiplicity.singleton,
0016                  VarParsing.varType.string,
0017                  "Input file to use.")
0018 options.register('fromLocalXML',                   # name
0019                 False,                             # default value
0020                 VarParsing.multiplicity.singleton, # kind of option, if single or multiple
0021                 VarParsing.varType.bool,           # type of the option
0022                 "Read Material description for XML files in release or in local installation" # Info message
0023                 )
0024 options.register('sample',
0025                 'SingleMuPt100',
0026                 VarParsing.multiplicity.singleton,
0027                 VarParsing.varType.string,
0028                 """Input sample to use. Will also modify the output filename accordingly.
0029                        Currently supported samples are:
0030                        SingleMuPt10,
0031                        [SingleMuPt100],
0032                        SingleElectronPt35,
0033                        SingleElectronPt10,
0034                        TTbar_PU25""")
0035 options.register('ntuple',
0036                 False,
0037                 VarParsing.multiplicity.singleton,
0038                 VarParsing.varType.bool,
0039                 "Flag to trigger the production of MTV ntuple",
0040                 )
0041 options.parseArguments()
0042 
0043 # DEFAULT VALUES
0044 output_file_inRECO = 'file:matbdgForReco_FromReco_%s.root' % options.sample
0045 output_file_inDQM  = 'file:matbdgForReco_FromReco_%s_inDQM.root'% options.sample
0046 input_file = '/store/relval/CMSSW_8_1_0_pre6/RelValSingleMuPt100_UP15/GEN-SIM-DIGI-RAW-HLTDEBUG/80X_mcRun2_asymptotic_v14-v1/00000/58AD9241-0A2A-E611-AB04-0025905B856E.root'
0047 input_files = []
0048 
0049 if options.fromLocalXML == True:
0050   output_file_inRECO = 'file:matbdgForReco_FromReco_%s_FromLocalXML.root' % options.sample
0051   output_file_inDQM  = 'file:matbdgForReco_FromReco_%s_FromLocalXML_inDQM.root' % options.sample
0052 
0053 if options.sample == 'SingleMuPt10':
0054   input_file = ['/store/relval/CMSSW_8_1_0_pre6/RelValSingleMuPt10_UP15/GEN-SIM-DIGI-RAW-HLTDEBUG/80X_mcRun2_asymptotic_v14-v1/00000/0263098F-092A-E611-AC04-0CC47A745250.root',
0055                 '/store/relval/CMSSW_8_1_0_pre6/RelValSingleMuPt10_UP15/GEN-SIM-DIGI-RAW-HLTDEBUG/80X_mcRun2_asymptotic_v14-v1/00000/2081A255-092A-E611-9EA6-0CC47A4C8E2E.root',
0056                 '/store/relval/CMSSW_8_1_0_pre6/RelValSingleMuPt10_UP15/GEN-SIM-DIGI-RAW-HLTDEBUG/80X_mcRun2_asymptotic_v14-v1/00000/80727153-092A-E611-948F-0CC47A745294.root',
0057                 '/store/relval/CMSSW_8_1_0_pre6/RelValSingleMuPt10_UP15/GEN-SIM-DIGI-RAW-HLTDEBUG/80X_mcRun2_asymptotic_v14-v1/00000/E676F884-092A-E611-8121-0CC47A4D7602.root',
0058                 '/store/relval/CMSSW_8_1_0_pre6/RelValSingleMuPt10_UP15/GEN-SIM-DIGI-RAW-HLTDEBUG/80X_mcRun2_asymptotic_v14-v1/00000/F06FBE84-092A-E611-ADA9-0CC47A4D769C.root']
0059 
0060 if options.sample == 'SingleElectronPt35':
0061   input_file = '/store/relval/CMSSW_8_1_0_pre6/RelValSingleElectronPt35_UP15/GEN-SIM-DIGI-RAW-HLTDEBUG/80X_mcRun2_asymptotic_v14-v1/00000/64866125-092A-E611-ACC3-0025905B8612.root'
0062 
0063 if options.sample == 'SingleElectronPt10':
0064   input_file = '/store/relval/CMSSW_8_1_0_pre6/RelValSingleElectronPt10_UP15/GEN-SIM-DIGI-RAW-HLTDEBUG/80X_mcRun2_asymptotic_v14-v1/00000/E05284C8-092A-E611-AED9-0CC47A4D75EC.root'
0065 
0066 if options.sample == 'TTbar_PU25':
0067   input_files = ['/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/C262684A-B92C-E611-A9CD-0CC47A4C8F08.root',
0068                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/C2EC8F1F-BA2C-E611-9EF5-0CC47A4C8E56.root',
0069                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/C4989350-B92C-E611-998D-0CC47A4D76AC.root',
0070                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/C68B5B52-B92C-E611-9AA3-0025905A613C.root',
0071                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/CADAE916-B92C-E611-AC71-0CC47A78A414.root',
0072                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/CC36B308-B92C-E611-B34B-003048FFD7AA.root',
0073                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/CC92BC5C-B92C-E611-B68B-0025905B857A.root',
0074                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/DE9B7443-B92C-E611-BD58-0CC47A78A2EC.root',
0075                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/E6DCC67A-B92C-E611-A83A-0CC47A4D76B2.root',
0076                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/EAFB710C-B92C-E611-A31D-0025905B85AA.root',
0077                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/F628B94F-B92C-E611-836C-0CC47A4D7646.root',
0078                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/FAA55833-BA2C-E611-BAFA-0025905A6092.root',
0079                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/FC4C281A-BA2C-E611-B1C3-0CC47A4C8F06.root',
0080                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/FC5E3132-B92C-E611-8C42-0025905B85FC.root',
0081                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/FC929909-B92C-E611-851F-0025905B85D2.root',
0082                  '/store/relval/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU25ns_80X_mcRun2_asymptotic_v14-v1/00000/FEBE1221-B92C-E611-B8CE-0025905A608E.root']
0083 
0084 if options.inputFile is not None:
0085   input_file = options.inputFile
0086 
0087 from Configuration.Eras.Era_Run2_2016_cff import Run2_2016
0088 process = cms.Process('MATERIAL',Run2_2016)
0089 
0090 # import of standard configurations
0091 process.load('Configuration.StandardSequences.Services_cff')
0092 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0093 process.load('FWCore.MessageService.MessageLogger_cfi')
0094 process.load('Configuration.EventContent.EventContent_cff')
0095 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0096 if options.fromLocalXML:
0097   print("Loading material from local XMLs")
0098   process.load('Configuration.Geometry.GeometryExtended2016Reco_cff')
0099 else:
0100   process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0101 process.load('Configuration.StandardSequences.MagneticField_cff')
0102 process.load('Configuration.StandardSequences.RawToDigi_cff')
0103 process.load('Configuration.StandardSequences.Reconstruction_cff')
0104 process.load('Configuration.StandardSequences.Validation_cff')
0105 process.load('DQMOffline.Configuration.DQMOfflineMC_cff')
0106 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0107 
0108 process.maxEvents = cms.untracked.PSet(
0109     input = cms.untracked.int32(-1)
0110 )
0111 
0112 # Input source
0113 process.source = cms.Source("PoolSource",
0114     fileNames = cms.untracked.vstring(input_file),
0115 #    fileNames = cms.untracked.vstring('file:/data/rovere/RelVal/CMSSW_8_1_0_pre6/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/80X_mcRun2_asymptotic_v14-v1/4A127630-092A-E611-AC30-0025905B858A.root'),
0116     secondaryFileNames = cms.untracked.vstring()
0117 )
0118 if len(input_files):
0119   process.source.fileNames = cms.untracked.vstring()
0120   process.source.fileNames.extend(input_files)
0121 process.options = cms.untracked.PSet(
0122 
0123 )
0124 
0125 # Production Info
0126 process.configurationMetadata = cms.untracked.PSet(
0127     annotation = cms.untracked.string('step3 nevts:10'),
0128     name = cms.untracked.string('Applications'),
0129     version = cms.untracked.string('$Revision: 1.19 $')
0130 )
0131 
0132 # Output definition
0133 
0134 process.RECOSIMoutput = cms.OutputModule("PoolOutputModule",
0135     dataset = cms.untracked.PSet(
0136         dataTier = cms.untracked.string('GEN-SIM-RECO'),
0137         filterName = cms.untracked.string('')
0138     ),
0139     eventAutoFlushCompressedSize = cms.untracked.int32(5242880),
0140     fileName = cms.untracked.string(output_file_inRECO),
0141     outputCommands = process.RECOSIMEventContent.outputCommands,
0142     splitLevel = cms.untracked.int32(0)
0143 )
0144 
0145 process.DQMoutput = cms.OutputModule("DQMRootOutputModule",
0146     dataset = cms.untracked.PSet(
0147         dataTier = cms.untracked.string('DQMIO'),
0148         filterName = cms.untracked.string('')
0149     ),
0150     fileName = cms.untracked.string(output_file_inDQM),
0151     outputCommands = process.DQMEventContent.outputCommands,
0152     splitLevel = cms.untracked.int32(0)
0153 )
0154 
0155 
0156 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0157 process.materialdumper = DQMEDAnalyzer('TrackingRecoMaterialAnalyser',
0158         tracks = cms.InputTag("generalTracks"),
0159         vertices = cms.InputTag("offlinePrimaryVertices"),
0160         DoPredictionsOnly = cms.bool(False),
0161         Fitter = cms.string('KFFitterForRefitInsideOut'),
0162         TrackerRecHitBuilder = cms.string('WithAngleAndTemplate'),
0163         Smoother = cms.string('KFSmootherForRefitInsideOut'),
0164         MuonRecHitBuilder = cms.string('MuonRecHitBuilder'),
0165         RefitDirection = cms.string('alongMomentum'),
0166         RefitRPCHits = cms.bool(True),
0167         Propagator = cms.string('SmartPropagatorAnyRKOpposite'),
0168         #Propagators
0169         PropagatorAlong = cms.string("RungeKuttaTrackerPropagator"),
0170         PropagatorOpposite = cms.string("RungeKuttaTrackerPropagatorOpposite")
0171 )
0172 # Additional output definition
0173 
0174 # Other statements
0175 process.mix.playback = True
0176 process.mix.digitizers = cms.PSet()
0177 for a in process.aliases: delattr(process, a)
0178 process.RandomNumberGeneratorService.restoreStateLabel=cms.untracked.string("randomEngineStateProducer")
0179 from Configuration.AlCa.GlobalTag import GlobalTag
0180 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '')
0181 
0182 # Path and EndPath definitions
0183 process.raw2digi_step = cms.Path(process.RawToDigi)
0184 process.reconstruction_step = cms.Path(process.reconstruction_trackingOnly)
0185 process.prevalidation_step = cms.Path(process.globalPrevalidationTrackingOnly)
0186 process.dqmoffline_step = cms.Path(process.DQMOfflineTracking)
0187 process.dqmofflineOnPAT_step = cms.Path(process.PostDQMOffline)
0188 process.validation_step = cms.EndPath(process.globalValidationTrackingOnly)
0189 process.RECOSIMoutput_step = cms.EndPath(process.RECOSIMoutput)
0190 process.DQMoutput_step = cms.EndPath(process.DQMoutput)
0191 process.materialdumper_step = cms.Path(process.materialdumper)
0192 
0193 # Schedule definition
0194 process.schedule = cms.Schedule(process.raw2digi_step,process.reconstruction_step,process.materialdumper_step,process.prevalidation_step,process.validation_step,process.dqmoffline_step,process.dqmofflineOnPAT_step,process.RECOSIMoutput_step,process.DQMoutput_step)
0195 
0196 # customisation of the process.
0197 
0198 # Automatic addition of the customisation function from SimGeneral.MixingModule.fullMixCustomize_cff
0199 from SimGeneral.MixingModule.fullMixCustomize_cff import setCrossingFrameOn
0200 
0201 #call to customisation function setCrossingFrameOn imported from SimGeneral.MixingModule.fullMixCustomize_cff
0202 process = setCrossingFrameOn(process)
0203 
0204 # End of customisation functions
0205 
0206 #Setup FWK for multithreaded
0207 process.options.numberOfThreads=cms.untracked.uint32(6)
0208 process.options.numberOfStreams=cms.untracked.uint32(0)
0209 
0210 if options.ntuple:
0211   from Validation.RecoTrack.customiseTrackingNtuple import customiseTrackingNtuple
0212   process = customiseTrackingNtuple(process)
0213   process.trackingNtuple.includeAllHits = False
0214   process.trackingNtuple.includeSeeds = False