Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:01

0001 from __future__ import print_function
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 def TkOnlyDigi(process):
0005     print("!!! Special version of the digitization for tracker only !!!")
0006     if hasattr(process,'digitisationTkOnly_step'):
0007         process=customise_DigiTkOnly(process)
0008 
0009     return process
0010 
0011 def customise_DigiTkOnly(process):
0012     process.load('Configuration.StandardSequences.Digi_cff')
0013     process.doAllDigi = cms.Sequence()
0014     process.load('SimGeneral.MixingModule.mixObjects_cfi')
0015     process.digitisationTkOnly_step.remove(process.mix.mixObjects.mixCH)
0016     del process.simCastorDigis
0017     del process.simEcalUnsuppressedDigis
0018     del process.simHcalUnsuppressedDigis
0019     process.mix.digitizers = cms.PSet(process.theDigitizersValid)
0020     del process.mix.digitizers.ecal
0021     del process.mix.digitizers.hcal
0022     del process.mix.digitizers.castor
0023     process.digitisationTkOnly_step.remove(process.mix.digitizers.pixel)
0024     process.load('SimTracker.SiPhase2Digitizer.phase2TrackerDigitizer_cfi')
0025     process.mix.digitizers.pixel=process.phase2TrackerDigitizer
0026     process.mix.digitizers.strip.ROUList = cms.vstring("g4SimHitsTrackerHitsPixelBarrelLowTof",
0027                          'g4SimHitsTrackerHitsPixelEndcapLowTof')
0028     #Check if mergedtruth is in the sequence first, could be taken out depending on cmsDriver options
0029     if hasattr(process.mix.digitizers,"mergedtruth") :
0030         process.mix.digitizers.mergedtruth.simHitCollections.muon = cms.VInputTag( )
0031         process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTIBLowTof"))
0032         process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTIBHighTof"))
0033         process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTOBLowTof"))
0034         process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTOBHighTof"))
0035         process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTECLowTof"))
0036         process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTECHighTof"))
0037         process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTIDLowTof"))
0038         process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTIDHighTof"))
0039 
0040     # keep new digis
0041     alist=['FEVTDEBUG','FEVTDEBUGHLT','FEVT']
0042     for a in alist:
0043         b=a+'output'
0044         if hasattr(process,b):
0045             getattr(process,b).outputCommands.append('keep Phase2TrackerDigiedmDetSetVector_*_*_*')
0046     return process
0047