CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.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 ########## MC ############
20 #Matching
21 from PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi import selectedHadronsAndPartons
22 from PhysicsTools.JetMCAlgos.AK4PFJetsMCFlavourInfos_cfi import ak4JetFlavourInfos
23 myak4JetFlavourInfos = ak4JetFlavourInfos.clone(
24  jets = cms.InputTag("ak4PFJetsCHS"),
25  partons = cms.InputTag("selectedHadronsAndPartons","algorithmicPartons"),
26  hadronFlavourHasPriority = cms.bool(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 = cms.InputTag("ak4PFJetsCHS"),
39  matched = cms.InputTag("ak4GenJetsForPUid"),
40  maxDeltaR = cms.double(0.25),
41  resolveAmbiguities = cms.bool(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 ## customizations for the pp_on_AA eras
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 ############.