CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
AddCaloSamplesAnalyzer Namespace Reference

Functions

def customise
 

Function Documentation

def AddCaloSamplesAnalyzer.customise (   process)

Definition at line 3 of file AddCaloSamplesAnalyzer.py.

3 
4 def customise(process):
5  # handle normal mixing or premixing
6  hcaldigi = None
7  if hasattr(process,'mix') and hasattr(process.mix,'digitizers') and hasattr(process.mix.digitizers,'hcal'):
8  hcaldigi = process.mix.digitizers.hcal
9  cstag = "mix"
10  if hasattr(process,'mixData'):
11  hcaldigi = process.mixData
12  cstag = "mixData"
13  if hcaldigi is None:
14  raise Exception("CaloSamplesAnalyzer requires a mix module, none found!")
15 
16  hcaldigi.debugCaloSamples = cms.bool(True)
17  process.CaloSamplesAnalyzer = cms.EDAnalyzer("CaloSamplesAnalyzer",
18  # from hcalSimParameters
19  hf1 = hcaldigi.hf1,
20  hf2 = hcaldigi.hf2,
21  ho = hcaldigi.ho,
22  hb = hcaldigi.hb,
23  he = hcaldigi.he,
24  zdc = hcaldigi.zdc,
25  hoZecotek = hcaldigi.hoZecotek,
26  hoHamamatsu = hcaldigi.hoHamamatsu,
27  # from hcalUnsuppressedDigis
28  hitsProducer = hcaldigi.hitsProducer,
29  TestNumbering = hcaldigi.TestNumbering,
30  CaloSamplesTag = cms.InputTag(cstag,"HcalSamples"),
31  )
32 
33  process.TFileService = cms.Service("TFileService",
34  fileName = cms.string("debugcalosamples.root")
35  )
36 
37  process.debug_step = cms.Path(process.CaloSamplesAnalyzer)
38  process.schedule.extend([process.debug_step])
39 
40  return process