Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-26 03:14:05

0001 import FWCore.ParameterSet.Config as cms
0002 import sys
0003 
0004 infile_name = sys.argv[2]
0005 outfile_name = '/afs/cern.ch/user/l/lgray/work/public/CMSSW_7_0_0_pre3_singlegconv/src/RecoParticleFlow/Configuration/test/%s/superClusterDump_%i.root'%(sys.argv[5],int(sys.argv[3]))
0006 nevents = int(sys.argv[4])
0007 
0008 
0009 process = cms.Process("REPROD")
0010 process.load("Configuration.StandardSequences.Reconstruction_cff")
0011 process.load("Configuration.StandardSequences.MagneticField_38T_cff")
0012 #process.load("Configuration.StandardSequences.MagneticField_4T_cff")
0013 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0014 process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff')
0015 from Configuration.AlCa.autoCond import autoCond
0016 process.GlobalTag.globaltag = autoCond['startup']
0017 #process.GlobalTag.globaltag = 'START50_V10::All'
0018 
0019 #process.Timing =cms.Service("Timing")
0020 process.maxEvents = cms.untracked.PSet(
0021     input = cms.untracked.int32(nevents)
0022 )
0023 
0024 process.source = cms.Source(
0025     "PoolSource",
0026     fileNames = cms.untracked.vstring(
0027     'root://cms-xrd-global.cern.ch/%s'%infile_name
0028     ),
0029     eventsToProcess = cms.untracked.VEventRange(),
0030     #eventsToProcess = cms.untracked.VEventRange('1:1217421-1:1217421'),
0031     #                                             '1:1220344-1:1220344',
0032     #                                             '1:1655912-1:1655912',
0033     #                                             '1:415027-1:415027',
0034     #                                             '1:460640-1:460640',
0035     #                                             '1:2054772-1:2054772'),
0036     secondaryFileNames = cms.untracked.vstring(),
0037     noEventSort = cms.untracked.bool(True),
0038     duplicateCheckMode = cms.untracked.string('noDuplicateCheck')
0039 )
0040 
0041 #from RecoParticleFlow.Configuration.reco_QCDForPF_cff import fileNames
0042 #process.source.fileNames = fileNames
0043 
0044 
0045 # modify reconstruction sequence
0046 #process.hbhereflag = process.hbhereco.clone()
0047 #process.hbhereflag.hbheInput = 'hbhereco'
0048 #process.towerMakerPF.hbheInput = 'hbhereflag'
0049 #process.particleFlowRecHitHCAL.hcalRecHitsHBHE = cms.InputTag("hbhereflag")
0050 process.particleFlowTmp.useHO = False
0051 
0052 process.TFileService = cms.Service(
0053     "TFileService",
0054     fileName=cms.string(outfile_name)
0055     )
0056 
0057 process.pfElectronSCTree = cms.EDAnalyzer(
0058     "PFSuperClusterTreeMaker",
0059     doGen = cms.untracked.bool(True),
0060     genSrc = cms.InputTag("genParticles"),
0061     primaryVertices = cms.InputTag("offlinePrimaryVertices"),
0062     superClusterSrcEB = cms.InputTag('pfElectronTranslator','pf')
0063     )
0064 
0065 process.pfPhotonSCTree = cms.EDAnalyzer(
0066     "PFSuperClusterTreeMaker",
0067     doGen = cms.untracked.bool(True),
0068     genSrc = cms.InputTag("genParticles"),
0069     primaryVertices = cms.InputTag("offlinePrimaryVertices"),
0070     superClusterSrcEB = cms.InputTag('pfPhotonTranslator','pfphot')
0071     )
0072 
0073 process.pfMustacheSCTree = cms.EDAnalyzer(
0074     "PFSuperClusterTreeMaker",
0075     doGen = cms.untracked.bool(True),
0076     genSrc = cms.InputTag("genParticles"),
0077     primaryVertices = cms.InputTag("offlinePrimaryVertices"),
0078     superClusterSrcEB = cms.InputTag("particleFlowSuperClusterECAL",
0079                                      "particleFlowSuperClusterECALBarrel"),
0080     superClusterSrcEE = cms.InputTag("particleFlowSuperClusterECAL",
0081                                      "particleFlowSuperClusterECALEndcapWithPreshower")
0082     )
0083 
0084 # Local re-reco: Produce tracker rechits, pf rechits and pf clusters
0085 process.localReReco = cms.Sequence(process.siPixelRecHits+
0086                                    process.siStripMatchedRecHits+
0087                                    #process.hbhereflag+
0088                                    process.particleFlowCluster+
0089                                    process.ecalClusters)
0090 
0091 # Track re-reco
0092 process.globalReReco =  cms.Sequence(process.offlineBeamSpot+
0093                                      process.recopixelvertexing+
0094                                      process.ckftracks+
0095                                      process.caloTowersRec+
0096                                      process.vertexreco+
0097                                      process.recoJets+
0098                                      process.muonrecoComplete+
0099                                      process.muoncosmicreco+
0100                                      process.egammaGlobalReco+
0101                                      process.pfTrackingGlobalReco+
0102                                      process.egammaHighLevelRecoPrePF+
0103                                      process.muoncosmichighlevelreco+
0104                                      process.metreco)
0105 
0106 # Particle Flow re-processing
0107 process.pfReReco = cms.Sequence(process.particleFlowReco+
0108                                 process.egammaHighLevelRecoPostPF+
0109                                 process.muonshighlevelreco+
0110                                 process.particleFlowLinks+
0111                                 process.recoPFJets+
0112                                 process.recoPFMET+
0113                                 process.PFTau+
0114                                 process.pfElectronSCTree+
0115                                 process.pfPhotonSCTree+
0116                                 process.pfMustacheSCTree)
0117 
0118                                 
0119 # Gen Info re-processing
0120 process.load("PhysicsTools.HepMCCandAlgos.genParticles_cfi")
0121 process.load("RecoJets.Configuration.GenJetParticles_cff")
0122 process.load("RecoJets.Configuration.RecoGenJets_cff")
0123 process.load("RecoMET.Configuration.GenMETParticles_cff")
0124 process.load("RecoMET.Configuration.RecoGenMET_cff")
0125 process.load("RecoParticleFlow.PFProducer.particleFlowSimParticle_cff")
0126 process.load("RecoParticleFlow.Configuration.HepMCCopy_cfi")
0127 process.genReReco = cms.Sequence(process.generator+
0128                                  process.genParticles+
0129                                  process.genJetParticles+
0130                                  process.recoGenJets+
0131                                  process.genMETParticles+
0132                                  process.recoGenMET+
0133                                  process.particleFlowSimParticle)
0134 
0135 # pf reprocessing
0136 process.p = cms.Path(process.localReReco+
0137                      process.globalReReco+
0138                      process.pfReReco+
0139                      process.genReReco
0140                      #+process.particleFlowCandidateChecker
0141                      )
0142 
0143 # And the logger
0144 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0145 #process.MessageLogger.cout = cms.untracked.PSet(
0146 #    threshold = cms.untracked.string('INFO')
0147 #    )
0148 process.options = cms.untracked.PSet(
0149     makeTriggerResults = cms.untracked.bool(True),
0150     #wantSummary = cms.untracked.bool(True),
0151     Rethrow = cms.untracked.vstring('Unknown', 
0152         'ProductNotFound', 
0153         'DictionaryNotFound', 
0154         'InsertFailure', 
0155         'Configuration', 
0156         'LogicError', 
0157         'UnimplementedFeature', 
0158         'InvalidReference', 
0159         'NullPointerError', 
0160         'NoProductSpecified', 
0161         'EventTimeout', 
0162         'EventCorruption', 
0163         'ModuleFailure', 
0164         'ScheduleExecutionFailure', 
0165         'EventProcessorFailure', 
0166         'FileInPathError', 
0167         'FatalRootError', 
0168         'NotFound')
0169 )
0170 
0171 process.MessageLogger.cerr.FwkReport.reportEvery = 1
0172 
0173