-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
Copy pathDiMuonVertex_HARVESTING.py
132 lines (114 loc) · 5.81 KB
/
DiMuonVertex_HARVESTING.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Auto generated configuration file
# using:
# Revision: 1.19
# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v
# with command line options: DiMuonVertex -s HARVESTING:alcaHarvesting --conditions auto:phase1_2022_realistic --mc --filetype DQM --scenario pp --era Run3 -n -1 --filein file:step3_inDQM.root
import FWCore.ParameterSet.Config as cms
from Configuration.Eras.Era_Run3_cff import Run3
process = cms.Process('HARVESTING',Run3)
import FWCore.ParameterSet.VarParsing as VarParsing
options = VarParsing.VarParsing()
options.register('maxEvents',
-1,
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.int,
"maximum events")
options.register('globalTag',
'auto:phase1_2022_realistic',
VarParsing.VarParsing.multiplicity.singleton,
VarParsing.VarParsing.varType.string,
"conditions")
options.parseArguments()
# 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.DQMSaverAtRunEnd_cff')
process.load('Configuration.StandardSequences.Harvesting_cff')
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
process.maxEvents = cms.untracked.PSet(
input = cms.untracked.int32(options.maxEvents),
output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
)
# Input source
process.source = cms.Source("DQMRootSource",
fileNames = cms.untracked.vstring('file:step3_inDQM.root')
)
process.options = cms.untracked.PSet(
FailPath = cms.untracked.vstring(),
IgnoreCompletely = cms.untracked.vstring(),
Rethrow = cms.untracked.vstring('ProductNotFound'),
SkipEvent = cms.untracked.vstring(),
accelerators = cms.untracked.vstring('*'),
allowUnscheduled = cms.obsolete.untracked.bool,
canDeleteEarly = cms.untracked.vstring(),
deleteNonConsumedUnscheduledModules = cms.untracked.bool(True),
dumpOptions = cms.untracked.bool(False),
emptyRunLumiMode = cms.obsolete.untracked.string,
eventSetup = cms.untracked.PSet(
forceNumberOfConcurrentIOVs = cms.untracked.PSet(
allowAnyLabel_=cms.required.untracked.uint32
),
numberOfConcurrentIOVs = cms.untracked.uint32(0)
),
fileMode = cms.untracked.string('FULLMERGE'),
forceEventSetupCacheClearOnNewRun = cms.untracked.bool(False),
makeTriggerResults = cms.obsolete.untracked.bool,
numberOfConcurrentLuminosityBlocks = cms.untracked.uint32(0),
numberOfConcurrentRuns = cms.untracked.uint32(1),
numberOfStreams = cms.untracked.uint32(0),
numberOfThreads = cms.untracked.uint32(1),
printDependencies = cms.untracked.bool(False),
sizeOfStackForThreadsInKB = cms.optional.untracked.uint32,
throwIfIllegalParameter = cms.untracked.bool(True),
wantSummary = cms.untracked.bool(False)
)
# Production Info
process.configurationMetadata = cms.untracked.PSet(
annotation = cms.untracked.string('DiMuonVertex nevts:-1'),
name = cms.untracked.string('Applications'),
version = cms.untracked.string('$Revision: 1.19 $')
)
# Output definition
# Additional output definition
# Other statements
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag(process.GlobalTag, options.globalTag, '')
process.dqmsave_step = cms.Path(process.DQMSaver)
# the module to harvest
process.DiMuonMassBiasClient = cms.EDProducer("DiMuonMassBiasClient",
FolderName = cms.string('AlCaReco/TkAlDiMuonAndVertex'),
fitBackground = cms.bool(False),
debugMode = cms.bool(True),
fit_par = cms.PSet(
mean_par = cms.vdouble(90.,60.,120.),
width_par = cms.vdouble(5.0,0.0,120.0),
sigma_par = cms.vdouble(5.0,0.0,120.0)
),
MEtoHarvest = cms.vstring(
'DiMuMassVsMuMuPhi',
'DiMuMassVsMuMuEta',
'DiMuMassVsMuPlusPhi',
'DiMuMassVsMuPlusEta',
'DiMuMassVsMuMinusPhi',
'DiMuMassVsMuMinusEta',
'DiMuMassVsMuMuDeltaEta',
'DiMuMassVsCosThetaCS'
)
)
process.diMuonBiasClient = cms.Sequence(process.DiMuonMassBiasClient)
# trick to run the harvester module
process.alcaHarvesting.insert(1,process.diMuonBiasClient)
# Schedule definition
process.schedule = cms.Schedule(process.alcaHarvesting,process.dqmsave_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