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 ## customizations for the pp_on_AA eras
12 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
13 from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
14 (pp_on_XeXe_2017 | pp_on_AA_2018).toModify(bTagAnalysis,
15  doJEC=False
16  )
17 
18 ########## MC ############
19 #Matching
20 from PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi import selectedHadronsAndPartons
21 from PhysicsTools.JetMCAlgos.AK4PFJetsMCFlavourInfos_cfi import ak4JetFlavourInfos
22 myak4JetFlavourInfos = ak4JetFlavourInfos.clone(
23  jets = cms.InputTag("ak4PFJetsCHS"),
24  partons = cms.InputTag("selectedHadronsAndPartons","algorithmicPartons"),
25  hadronFlavourHasPriority = cms.bool(True)
26  )
27 
28 #Get gen jet collection for real jets
29 ak4GenJetsForPUid = cms.EDFilter("GenJetSelector",
30  src = cms.InputTag("ak4GenJets"),
31  cut = cms.string('pt > 8.'),
32  filter = cms.bool(False)
33  )
34 #do reco gen - reco matching
35 from PhysicsTools.PatAlgos.mcMatchLayer0.jetMatch_cfi import patJetGenJetMatch
36 newpatJetGenJetMatch = patJetGenJetMatch.clone(
37  src = cms.InputTag("ak4PFJetsCHS"),
38  matched = cms.InputTag("ak4GenJetsForPUid"),
39  maxDeltaR = cms.double(0.25),
40  resolveAmbiguities = cms.bool(True)
41 )
42 
43 # Module execution for MC
45 bTagValidation.jetMCSrc = 'myak4JetFlavourInfos'
46 bTagValidation.ptRanges = cms.vdouble(0.0)
47 bTagValidation.etaRanges = cms.vdouble(0.0)
48 bTagValidation.doJetID = True
49 bTagValidation.doJEC = True
50 bTagValidation.genJetsMatched = cms.InputTag("newpatJetGenJetMatch")
51 #to run on fastsim
52 prebTagSequenceMC = cms.Sequence(ak4GenJetsForPUid*newpatJetGenJetMatch*selectedHadronsAndPartons*myak4JetFlavourInfos)
53 bTagPlotsMC = cms.Sequence(bTagValidation)
54 
55 ## customizations for the pp_on_AA eras
56 (pp_on_XeXe_2017 | pp_on_AA_2018).toModify(bTagValidation,
57  doJEC=False
58 )
59 
60 #to run on fullsim in the validation sequence, all histograms produced in the dqmoffline sequence
61 bTagValidationNoall = bTagValidation.clone(flavPlots="bcl")
62 bTagPlotsMCbcl = cms.Sequence(bTagValidationNoall)
DATA ############.