Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:39

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 def customise(process):
0004     # handle normal mixing or premixing

0005     hcaldigi = None
0006     if hasattr(process,'mix') and hasattr(process.mix,'digitizers') and hasattr(process.mix.digitizers,'hcal'):
0007         hcaldigi = process.mix.digitizers.hcal
0008         cstag = "mix"
0009     if hasattr(process,'mixData'):
0010         hcaldigi = process.mixData
0011         cstag = "mixData"
0012     if hcaldigi is None:
0013         raise Exception("CaloSamplesAnalyzer requires a mix module, none found!")
0014 
0015     hcaldigi.debugCaloSamples = cms.bool(True)
0016     process.CaloSamplesAnalyzer = cms.EDAnalyzer("CaloSamplesAnalyzer",
0017         # from hcalSimParameters

0018         hf1 = hcaldigi.hf1,
0019         hf2 = hcaldigi.hf2,
0020         ho = hcaldigi.ho,
0021         hb = hcaldigi.hb,
0022         he = hcaldigi.he,
0023         zdc = hcaldigi.zdc,
0024         hoZecotek = hcaldigi.hoZecotek,
0025         hoHamamatsu = hcaldigi.hoHamamatsu,
0026         # from hcalUnsuppressedDigis

0027         hitsProducer = hcaldigi.hitsProducer,
0028         TestNumbering = hcaldigi.TestNumbering,
0029         CaloSamplesTag = cms.InputTag(cstag,"HcalSamples"),
0030     )
0031 
0032     process.TFileService = cms.Service("TFileService",
0033         fileName = cms.string("debugcalosamples.root")
0034     )
0035     
0036     process.debug_step = cms.Path(process.CaloSamplesAnalyzer)
0037     process.schedule.extend([process.debug_step])
0038     
0039     return process