Example #1
0
    process.GlobalTag.globaltag = '74X_mcRun2_asymptotic_v4' 
elif os.environ["CMSSW_VERSION"].count("CMSSW_8_0"):
    process.GlobalTag.globaltag = '80X_mcRun2_asymptotic_2016_miniAODv2'
else:
    raise Exception,"Could not find a sensible CMSSW_VERSION for default globaltag"

process.TFileService = cms.Service("TFileService",
                                   fileName = cms.string("test.root")
)

process.load("flashgg.Taggers.flashggUpdatedIdMVADiPhotons_cfi") 
from flashgg.Taggers.flashggPreselectedDiPhotons_cfi import flashggPreselectedDiPhotons
process.kinPreselDiPhotons = flashggPreselectedDiPhotons.clone(
cut=cms.string(
        "leadingPhoton.pt > 40 && subLeadingPhoton.pt > 30"
        " && abs(leadingPhoton.superCluster.eta)<2.5 && abs(subLeadingPhoton.superCluster.eta)<2.5 "
        " && ( abs(leadingPhoton.superCluster.eta)<1.4442 || abs(leadingPhoton.superCluster.eta)>1.566)"
        " && ( abs(subLeadingPhoton.superCluster.eta)<1.4442 || abs(subLeadingPhoton.superCluster.eta)>1.566)"
        )
                                                              )

process.load("flashgg.Taggers.diphotonDumper_cfi") ##  import diphotonDumper 
import flashgg.Taggers.dumperConfigTools as cfgTools

process.diphotonDumper.src = "kinPreselDiPhotons"

process.diphotonDumper.dumpTrees = True
process.diphotonDumper.dumpWorkspace = False
process.diphotonDumper.quietRooFit = True


# split tree, histogram and datasets by process
Example #2
0
        "file:myMicroAODOutputFile_PU.root"        
        )
)
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32( 1000 )

process.TFileService = cms.Service("TFileService",
                                   fileName = cms.string("test.root")
)

process.load("flashgg.Taggers.flashggUpdatedIdMVADiPhotons_cfi") 
from flashgg.Taggers.flashggPreselectedDiPhotons_cfi import flashggPreselectedDiPhotons
process.kinPreselDiPhotons = flashggPreselectedDiPhotons.clone(
cut=cms.string(
        "leadingPhoton.pt > 40 && subLeadingPhoton.pt > 30"
        " && abs(leadingPhoton.superCluster.eta)<2.5 && abs(subLeadingPhoton.superCluster.eta)<2.5 "
        " && ( abs(leadingPhoton.superCluster.eta)<1.4442 || abs(leadingPhoton.superCluster.eta)>1.566)"
        " && ( abs(subLeadingPhoton.superCluster.eta)<1.4442 || abs(subLeadingPhoton.superCluster.eta)>1.566)"
        )
                                                              )

process.load("flashgg.Taggers.diphotonDumper_cfi") ##  import diphotonDumper 
import flashgg.Taggers.dumperConfigTools as cfgTools

process.diphotonDumper.src = "kinPreselDiPhotons"

process.diphotonDumper.dumpTrees = True
process.diphotonDumper.dumpWorkspace = False
process.diphotonDumper.quietRooFit = True


# split tree, histogram and datasets by process
                                   fileName = cms.string("test.root")
)

process.load("flashgg.Taggers.flashggUpdatedIdMVADiPhotons_cfi") 
process.flashggUpdatedIdMVADiPhotons.reRunRegression = cms.bool(False)
process.flashggUpdatedIdMVADiPhotons.doNon5x5transformation = cms.bool(False)
process.flashggUpdatedIdMVADiPhotons.do5x5correction = cms.bool(False)
process.flashggUpdatedIdMVADiPhotons.doIsoCorrection = cms.bool(False)

from flashgg.Taggers.flashggPreselectedDiPhotons_cfi import flashggPreselectedDiPhotons
process.kinPreselDiPhotons = flashggPreselectedDiPhotons.clone(
src = cms.InputTag("flashggUpdatedIdMVADiPhotons"),
cut=cms.string(
        "mass > 95"
        " && leadingPhoton.pt > 18 && subLeadingPhoton.pt > 18"
        " && abs(leadingPhoton.superCluster.eta)<2.5 && abs(subLeadingPhoton.superCluster.eta)<2.5 "
        " && ( abs(leadingPhoton.superCluster.eta)<1.4442 || abs(leadingPhoton.superCluster.eta)>1.566)"
        " && ( abs(subLeadingPhoton.superCluster.eta)<1.4442 || abs(subLeadingPhoton.superCluster.eta)>1.566)"
        " && (leadingPhoton.pt > 14 && leadingPhoton.hadTowOverEm < 0.15 && (leadingPhoton.full5x5_r9>0.8 || leadingPhoton.chargedHadronIso<20 || leadingPhoton.chargedHadronIso<(0.3*leadingPhoton.pt)))"
        " && (subLeadingPhoton.pt > 14 && subLeadingPhoton.hadTowOverEm < 0.15 && (subLeadingPhoton.full5x5_r9>0.8 || subLeadingPhoton.chargedHadronIso<20 || subLeadingPhoton.chargedHadronIso<(0.3*subLeadingPhoton.pt)))"
        )
)


process.flashggSinglePhotonViews = cms.EDProducer("FlashggSinglePhotonViewProducer",
                                                  DiPhotonTag=cms.InputTag('kinPreselDiPhotons'),                                         
                                                  maxCandidates = cms.int32(1)
                                                  )

process.load("flashgg.Taggers.photonViewDumper_cfi") ##  import diphotonDumper 
import flashgg.Taggers.dumperConfigTools as cfgTools
process.kinPreselDiPhotons = flashggPreselectedDiPhotons.clone(
cut=cms.string(
        " leadingPhoton.pt > 18 && subLeadingPhoton.pt > 18"
        " && mass > 55" ##### Change mass cut if needed
        " && abs(leadingPhoton.superCluster.eta)<2.5 && abs(subLeadingPhoton.superCluster.eta)<2.5 "
#        " && ( abs(leadingPhoton.superCluster.eta)<1.4442 || abs(leadingPhoton.superCluster.eta)>1.566)"
#        " && ( abs(subLeadingPhoton.superCluster.eta)<1.4442 || abs(subLeadingPhoton.superCluster.eta)>1.566)"
        " && (leadingPhoton.full5x5_r9>0.8||leadingPhoton.egChargedHadronIso<20||leadingPhoton.egChargedHadronIso/leadingPhoton.pt<0.3)"
        " && (subLeadingPhoton.full5x5_r9>0.8||subLeadingPhoton.egChargedHadronIso<20||subLeadingPhoton.egChargedHadronIso/subLeadingPhoton.pt<0.3)"
        # E-veto
#        " && leadingPhoton.passElectronVeto && subLeadingPhoton.passElectronVeto"
        #PS veto
        " && (!leadingPhoton.hasPixelSeed) && (!subLeadingPhoton.hasPixelSeed)"
                 
        " && leadingPhoton.hadTowOverEm<0.008 && subLeadingPhoton.hadTowOverEm<0.008"
        " && (  (     (    abs(leadingPhoton.superCluster.eta)<1.4442\
                        && abs(subLeadingPhoton.superCluster.eta)<1.4442 )\
                   && (    (   leadingPhoton.full5x5_r9>0.85)\
                        || (   leadingPhoton.full5x5_r9<=0.85 && leadingPhoton.full5x5_r9>0.5\
                            && leadingPhoton.full5x5_sigmaIetaIeta<0.015\
                            && leadingPhoton.pfPhoIso03<4.0\
                            && leadingPhoton.trkSumPtHollowConeDR03<6.0) )\
                   && (    (   subLeadingPhoton.full5x5_r9>0.85)\
                        || (   subLeadingPhoton.full5x5_r9<=0.85 && subLeadingPhoton.full5x5_r9>0.5\
                            && subLeadingPhoton.full5x5_sigmaIetaIeta<0.015\
                            && subLeadingPhoton.pfPhoIso03<4.0\
                            && subLeadingPhoton.trkSumPtHollowConeDR03<6.0) )  )\
              || (    (    abs(leadingPhoton.superCluster.eta)<1.4442\
                        && abs(subLeadingPhoton.superCluster.eta)>1.566 )\
                   && (    leadingPhoton.full5x5_r9>0.85\
                        && leadingPhoton.full5x5_sigmaIetaIeta<0.015\
                        && leadingPhoton.pfPhoIso03<4.0\
                        && leadingPhoton.trkSumPtHollowConeDR03<6.0)\
                   && (    subLeadingPhoton.full5x5_r9>0.90\
                        && subLeadingPhoton.full5x5_sigmaIetaIeta<0.035\
                        && subLeadingPhoton.pfPhoIso03<4.0\
                        && subLeadingPhoton.trkSumPtHollowConeDR03<6.0)  )\
              || (   (     abs(subLeadingPhoton.superCluster.eta)<1.4442\
                        && abs(leadingPhoton.superCluster.eta)>1.566 )\
                   && (    subLeadingPhoton.full5x5_r9>0.85\
                        && subLeadingPhoton.full5x5_sigmaIetaIeta<0.015\
                        && subLeadingPhoton.pfPhoIso03<4.0\
                        && subLeadingPhoton.trkSumPtHollowConeDR03<6.0)\
                   && (    leadingPhoton.full5x5_r9>0.90\
                        && leadingPhoton.full5x5_sigmaIetaIeta<0.035\
                        && leadingPhoton.pfPhoIso03<4.0\
                        && leadingPhoton.trkSumPtHollowConeDR03<6.0)  )\
              || (   (     abs(subLeadingPhoton.superCluster.eta)>1.566\
                        && abs(leadingPhoton.superCluster.eta)>1.566)\
                   && (    subLeadingPhoton.full5x5_r9>0.90\
                        && subLeadingPhoton.full5x5_sigmaIetaIeta<0.035\
                        && subLeadingPhoton.pfPhoIso03<4.0\
                        && subLeadingPhoton.trkSumPtHollowConeDR03<6.0)\
                   && (    leadingPhoton.full5x5_r9>0.90\
                        && leadingPhoton.full5x5_sigmaIetaIeta<0.035\
                        && leadingPhoton.pfPhoIso03<4.0\
                        && leadingPhoton.trkSumPtHollowConeDR03<6.0)\
                        )  )"

        ## " && leadingPhoton.genMatchType != subLeadingPhoton.genMatchType " ## selects only prompt-fake pairs
        )
                                                              )
Example #5
0
process.TFileService = cms.Service("TFileService",
                                   fileName=cms.string("test.root"))

process.load("flashgg.Taggers.flashggUpdatedIdMVADiPhotons_cfi")
process.flashggUpdatedIdMVADiPhotons.reRunRegression = cms.bool(False)
process.flashggUpdatedIdMVADiPhotons.doNon5x5transformation = cms.bool(False)
process.flashggUpdatedIdMVADiPhotons.do5x5correction = cms.bool(False)
process.flashggUpdatedIdMVADiPhotons.doIsoCorrection = cms.bool(False)

from flashgg.Taggers.flashggPreselectedDiPhotons_cfi import flashggPreselectedDiPhotons
process.kinPreselDiPhotons = flashggPreselectedDiPhotons.clone(
    src=cms.InputTag("flashggUpdatedIdMVADiPhotons"),
    cut=cms.string(
        "mass > 95"
        " && leadingPhoton.pt > 18 && subLeadingPhoton.pt > 18"
        " && abs(leadingPhoton.superCluster.eta)<2.5 && abs(subLeadingPhoton.superCluster.eta)<2.5 "
        " && ( abs(leadingPhoton.superCluster.eta)<1.4442 || abs(leadingPhoton.superCluster.eta)>1.566)"
        " && ( abs(subLeadingPhoton.superCluster.eta)<1.4442 || abs(subLeadingPhoton.superCluster.eta)>1.566)"
        " && (leadingPhoton.pt > 14 && leadingPhoton.hadTowOverEm < 0.15 && (leadingPhoton.full5x5_r9>0.8 || leadingPhoton.chargedHadronIso<20 || leadingPhoton.chargedHadronIso<(0.3*leadingPhoton.pt)))"
        " && (subLeadingPhoton.pt > 14 && subLeadingPhoton.hadTowOverEm < 0.15 && (subLeadingPhoton.full5x5_r9>0.8 || subLeadingPhoton.chargedHadronIso<20 || subLeadingPhoton.chargedHadronIso<(0.3*subLeadingPhoton.pt)))"
    ))

process.flashggSinglePhotonViews = cms.EDProducer(
    "FlashggSinglePhotonViewProducer",
    DiPhotonTag=cms.InputTag('kinPreselDiPhotons'),
    maxCandidates=cms.int32(1))

process.load("flashgg.Taggers.photonViewDumper_cfi")  ##  import diphotonDumper
import flashgg.Taggers.dumperConfigTools as cfgTools

process.photonViewDumper.src = "flashggSinglePhotonViews"
Example #6
0
        "file:myMicroAODOutputFile_GJet40-80.root"        
        )
)
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10000) )
process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32( 1000 )

process.TFileService = cms.Service("TFileService",
                                   fileName = cms.string("test.root")
)

from flashgg.Taggers.flashggPreselectedDiPhotons_cfi import flashggPreselectedDiPhotons
process.kinPreselDiPhotons = flashggPreselectedDiPhotons.clone(
cut=cms.string(
        " leadingPhoton.pt > 18 && subLeadingPhoton.pt > 18"
        " && mass > 55"
        " && abs(leadingPhoton.superCluster.eta)<2.5 && abs(subLeadingPhoton.superCluster.eta)<2.5 "
        " && ( abs(leadingPhoton.superCluster.eta)<1.4442 || abs(leadingPhoton.superCluster.eta)>1.566)"
        " && ( abs(subLeadingPhoton.superCluster.eta)<1.4442 || abs(subLeadingPhoton.superCluster.eta)>1.566)"
        ## " && leadingPhoton.genMatchType != subLeadingPhoton.genMatchType " ## selects only prompt-fake pairs
        )
                                                              )


process.flashggSinglePhotonViews = cms.EDProducer("FlashggSinglePhotonViewProducer",
 					  DiPhotonTag=cms.InputTag('kinPreselDiPhotons'),
                                          maxCandidates = cms.int32(1)
                                          )

process.load("flashgg.Taggers.photonViewDumper_cfi") ##  import diphotonDumper 
import flashgg.Taggers.dumperConfigTools as cfgTools

process.photonViewDumper.src = "flashggSinglePhotonViews"