Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:18:10

0001 ### -------------------------------------------------------------------
0002 ### VarParsing allows one to specify certain parameters in the command line
0003 ### e.g.
0004 ### cmsRun testElectronSequence_cfg.py print maxEvents=10
0005 ### -------------------------------------------------------------------
0006 
0007 import FWCore.ParameterSet.Config as cms
0008 import FWCore.ParameterSet.VarParsing as VarParsing
0009 import os 
0010 
0011 process = cms.Process("TEST")
0012 
0013 process.load('Configuration.StandardSequences.Services_cff')
0014 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0015 process.load('FWCore.MessageService.MessageLogger_cfi')
0016 process.load('Configuration.StandardSequences.GeometryDB_cff')
0017 process.load('Configuration.StandardSequences.MagneticField_38T_cff')
0018 
0019 #global tags for conditions data: https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
0020 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0021 process.GlobalTag.globaltag = 'MC_39Y_V2::All'
0022 
0023 ##################################################################################
0024 
0025 # setup 'standard'  options
0026 options = VarParsing.VarParsing ('standard')
0027 
0028 # setup any defaults you want
0029 options.output = 'test_out.root'
0030 options.files = [
0031     '/store/relval/CMSSW_3_9_0/RelValPyquen_ZeemumuJets_pt10_2760GeV/GEN-SIM-DIGI-RAW-HLTDEBUG/MC_39Y_V2-v1/0052/C41EB5F8-1DD9-DF11-BDF9-003048678E92.root',
0032     '/store/relval/CMSSW_3_9_0/RelValPyquen_ZeemumuJets_pt10_2760GeV/GEN-SIM-DIGI-RAW-HLTDEBUG/MC_39Y_V2-v1/0052/C2B6CF74-1ED9-DF11-A35F-0018F3D0961A.root',
0033     '/store/relval/CMSSW_3_9_0/RelValPyquen_ZeemumuJets_pt10_2760GeV/GEN-SIM-DIGI-RAW-HLTDEBUG/MC_39Y_V2-v1/0052/A4EF86F3-1DD9-DF11-9B50-0026189438EA.root',
0034     '/store/relval/CMSSW_3_9_0/RelValPyquen_ZeemumuJets_pt10_2760GeV/GEN-SIM-DIGI-RAW-HLTDEBUG/MC_39Y_V2-v1/0052/84D2AFF7-1ED9-DF11-9945-00304867C0F6.root',
0035     '/store/relval/CMSSW_3_9_0/RelValPyquen_ZeemumuJets_pt10_2760GeV/GEN-SIM-DIGI-RAW-HLTDEBUG/MC_39Y_V2-v1/0052/80CC6AF2-1DD9-DF11-B89F-0030486790BA.root',
0036     '/store/relval/CMSSW_3_9_0/RelValPyquen_ZeemumuJets_pt10_2760GeV/GEN-SIM-DIGI-RAW-HLTDEBUG/MC_39Y_V2-v1/0052/70D088E0-22D9-DF11-A42C-003048679244.root',
0037     '/store/relval/CMSSW_3_9_0/RelValPyquen_ZeemumuJets_pt10_2760GeV/GEN-SIM-DIGI-RAW-HLTDEBUG/MC_39Y_V2-v1/0052/6AC7A36F-1ED9-DF11-9584-003048679296.root',
0038     '/store/relval/CMSSW_3_9_0/RelValPyquen_ZeemumuJets_pt10_2760GeV/GEN-SIM-DIGI-RAW-HLTDEBUG/MC_39Y_V2-v1/0052/54C85271-1ED9-DF11-9B1D-00261894395C.root',
0039     '/store/relval/CMSSW_3_9_0/RelValPyquen_ZeemumuJets_pt10_2760GeV/GEN-SIM-DIGI-RAW-HLTDEBUG/MC_39Y_V2-v1/0052/5207EDE9-1ED9-DF11-9BBB-00304867918A.root',
0040     '/store/relval/CMSSW_3_9_0/RelValPyquen_ZeemumuJets_pt10_2760GeV/GEN-SIM-DIGI-RAW-HLTDEBUG/MC_39Y_V2-v1/0052/4AFA1DFA-1AD9-DF11-BBEB-003048679046.root'
0041     ] 
0042 options.maxEvents = 1 
0043 
0044 # get and parse the command line arguments
0045 options.parseArguments()
0046 
0047 
0048 ##################################################################################
0049 # Some Services
0050        
0051 process.SimpleMemoryCheck = cms.Service('SimpleMemoryCheck',
0052                                         ignoreTotal=cms.untracked.int32(0),
0053                                         oncePerEventMode = cms.untracked.bool(False)
0054                                         )
0055 
0056 process.Timing = cms.Service("Timing")
0057 
0058 ##################################################################################
0059 # Input Source
0060 process.source = cms.Source('PoolSource',
0061     fileNames = cms.untracked.vstring(options.files)
0062 )
0063                             
0064 process.maxEvents = cms.untracked.PSet(
0065     input = cms.untracked.int32(options.maxEvents)
0066 )
0067 
0068 # GenFilter for opposite-sign status=1 electrons from the embedded signal within the acceptance
0069 process.eegenfilter = cms.EDFilter("MCParticlePairFilter",
0070     moduleLabel = cms.untracked.string("hiSignal"),                               
0071     Status = cms.untracked.vint32(1, 1),
0072     MinPt = cms.untracked.vdouble(2.5, 2.5),
0073     MaxEta = cms.untracked.vdouble(2.5, 2.5),
0074     MinEta = cms.untracked.vdouble(-2.5, -2.5),
0075     ParticleCharge = cms.untracked.int32(-1),
0076     ParticleID1 = cms.untracked.vint32(11),
0077     ParticleID2 = cms.untracked.vint32(11)
0078 )
0079 
0080 ##################################################################################
0081 #Reconstruction         
0082 process.load("Configuration.StandardSequences.RawToDigi_cff")           # RawToDigi
0083 process.load("Configuration.StandardSequences.ReconstructionHeavyIons_cff") # full heavy ion reconstruction
0084 process.load("RecoHI.HiEgammaAlgos.HiElectronSequence_cff")                 # gsf electrons
0085 
0086 ##############################################################################
0087 # Output EDM File
0088 process.load("Configuration.EventContent.EventContentHeavyIons_cff")        #load keep/drop output commands
0089 process.output = cms.OutputModule("PoolOutputModule",
0090                                   process.FEVTDEBUGEventContent,
0091                                   fileName = cms.untracked.string(options.output),
0092                                   SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('filter_step'))
0093                                   )
0094 process.output.outputCommands.extend(["keep *_*_*_TEST"])
0095 
0096 ##################################################################################
0097 
0098 # Paths
0099 process.filter_step = cms.Path(process.eegenfilter)
0100 
0101 process.reco_step = cms.Path(process.eegenfilter
0102                              * process.RawToDigi
0103                              * process.reconstructionHeavyIons
0104                              * process.hiElectronSequence)
0105 
0106 process.out_step = cms.EndPath(process.output)
0107 
0108 process.schedule = cms.Schedule(process.filter_step,process.reco_step,process.out_step)