CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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("MessageLogger",
8  cerr = cms.untracked.PSet(
9  enable = cms.untracked.bool(False)
10  ),
11  debugModules = cms.untracked.vstring('siStripLorentzAngleDummyDBWriter'),
12  files = cms.untracked.PSet(
13  SQLiteGenerator = cms.untracked.PSet(
14 
15  )
16  ),
17  threshold = cms.untracked.string('DEBUG')
18 )
19 
20 process.maxEvents = cms.untracked.PSet(
21  input = cms.untracked.int32(1)
22 )
23 process.source = cms.Source("EmptySource",
24  numberEventsInRun = cms.untracked.uint32(1),
25  firstRun = cms.untracked.uint32(1)
26 )
27 
28 process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
29 
30 process.load("CalibTracker.SiStripESProducers.fake.SiStripLorentzAngleFakeESSource_cfi")
31 process.load("CalibTracker.SiStripESProducers.DBWriter.SiStripLorentzAngleDummyDBWriter_cfi")
32 
33 process.PoolDBOutputService = cms.Service("PoolDBOutputService",
34  connect = cms.string('sqlite_file:SiStripLorentzAngle_CalibrationEnsemble.db'),
35  timetype = cms.untracked.string('runnumber'),
36  BlobStreamerName = cms.untracked.string('TBufferBlobStreamingService'),
37  DBParameters = cms.PSet(
38  messageLevel = cms.untracked.int32(2),
39  authenticationPath = cms.untracked.string('/afs/cern.ch/cms/DB/conddb')
40  ),
41 
42  toPut = cms.VPSet(cms.PSet(
43  record = cms.string('SiStripLorentzAngleRcd'),
44  tag = cms.string('SiStripLorentzAngle_CalibrationEnsemble_31X')
45  ))
46 )
47 
48 process.siStripLorentzAngleDummyDBWriter.record=process.PoolDBOutputService.toPut[0].record
49 
50 # Three possible generations:
51 # - give two values = (min,max) -> uniform distribution
52 # - give one value and PerCent_Err != 0 -> gaussian distribution
53 # - either give two equal values or a single value (pass an empty max vector) -> fixed value
54 
55 BField = 3.8
56 from CalibTracker.SiStripESProducers.fake.SiStripLorentzAngleFakeESSource_cfi import siStripLorentzAngleFakeESSource
57 # TIB min and max
58 siStripLorentzAngleFakeESSource.TIB_EstimatedValuesMin = cms.vdouble(0.0/BField, 0.0/BField, 0.0/BField, 0.0/BField)
59 siStripLorentzAngleFakeESSource.TIB_EstimatedValuesMax = cms.vdouble(0.10/BField, 0.10/BField, 0.10/BField, 0.10/BField)
60 # TIB errors
61 siStripLorentzAngleFakeESSource.TIB_PerCent_Errs = cms.vdouble(0., 0., 0., 0.)
62 # TOB min and max
63 siStripLorentzAngleFakeESSource.TOB_EstimatedValuesMin = cms.vdouble(0.0/BField, 0.0/BField, 0.0/BField, 0.0/BField, 0.0/BField, 0.0/BField)
64 siStripLorentzAngleFakeESSource.TOB_EstimatedValuesMax = cms.vdouble(0.12/BField, 0.12/BField, 0.12/BField, 0.12/BField, 0.12/BField, 0.12/BField)
65 # TOB errors
66 siStripLorentzAngleFakeESSource.TOB_PerCent_Errs = cms.vdouble(0., 0., 0., 0., 0., 0.)
67 
68 process.p1 = cms.Path(process.siStripLorentzAngleDummyDBWriter)
69