CMS 3D CMS Logo

SQLiteEnsembleGenerator_cfg.py
Go to the documentation of this file.
1 #based on CalibTracker/SiStripESProducers/test/python/DummyCondDBWriter_SiStripLorentzAngle_cfg.py
2 
3 import FWCore.ParameterSet.Config as cms
4 
5 process = cms.Process("Builder")
6 
7 process.MessageLogger = cms.Service(
8  "MessageLogger",
9  debugModules = cms.untracked.vstring('siStripLorentzAngleDummyDBWriter'),
10  threshold = cms.untracked.string('DEBUG'),
11  destinations = cms.untracked.vstring('SQLiteGenerator.log')
12 )
13 
14 process.maxEvents = cms.untracked.PSet(
15  input = cms.untracked.int32(1)
16 )
17 process.source = cms.Source("EmptySource",
18  numberEventsInRun = cms.untracked.uint32(1),
19  firstRun = cms.untracked.uint32(1)
20 )
21 
22 process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
23 
24 process.load("CalibTracker.SiStripESProducers.fake.SiStripLorentzAngleFakeESSource_cfi")
25 process.load("CalibTracker.SiStripESProducers.DBWriter.SiStripLorentzAngleDummyDBWriter_cfi")
26 
27 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
28  connect = cms.string('sqlite_file:SiStripLorentzAngle_CalibrationEnsemble.db'),
29  timetype = cms.untracked.string('runnumber'),
30  BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
31  DBParameters = cms.PSet(
32  messageLevel = cms.untracked.int32(2),
33  authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
34  ),
35 
36  toPut = cms.VPSet(cms.PSet(
37  record = cms.string('SiStripLorentzAngleRcd'),
38  tag = cms.string('SiStripLorentzAngle_CalibrationEnsemble_31X')
39  ))
40 )
41 
42 process.siStripLorentzAngleDummyDBWriter.record=process.PoolDBOutputService.toPut[0].record
43 
44 # Three possible generations:
45 # - give two values = (min,max) -> uniform distribution
46 # - give one value and PerCent_Err != 0 -> gaussian distribution
47 # - either give two equal values or a single value (pass an empty max vector) -> fixed value
48 
49 BField = 3.8
50 from CalibTracker.SiStripESProducers.fake.SiStripLorentzAngleFakeESSource_cfi import siStripLorentzAngleFakeESSource
51 # TIB min and max
52 siStripLorentzAngleFakeESSource.TIB_EstimatedValuesMin = cms.vdouble(0.0/BField, 0.0/BField, 0.0/BField, 0.0/BField)
53 siStripLorentzAngleFakeESSource.TIB_EstimatedValuesMax = cms.vdouble(0.10/BField, 0.10/BField, 0.10/BField, 0.10/BField)
54 # TIB errors
55 siStripLorentzAngleFakeESSource.TIB_PerCent_Errs = cms.vdouble(0., 0., 0., 0.)
56 # TOB min and max
57 siStripLorentzAngleFakeESSource.TOB_EstimatedValuesMin = cms.vdouble(0.0/BField, 0.0/BField, 0.0/BField, 0.0/BField, 0.0/BField, 0.0/BField)
58 siStripLorentzAngleFakeESSource.TOB_EstimatedValuesMax = cms.vdouble(0.12/BField, 0.12/BField, 0.12/BField, 0.12/BField, 0.12/BField, 0.12/BField)
59 # TOB errors
60 siStripLorentzAngleFakeESSource.TOB_PerCent_Errs = cms.vdouble(0., 0., 0., 0., 0., 0.)
61 
62 process.p1 = cms.Path(process.siStripLorentzAngleDummyDBWriter)
63