Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2025-03-08 03:06:58

0001 """
0002 This script runs the SimDoubletsProducer and SimDoubletsAnalyzer for Run3.
0003 
0004 To run it, you first have to produce or get the output root file from a step 2 that runs the HLT.
0005 The input file is expected to be named `step2.root` by default, but you can also rename it below.
0006 Then you can simply run the config using:
0007 
0008 cmsRun simDoubletsPhase1_TEST.py
0009 
0010 It will produce one DQMIO output file named `simDoublets_DQMIO.root`. 
0011 This can be further processed in the harvesting step by running the simDoubletsPhase1_HARVESTING.py script.
0012 """
0013 inputFile = "step2.root"
0014 
0015 import FWCore.ParameterSet.Config as cms
0016 
0017 from Configuration.Eras.Era_Run3_2025_cff import Run3_2025
0018 
0019 process = cms.Process("SIMDOUBLETS",Run3_2025)
0020 
0021 process.maxEvents = cms.untracked.PSet(
0022     input = cms.untracked.int32(-1),
0023     output = cms.optional.untracked.allowed(cms.int32,cms.PSet)
0024 )
0025 
0026 # Input source
0027 process.source = cms.Source("PoolSource",
0028     dropDescendantsOfDroppedBranches = cms.untracked.bool(False),
0029     fileNames = cms.untracked.vstring('file:%s' % inputFile),
0030     inputCommands = cms.untracked.vstring(
0031         'keep *',
0032         'drop *_hltSiPixelRecHits_*_*'   # we will reproduce the PixelRecHits to have their local position available
0033     ),
0034     secondaryFileNames = cms.untracked.vstring()
0035 )
0036 
0037 ### conditions
0038 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0039 from Configuration.AlCa.GlobalTag import GlobalTag
0040 process.GlobalTag = GlobalTag(process.GlobalTag, '142X_mcRun3_2025_realistic_v4', '')
0041 
0042 ### standard includes
0043 process.load('Configuration/StandardSequences/Services_cff')
0044 process.load('Configuration.StandardSequences.GeometryRecoDB_cff')
0045 process.load("Configuration.StandardSequences.RawToDigi_cff")
0046 process.load("Configuration.EventContent.EventContent_cff")
0047 process.load("Configuration.StandardSequences.MagneticField_cff")
0048 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0049 
0050 ### load HLTDoLocalPixelSequence
0051 process.load('HLTrigger.Configuration.HLT_GRun_cff')
0052 ### load hltTPClusterProducer
0053 process.load("Validation.RecoTrack.associators_cff")
0054 ### load the new EDProducer "SimDoubletsProducerPhase1"
0055 process.load("SimTracker.TrackerHitAssociation.simDoubletsProducerPhase1_cfi")
0056 ### load the new DQM EDAnalyzer "SimDoubletsAnalyzerPhase1"
0057 process.load("Validation.TrackingMCTruth.simDoubletsAnalyzerPhase1_cfi")
0058 
0059 ####  set up the path
0060 process.simDoubletPath = cms.Path(
0061     process.HLTDoLocalPixelSequence *   # reproduce the SiPixelRecHits
0062     process.hltTPClusterProducer *      # run the cluster to TrackingParticle association
0063     process.simDoubletsProducerPhase1 * # produce the SimDoublets
0064     process.simDoubletsAnalyzerPhase1   # analyze the SimDoublets
0065 )
0066 
0067 # Output definition
0068 process.DQMoutput = cms.OutputModule("DQMRootOutputModule",
0069     dataset = cms.untracked.PSet(
0070         dataTier = cms.untracked.string('DQMIO'),
0071         filterName = cms.untracked.string('')
0072     ),
0073     fileName = cms.untracked.string('file:simDoublets_DQMIO.root'),
0074     outputCommands = process.DQMEventContent.outputCommands,
0075     splitLevel = cms.untracked.int32(0)
0076 )
0077 
0078 
0079 process.endjob_step = cms.EndPath(process.endOfProcess)
0080 process.DQMoutput_step = cms.EndPath(process.DQMoutput)
0081 
0082 
0083 process.schedule = cms.Schedule(
0084       process.simDoubletPath,process.endjob_step,process.DQMoutput_step
0085 )
0086 
0087 process.options = cms.untracked.PSet(
0088     numberOfThreads = cms.untracked.uint32(1),
0089     numberOfStreams = cms.untracked.uint32(1),
0090     wantSummary = cms.untracked.bool(True)
0091 )