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 "source" if the digis
24 # are produced by the EcalSimpleSource module, keep the default value
25 # otherwise:
26 #replace ecalSimRawData.unsuppressedDigiProducer = "source"
27 # Set ecalSimRawData.trigPrimProducer to "source" if the TP digis
28 # are produced by the EcalSimpleSource module, keep the default value
29 # otherwise:
30 #replace ecalSimRawData.trigPrimProducer = "source"
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("EcalSimpleSource",
45  # number of events to generate:
46  maxEvents = cms.untracked.int32(1),
47  #xtal channel digis. Set to empty string for no digis.
48  # some realistic shape. Gain 12 (ID=1, see 1<<12). Every crystals with a
49  # 160 ADC count amplitude above a 200 ADC count baseline.
50  # 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"
51  formula = cms.string(''),
52  # sim hits. Set to empty string for no sim hit.
53  # Pattern example with energy set to (eta index in EB)*10MeV in first event
54  # and then incremented by 10MeV at each event:
55  simHitFormula = cms.string('(ieta0+ievt0)/100.'),
56  #TT samples. Set to empy string for no TP digis.
57  # TT sample format:
58  # | 10 | 9 - 0 |
59  # |fgvb| Et |
60  # Pattern example with energy set to TT id within SM in first event and then
61  # incremented at each event:
62  # string tpFormula = "max(1023, itt0+ievt0)"
63  tpFormula = cms.string(''),
64  #verbosity switch:
65  verbose = cms.untracked.bool(False)
66 )
67 
68 process.EcalTrivialConditionRetriever = cms.ESSource("EcalTrivialConditionRetriever")
69 
70 process.out = cms.OutputModule("PoolOutputModule",
71  fileName = cms.untracked.string('file:toto.root')
72 )
73 
74 process.p = cms.Path(process.mix*process.simEcalUnsuppressedDigis*process.simEcalTriggerPrimitiveDigis*process.simEcalDigis*process.ecalSimRawData)
75 process.fine = cms.EndPath(process.out)
76 process.simEcalTriggerPrimitiveDigis.Label = 'simEcalUnsuppressedDigis'
77 process.simEcalTriggerPrimitiveDigis.InstanceEB = ''
78 process.simEcalTriggerPrimitiveDigis.InstanceEE = ''
79 process.ecalTriggerPrimitiveDigis.TcpOutput = True
80 process.simEcalDigis.dumpFlags = 10
81 process.simEcalDigis.trigPrimBypass = False
82 process.simEcalDigis.writeSrFlags = True
83 
84