Exemplo n.º 1
0
	VarParsing.multiplicity.singleton,
	VarParsing.varType.float,
	"The event weight."
)
options.register ('mask',
	'',
	VarParsing.multiplicity.singleton,
	VarParsing.varType.string,
	"Luminosity mask"
)

options.parseArguments()
process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(options.maxEvents))		# Set up the number of events to run over.

if options.suffix == "1":
	options.suffix = "pt{0}".format(options.cutPtFilter)

### Input:
if options.subprocess:
	miniaod = dataset.fetch_miniaod(options.subprocess, options.generation)
	sample = miniaod.get_sample()
	sigma = sample.sigma
	if sigma == None:		# 161013: Added after removing sigma from jetht datasets.
		sigma = -1
	weight = miniaod.weight
	if options.weight < 0:
		factor = 1
		if not options.crab:
			if options.maxEvents > 0:		# If maxEvents is -1, run over everything
				factor = miniaod.n/options.maxEvents
		options.weight = weight*factor