Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:44

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 #
0004 # generator level info
0005 #
0006 from PhysicsTools.HepMCCandAlgos.genParticles_cfi import *
0007 from GeneratorInterface.Core.generatorSmeared_cfi import *
0008 from RecoJets.Configuration.RecoGenJets_cff import *
0009 from RecoMET.Configuration.RecoGenMET_cff import *
0010 from RecoJets.Configuration.GenJetParticles_cff import *
0011 from RecoMET.Configuration.GenMETParticles_cff import *
0012 # Vertex smearing
0013 #
0014 # There're several types of Vertex smearing module (Gauss, Flat, BeamProfile, Betafunc, BetafuncEarlyCollisions);
0015 # the cff's are available for each one :
0016 # Configuration/StandardSequences/data/VtxSmearedGauss.cff
0017 # Configuration/StandardSequences/data/VtxSmearedFlat.cff
0018 # Configuration/StandardSequences/data/VtxSmearedBeamProfile.cff
0019 # Configuration/StandardSequences/data/VtxSmearedBetafuncNominalCollision.cff
0020 # Configuration/StandardSequences/data/VtxSmearedBetafuncEarlyCollision.cff
0021 #
0022 # Either of the above returns label "generatorSmeared" that is already in the path below
0023 # (but not included here!!!)
0024 #   
0025 # Note 1 : one and only label is allowed for either of these modules,
0026 #          that is VtxSmeared (the reason is not to allow multiple smearing); 
0027 #          an attempt to use any other label will cause the Fwk to throw
0028 # Note 2 : because only one label is allowed, a user can have only one
0029 #          instance of the Vertex smearing module in a given configuration;
0030 #          in other words, if you put in 2 or all 3 of the available cfi's, 
0031 #          the Fwk will throw
0032 #
0033 # Currently, we suggest using Betafunc vertex smearing in the desired LHC configuration 
0034 #
0035 # The vertex smearing needs to be called before the particle candidate generation
0036 #
0037 # REMINDER : vertex smearing need a startup seed;
0038 # in your cfg, do NOT forget to give seeds via RandomNumberGeneratorService !!!
0039 # 
0040 # Example configuration of the RandomNumberGeneratorService to appear in cfg:
0041 # service = RandomNumberGeneratorService
0042 # {
0043 #   untracked uint32 sourceSeed = 123456789
0044 #   PSet moduleSeeds =
0045 #   {
0046 #      untracked uint32 VtxSmeared = 98765432
0047 #   }
0048 # }
0049 
0050 GeneInfoTask = cms.Task(genParticles)
0051 genJetMETTask = cms.Task(genJetParticlesTask, recoGenJetsTask, genMETParticlesTask, recoGenMETTask)
0052 
0053 VertexSmearing = cms.Sequence(cms.SequencePlaceholder("VtxSmeared"))
0054 GenSmeared = cms.Sequence(generatorSmeared)
0055 GeneInfo = cms.Sequence(GeneInfoTask)
0056 genJetMET = cms.Sequence(genJetMETTask)
0057 
0058 from SimPPS.Configuration.GenPPS_cff import *
0059 pgen = cms.Sequence(cms.SequencePlaceholder("randomEngineStateProducer")+VertexSmearing+GenSmeared+GeneInfo+genJetMET, PPSTransportTask)
0060 
0061 # sequence for bare generator result only, without vertex smearing and analysis objects added
0062 pgen_genonly = cms.Sequence(cms.SequencePlaceholder("randomEngineStateProducer"))
0063 
0064 # only vertex smearing and analysis objects
0065 pgen_smear = cms.Sequence(VertexSmearing+GenSmeared+GeneInfo+genJetMET, PPSTransportTask)
0066 
0067 fixGenInfoTask = cms.Task(GeneInfoTask, genJetMETTask)
0068 fixGenInfo = cms.Sequence(fixGenInfoTask)
0069 
0070 
0071 import HLTrigger.HLTfilters.triggerResultsFilter_cfi
0072 genstepfilter = HLTrigger.HLTfilters.triggerResultsFilter_cfi.triggerResultsFilter.clone(
0073     l1tResults = cms.InputTag(''),
0074     hltResults = cms.InputTag('TriggerResults'),
0075     triggerConditions = cms.vstring()
0076 )