Skip to content

Commit 24da1b3

Browse files
Add python config files for testing SimDoublets
1 parent de6f5a9 commit 24da1b3

File tree

4 files changed

+301
-0
lines changed

4 files changed

+301
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
"""
2+
This script runs the harvesting step on top of the file `simDoublets_DQMIO.root` produced when running the
3+
simDoubletsPhase1_TEST.py script. To harvest simply run:
4+
5+
cmsRun simDoubletsPhase1_HARVESTING.py
6+
7+
This will produce a DQM file with all SimDoublets histograms.
8+
"""
9+
10+
import FWCore.ParameterSet.Config as cms
11+
12+
from Configuration.Eras.Era_Run3_2025_cff import Run3_2025
13+
14+
process = cms.Process('HARVESTING',Run3_2025)
15+
16+
# import of standard configurations
17+
process.load('Configuration.StandardSequences.Services_cff')
18+
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
19+
process.load('FWCore.MessageService.MessageLogger_cfi')
20+
process.load('Configuration.EventContent.EventContent_cff')
21+
process.load('SimGeneral.MixingModule.mixNoPU_cfi')
22+
process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
23+
process.load('Configuration.StandardSequences.MagneticField_cff')
24+
process.load('Configuration.StandardSequences.DQMSaverAtRunEnd_cff')
25+
process.load('Configuration.StandardSequences.Harvesting_cff')
26+
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
27+
28+
process.maxEvents = cms.untracked.PSet(
29+
input = cms.untracked.int32(-1)
30+
)
31+
32+
# Input source
33+
process.source = cms.Source("PoolSource",
34+
fileNames = cms.untracked.vstring('file:simDoublets_DQMIO.root')
35+
)
36+
37+
process.options = cms.untracked.PSet(
38+
Rethrow = cms.untracked.vstring('ProductNotFound'),
39+
fileMode = cms.untracked.string('FULLMERGE')
40+
)
41+
42+
# Production Info
43+
process.configurationMetadata = cms.untracked.PSet(
44+
version = cms.untracked.string('$Revision: 1.19 $'),
45+
annotation = cms.untracked.string('step4 nevts:100'),
46+
name = cms.untracked.string('Applications')
47+
)
48+
49+
# Other statements
50+
from Configuration.AlCa.GlobalTag import GlobalTag
51+
process.GlobalTag = GlobalTag(process.GlobalTag, '142X_mcRun3_2025_realistic_v4', '')
52+
53+
# Path and EndPath definitions
54+
process.load('Validation.TrackingMCTruth.PostProcessorSimDoublets_cff') # load harvesting config for SimDoublets
55+
process.harvesting_step = cms.Path(process.postProcessorSimDoublets)
56+
process.dqmsave_step = cms.Path(process.DQMSaver)
57+
58+
# Schedule definition
59+
process.schedule = cms.Schedule(process.harvesting_step,process.dqmsave_step)
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
"""
2+
This script runs the SimDoubletsProducer and SimDoubletsAnalyzer for Run3.
3+
4+
To run it, you first have to produce or get the output root file from a step 2 that runs the HLT.
5+
The input file is expected to be named `step2.root` by default, but you can also rename it below.
6+
Then you can simply run the config using:
7+
8+
cmsRun simDoubletsPhase1_TEST.py
9+
10+
It will produce one DQMIO output file named `simDoublets_DQMIO.root`.
11+
This can be further processed in the harvesting step by running the simDoubletsPhase1_HARVESTING.py script.
12+
"""
13+
inputFile = "step2.root"
14+
15+
import FWCore.ParameterSet.Config as cms
16+
17+
from Configuration.Eras.Era_Run3_2025_cff import Run3_2025
18+
19+
process = cms.Process("SIMDOUBLETS",Run3_2025)
20+
21+
process.maxEvents = cms.untracked.PSet(
22+
input = cms.untracked.int32(-1),
23+
output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
24+
)
25+
26+
# Input source
27+
process.source = cms.Source("PoolSource",
28+
dropDescendantsOfDroppedBranches = cms.untracked.bool(False),
29+
fileNames = cms.untracked.vstring('file:%s' % inputFile),
30+
inputCommands = cms.untracked.vstring(
31+
'keep *',
32+
'drop *_hltSiPixelRecHits_*_*' # we will reproduce the PixelRecHits to have their local position available
33+
),
34+
secondaryFileNames = cms.untracked.vstring()
35+
)
36+
37+
### conditions
38+
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
39+
from Configuration.AlCa.GlobalTag import GlobalTag
40+
process.GlobalTag = GlobalTag(process.GlobalTag, '142X_mcRun3_2025_realistic_v4', '')
41+
42+
### standard includes
43+
process.load('Configuration/StandardSequences/Services_cff')
44+
process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
45+
process.load("Configuration.StandardSequences.RawToDigi_cff")
46+
process.load("Configuration.EventContent.EventContent_cff")
47+
process.load("Configuration.StandardSequences.MagneticField_cff")
48+
process.load('Configuration.StandardSequences.EndOfProcess_cff')
49+
50+
### load HLTDoLocalPixelSequence
51+
process.load('HLTrigger.Configuration.HLT_GRun_cff')
52+
### load hltTPClusterProducer
53+
process.load("Validation.RecoTrack.associators_cff")
54+
### load the new EDProducer "SimDoubletsProducerPhase1"
55+
process.load("SimTracker.TrackerHitAssociation.simDoubletsProducerPhase1_cfi")
56+
### load the new DQM EDAnalyzer "SimDoubletsAnalyzerPhase1"
57+
process.load("Validation.TrackingMCTruth.simDoubletsAnalyzerPhase1_cfi")
58+
59+
#### set up the path
60+
process.simDoubletPath = cms.Path(
61+
process.HLTDoLocalPixelSequence * # reproduce the SiPixelRecHits
62+
process.hltTPClusterProducer * # run the cluster to TrackingParticle association
63+
process.simDoubletsProducerPhase1 * # produce the SimDoublets
64+
process.simDoubletsAnalyzerPhase1 # analyze the SimDoublets
65+
)
66+
67+
# Output definition
68+
process.DQMoutput = cms.OutputModule("DQMRootOutputModule",
69+
dataset = cms.untracked.PSet(
70+
dataTier = cms.untracked.string('DQMIO'),
71+
filterName = cms.untracked.string('')
72+
),
73+
fileName = cms.untracked.string('file:simDoublets_DQMIO.root'),
74+
outputCommands = process.DQMEventContent.outputCommands,
75+
splitLevel = cms.untracked.int32(0)
76+
)
77+
78+
79+
process.endjob_step = cms.EndPath(process.endOfProcess)
80+
process.DQMoutput_step = cms.EndPath(process.DQMoutput)
81+
82+
83+
process.schedule = cms.Schedule(
84+
process.simDoubletPath,process.endjob_step,process.DQMoutput_step
85+
)
86+
87+
process.options = cms.untracked.PSet(
88+
numberOfThreads = cms.untracked.uint32(1),
89+
numberOfStreams = cms.untracked.uint32(1),
90+
wantSummary = cms.untracked.bool(True)
91+
)
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
"""
2+
This script runs the harvesting step on top of the file `simDoublets_DQMIO.root` produced when running the
3+
simDoubletsPhase2_TEST.py script. To harvest simply run:
4+
5+
cmsRun simDoubletsPhase2_HARVESTING.py
6+
7+
This will produce a DQM file with all SimDoublets histograms.
8+
"""
9+
10+
import FWCore.ParameterSet.Config as cms
11+
12+
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
13+
14+
process = cms.Process('HARVESTING',Phase2C17I13M9)
15+
16+
# import of standard configurations
17+
process.load('Configuration.StandardSequences.Services_cff')
18+
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
19+
process.load('FWCore.MessageService.MessageLogger_cfi')
20+
process.load('Configuration.EventContent.EventContent_cff')
21+
process.load('SimGeneral.MixingModule.mixNoPU_cfi')
22+
process.load('Configuration.Geometry.GeometryExtendedRun4D110Reco_cff')
23+
process.load('Configuration.StandardSequences.MagneticField_cff')
24+
process.load('Configuration.StandardSequences.DQMSaverAtRunEnd_cff')
25+
process.load('Configuration.StandardSequences.Harvesting_cff')
26+
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
27+
28+
process.maxEvents = cms.untracked.PSet(
29+
input = cms.untracked.int32(-1)
30+
)
31+
32+
# Input source
33+
process.source = cms.Source("DQMRootSource",
34+
fileNames = cms.untracked.vstring('file:simDoublets_DQMIO.root')
35+
)
36+
37+
process.options = cms.untracked.PSet(
38+
Rethrow = cms.untracked.vstring('ProductNotFound'),
39+
fileMode = cms.untracked.string('FULLMERGE')
40+
)
41+
42+
# Production Info
43+
process.configurationMetadata = cms.untracked.PSet(
44+
version = cms.untracked.string('$Revision: 1.19 $'),
45+
annotation = cms.untracked.string('step4 nevts:100'),
46+
name = cms.untracked.string('Applications')
47+
)
48+
49+
# Other statements
50+
from Configuration.AlCa.GlobalTag import GlobalTag
51+
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T33', '')
52+
53+
# Path and EndPath definitions
54+
process.load('Validation.TrackingMCTruth.PostProcessorSimDoublets_cff') # load harvesting config for SimDoublets
55+
process.harvesting_step = cms.Path(process.postProcessorSimDoublets)
56+
process.dqmsave_step = cms.Path(process.DQMSaver)
57+
58+
# Schedule definition
59+
process.schedule = cms.Schedule(process.harvesting_step,process.dqmsave_step)
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
"""
2+
This script runs the SimDoubletsProducer and SimDoubletsAnalyzer for Phase2.
3+
4+
To run it, you first have to produce or get the output root file from a step 2 that runs the HLT.
5+
The input file is expected to be named `step2.root` by default, but you can also rename it below.
6+
Then you can simply run the config using:
7+
8+
cmsRun simDoubletsPhase2_TEST.py
9+
10+
It will produce one DQMIO output file named `simDoublets_DQMIO.root`.
11+
This can be further processed in the harvesting step by running the simDoubletsPhase2_HARVESTING.py script.
12+
"""
13+
inputFile = "step2.root"
14+
15+
import FWCore.ParameterSet.Config as cms
16+
17+
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
18+
19+
process = cms.Process("SIMDOUBLETS",Phase2C17I13M9)
20+
21+
process.maxEvents = cms.untracked.PSet(
22+
input = cms.untracked.int32(-1),
23+
output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
24+
)
25+
26+
# Input source
27+
process.source = cms.Source("PoolSource",
28+
dropDescendantsOfDroppedBranches = cms.untracked.bool(False),
29+
fileNames = cms.untracked.vstring('file:%s' % inputFile),
30+
inputCommands = cms.untracked.vstring(
31+
'keep *',
32+
'drop *_hltSiPixelRecHits_*_*' # we will reproduce the PixelRecHits to have their local position available
33+
),
34+
secondaryFileNames = cms.untracked.vstring()
35+
)
36+
37+
### conditions
38+
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
39+
from Configuration.AlCa.GlobalTag import GlobalTag
40+
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T33', '')
41+
42+
### standard includes
43+
process.load('Configuration/StandardSequences/Services_cff')
44+
process.load('Configuration.Geometry.GeometryExtendedRun4D110Reco_cff')
45+
process.load("Configuration.StandardSequences.RawToDigi_cff")
46+
process.load("Configuration.StandardSequences.Reconstruction_cff")
47+
process.load("Configuration.EventContent.EventContent_cff")
48+
process.load("Configuration.StandardSequences.MagneticField_cff")
49+
process.load('Configuration.StandardSequences.EndOfProcess_cff')
50+
51+
### load hltSiPixelRecHits
52+
process.load("HLTrigger.Configuration.HLT_75e33.modules.hltSiPixelRecHits_cfi")
53+
### load hltTPClusterProducer
54+
process.load("Validation.RecoTrack.associators_cff")
55+
### load the new EDProducer "SimDoubletsProducerPhase2"
56+
process.load("SimTracker.TrackerHitAssociation.simDoubletsProducerPhase2_cfi")
57+
### load the new DQM EDAnalyzer "SimDoubletsAnalyzerPhase2"
58+
process.load("Validation.TrackingMCTruth.simDoubletsAnalyzerPhase2_cfi")
59+
60+
#### set up the paths
61+
process.simDoubletPath = cms.Path(
62+
process.hltSiPixelRecHits * # reproduce the SiPixelRecHits
63+
process.hltTPClusterProducer * # run the cluster to TrackingParticle association
64+
process.simDoubletsProducerPhase2 * # produce the SimDoublets
65+
process.simDoubletsAnalyzerPhase2 # analyze the SimDoublets
66+
)
67+
68+
# Output definition
69+
process.DQMoutput = cms.OutputModule("DQMRootOutputModule",
70+
dataset = cms.untracked.PSet(
71+
dataTier = cms.untracked.string('DQMIO'),
72+
filterName = cms.untracked.string('')
73+
),
74+
fileName = cms.untracked.string('file:simDoublets_DQMIO.root'),
75+
outputCommands = process.DQMEventContent.outputCommands,
76+
splitLevel = cms.untracked.int32(0)
77+
)
78+
79+
80+
process.endjob_step = cms.EndPath(process.endOfProcess)
81+
process.DQMoutput_step = cms.EndPath(process.DQMoutput)
82+
83+
84+
process.schedule = cms.Schedule(
85+
process.simDoubletPath,process.endjob_step,process.DQMoutput_step
86+
)
87+
88+
process.options = cms.untracked.PSet(
89+
numberOfThreads = cms.untracked.uint32(1),
90+
numberOfStreams = cms.untracked.uint32(1),
91+
wantSummary = cms.untracked.bool(True)
92+
)

0 commit comments

Comments
 (0)