-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
117 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from DataFormats.FWLite import Events,Handle,Runs | ||
source = "externalLHEProducer" | ||
|
||
#for filename in ["HIG-RunIIFall18wmLHEGS-00509.root"," HIG-RunIIFall18wmLHEGS-00509_ordered.root","HIG-RunIIFall18wmLHEGS-00509_unordered.root"]: | ||
for filename in ["HIG-RunIIFall18wmLHEGS-00509.root"]: | ||
runs = Runs(filename) | ||
run = runs.__iter__().next() | ||
weightInfoHandle = Handle("LHEWeightInfoProduct") | ||
run.getByLabel(source, weightInfoHandle) | ||
weightInfoProd = weightInfoHandle.product() | ||
|
||
events = Events(filename) | ||
event = events.__iter__().next() | ||
weightHandle = Handle("LHEWeightProduct") | ||
event.getByLabel("externalLHEProducer", weightHandle) | ||
event.getByLabel(source, weightHandle) | ||
weightInfo = weightHandle.product() | ||
print "Content of the weights" | ||
for j, weights in enumerate(weightInfo.weights()): | ||
print "-"*10, "Looking at entry", j, "length is", len(weights),"-"*10 | ||
matching = weightInfoProd.orderedWeightGroupInfo(j) | ||
print "Weights length?", len(weights), "Contained ids lenths?", len(matching.containedIds()) | ||
print "-"*80 | ||
for i,weight in enumerate(weights): | ||
print i, weight | ||
info = matching.weightMetaInfo(i) | ||
print " ID, localIndex, globalIndex, label, set:", info.id, info.localIndex, info.globalIndex, info.label, matching.name() | ||
print "-"*80 | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# Auto generated configuration file | ||
# using: | ||
# Revision: 1.19 | ||
# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v | ||
# with command line options: Configuration/GenProduction/python/HIG-RunIIFall18wmLHEGS-00509-fragment.py --fileout file:HIG-RunIIFall18wmLHEGS-00509.root --mc --eventcontent LHE --datatier LHE --conditions 102X_upgrade2018_realistic_v11 --step LHE --python_filename HIG-RunIIFall18wmLHEGS-00509_1_cfg.py --no_exec | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
|
||
|
||
process = cms.Process('LHE') | ||
|
||
# import of standard configurations | ||
process.load('Configuration.StandardSequences.Services_cff') | ||
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') | ||
process.load('FWCore.MessageService.MessageLogger_cfi') | ||
process.load('Configuration.EventContent.EventContent_cff') | ||
process.load('SimGeneral.MixingModule.mixNoPU_cfi') | ||
process.load('Configuration.StandardSequences.GeometryRecoDB_cff') | ||
process.load('Configuration.StandardSequences.MagneticField_cff') | ||
process.load('Configuration.StandardSequences.EndOfProcess_cff') | ||
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') | ||
|
||
process.maxEvents = cms.untracked.PSet( | ||
input = cms.untracked.int32(10) | ||
) | ||
|
||
# Input source | ||
process.source = cms.Source("EmptySource") | ||
|
||
process.options = cms.untracked.PSet( | ||
|
||
) | ||
|
||
# Production Info | ||
process.configurationMetadata = cms.untracked.PSet( | ||
annotation = cms.untracked.string('Configuration/GenProduction/python/HIG-RunIIFall18wmLHEGS-00509-fragment.py nevts:10'), | ||
name = cms.untracked.string('Applications'), | ||
version = cms.untracked.string('$Revision: 1.19 $') | ||
) | ||
|
||
# Output definition | ||
|
||
process.LHEoutput = cms.OutputModule("PoolOutputModule", | ||
dataset = cms.untracked.PSet( | ||
dataTier = cms.untracked.string('LHE'), | ||
filterName = cms.untracked.string('') | ||
), | ||
fileName = cms.untracked.string('file:HIG-RunIIFall18wmLHEGS-00509.root'), | ||
#outputCommands = process.LHEEventContent.outputCommands, | ||
outputCommands = cms.untracked.vstring('keep *', | ||
'drop ME*_MEtoEDM*_*_*'), | ||
splitLevel = cms.untracked.int32(0) | ||
) | ||
|
||
# Additional output definition | ||
|
||
# Other statements | ||
from Configuration.AlCa.GlobalTag import GlobalTag | ||
process.GlobalTag = GlobalTag(process.GlobalTag, '102X_upgrade2018_realistic_v11', '') | ||
|
||
process.externalLHEProducer = cms.EDProducer("ExternalLHEProducer", | ||
args = cms.vstring('/afs/hep.wisc.edu/home/kdlong/public/DarkMatter_MonoZPrime_V_Mx50_Mv500_gDMgQ1_LO_slc6_amd64_gcc481_CMSSW_7_1_30_tarball_Dummy.tgz'), | ||
nEvents = cms.untracked.uint32(10), | ||
numberOfParameters = cms.uint32(1), | ||
outputFile = cms.string('cmsgrid_final.lhe'), | ||
scriptName = cms.FileInPath('GeneratorInterface/LHEInterface/data/run_generic_tarball_cvmfs.sh') | ||
) | ||
|
||
|
||
# Path and EndPath definitions | ||
process.lhe_step = cms.Path(process.externalLHEProducer) | ||
process.endjob_step = cms.EndPath(process.endOfProcess) | ||
process.LHEoutput_step = cms.EndPath(process.LHEoutput) | ||
|
||
# Schedule definition | ||
process.schedule = cms.Schedule(process.lhe_step,process.endjob_step,process.LHEoutput_step) | ||
from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask | ||
associatePatAlgosToolsTask(process) | ||
|
||
|
||
# Customisation from command line | ||
|
||
# Add early deletion of temporary data products to reduce peak memory need | ||
from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete | ||
process = customiseEarlyDelete(process) | ||
# End adding early deletion |