CMS 3D CMS Logo

ECALHCAL.py
Go to the documentation of this file.
1 import six
2 import FWCore.ParameterSet.Config as cms
3 def customise(process):
4 
5 # extend the particle gun acceptance
6 
7  process.generator.AddAntiParticle = cms.bool(False)
8 
9 # no magnetic field
10 
11  process.g4SimHits.UseMagneticField = cms.bool(False)
12  process.UniformMagneticFieldESProducer = cms.ESProducer("UniformMagneticFieldESProducer",
13  ZFieldInTesla = cms.double(0.0)
14  )
15 
16  process.prefer("UniformMagneticFieldESProducer")
17 
18 # add ECAL and HCAL specific Geant4 hits objects
19 
20  process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
21  instanceLabel = cms.untracked.string('EcalValidInfo'),
22  type = cms.string('EcalSimHitsValidProducer'),
23  verbose = cms.untracked.bool(False)
24  ))
25 
26  # use directly the generator output, no Hector
27 
28  process.g4SimHits.Generator.HepMCProductLabel = cms.string('generatorSmeared')
29 
30  # modify the content
31 
32  #process.output.outputCommands.append("keep *_simHcalUnsuppressedDigis_*_*")
33  six.next(six.iteritems(process.outputModules_()))[1].outputCommands.append("keep *_simHcalUnsuppressedDigis_*_*")
34 
35 # user schedule: use only calorimeters digitization and local reconstruction
36 
37  del process.schedule[:]
38 
39  process.schedule.append(process.generation_step)
40  process.schedule.append(process.simulation_step)
41 
42  process.ecalMultiFitUncalibRecHit.EBdigiCollection = cms.InputTag("simEcalDigis","ebDigis")
43  process.ecalMultiFitUncalibRecHit.EEdigiCollection = cms.InputTag("simEcalDigis","eeDigis")
44  process.ecalPreshowerRecHit.ESdigiCollection = cms.InputTag("simEcalPreshowerDigis")
45 
46  delattr(process,"hbhereco")
47  process.hbhereco = process.hbheprereco.clone()
48  process.hcalLocalRecoSequence.replace(process.hbheprereco,process.hbhereco)
49  process.hbhereco.digiLabelQIE8 = cms.InputTag("simHcalUnsuppressedDigis")
50  process.hbhereco.digiLabelQIE11 = cms.InputTag("simHcalUnsuppressedDigis","HBHEQIE11DigiCollection")
51  process.horeco.digiLabel = cms.InputTag("simHcalUnsuppressedDigis")
52  process.hfreco.digiLabel = cms.InputTag("simHcalUnsuppressedDigis")
53  process.ecalRecHit.recoverEBIsolatedChannels = cms.bool(False)
54  process.ecalRecHit.recoverEEIsolatedChannels = cms.bool(False)
55  process.ecalRecHit.recoverEBFE = cms.bool(False)
56  process.ecalRecHit.recoverEEFE = cms.bool(False)
57 
58 # process.local_digireco = cms.Path(process.mix * process.calDigi * process.ecalLocalRecoSequence * process.hbhereco * process.hfreco * process.horeco * (process.ecalClusters+process.caloTowersRec) * process.reducedEcalRecHitsSequence )
59 
60  process.reducedEcalRecHitsEB.interestingDetIdCollections = cms.VInputTag(
61  # ecal
62  cms.InputTag("interestingEcalDetIdEB"),
63  cms.InputTag("interestingEcalDetIdEBU"),
64  )
65 
66  process.reducedEcalRecHitsEE.interestingDetIdCollections = cms.VInputTag(
67  # ecal
68  cms.InputTag("interestingEcalDetIdEE"),
69  )
70 
71  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.ecalClustersNoPFBox+process.caloTowersRec) * process.reducedEcalRecHitsSequenceEcalOnly )
72 
73  process.schedule.append(process.local_digireco)
74 
75  # add HcalNoiseRBXCollection product for Validation/CaloTowers Validation/HcalRecHits
76  process.load( "RecoMET.METProducers.hcalnoiseinfoproducer_cfi" )
77  process.hcalnoise_path = cms.Path( process.hcalnoise )
78  process.schedule.append( process.hcalnoise_path )
79 
80  process.load("Validation/Configuration/ecalSimValid_cff")
81  process.load("Validation/Configuration/hcalSimValid_cff")
82  process.local_validation = cms.Path(process.ecalSimValid+process.hcalSimValid)
83  process.schedule.append(process.local_validation)
84 
85  process.schedule.append(process.endjob_step)
86  #process.schedule.append(process.out_step)
87  process.schedule.append(getattr(process,six.next(six.iteritems(process.outputModules_()))[0]+"_step"))
88 
89  return(process)
return((rh^lh)&mask)
def customise(process)
Definition: ECALHCAL.py:3