CMS 3D CMS Logo

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