CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
AddCaloSamplesAnalyzer.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 def customise(process):
4  # handle normal mixing or premixing
5  hcaldigi = None
6  if hasattr(process,'mix') and hasattr(process.mix,'digitizers') and hasattr(process.mix.digitizers,'hcal'):
7  hcaldigi = process.mix.digitizers.hcal
8  cstag = "mix"
9  if hasattr(process,'mixData'):
10  hcaldigi = process.mixData
11  cstag = "mixData"
12  if hcaldigi is None:
13  raise Exception("CaloSamplesAnalyzer requires a mix module, none found!")
14 
15  hcaldigi.debugCaloSamples = cms.bool(True)
16  process.CaloSamplesAnalyzer = cms.EDAnalyzer("CaloSamplesAnalyzer",
17  # from hcalSimParameters
18  hf1 = hcaldigi.hf1,
19  hf2 = hcaldigi.hf2,
20  ho = hcaldigi.ho,
21  hb = hcaldigi.hb,
22  he = hcaldigi.he,
23  zdc = hcaldigi.zdc,
24  hoZecotek = hcaldigi.hoZecotek,
25  hoHamamatsu = hcaldigi.hoHamamatsu,
26  # from hcalUnsuppressedDigis
27  hitsProducer = hcaldigi.hitsProducer,
28  TestNumbering = hcaldigi.TestNumbering,
29  CaloSamplesTag = cms.InputTag(cstag,"HcalSamples"),
30  )
31 
32  process.TFileService = cms.Service("TFileService",
33  fileName = cms.string("debugcalosamples.root")
34  )
35 
36  process.debug_step = cms.Path(process.CaloSamplesAnalyzer)
37  process.schedule.extend([process.debug_step])
38 
39  return process
Exception
AddCaloSamplesAnalyzer.customise
def customise(process)
Definition: AddCaloSamplesAnalyzer.py:3