Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-07-23 02:26:07

0001 import FWCore.ParameterSet.Config as cms
0002 def customise(process):
0003 
0004 # extend the particle gun acceptance
0005 
0006     process.generator.AddAntiParticle = cms.bool(False)
0007 
0008 # no magnetic field
0009 
0010     process.g4SimHits.UseMagneticField = cms.bool(False)
0011     process.UniformMagneticFieldESProducer = cms.ESProducer("UniformMagneticFieldESProducer",
0012                                                             ZFieldInTesla = cms.double(0.0)
0013                                                                 )
0014 
0015     process.prefer("UniformMagneticFieldESProducer") 
0016 
0017 # add ECAL and HCAL specific Geant4 hits objects
0018 
0019     process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
0020         instanceLabel = cms.untracked.string('EcalValidInfo'),
0021         type = cms.string('EcalSimHitsValidProducer'),
0022         verbose = cms.untracked.bool(False)
0023     ))
0024 
0025     # use directly the generator output, no Hector
0026 
0027     process.g4SimHits.Generator.HepMCProductLabel = cms.string('generatorSmeared')
0028 
0029     # modify the content
0030 
0031     #process.output.outputCommands.append("keep *_simHcalUnsuppressedDigis_*_*")
0032     next(iter(process.outputModules_().items()))[1].outputCommands.append("keep *_simHcalUnsuppressedDigis_*_*")
0033 # user schedule: use only calorimeters digitization and local reconstruction
0034 
0035     del process.schedule[:] 
0036 
0037     process.schedule.append(process.generation_step)
0038     process.schedule.append(process.simulation_step)
0039 
0040     process.ecalMultiFitUncalibRecHit.cpu.EBdigiCollection = cms.InputTag("simEcalDigis","ebDigis")
0041     process.ecalMultiFitUncalibRecHit.cpu.EEdigiCollection = cms.InputTag("simEcalDigis","eeDigis")
0042     process.ecalPreshowerRecHit.ESdigiCollection = cms.InputTag("simEcalPreshowerDigis") 
0043 
0044     delattr(process,"hbhereco")
0045     process.hbhereco = process.hbheprereco.clone()
0046     process.hcalLocalRecoSequence.replace(process.hbheprereco,process.hbhereco)
0047     process.hbhereco.cpu.digiLabelQIE8 = cms.InputTag("simHcalUnsuppressedDigis")
0048     process.hbhereco.cpu.digiLabelQIE11 = cms.InputTag("simHcalUnsuppressedDigis","HBHEQIE11DigiCollection")
0049     process.horeco.digiLabel = cms.InputTag("simHcalUnsuppressedDigis")
0050     process.hfreco.digiLabel = cms.InputTag("simHcalUnsuppressedDigis")
0051     process.ecalRecHit.cpu.recoverEBIsolatedChannels = cms.bool(False)
0052     process.ecalRecHit.cpu.recoverEEIsolatedChannels = cms.bool(False)
0053     process.ecalRecHit.cpu.recoverEBFE = cms.bool(False)
0054     process.ecalRecHit.cpu.recoverEEFE = cms.bool(False)
0055 
0056 #    process.local_digireco = cms.Path(process.mix * process.calDigi * process.ecalLocalRecoSequence * process.hbhereco * process.hfreco * process.horeco * (process.ecalClusters+process.caloTowersRec) * process.reducedEcalRecHitsSequence )
0057 
0058     process.reducedEcalRecHitsEB.interestingDetIdCollections = cms.VInputTag(
0059             # ecal
0060             cms.InputTag("interestingEcalDetIdEB"),
0061             cms.InputTag("interestingEcalDetIdEBU"),
0062             )
0063             
0064     process.reducedEcalRecHitsEE.interestingDetIdCollections = cms.VInputTag(
0065             # ecal
0066             cms.InputTag("interestingEcalDetIdEE"),
0067             )            
0068 
0069     process.local_digireco = cms.Path(process.mix * process.addPileupInfo * process.bunchSpacingProducer * process.calDigi * process.ecalPacker * process.esDigiToRaw * process.hcalRawData * process.rawDataCollector * process.ecalDigis * process.ecalPreshowerDigis * process.hcalDigis * process.calolocalreco * process.hbhereco * process.hfreco * process.horeco *(process.ecalClustersNoPFBox+process.caloTowersRec) * process.reducedEcalRecHitsSequenceEcalOnly )
0070 
0071     process.schedule.append(process.local_digireco)
0072 
0073     # add HcalNoiseRBXCollection product for Validation/CaloTowers Validation/HcalRecHits  
0074     process.load( "RecoMET.METProducers.hcalnoiseinfoproducer_cfi" )
0075     process.hcalnoise_path = cms.Path( process.hcalnoise )
0076     process.schedule.append( process.hcalnoise_path )
0077 
0078     process.load("Validation/Configuration/ecalSimValid_cff") 
0079     process.load("Validation/Configuration/hcalSimValid_cff") 
0080     process.local_validation = cms.Path(process.ecalSimValid+process.hcalSimValid)
0081     process.schedule.append(process.local_validation) 
0082 
0083     process.schedule.append(process.endjob_step)
0084     #process.schedule.append(process.out_step)
0085 
0086     return(process)