9 import FWCore.ParameterSet.VarParsing
as VarParsing
11 options.register(
'ZmumuCollection',
12 'goldenZmumuCandidatesGe2IsoMuons',
13 VarParsing.VarParsing.multiplicity.singleton,
14 VarParsing.VarParsing.varType.int,
15 "collection of selected Z->mumu candidates")
17 options.register(
'mdtau',
19 VarParsing.VarParsing.multiplicity.singleton,
20 VarParsing.VarParsing.varType.int,
21 "mdtau value passed to TAUOLA for selecting tau decay modes")
23 options.register(
'transformationMode',
25 VarParsing.VarParsing.multiplicity.singleton,
26 VarParsing.VarParsing.varType.int,
27 "transformation mode: 0=mumu->mumu, 1=mumu->tautau")
29 options.register(
'embeddingMode',
31 VarParsing.VarParsing.multiplicity.singleton,
32 VarParsing.VarParsing.varType.int,
33 "embedding mode: 0=PF, 1=RH")
35 options.register(
'minVisibleTransverseMomentum',
37 VarParsing.VarParsing.multiplicity.singleton,
38 VarParsing.VarParsing.varType.string,
39 "generator level cut on visible transverse momentum (typeN:pT,[...];[...])")
41 options.register(
'useJson',
43 VarParsing.VarParsing.multiplicity.singleton,
44 VarParsing.VarParsing.varType.int,
45 "should I enable event selection by JSON file ?")
47 options.register(
'overrideBeamSpot',
49 VarParsing.VarParsing.multiplicity.singleton,
50 VarParsing.VarParsing.varType.int,
51 "should I override beamspot in globaltag ?")
53 options.register(
'doNotSkimEvents',
55 VarParsing.VarParsing.multiplicity.singleton,
56 VarParsing.VarParsing.varType.int,
57 "should I disable all event selection cuts ?")
60 if not hasattr(process,
"doNotParse"):
62 if hasattr(sys,
"argv") ==
True:
63 if not sys.argv[0].endswith(
'cmsDriver.py'):
64 options.parseArguments()
67 print "CL parsing disabled!"
70 process.options[
'mdtau'] = options.mdtau
71 process.options[
'transformationMode'] = options.transformationMode
72 process.options[
'embeddingMode'] = options.embeddingMode
73 process.options[
'minVisibleTransverseMomentum'] = options.minVisibleTransverseMomentum
74 if options.useJson != 0:
75 process.options[
'useJson'] =
True
77 process.options[
'useJson'] =
False
78 if options.overrideBeamSpot != 0:
79 process.options[
'overrideBeamSpot'] =
True
81 process.options[
'overrideBeamSpot'] =
False
82 if options.doNotSkimEvents != 0:
83 process.options[
'doNotSkimEvents'] =
True
85 process.options[
'doNotSkimEvents'] =
False
def parseCommandLineOptions