CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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(
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 # TIB min and max
51 process.SiStripLorentzAngleGenerator.TIB_EstimatedValuesMin = cms.vdouble(0.0/BField, 0.0/BField, 0.0/BField, 0.0/BField)
52 process.SiStripLorentzAngleGenerator.TIB_EstimatedValuesMax = cms.vdouble(0.10/BField, 0.10/BField, 0.10/BField, 0.10/BField)
53 # TIB errors
54 process.SiStripLorentzAngleGenerator.TIB_PerCent_Errs = cms.vdouble(0., 0., 0., 0.)
55 # TOB min and max
56 process.SiStripLorentzAngleGenerator.TOB_EstimatedValuesMin = cms.vdouble(0.0/BField, 0.0/BField, 0.0/BField, 0.0/BField, 0.0/BField, 0.0/BField)
57 process.SiStripLorentzAngleGenerator.TOB_EstimatedValuesMax = cms.vdouble(0.12/BField, 0.12/BField, 0.12/BField, 0.12/BField, 0.12/BField, 0.12/BField)
58 # TOB errors
59 process.SiStripLorentzAngleGenerator.TOB_PerCent_Errs = cms.vdouble(0., 0., 0., 0., 0., 0.)
60 
61 process.p1 = cms.Path(process.siStripLorentzAngleDummyDBWriter)
62