CMS 3D CMS Logo

TkOnlyDigi_cff.py
Go to the documentation of this file.
1 from __future__ import print_function
2 import FWCore.ParameterSet.Config as cms
3 
4 def TkOnlyDigi(process):
5  print("!!! Special version of the digitization for tracker only !!!")
6  if hasattr(process,'digitisationTkOnly_step'):
7  process=customise_DigiTkOnly(process)
8 
9  return process
10 
11 def customise_DigiTkOnly(process):
12  process.load('Configuration.StandardSequences.Digi_cff')
13  process.doAllDigi = cms.Sequence()
14  process.load('SimGeneral.MixingModule.mixObjects_cfi')
15  process.digitisationTkOnly_step.remove(process.mix.mixObjects.mixCH)
16  del process.simCastorDigis
17  del process.simEcalUnsuppressedDigis
18  del process.simHcalUnsuppressedDigis
19  process.mix.digitizers = cms.PSet(process.theDigitizersValid)
20  del process.mix.digitizers.ecal
21  del process.mix.digitizers.hcal
22  del process.mix.digitizers.castor
23  process.digitisationTkOnly_step.remove(process.mix.digitizers.pixel)
24  process.load('SimTracker.SiPhase2Digitizer.phase2TrackerDigitizer_cfi')
25  process.mix.digitizers.pixel=process.phase2TrackerDigitizer
26  process.mix.digitizers.strip.ROUList = cms.vstring("g4SimHitsTrackerHitsPixelBarrelLowTof",
27  'g4SimHitsTrackerHitsPixelEndcapLowTof')
28  #Check if mergedtruth is in the sequence first, could be taken out depending on cmsDriver options
29  if hasattr(process.mix.digitizers,"mergedtruth") :
30  process.mix.digitizers.mergedtruth.simHitCollections.muon = cms.VInputTag( )
31  process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTIBLowTof"))
32  process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTIBHighTof"))
33  process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTOBLowTof"))
34  process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTOBHighTof"))
35  process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTECLowTof"))
36  process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTECHighTof"))
37  process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTIDLowTof"))
38  process.mix.digitizers.mergedtruth.simHitCollections.tracker.remove( cms.InputTag("g4SimHits","TrackerHitsTIDHighTof"))
39 
40  # keep new digis
41  alist=['FEVTDEBUG','FEVTDEBUGHLT','FEVT']
42  for a in alist:
43  b=a+'output'
44  if hasattr(process,b):
45  getattr(process,b).outputCommands.append('keep Phase2TrackerDigiedmDetSetVector_*_*_*')
46  return process
47 
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66
def customise_DigiTkOnly(process)
def TkOnlyDigi(process)