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