Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-08-09 22:38:32

0001 # THIS CONFIGURATION IS BROKEN. SINCE 2015 Geometry_cff has been deleted
0002 # and it is a fatal error to load it. And because of this I did not bother
0003 # to convert it to use tasks in 2017 when Tasks where implemented for unscheduled
0004 # mode (or remove the allowUnscheduled flag which no longer does anything).
0005 # Modules which are supposed to run unscheduled will not run.  Someone should
0006 # probably either fix or delete this ...
0007 
0008 import FWCore.ParameterSet.Config as cms
0009 
0010 process = cms.Process("S2")
0011 
0012 process.source = cms.Source("PoolSource",
0013     fileNames = cms.untracked.vstring("file:patTuple_mini.root")
0014 )
0015 from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValProdTTbarPileUpMINIAODSIM
0016 process.source.fileNames = filesRelValProdTTbarPileUpMINIAODSIM
0017 
0018 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100) )
0019 
0020 from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJets
0021 from RecoJets.JetProducers.ak4GenJets_cfi import ak4GenJets
0022 
0023 process.load("CommonTools.ParticleFlow.pfCHS_cff")
0024 
0025 process.ak4PFJets = ak4PFJets.clone(src = 'packedPFCandidates', doAreaFastjet = True) # no idea while doArea is false by default, but it's True in RECO so we have to set it
0026 process.ak4PFJetsCHS = ak4PFJets.clone(src = 'pfCHS', doAreaFastjet = True) # no idea while doArea is false by default, but it's True in RECO so we have to set it
0027 process.ak4GenJets = ak4GenJets.clone(src = 'packedGenParticles')
0028 
0029 process.load("PhysicsTools.PatAlgos.producersLayer1.patCandidates_cff")
0030 process.load("Configuration.EventContent.EventContent_cff")
0031 process.load('Configuration.StandardSequences.GeometryDB_cff')
0032 process.load('Configuration.StandardSequences.MagneticField_38T_cff')
0033 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0034 from Configuration.AlCa.GlobalTag import GlobalTag
0035 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase1_2022_realistic')
0036 
0037 from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection
0038 addJetCollection(
0039    process,
0040    postfix   = "",
0041    labelName = 'AK4PFCHS',
0042    jetSource = cms.InputTag('ak4PFJetsCHS'),
0043    pvSource = cms.InputTag('offlineSlimmedPrimaryVertices'),
0044    pfCandidates = cms.InputTag('packedPFCandidates'),
0045    svSource = cms.InputTag('slimmedSecondaryVertices'),
0046    jetCorrections = ('AK4PFchs', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute']), 'Type-2'),
0047    btagDiscriminators = [ 'pfCombinedSecondaryVertexBJetTags', 'pfCombinedInclusiveSecondaryVertexV2BJetTags' ],
0048    genJetCollection=cms.InputTag('ak4GenJets'),
0049    genParticles=cms.InputTag('prunedGenParticles')
0050    )
0051 # if using legacy jet flavour (not used by default)
0052 process.patJetPartonsLegacy.skipFirstN = cms.uint32(0) # do not skip first 6 particles, we already pruned some!
0053 process.patJetPartonsLegacy.acceptNoDaughters = cms.bool(True) # as we drop intermediate stuff, we need to accept quarks with no siblings
0054 
0055 
0056 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0057 process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
0058 process.options.allowUnscheduled = cms.untracked.bool(True)
0059 
0060 process.OUT = cms.OutputModule("PoolOutputModule",
0061     fileName = cms.untracked.string('test.root'),
0062     outputCommands = cms.untracked.vstring(['drop *','keep patJets_patJetsAK4PFCHS_*_*','keep *_*_*_PAT'])
0063 )
0064 process.endpath= cms.EndPath(process.OUT)
0065