Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-01 23:54:09

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 *_l1ctLayer1_PF_*',
0128         'keep *_l1ctLayer1_Puppi_*',
0129         'keep *_l1pfCandidates_PF_*',
0130         'keep *_l1pfCandidates_Puppi_*',
0131         'keep *_l1pfProducer*_z0_*',
0132         'keep *_pfTracksFromL1Tracks*_*_*',
0133         'keep *_pfClustersFrom*_*_*',
0134         'keep *_TTTracksFromTracklet_*_*',
0135         'keep *_VertexProducer_*_*',                                
0136         'keep *_L1TkPrimaryVertex_*_*',
0137         'keep *_slimmedTaus_*_*',
0138         'keep *_packedPFCandidates_*_*',
0139         'keep *_generator_*_*',
0140         'keep *_caloStage2Digis_*_*',
0141         'keep *_HPSPFTauProducer*PF_*_*',                           
0142         'keep *_HPSPFTauProducer*Puppi_*_*',                            
0143         'keep *_prunedGenParticles_*_*',
0144         'keep *_tauGenJetsSelectorAllHadrons_*_*',
0145         'keep *_particleFlow_*_*',
0146         'keep *_generalTracks_*_*',
0147         'keep *_electronGsfTracks_*_*',
0148         'keep *_offlineSlimmedPrimaryVertices_*_*',                           
0149         'keep *_L1PFTauProducer_*_*',
0150         'keep *_slimmedAddPileupInfo_*_*', 
0151         "keep *_Phase1L1TJetProducer_*_*",
0152     )                           
0153 )
0154 process.outpath = cms.EndPath(process.out)
0155 
0156 process.endjob_step = cms.EndPath(process.endOfProcess)
0157 
0158 # Schedule definition
0159 process.schedule = cms.Schedule(process.production_step, process.outpath, process.endjob_step)
0160 
0161 from PhysicsTools.PatAlgos.tools.helpers import associatePatAlgosToolsTask
0162 associatePatAlgosToolsTask(process)
0163 
0164 # Add early deletion of temporary data products to reduce peak memory need
0165 from Configuration.StandardSequences.earlyDeleteSettings_cff import customiseEarlyDelete
0166 process = customiseEarlyDelete(process)
0167 # End adding early deletion
0168 
0169 # Enable module run-time report
0170 #process.options = cms.untracked.PSet(
0171 #    wantSummary = cms.untracked.bool(True)
0172 #)
0173 
0174 dump_file = open('dump.py','w')
0175 dump_file.write(process.dumpPython())
0176 
0177 process.options.numberOfThreads = cms.untracked.uint32(2)