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 newak4PFCHSL1Fastjet = ak4PFCHSL1Fastjet.clone(algorithm = 'AK5PFchs')
9 newak4PFCHSL2Relative = ak4PFCHSL2Relative.clone(algorithm = 'AK5PFchs')
10 newak4PFCHSL3Absolute = ak4PFCHSL3Absolute.clone(algorithm = 'AK5PFchs')
11 newak4PFCHSResidual = ak4PFCHSResidual.clone(algorithm = 'AK5PFchs')
12 
13 newak4PFCHSL1FastL2L3 = ak4PFCHSL1FastL2L3.clone(correctors = cms.vstring('newak4PFCHSL1Fastjet','newak4PFCHSL2Relative','newak4PFCHSL3Absolute'))
14 newak4PFCHSL1FastL2L3Residual = ak4PFCHSL1FastL2L3Residual.clone(correctors = cms.vstring('newak4PFCHSL1Fastjet','newak4PFCHSL2Relative','newak4PFCHSL3Absolute','newak4PFCHSResidual'))
15 
16 #Needed only for fastsim, why?
17 ak4PFCHSL1Fastjet.algorithm = 'AK5PFchs'
18 ak4PFCHSL2Relative.algorithm = 'AK5PFchs'
19 ak4PFCHSL3Absolute.algorithm = 'AK5PFchs'
20 ak4PFCHSResidual.algorithm = 'AK5PFchs'
21 
22 ######### DATA ############
24 bTagAnalysis.finalizePlots = False
25 bTagAnalysis.finalizeOnly = False
26 bTagAnalysis.ptRanges = cms.vdouble(0.0)
27 #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
28 bTagAnalysis.doJetID = True
29 bTagAnalysis.doJEC = True
30 bTagAnalysis.JECsource = cms.string("newak4PFCHSL1FastL2L3")
31 bTagPlotsDATA = cms.Sequence(bTagAnalysis)
32 
33 ########## MC ############
34 #Matching
36 AK4byRef.jets = cms.InputTag("ak4PFJetsCHS")
37 #Get gen jet collection for real jets
38 ak4GenJetsForPUid = cms.EDFilter("GenJetSelector",
39  src = cms.InputTag("ak4GenJets"),
40  cut = cms.string('pt > 8.'),
41  filter = cms.bool(False)
42  )
43 #do reco gen - reco matching
44 from PhysicsTools.PatAlgos.mcMatchLayer0.jetMatch_cfi import patJetGenJetMatch
45 newpatJetGenJetMatch = patJetGenJetMatch.clone(
46  src = cms.InputTag("ak4PFJetsCHS"),
47  matched = cms.InputTag("ak4GenJetsForPUid"),
48  maxDeltaR = cms.double(0.25),
49  resolveAmbiguities = cms.bool(True)
50 )
51 
52 # Module execution for MC
54 bTagValidation.finalizePlots = False
55 bTagValidation.finalizeOnly = False
56 bTagValidation.jetMCSrc = 'AK4byValAlgo'
57 bTagValidation.ptRanges = cms.vdouble(0.0)
58 bTagValidation.etaRanges = cms.vdouble(0.0)
59 bTagValidation.doJetID = True
60 bTagValidation.doJEC = True
61 bTagValidation.JECsource = cms.string("newak4PFCHSL1FastL2L3")
62 bTagValidation.doPUid = cms.bool(True)
63 bTagValidation.genJetsMatched = cms.InputTag("newpatJetGenJetMatch")
64 #to run on fastsim
65 prebTagSequenceMC = cms.Sequence(ak4GenJetsForPUid*newpatJetGenJetMatch*myPartons*AK4Flavour)
66 bTagPlotsMC = cms.Sequence(bTagValidation)
67 
68 #to run on fullsim in the validation sequence, all histograms produced in the dqmoffline sequence
69 bTagValidationNoall = bTagValidation.clone(flavPlots="noall")
70 bTagPlotsMCbcl = cms.Sequence(myPartons*AK4Flavour*bTagValidationNoall)
DATA ############.