Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:35

0001 import FWCore.ParameterSet.Config as cms
0002 from Configuration.StandardSequences.Eras import eras
0003 from Configuration.ProcessModifiers.convertHGCalDigisSim_cff import convertHGCalDigisSim
0004 from Configuration.Eras.Era_Phase2C9_cff import Phase2C9
0005 process = cms.Process('Produce',Phase2C9)
0006 
0007 # import of standard configurations
0008 process.load('Configuration.StandardSequences.Services_cff')
0009 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
0010 process.load('FWCore.MessageService.MessageLogger_cfi')
0011 process.load('Configuration.EventContent.EventContent_cff')
0012 process.load('SimGeneral.MixingModule.mixNoPU_cfi')
0013 process.load('Configuration.Geometry.GeometryExtended2026D49Reco_cff')
0014 process.load('Configuration.StandardSequences.MagneticField_cff')
0015 process.load('Configuration.StandardSequences.EndOfProcess_cff')
0016 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0017 
0018 process.maxEvents = cms.untracked.PSet(
0019     input = cms.untracked.int32(10)
0020 )
0021 
0022 # Input source
0023 process.source = cms.Source("PoolSource",
0024     fileNames = cms.untracked.vstring(
0025         '/store/mc/Phase2HLTTDRSummer20ReRECOMiniAOD/VBFHToTauTau_M125_14TeV_powheg_pythia8_correctedGridpack_tuneCP5/FEVT/PU200_111X_mcRun4_realistic_T15_v1-v1/120000/084C8B72-BC64-DE46-801F-D971D5A34F62.root'
0026     ),
0027     inputCommands = cms.untracked.vstring("keep *", 
0028         "drop l1tEMTFHit2016Extras_simEmtfDigis_CSC_HLT",
0029         "drop l1tEMTFHit2016Extras_simEmtfDigis_RPC_HLT",
0030         "drop l1tEMTFHit2016s_simEmtfDigis__HLT",
0031         "drop l1tEMTFTrack2016Extras_simEmtfDigis__HLT",
0032         "drop l1tEMTFTrack2016s_simEmtfDigis__HLT",
0033         'drop l1tEMTFHit2016Extras_simEmtfDigis_CSC_HLT',
0034         'drop l1tEMTFHit2016Extras_simEmtfDigis_RPC_HLT',
0035         'drop l1tEMTFHit2016s_simEmtfDigis__HLT',
0036         'drop l1tEMTFTrack2016Extras_simEmtfDigis__HLT',
0037         'drop l1tEMTFTrack2016s_simEmtfDigis__HLT',
0038     ),
0039 )
0040 
0041 process.options = cms.untracked.PSet(
0042 
0043 )
0044 
0045 # Production Info
0046 process.configurationMetadata = cms.untracked.PSet(
0047     annotation = cms.untracked.string('step2 nevts:1'),
0048     name = cms.untracked.string('Applications'),
0049     version = cms.untracked.string('$Revision: 1.19 $')
0050 )
0051 
0052 # Other statements
0053 from Configuration.AlCa.GlobalTag import GlobalTag
0054 process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic', '')
0055 
0056 # Sequence, Path and EndPath definitions
0057 process.productionSequence = cms.Sequence()
0058 
0059 process.load('SimCalorimetry.HcalTrigPrimProducers.hcaltpdigi_cff')
0060 process.load('CalibCalorimetry.CaloTPG.CaloTPGTranscoder_cfi')
0061 
0062 process.load('Configuration.StandardSequences.SimL1Emulator_cff')
0063 process.productionSequence += process.SimL1Emulator
0064 
0065 ############################################################
0066 # Generator-level (visible) hadronic taus
0067 ############################################################
0068 
0069 process.load("PhysicsTools.JetMCAlgos.TauGenJets_cfi")
0070 process.tauGenJets.GenParticles = cms.InputTag("genParticles")
0071 process.load("PhysicsTools.JetMCAlgos.TauGenJetsDecayModeSelectorAllHadrons_cfi")
0072 process.genTaus = cms.Sequence(process.tauGenJets + process.tauGenJetsSelectorAllHadrons)
0073 process.productionSequence += process.genTaus
0074 
0075 ############################################################
0076 # produce  L1 HPS PF Tau objects
0077 ############################################################
0078 
0079 from L1Trigger.Phase2L1Taus.HPSPFTauProducerPF_cfi import HPSPFTauProducerPF
0080 from L1Trigger.Phase2L1Taus.HPSPFTauProducerPuppi_cfi import HPSPFTauProducerPuppi
0081 for useStrips in [ True, False ]:
0082     for applyPreselection in [ True, False ]:
0083         moduleNameBase = "HPSPFTauProducer"
0084         if useStrips and applyPreselection:
0085             moduleNameBase += "WithStripsAndPreselection"
0086         elif useStrips and not applyPreselection:
0087             moduleNameBase += "WithStripsWithoutPreselection"
0088         elif not useStrips and applyPreselection:
0089             moduleNameBase += "WithoutStripsWithPreselection"
0090         elif not useStrips and not applyPreselection:
0091             moduleNameBase += "WithoutStripsAndPreselection"
0092         else:
0093             raise ValueError("Invalid Combination of 'useStrips' and 'applyPreselection' Configuration parameters !!")
0094         
0095         moduleNamePF = moduleNameBase + "PF"
0096         modulePF = HPSPFTauProducerPF.clone(
0097             useStrips = cms.bool(useStrips),
0098             applyPreselection = cms.bool(applyPreselection),
0099             debug = cms.untracked.bool(False)
0100         )
0101         setattr(process, moduleNamePF, modulePF)
0102         process.productionSequence += getattr(process, moduleNamePF)
0103 
0104         moduleNamePuppi = moduleNameBase + "Puppi"
0105         modulePuppi = HPSPFTauProducerPuppi.clone(
0106             useStrips = cms.bool(useStrips),
0107             applyPreselection = cms.bool(applyPreselection),
0108             debug = cms.untracked.bool(False)
0109         )
0110         setattr(process, moduleNamePuppi, modulePuppi)
0111         process.productionSequence += getattr(process, moduleNamePuppi)
0112 
0113 
0114 process.production_step = cms.Path(process.productionSequence)
0115 
0116 ############################################################ 
0117 # write output file
0118 ############################################################ 
0119 
0120 process.out = cms.OutputModule("PoolOutputModule",
0121     fileName = cms.untracked.string("NTuple_HPSPFTauProducer_part_1.root"),                           
0122     SelectEvents = cms.untracked.PSet(
0123         SelectEvents = cms.vstring('production_step')
0124     ),
0125     outputCommands = cms.untracked.vstring(
0126         'drop *_*_*_*',                                 
0127         'keep *_l1tLayer1_PF_*',
0128         'keep *_l1tLayer1_Puppi_*',
0129         'keep *_l1tPFProducer*_z0_*',
0130         'keep *_l1tPFTracksFromL1Tracks*_*_*',
0131         'keep *_l1tPFClustersFrom*_*_*',
0132         'keep *_l1tTTTracksFromTracklet_*_*',
0133         'keep *_l1tVertexProducer_*_*',                                
0134         'keep *_l1tTkPrimaryVertex_*_*',
0135         'keep *_slimmedTaus_*_*',
0136         'keep *_packedPFCandidates_*_*',
0137         'keep *_generator_*_*',
0138         'keep *_caloStage2Digis_*_*',
0139         'keep *_l1tHPSPFTauProducer*PF_*_*',                           
0140         'keep *_l1tHPSPFTauProducer*Puppi_*_*',                            
0141         'keep *_prunedGenParticles_*_*',
0142         'keep *_tauGenJetsSelectorAllHadrons_*_*',
0143         'keep *_particleFlow_*_*',
0144         'keep *_generalTracks_*_*',
0145         'keep *_electronGsfTracks_*_*',
0146         'keep *_offlineSlimmedPrimaryVertices_*_*',                           
0147         'keep *_l1tPFTauProducer_*_*',
0148         'keep *_slimmedAddPileupInfo_*_*', 
0149         "keep *_l1tPhase1JetProducer_*_*",
0150     )                           
0151 )
0152 process.outpath = cms.EndPath(process.out)
0153 
0154 process.endjob_step = cms.EndPath(process.endOfProcess)
0155 
0156 # Schedule definition
0157 process.schedule = cms.Schedule(process.production_step, process.outpath, process.endjob_step)
0158 
0159 from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
0160 associatePatAlgosToolsTask(process)
0161 
0162 # Add early deletion of temporary data products to reduce peak memory need
0163 from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
0164 process = customiseEarlyDelete(process)
0165 # End adding early deletion
0166 
0167 # Enable module run-time report
0168 #process.options = cms.untracked.PSet(
0169 #    wantSummary = cms.untracked.bool(True)
0170 #)
0171 
0172 dump_file = open('dump.py','w')
0173 dump_file.write(process.dumpPython())
0174 
0175 process.options.numberOfThreads = cms.untracked.uint32(2)