CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
dqmAnalyzer_cff.py
Go to the documentation of this file.
2 
3 #not useful anymore for b-tagging but used in some other sequences
4 from JetMETCorrections.Configuration.JetCorrectionServices_cff import ak4PFL2L3,ak4PFL2Relative,ak4PFL3Absolute
5 
6 #JEC for CHS
7 from JetMETCorrections.Configuration.JetCorrectionServices_cff import ak4PFCHSL1Fastjet, ak4PFCHSL2Relative, ak4PFCHSL3Absolute, ak4PFCHSResidual, ak4PFCHSL1FastL2L3, ak4PFCHSL1FastL2L3Residual
8 
9 ######### DATA ############
11 bTagAnalysis.ptRanges = cms.vdouble(0.0)
12 bTagAnalysis.doJetID = True
13 bTagAnalysis.doJEC = True
14 #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
15 bTagAnalysis.JECsource = cms.string("ak4PFCHSL1FastL2L3")
16 bTagPlotsDATA = cms.Sequence(bTagAnalysis)
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(jets = cms.InputTag("ak4PFJetsCHS"))
23 
24 #Get gen jet collection for real jets
25 ak4GenJetsForPUid = cms.EDFilter("GenJetSelector",
26  src = cms.InputTag("ak4GenJets"),
27  cut = cms.string('pt > 8.'),
28  filter = cms.bool(False)
29  )
30 #do reco gen - reco matching
31 from PhysicsTools.PatAlgos.mcMatchLayer0.jetMatch_cfi import patJetGenJetMatch
32 newpatJetGenJetMatch = patJetGenJetMatch.clone(
33  src = cms.InputTag("ak4PFJetsCHS"),
34  matched = cms.InputTag("ak4GenJetsForPUid"),
35  maxDeltaR = cms.double(0.25),
36  resolveAmbiguities = cms.bool(True)
37 )
38 
39 # Module execution for MC
41 bTagValidation.jetMCSrc = 'myak4JetFlavourInfos'
42 bTagValidation.ptRanges = cms.vdouble(0.0)
43 bTagValidation.etaRanges = cms.vdouble(0.0)
44 bTagValidation.doJetID = True
45 bTagValidation.doJEC = True
46 bTagValidation.JECsource = cms.string("ak4PFCHSL1FastL2L3")
47 bTagValidation.genJetsMatched = cms.InputTag("newpatJetGenJetMatch")
48 #to run on fastsim
49 prebTagSequenceMC = cms.Sequence(ak4GenJetsForPUid*newpatJetGenJetMatch*selectedHadronsAndPartons*myak4JetFlavourInfos)
50 bTagPlotsMC = cms.Sequence(bTagValidation)
51 
52 #to run on fullsim in the validation sequence, all histograms produced in the dqmoffline sequence
53 bTagValidationNoall = bTagValidation.clone(flavPlots="bcl")
54 bTagPlotsMCbcl = cms.Sequence(bTagValidationNoall)
DATA ############.