Exemplo n.º 1
0
if "data" in options.globalTag.lower() and not options.isData:
    print "\n\nConfig ERROR: GT contains seems to be for data but isData==False\n\n"
    sys.exit()
if "mc" in options.globalTag.lower() and options.isData:
    print "\n\nConfig ERROR: GT contains seems to be for MC but isData==True\n\n"
    sys.exit()
if not options.inputFiles:
    print "\n\nConfig ERROR: no inputFiles specified\n\n"
    sys.exit()
    
# print settings
print "\n\n***** JOB SETUP *************************"
for key in options._register:
    # do not print unused default options
    if key not in ["secondaryInputFiles","section","tag","totalSections","outputFile","secondaryOutputFile","filePrepend"]:
        print str(key)+" : "+str( options.__getattr__(key) )
print "*****************************************\n\n"


process = cms.Process("analysis")

# cmssw options
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger.cerr.FwkReport.reportEvery = 100
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff")
process.GlobalTag.globaltag = options.globalTag
process.options   = cms.untracked.PSet( wantSummary = cms.untracked.bool(False) )
process.options.allowUnscheduled = cms.untracked.bool(True)
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(int(options.maxEvents)))
process.source = cms.Source(  "PoolSource",
                              fileNames = cms.untracked.vstring(options.inputFiles),
Exemplo n.º 2
0
        "HGCalRecHit:HGCHEFRecHits",
        "HGCalRecHit:HGCHEBRecHits",
    ),
    simClusters=cms.InputTag("mix:MergedCaloTruth"),
)

process.recosim_step *= process.hgcRecHitsToSimClusters
#process.dump=cms.EDAnalyzer('EventContentAnalyzer')
#process.recosim_step += process.dump

# Input source
process.source.fileNames = cms.untracked.vstring(options.inputFiles)

# Output definition
process.FEVTDEBUGoutput.fileName = cms.untracked.string(
    options.__getattr__("outputFile", noTags=True))
process.FEVTDEBUGoutput.outputCommands.append("keep *_*G4*_*_*")
process.FEVTDEBUGoutput.outputCommands.extend([
    "keep *_MergedTrackTruth_*_*",
    "keep *_trackingParticleRecoTrackAsssociation_*_*",
    "keep *_trackingParticleSimClusterAssociation_*_*",
    "keep *_trackingParticleMergedSCAssociation_*_*",
    "keep *_hgcRecHitsToSimClusters_*_*",
    "keep SimClustersedmAssociation_mix_*_*",
    "keep CaloParticlesedmAssociation_mix_*_*",
    "keep *_pfParticles_*_*",
    "keep recoPFRecHits_*_*_*",
    "keep *_hgcSimTruth_*_*",
    "keep *_lcAssocByEnergyScoreProcer_*_*",
    "keep *_layerClusterCaloParticleAssociationProducer_*_*",
    "keep *_scAssocByEnergyScoreProducer_*_*",
Exemplo n.º 3
0
if "mc" in options.globalTag.lower() and options.isData:
    print "\n\nConfig ERROR: GT contains seems to be for MC but isData==True\n\n"
    sys.exit()
if not options.inputFiles:
    print "\n\nConfig ERROR: no inputFiles specified\n\n"
    sys.exit()

# print settings
print "\n\n***** JOB SETUP *************************"
for key in options._register:
    # do not print unused default options
    if key not in [
            "secondaryInputFiles", "section", "tag", "totalSections",
            "outputFile", "secondaryOutputFile", "filePrepend"
    ]:
        print str(key) + " : " + str(options.__getattr__(key))
print "*****************************************\n\n"

process = cms.Process("analysis")

# cmssw options
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger.cerr.FwkReport.reportEvery = 100
process.load(
    "Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff"
)
process.GlobalTag.globaltag = options.globalTag
process.options = cms.untracked.PSet(wantSummary=cms.untracked.bool(False))
process.options.allowUnscheduled = cms.untracked.bool(True)
process.maxEvents = cms.untracked.PSet(
    input=cms.untracked.int32(int(options.maxEvents)))
Exemplo n.º 4
0
    #process.deterministicSeeds.tauCollection = tauCollection
    #process.deterministicSeeds.photonCollection = photonCollection
    process.deterministicSeeds.jetCollection = jetCollection
    process.deterministicSeeds.METCollection = metCollection
    seq += process.deterministicSeeds

    # overwrite output collections
    muonCollection = cms.InputTag("deterministicSeeds", "muonsWithSeed", process.name_())
    jetCollection = cms.InputTag("deterministicSeeds", "jetsWithSeed", process.name_())
    metCollection = cms.InputTag("deterministicSeeds", "METsWithSeed", process.name_())
    electronCollection = cms.InputTag("deterministicSeeds", "electronsWithSeed", process.name_())

    # load and configure the tree maker
    process.load("JetTaggingSF.JetTaggingSF.treeMaker_cfi")
    process.treeMaker.verbose = cms.untracked.bool(False)
    process.treeMaker.outputFile = cms.string(options.__getattr__("outputFile", noTags=True))
    process.treeMaker.campaign = cms.string(options.campaign)
    process.treeMaker.metaDataFile = cms.string(options.metaDataFile)
    process.treeMaker.isData = cms.bool(options.isData)
    process.treeMaker.leptonChannel = cms.string(options.leptonChannel)
    process.treeMaker.eeTriggers = cms.vstring(options.eeTriggers)
    process.treeMaker.emuTriggers = cms.vstring(options.emuTriggers)
    process.treeMaker.mumuTriggers = cms.vstring(options.mumuTriggers)
    process.treeMaker.eTriggers = cms.vstring(options.eTriggers)
    process.treeMaker.muTriggers = cms.vstring(options.muTriggers)
    process.treeMaker.metFilters = cms.vstring(options.metFilters)
    process.treeMaker.jesFiles = cms.vstring(options.jesFiles)
    process.treeMaker.jesRanges = cms.vint32(options.jesRanges)
    process.treeMaker.jesUncFiles = cms.vstring(options.jesUncFiles)
    process.treeMaker.jesUncSrcFile = cms.string(options.jesUncSrcFile)
    process.treeMaker.jesUncSources = cms.vstring(options.jesUncSources)
Exemplo n.º 5
0
# options
options = VarParsing("python")

# set defaults of common options
options.setDefault("outputFile", "ntup.root")
options.setDefault("maxEvents", -1)

options.parseArguments()


# input / output
process.maxEvents.input = cms.untracked.int32(-1)
process.source.fileNames = cms.untracked.vstring(
    *["file:{}".format(f) for f in options.inputFiles])
process.TFileService = cms.Service("TFileService",
    fileName=cms.string("file:{}".format(options.__getattr__("outputFile", noTags=True))))


# setup the HGCAL tuple writer
from FastSimulation.Event.ParticleFilter_cfi import *
from RecoLocalCalo.HGCalRecProducers.HGCalRecHit_cfi import dEdX

process.ana = cms.EDAnalyzer("HGCalAnalysis",
    detector=cms.string("all"),
    inputTag_HGCalMultiCluster=cms.string("hgcalMultiClusters"),
    rawRecHits=cms.bool(True),
    readCaloParticles=cms.bool(True),
    readGenParticles=cms.bool(False),
    storeGenParticleOrigin=cms.bool(False),
    storeGenParticleExtrapolation=cms.bool(False),
    storePCAvariables=cms.bool(False),
Exemplo n.º 6
0
"""


import FWCore.ParameterSet.Config as cms
from reco_prodtools.templates.RECO_fragment import process
from FWCore.ParameterSet.VarParsing import VarParsing


# options
options = VarParsing("python")

# set defaults of common options
options.setDefault("outputFile", "reco.root")
options.setDefault("maxEvents", -1)

# register custom options
options.register("outputFileDQM", "dqm.root", VarParsing.multiplicity.singleton,
    VarParsing.varType.string, "path to the DQM output file")

options.parseArguments()


# input / output
process.maxEvents.input = cms.untracked.int32(-1)
process.source.fileNames = cms.untracked.vstring(
    *["file:{}".format(f) for f in options.inputFiles])
process.FEVTDEBUGHLToutput.fileName = cms.untracked.string(
    "file:{}".format(options.__getattr__("outputFile", noTags=True)))
process.DQMoutput.fileName = cms.untracked.string(
    "file:{}".format(options.outputFileDQM))