Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-13 01:43:31

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 ######### DATA ############
0004 from DQMOffline.RecoB.bTagAnalysisData_cfi import *
0005 bTagAnalysis.ptRanges = cms.vdouble(0.0)
0006 bTagAnalysis.doJetID = True
0007 bTagAnalysis.doJEC = True
0008 #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
0009 bTagPlotsDATA = cms.Sequence(bTagAnalysis)
0010 
0011 ## customizations for the pp_on_AA eras
0012 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
0013 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0014 (pp_on_XeXe_2017 | pp_on_AA).toModify(bTagAnalysis,
0015                                       doJEC=False
0016 )
0017 
0018 
0019 ########## MC ############
0020 #Matching
0021 from PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi import selectedHadronsAndPartons
0022 from PhysicsTools.JetMCAlgos.AK4PFJetsMCFlavourInfos_cfi import ak4JetFlavourInfos
0023 myak4JetFlavourInfos = ak4JetFlavourInfos.clone(
0024     jets = "ak4PFJetsCHS",
0025     partons = "selectedHadronsAndPartons:algorithmicPartons",
0026     hadronFlavourHasPriority = True
0027     )
0028 
0029 #Get gen jet collection for real jets
0030 ak4GenJetsForPUid = cms.EDFilter("GenJetSelector",
0031                                  src = cms.InputTag("ak4GenJets"),
0032                                  cut = cms.string('pt > 8.'),
0033                                  filter = cms.bool(False)
0034                                  )
0035 #do reco gen - reco matching
0036 from PhysicsTools.PatAlgos.mcMatchLayer0.jetMatch_cfi import patJetGenJetMatch
0037 newpatJetGenJetMatch = patJetGenJetMatch.clone(
0038     src = "ak4PFJetsCHS",
0039     matched = "ak4GenJetsForPUid",
0040     maxDeltaR = 0.25,
0041     resolveAmbiguities = True
0042 )
0043 
0044 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0045 pp_on_AA.toModify(newpatJetGenJetMatch, src = "akCs4PFJets")
0046 
0047 # Module execution for MC
0048 from Validation.RecoB.bTagAnalysis_cfi import *
0049 bTagValidation.jetMCSrc = 'myak4JetFlavourInfos'
0050 bTagValidation.ptRanges = cms.vdouble(0.0)
0051 bTagValidation.etaRanges = cms.vdouble(0.0)
0052 bTagValidation.doJetID = True
0053 bTagValidation.doJEC = True
0054 bTagValidation.genJetsMatched = cms.InputTag("newpatJetGenJetMatch")
0055 #to run on fastsim
0056 prebTagSequenceMC = cms.Sequence(ak4GenJetsForPUid*newpatJetGenJetMatch*selectedHadronsAndPartons*myak4JetFlavourInfos)
0057 bTagPlotsMC = cms.Sequence(bTagValidation)
0058 
0059 ## customizations for the pp_on_AA eras
0060 (pp_on_XeXe_2017 | pp_on_AA).toModify(bTagValidation,
0061                                       doJEC=False
0062 )
0063 
0064 #to run on fullsim in the validation sequence, all histograms produced in the dqmoffline sequence
0065 bTagValidationNoall = bTagValidation.clone(flavPlots="bcl")
0066 bTagPlotsMCbcl = cms.Sequence(bTagValidationNoall)