CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalElecEmulExample_cfg.py
Go to the documentation of this file.
2 
3 process = cms.Process("EcalSimRawData")
4 #
5 #
6 #
7 # Digitization
8 #
9 process.load("Configuration.StandardSequences.Digi_cff")
10 
11 process.load("Configuration.StandardSequences.MixingNoPileUp_cff")
12 
13 # TPG: defines the ecalTriggerPrimitiveDigis module
14 process.load("SimCalorimetry.EcalTrigPrimProducers.ecalTriggerPrimitiveDigis_cfi")
15 
16 #
17 #
18 #
19 # Simulation of raw data. Defines the ecalSimRawData module:
20 #
21 process.load("SimCalorimetry.EcalElectronicsEmulation.EcalSimRawData_cfi")
22 
23 # Set ecalSimRawData.unsuppressedDigiProducer to "ecalSimpleProducer" if the digis
24 # are produced by the EcalSimpleProducer module, keep the default value
25 # otherwise:
26 #replace ecalSimRawData.unsuppressedDigiProducer = "ecalSimpleProducer"
27 # Set ecalSimRawData.trigPrimProducer to "ecalSimpleProducer" if the TP digis
28 # are produced by the EcalSimpleProducer module, keep the default value
29 # otherwise:
30 #replace ecalSimRawData.trigPrimProducer = "ecalSimpleProducer"
31 #
32 #
33 #
34 # Geometry
35 #
36 process.load("Geometry.CMSCommonData.cmsSimIdealGeometryXML_cfi")
37 
38 # Calo geometry service model
39 process.load("Geometry.CaloEventSetup.CaloGeometry_cff")
40 
41 # Description of EE trigger tower map
42 process.load("Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi")
43 
44 process.source = cms.Source("EmptySource")
45 
46 process.maxEvents = cms.untracked.PSet(
47  # number of events to generate:
48  input = cms.untracked.int32(1)
49 )
50 
51 process.ecalSimpleProducer = cms.EDProducer("EcalSimpleProducer",
52  #xtal channel digis. Set to empty string for no digis.
53  # some realistic shape. Gain 12 (ID=1, see 1<<12). Every crystals with a
54  # 160 ADC count amplitude above a 200 ADC count baseline.
55  # string formula = "min(4095.,200+160.*((isample0==3)*.01+(isample0==4)*.76+(isample0==5)*1.+(isample0==6)*.89+(isample0==7)*.67+(isample0==8)*.47+(isample0==9)*.32))+1<<12"
56  formula = cms.string(''),
57  # sim hits. Set to empty string for no sim hit.
58  # Pattern example with energy set to (eta index in EB)*10MeV in first event
59  # and then incremented by 10MeV at each event:
60  simHitFormula = cms.string('(ieta0+ievt0)/100.'),
61  #TT samples. Set to empy string for no TP digis.
62  # TT sample format:
63  # | 10 | 9 - 0 |
64  # |fgvb| Et |
65  # Pattern example with energy set to TT id within SM in first event and then
66  # incremented at each event:
67  # string tpFormula = "max(1023, itt0+ievt0)"
68  tpFormula = cms.string(''),
69  #verbosity switch:
70  verbose = cms.untracked.bool(False)
71 )
72 
73 process.EcalTrivialConditionRetriever = cms.ESSource("EcalTrivialConditionRetriever")
74 
75 process.out = cms.OutputModule("PoolOutputModule",
76  fileName = cms.untracked.string('file:toto.root')
77 )
78 
79 process.p = cms.Path(process.ecalSimpleProducer*process.mix*process.simEcalUnsuppressedDigis*process.simEcalTriggerPrimitiveDigis*process.simEcalDigis*process.ecalSimRawData)
80 process.fine = cms.EndPath(process.out)
81 process.simEcalTriggerPrimitiveDigis.Label = 'simEcalUnsuppressedDigis'
82 process.simEcalTriggerPrimitiveDigis.InstanceEB = ''
83 process.simEcalTriggerPrimitiveDigis.InstanceEE = ''
84 process.ecalTriggerPrimitiveDigis.TcpOutput = True
85 process.simEcalDigis.dumpFlags = 10
86 process.simEcalDigis.trigPrimBypass = False
87 process.simEcalDigis.writeSrFlags = True
88 
89