CMS 3D CMS Logo

copySimPulseShapeFromFile_cfg.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 process = cms.Process("TEST")
4 process.load("CalibCalorimetry.EcalTrivialCondModules.EcalTrivialCondRetriever_cfi")
5 process.EcalTrivialConditionRetriever.producedEcalSimPulseShape = cms.untracked.bool(True)
6 process.EcalTrivialConditionRetriever.getSimPulseShapeFromFile = cms.untracked.bool(True) ### if set False hadrdcoded shapes will be loaded by default
7 
8 
9 ### phase I Pulse Shapes
10 #process.EcalTrivialConditionRetriever.sim_pulse_shape_TI = cms.untracked.double( 1.0)
11 #process.EcalTrivialConditionRetriever.sim_pulse_shape_EB_thresh = cms.double(0.00013)
12 #process.EcalTrivialConditionRetriever.sim_pulse_shape_EE_thresh = cms.double(0.00025)
13 #process.EcalTrivialConditionRetriever.sim_pulse_shape_APD_thresh = cms.double(0)
14 #process.EcalTrivialConditionRetriever.EBSimPulseShapeFile = cms.untracked.string("EB_SimPulseShape.txt")
15 #process.EcalTrivialConditionRetriever.EESimPulseShapeFile = cms.untracked.string("EE_SimPulseShape.txt")
16 #process.EcalTrivialConditionRetriever.APDSimPulseShapeFile = cms.untracked.string("APD_SimPulseShape.txt")
17 
18 ### phase II Pulse Shapes
19 process.EcalTrivialConditionRetriever.sim_pulse_shape_TI = cms.untracked.double(0.250)
20 process.EcalTrivialConditionRetriever.sim_pulse_shape_EB_thresh = cms.double(0.201244)
21 process.EcalTrivialConditionRetriever.sim_pulse_shape_EE_thresh = cms.double(0.201244)
22 process.EcalTrivialConditionRetriever.sim_pulse_shape_APD_thresh = cms.double(0.201244)
23 process.EcalTrivialConditionRetriever.EBSimPulseShapeFile = cms.untracked.string("EB_SimPulseShape_PhaseII.txt")
24 process.EcalTrivialConditionRetriever.EESimPulseShapeFile = cms.untracked.string("EB_SimPulseShape_PhaseII.txt")
25 process.EcalTrivialConditionRetriever.APDSimPulseShapeFile = cms.untracked.string("EB_SimPulseShape_PhaseII.txt")
26 
27 
28 process.load("CondCore.CondDB.CondDB_cfi")
29 #process.CondDBCommon.connect = 'oracle://cms_orcon_prod/CMS_COND_31X_ECAL'
30 #process.CondDBCommon.DBParameters.authenticationPath = '/nfshome0/popcondev/conddb'
31 process.CondDB.connect = 'sqlite_file:DB.db'
32 
33 process.MessageLogger = cms.Service("MessageLogger",
34  debugModules = cms.untracked.vstring('*'),
35  destinations = cms.untracked.vstring('cout')
36 )
37 
38 process.source = cms.Source("EmptyIOVSource",
39  firstValue = cms.uint64(1),
40  lastValue = cms.uint64(1),
41  timetype = cms.string('runnumber'),
42  interval = cms.uint64(1)
43 )
44 
45 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
46  process.CondDB,
47  toPut = cms.VPSet(
48  cms.PSet(
49  record = cms.string('EcalSimPulseShapeRcd'),
50  tag = cms.string('EcalSimPulseShape_default_mc')
51  )
52  )
53 )
54 
55 process.dbCopy = cms.EDAnalyzer("EcalDBCopy",
56  timetype = cms.string('runnumber'),
57  toCopy = cms.VPSet(
58  cms.PSet(
59  record = cms.string('EcalSimPulseShapeRcd'),
60  container = cms.string('EcalSimPulseShape')
61  )
62  )
63 )
64 
65 process.prod = cms.EDAnalyzer("EcalTrivialObjectAnalyzer")
66 
67 process.p = cms.Path(process.prod*process.dbCopy)