CMS 3D CMS Logo

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