test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
dqmAnalyzer_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 ######### DATA ############
5 bTagAnalysis.ptRanges = cms.vdouble(0.0)
6 bTagAnalysis.doJetID = True
7 bTagAnalysis.doJEC = True
8 #Residual correction will be added inside the c++ code only for data (checking the presence of genParticles collection), not explicit here as this sequence also ran on MC FullSim
9 bTagPlotsDATA = cms.Sequence(bTagAnalysis)
10 
11 ########## MC ############
12 #Matching
13 from PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi import selectedHadronsAndPartons
14 from PhysicsTools.JetMCAlgos.AK4PFJetsMCFlavourInfos_cfi import ak4JetFlavourInfos
15 myak4JetFlavourInfos = ak4JetFlavourInfos.clone(
16  jets = cms.InputTag("ak4PFJetsCHS"),
17  hadronFlavourHasPriority = cms.bool(True)
18  )
19 
20 #Get gen jet collection for real jets
21 ak4GenJetsForPUid = cms.EDFilter("GenJetSelector",
22  src = cms.InputTag("ak4GenJets"),
23  cut = cms.string('pt > 8.'),
24  filter = cms.bool(False)
25  )
26 #do reco gen - reco matching
27 from PhysicsTools.PatAlgos.mcMatchLayer0.jetMatch_cfi import patJetGenJetMatch
28 newpatJetGenJetMatch = patJetGenJetMatch.clone(
29  src = cms.InputTag("ak4PFJetsCHS"),
30  matched = cms.InputTag("ak4GenJetsForPUid"),
31  maxDeltaR = cms.double(0.25),
32  resolveAmbiguities = cms.bool(True)
33 )
34 
35 # Module execution for MC
37 bTagValidation.jetMCSrc = 'myak4JetFlavourInfos'
38 bTagValidation.ptRanges = cms.vdouble(0.0)
39 bTagValidation.etaRanges = cms.vdouble(0.0)
40 bTagValidation.doJetID = True
41 bTagValidation.doJEC = True
42 bTagValidation.genJetsMatched = cms.InputTag("newpatJetGenJetMatch")
43 #to run on fastsim
44 prebTagSequenceMC = cms.Sequence(ak4GenJetsForPUid*newpatJetGenJetMatch*selectedHadronsAndPartons*myak4JetFlavourInfos)
45 bTagPlotsMC = cms.Sequence(bTagValidation)
46 
47 #to run on fullsim in the validation sequence, all histograms produced in the dqmoffline sequence
48 bTagValidationNoall = bTagValidation.clone(flavPlots="bcl")
49 bTagPlotsMCbcl = cms.Sequence(bTagValidationNoall)
DATA ############.