process.unCalibrateMePath = cms.Path(process.unCalibrateMe) extraSysModules.append( cms.PSet( PhotonMethodName = cms.string("FlashggPhotonGainRatios"), MethodName = cms.string("FlashggDiPhotonFromPhoton"), Label = cms.string("gainRatios"), NSigmas = cms.vint32(), ApplyCentralValue = cms.bool(True), calibratedEBRechits = cms.InputTag('reducedEgamma', 'reducedEBRecHits'), reCalibratedEBRechits = cms.InputTag('unCalibrateMe', 'EcalRecalibRecHitsEB'), updateEnergy = cms.bool(True) ) ) # electron matching if invertEleVeto and customize.doeleId: eleSource="flashggSelectedElectrons" if not "EXOSpring16_v2" in customize.datasetName() else "flashggElectrons" if customize.eleId == "isHLTsafe": from flashgg.MicroAOD.flashggHltSafeElectrons_cfi import flashggHltSafeElectrons process.flashggIdentifiedElectrons = flashggHltSafeElectrons.clone(src=cms.InputTag(eleSource)) else: from flashgg.MicroAOD.flashggLeptonSelectors_cff import flashggSelectedElectrons process.flashggIdentifiedElectrons = flashggSelectedElectrons.clone( src=cms.InputTag(eleSource), cut=cms.string(customize.eleId) ) extraSysModules.append( cms.PSet( PhotonMethodName = cms.string("FlashggPhotonEleMatch"), MethodName = cms.string("FlashggDiPhotonFromPhoton"), Label = cms.string("eleMatch"), NSigmas = cms.vint32(), ApplyCentralValue = cms.bool(True),
"genPt>>phoPt(145,100,3000)", "phoEta>>phoEta(55,-2.75,2.75)", "phoPhi>>phoPhi(65,-3.25,3.25)", "phoBlockChIso>>phoBlockChIso(120,-10,50)", "phoBlockPhoIso>>phoBlockPhoIso(120,-10,50)", "phoChIso>>phoChIso(120,-10,50)", "phoPhoIso>>phoPhoIso(120,-10,50)", "phoNeutIso>>phoNeutIso(120,-10,50)", "phoHoE>>phoHoE(40,0,0.2)", "phoSigmaIeIe>>phoSigmaIeIe(50,0,5.e-2)", "phoPixSeed>>phoPixSeed(2,-0.5,1.5)", "phoScEta:phoPhi>>phoEtaVsPhi(65,-3.25,3.25:55,-2.75,2.75)" ] if customize.datasetName() and (not "EXOSpring15_v3" in customize.datasetName() or "EXOSpring15_v3v8" in customize.datasetName()): variables.extend( [ "leadRndConeChIso := leadingView.extraChIsoWrtChoosenVtx('rnd03')", "leadRndConeChIso0 := leadingView.extraChIsoWrtChoosenVtx('rnd03_0')", "leadRndConeChIso1 := leadingView.extraChIsoWrtChoosenVtx('rnd03_1')", "leadRndConeChIso2 := leadingView.extraChIsoWrtChoosenVtx('rnd03_2')", "leadRndConeChIso3 := leadingView.extraChIsoWrtChoosenVtx('rnd03_3')", "leadRndConeChIso4 := leadingView.extraChIsoWrtChoosenVtx('rnd03_4')", "leadRndConeChIso5 := leadingView.extraChIsoWrtChoosenVtx('rnd03_5')", "leadRndConeChIso6 := leadingView.extraChIsoWrtChoosenVtx('rnd03_6')", "leadRndConeChIso7 := leadingView.extraChIsoWrtChoosenVtx('rnd03_7')", "leadRndConeChIso8 := leadingView.extraChIsoWrtChoosenVtx('rnd03_8')", "subleadRndConeChIso := subLeadingView.extraChIsoWrtChoosenVtx('rnd03')", "subleadRndConeChIso0 := subLeadingView.extraChIsoWrtChoosenVtx('rnd03_0')", "subleadRndConeChIso1 := subLeadingView.extraChIsoWrtChoosenVtx('rnd03_1')",
) ) variables.extend( ["leadEleMatch := leadingPhoton.hasUserCand('eleMatch')", "subleadEleMatch := subLeadingPhoton.hasUserCand('eleMatch')" ] ) # store cut-based IDs for eid in "Loose", "Medium", "Tight": variables.extend( [ "leadEleIs%s := ?leadingPhoton.hasUserCand('eleMatch')?leadingPhoton.userCand('eleMatch').pass%sId:0" % (eid,eid), "subleadEleIs%s := ?subLeadingPhoton.hasUserCand('eleMatch')?subLeadingPhoton.userCand('eleMatch').pass%sId:0" % (eid,eid) ]) # trigger filtering from HLTrigger.HLTfilters.hltHighLevel_cfi import hltHighLevel if customize.processType == "data" and not "electron" in customize.selection: if "Prompt" in customize.datasetName() or "04Dec" in customize.datasetName() or "16Dec2015" in customize.datasetName(): filterProc = "RECO" else: filterProc = "PAT" diphotonDumper.globalVariables.addTriggerBits = cms.PSet( tag=cms.InputTag("TriggerResults","",filterProc),bits=cms.vstring("eeBadScFilter","goodVertices") ) elif len(dumpBits) > 0: if doDoublePho: diphotonDumper.globalVariables.addTriggerBits = cms.PSet( tag=cms.InputTag("TriggerResults","","HLT"),bits=cms.vstring(dumpBits) ) if doSinglePho: photonDumper.globalVariables.addTriggerBits = cms.PSet( tag=cms.InputTag("TriggerResults","","HLT"),bits=cms.vstring(dumpBits) )
if (customize.selection == "diphoton" or customize.selection == "photon"): dumpCfg.addRandomCones(variables, variablesSinglePho, histograms, histogramsSinglePho) if customize.extraActvity: from diphotons.Analysis.extraActivityConfig import addGlobalVariables addGlobalVariables(process, diphotonDumper) if customize.addGainFlags: dumpCfg.addGainSwitchFlags(variables, histograms) # HLT matching ## if customize.processType == "data" and customize.dohltMatch: if customize.dohltMatch: selectedPatTrigger = "slimmedPatTrigger" if "Fall17" in customize.datasetName( ) else "selectedPatTrigger" extraSysModules.append( cms.PSet( PhotonMethodName=cms.string("FlashggPhotonHLTMatch"), MethodName=cms.string("FlashggDiPhotonFromPhoton"), Label=cms.string("hltMatch"), NSigmas=cms.vint32(), ApplyCentralValue=cms.bool(True), trgBitsSrc=cms.InputTag("TriggerResults", "", "HLT"), ## trgObjectsSrc = cms.InputTag("selectedPatTrigger"), trgObjectsSrc=cms.InputTag(selectedPatTrigger), pathNames=cms.vstring(dumpBits), deltaRmax=cms.double(0.3), )) for bit in dumpBits: variables.extend([