process.goodOfflinePrimaryVertices = cms.EDFilter(
    "PrimaryVertexObjectFilter",
    filterParams = pvSelector.clone( minNdof = cms.double(4.0), maxZ = cms.double(24.0) ),
    src=cms.InputTag('offlinePrimaryVertices')
    )

#input for softLeptonTagInfos
process.softPFElectronsTagInfos.primaryVertex = cms.InputTag('goodOfflinePrimaryVertices')
process.softPFMuonsTagInfos.primaryVertex = cms.InputTag('goodOfflinePrimaryVertices')

#for the flavour matching
from PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi import selectedHadronsAndPartons
process.selectedHadronsAndPartons = selectedHadronsAndPartons.clone()

from PhysicsTools.JetMCAlgos.AK5PFJetsMCFlavourInfos_cfi import ak5JetFlavourInfos
process.jetFlavourInfosAK5PFJets = ak5JetFlavourInfos.clone()
process.jetFlavourInfosAK5PFJets.jets = cms.InputTag("ak5PFJets")


process.maxEvents = cms.untracked.PSet(
    input = cms.untracked.int32(11)
)

process.source = cms.Source("PoolSource",
	skipEvents=cms.untracked.uint32(0),
	fileNames = cms.untracked.vstring(
#'/store/mc/Fall11/QCD_Pt-50to80_Tune4C_7TeV_pythia8/AODSIM/PU_S6_START44_V9B-v1/0000/00225C27-4744-E111-8583-003048C692E4.root',
#'/store/mc/Fall11/QCD_Pt-80to120_Tune4C_7TeV_pythia8/AODSIM/PU_S6_START44_V9B-v1/0000/00D668C4-5244-E111-A8F6-0025901D4936.root',
#'/store/mc/Fall11/QCD_Pt-120to170_Tune4C_7TeV_pythia8/AODSIM/PU_S6_START44_V9B-v1/0000/023CE3AD-CF46-E111-90CB-003048C690A0.root',
#'/store/mc/Fall11/QCD_Pt-170to300_Tune4C_7TeV_pythia8/AODSIM/PU_S6_START44_V9B-v1/0000/0433579C-7644-E111-9D93-00215AD4D6C8.root',
#'/store/mc/Fall11/QCD_Pt-300to470_Tune4C_7TeV_pythia8/AODSIM/PU_S6_START44_V9B-v1/0000/00C128DE-923F-E111-AA76-003048C69312.root',
예제 #2
0
#fileNames = cms.untracked.vstring('root://eospublic.cern.ch//eos/opendata/cms/MonteCarlo2012/Summer12_DR53X/DYJetsToLL_M-50_TuneZ2Star_8TeV-madgraph-tarball/AODSIM/PU_RD1_START53_V7N-v1/20000/003063B7-4CCF-E211-9FED-003048D46124.root'))

# Set the maximum number of events to be processed (-1 processes all events)
process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(-1))

# Number of events to be skipped (0 by default)
process.source.skipEvents = cms.untracked.uint32(0)

#-------------------------------------------------------------------------
# AK5 jets
#-------------------------------------------------------------------------
from PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi import selectedHadronsAndPartons
process.selectedHadronsAndPartons = selectedHadronsAndPartons.clone()

from PhysicsTools.JetMCAlgos.AK5PFJetsMCFlavourInfos_cfi import ak5JetFlavourInfos
process.jetFlavourInfosAK5PFJets = ak5JetFlavourInfos.clone()

################################
## MC Weights Analyzer
################################
process.mcweightanalyzer = cms.EDAnalyzer(
    "WeightAnalyzerBEff",
    JetsTag=cms.InputTag("ak5PFJets"),
    discriminator=cms.string("combinedSecondaryVertexBJetTags"),
    DiscriminatorValueTight=cms.double(0.898),
    DiscriminatorValueMedium=cms.double(0.679),
    DiscriminatorValueLoose=cms.double(0.244),
)

process.TFileService = cms.Service(
    "TFileService", fileName=cms.string("flavortagefficiencies.root"))
예제 #3
0
import FWCore.ParameterSet.Config as cms

# Flavour info: jet collection with all associated ghosts
from PhysicsTools.JetMCAlgos.AK5PFJetsMCFlavourInfos_cfi import ak5JetFlavourInfos
genJetFlavourPlusLeptonInfos = ak5JetFlavourInfos.clone(
    leptons = cms.InputTag("selectedHadronsAndPartons","leptons")
)


from PhysicsTools.JetMCAlgos.GenHFHadronMatcher_cfi import matchGenHFHadron


# Configuration for matching B-hadrons ================================================================
matchGenBHadron = matchGenHFHadron.clone(
    jetFlavourInfos = cms.InputTag("genJetFlavourPlusLeptonInfos"),
    flavour = 5
)


# Configuration for matching C-hadrons =================================================================
matchGenCHadron = matchGenHFHadron.clone(
    jetFlavourInfos = cms.InputTag("genJetFlavourPlusLeptonInfos"),
    flavour = 4
)

예제 #4
0
                                            )
process.flavourByValGenJet = cms.EDProducer("JetFlavourIdentifier",
                                            srcByReference = cms.InputTag("flavourByRefGenJet"),
                                            physicsDefinition = cms.bool(False)
                                            )


from PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi import selectedHadronsAndPartons
process.selectedHadronsAndPartons = selectedHadronsAndPartons.clone()

from PhysicsTools.JetMCAlgos.AK4PFJetsMCFlavourInfos_cfi import ak4JetFlavourInfos
process.myak4PFJetFlavourInfos = ak4JetFlavourInfos.clone(jets = cms.InputTag("ak4PFJets"))

#ak5 jets
from PhysicsTools.JetMCAlgos.AK5PFJetsMCFlavourInfos_cfi import ak5JetFlavourInfos
process.myak5PFJetFlavourInfos = ak5JetFlavourInfos.clone(jets = cms.InputTag("ak5PFJets"))


from PhysicsTools.JetMCAlgos.AK4PFJetsMCFlavourInfos_cfi import ak4JetFlavourInfos
process.myak4PFJetCHSFlavourInfos = ak4JetFlavourInfos.clone(jets = cms.InputTag("ak4PFJetsCHS"))

#from PhysicsTools.JetMCAlgos.AK4PFJetsMCFlavourInfos_cfi import ak4JetFlavourInfos
#process.myak4CaloJetFlavourInfos = ak4JetFlavourInfos.clone(jets = cms.InputTag("ak4CaloJets"))

from PhysicsTools.JetMCAlgos.AK4PFJetsMCFlavourInfos_cfi import ak4JetFlavourInfos
process.myak4GenJetFlavourInfos = ak4JetFlavourInfos.clone(jets = cms.InputTag("ak4GenJets"))




        # Herwig6:
        # /TT_CT10_AUET2_8TeV-powheg-herwig/Summer12_DR53X-PU_S10_START53_V19-v1/AODSIM
        #'/store/mc/Summer12_DR53X/TT_CT10_AUET2_8TeV-powheg-herwig/AODSIM/PU_S10_START53_V19-v1/10000/0039166F-C9CA-E211-9B10-0026189438E0.root'
    ))

process.TFileService = cms.Service("TFileService",
                                   fileName=cms.string('histos.root'))

#-------------------------------------------------------------------------
# AK5 jets
#-------------------------------------------------------------------------
from PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi import selectedHadronsAndPartons
process.selectedHadronsAndPartons = selectedHadronsAndPartons.clone(
    particles=cms.InputTag("genParticles"))

from PhysicsTools.JetMCAlgos.AK5PFJetsMCFlavourInfos_cfi import ak5JetFlavourInfos
process.jetFlavourInfosAK5PFJets = ak5JetFlavourInfos.clone(
    jets=cms.InputTag("ak5PFJets"))
#-------------------------------------------------------------------------

process.jetFlavorAnalyzer = cms.EDAnalyzer(
    'JetFlavorAnalyzer',
    src=cms.InputTag("genParticles"),
    jetFlavourInfos=cms.InputTag("jetFlavourInfosAK5PFJets"),
    jetPtMin=cms.double(30.))

process.p = cms.Path(process.selectedHadronsAndPartons *
                     process.jetFlavourInfosAK5PFJets *
                     process.jetFlavorAnalyzer)
예제 #6
0
import FWCore.ParameterSet.Config as cms

# Flavour info: jet collection with all associated ghosts
from PhysicsTools.JetMCAlgos.AK5PFJetsMCFlavourInfos_cfi import ak5JetFlavourInfos
genJetFlavourPlusLeptonInfos = ak5JetFlavourInfos.clone(
    leptons=cms.InputTag("selectedHadronsAndPartons", "leptons"))

from PhysicsTools.JetMCAlgos.GenHFHadronMatcher_cfi import matchGenHFHadron

# Configuration for matching B-hadrons ================================================================
matchGenBHadron = matchGenHFHadron.clone(
    jetFlavourInfos=cms.InputTag("genJetFlavourPlusLeptonInfos"), flavour=5)

# Configuration for matching C-hadrons =================================================================
matchGenCHadron = matchGenHFHadron.clone(
    jetFlavourInfos=cms.InputTag("genJetFlavourPlusLeptonInfos"), flavour=4)