Ejemplo n.º 1
0
    FlowSteps.append(ElectronCalibration)

if options.muCalib:
    from UWVV.AnalysisTools.templates.MuonCalibration import MuonCalibration
    FlowSteps.append(MuonCalibration)

# ZZ stuff
from UWVV.AnalysisTools.templates.ZZFlow import ZZFlow
FlowSteps.append(ZZFlow)

# but not actually the Z/ZZ combinations
from UWVV.AnalysisTools.templates.NoCombinedStates import NoCombinedStates
FlowSteps.append(NoCombinedStates)

# Turn all these into a single flow class
FlowClass = createFlow(*FlowSteps)
flow = FlowClass('flow',
                 process,
                 isMC=bool(options.isMC),
                 isSync=bool(options.isSync))

outputCommands = cms.untracked.vstring(
    'drop *',
    'keep *_packedGenParticles_*_*',
    'keep *_prunedGenParticles_*_*',
    'keep *_packedPFCandidates_*_*',
    'keep *_offlineSlimmedPrimaryVertices_*_*',
)
for obj, objName in flow.finalTags().iteritems():
    print obj, objName
    outputCommands.append('keep *_{}_*_*'.format(objName.split(':')[0]))
Ejemplo n.º 2
0
process.MessageLogger.cerr.FwkReport.reportEvery = 100

process.source = cms.Source(
    "PoolSource",
    fileNames = cms.untracked.vstring('/store/mc/RunIIFall15MiniAODv2/GluGluHToZZTo4L_M2500_13TeV_powheg2_JHUgenV6_pythia8/MINIAODSIM/PU25nsData2015v1_76X_mcRun2_asymptotic_v12-v1/60000/02C0EC1D-F3E4-E511-ADCA-AC162DA603B4.root'),
    )

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

process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(10000))

ZZFlowClass = createFlow(VertexCleaning, ZZInitialStateBaseFlow, ZZFlow)
zzFlow = ZZFlowClass('zzFlow', process)

process.treeMakerEEEE = cms.EDAnalyzer(
    'TreeGeneratorEEEE',
    src = zzFlow.finalObjTag('zz4e'),
    branches = makeBranchSet('eeee'),
    eventParams = makeEventParams(zzFlow.finalTags()),
    triggers = triggerBranches,
    )
process.treeMakerEEMuMu = cms.EDAnalyzer(
    'TreeGeneratorEEMuMu',
    src = zzFlow.finalObjTag('zz2e2m'),
    branches = makeBranchSet('eemm'),
    eventParams = makeEventParams(zzFlow.finalTags()),
    triggers = triggerBranches,
Ejemplo n.º 3
0
        if zz:
            from UWVV.Ntuplizer.templates.vbsBranches import vbsDerivedSystematicBranches
            extraInitialStateBranches.append(vbsDerivedSystematicBranches)

flowOpts = {
    'isMC': bool(options.isMC),
    'isSync': bool(options.isMC) and bool(options.isSync),
    'year': options.year,
    'electronScaleShift': options.eScaleShift,
    'electronRhoResShift': options.eRhoResShift,
    'electronPhiResShift': options.ePhiResShift,
    'muonClosureShift': options.mClosureShift,
}

# Turn all these into a single flow class
FlowClass = createFlow(*FlowSteps)
flow = FlowClass('flow', process, initialstate_chans=channels, **flowOpts)

### Set up tree makers

# meta info tree first
process.metaInfo = cms.EDAnalyzer(
    'MetaTreeGenerator',
    eventParams=makeEventParams(flow.finalTags()),
    datasetName=cms.string(options.datasetName),
)
process.metaTreePath = cms.Path(process.metaInfo)
process.schedule.append(process.metaTreePath)

is2016H = 'Run2016H' in inputFiles[0] or "Run2016H" in options.datasetName
is2016G = 'Run2016G' in inputFiles[0] or "Run2016G" in options.datasetName
Ejemplo n.º 4
0
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc')

process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.schedule = cms.Schedule()

process.MessageLogger.cerr.FwkReport.reportEvery = 100

process.source = cms.Source(
    "PoolSource",
    fileNames = cms.untracked.vstring('/store/mc/RunIIFall15MiniAODv2/GluGluHToZZTo4L_M2500_13TeV_powheg2_JHUgenV6_pythia8/MINIAODSIM/PU25nsData2015v1_76X_mcRun2_asymptotic_v12-v1/60000/02C0EC1D-F3E4-E511-ADCA-AC162DA603B4.root'),
    )

process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(100))

LeptonFlowClass = createFlow(ElectronBaseFlow, MuonBaseFlow)
leptonFlow = LeptonFlowClass('leptonFlow', process)

InitialStateFlowClass = createFlow(ZZInitialStateBaseFlow)
initialStateFlow = InitialStateFlowClass('initialStateFlow', process,
                                       **leptonFlow.outputs[-1])

process.print4ECands = cms.EDAnalyzer(
    'CandidatePrinter',
    src = cms.InputTag(initialStateFlow.finalObjTag('zz4e')),
    )

process.print2E2MuCands = cms.EDAnalyzer(
    'CandidatePrinter',
    src = cms.InputTag(initialStateFlow.finalObjTag('zz2e2m')),
    )
Ejemplo n.º 5
0
process.source = cms.Source(
    "PoolSource",
    fileNames=cms.untracked.vstring(
        '/store/mc/RunIIFall15MiniAODv2/GluGluHToZZTo4L_M2500_13TeV_powheg2_JHUgenV6_pythia8/MINIAODSIM/PU25nsData2015v1_76X_mcRun2_asymptotic_v12-v1/60000/02C0EC1D-F3E4-E511-ADCA-AC162DA603B4.root'
    ),
)

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

process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(10000))

ZZFlowClass = createFlow(VertexCleaning, ZZInitialStateBaseFlow, ZZFlow)
zzFlow = ZZFlowClass('zzFlow', process)

process.treeMakerEEEE = cms.EDAnalyzer(
    'TreeGeneratorEEEE',
    src=zzFlow.finalObjTag('zz4e'),
    branches=makeBranchSet('eeee'),
    eventParams=makeEventParams(zzFlow.finalTags()),
    triggers=triggerBranches,
)
process.treeMakerEEMuMu = cms.EDAnalyzer(
    'TreeGeneratorEEMuMu',
    src=zzFlow.finalObjTag('zz2e2m'),
    branches=makeBranchSet('eemm'),
    eventParams=makeEventParams(zzFlow.finalTags()),
    triggers=triggerBranches,
Ejemplo n.º 6
0
    FlowSteps.append(ElectronCalibration)

if options.muCalib:
    from UWVV.AnalysisTools.templates.MuonCalibration import MuonCalibration
    FlowSteps.append(MuonCalibration)

# ZZ stuff
from UWVV.AnalysisTools.templates.ZZFlow import ZZFlow
FlowSteps.append(ZZFlow)

# but not actually the Z/ZZ combinations
from UWVV.AnalysisTools.templates.NoCombinedStates import NoCombinedStates
FlowSteps.append(NoCombinedStates)

# Turn all these into a single flow class
FlowClass = createFlow(*FlowSteps)
flow = FlowClass('flow', process, 
                 isMC=bool(options.isMC), isSync=bool(options.isSync))

outputCommands = cms.untracked.vstring(
    'drop *',
    'keep *_packedGenParticles_*_*',
    'keep *_prunedGenParticles_*_*',
    'keep *_packedPFCandidates_*_*',
    'keep *_offlineSlimmedPrimaryVertices_*_*',
    )
for obj, objName in flow.finalTags().iteritems():
    print obj, objName
    outputCommands.append('keep *_{}_*_*'.format(objName.split(':')[0]))

process.out = cms.OutputModule(
Ejemplo n.º 7
0
        if zz:
            from UWVV.Ntuplizer.templates.vbsBranches import vbsDerivedSystematicBranches
            extraInitialStateBranches.append(vbsDerivedSystematicBranches)

flowOpts = {
    'isMC' : bool(options.isMC),
    'isSync' : bool(options.isMC) and bool(options.isSync),

    'electronScaleShift' : options.eScaleShift,
    'electronRhoResShift' : options.eRhoResShift,
    'electronPhiResShift' : options.ePhiResShift,
    'muonClosureShift' : options.mClosureShift,
    }

# Turn all these into a single flow class
FlowClass = createFlow(*FlowSteps)
flow = FlowClass('flow', process, initialstate_chans=channels, **flowOpts)



### Set up tree makers

# meta info tree first
process.metaInfo = cms.EDAnalyzer(
    'MetaTreeGenerator',
    eventParams = makeEventParams(flow.finalTags()),
    datasetName = cms.string(options.datasetName),
    )
process.metaTreePath = cms.Path(process.metaInfo)
process.schedule.append(process.metaTreePath)