CMS 3D CMS Logo

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  partons = cms.InputTag("selectedHadronsAndPartons","algorithmicPartons"),
18  hadronFlavourHasPriority = cms.bool(True)
19  )
20 
21 #Get gen jet collection for real jets
22 ak4GenJetsForPUid = cms.EDFilter("GenJetSelector",
23  src = cms.InputTag("ak4GenJets"),
24  cut = cms.string('pt > 8.'),
25  filter = cms.bool(False)
26  )
27 #do reco gen - reco matching
28 from PhysicsTools.PatAlgos.mcMatchLayer0.jetMatch_cfi import patJetGenJetMatch
29 newpatJetGenJetMatch = patJetGenJetMatch.clone(
30  src = cms.InputTag("ak4PFJetsCHS"),
31  matched = cms.InputTag("ak4GenJetsForPUid"),
32  maxDeltaR = cms.double(0.25),
33  resolveAmbiguities = cms.bool(True)
34 )
35 
36 # Module execution for MC
38 bTagValidation.jetMCSrc = 'myak4JetFlavourInfos'
39 bTagValidation.ptRanges = cms.vdouble(0.0)
40 bTagValidation.etaRanges = cms.vdouble(0.0)
41 bTagValidation.doJetID = True
42 bTagValidation.doJEC = True
43 bTagValidation.genJetsMatched = cms.InputTag("newpatJetGenJetMatch")
44 #to run on fastsim
45 prebTagSequenceMC = cms.Sequence(ak4GenJetsForPUid*newpatJetGenJetMatch*selectedHadronsAndPartons*myak4JetFlavourInfos)
46 bTagPlotsMC = cms.Sequence(bTagValidation)
47 
48 #to run on fullsim in the validation sequence, all histograms produced in the dqmoffline sequence
49 bTagValidationNoall = bTagValidation.clone(flavPlots="bcl")
50 bTagPlotsMCbcl = cms.Sequence(bTagValidationNoall)
DATA ############.