CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
geometryComparisonTemplates.py
Go to the documentation of this file.
1 ######################################################################
2 ######################################################################
3 intoNTuplesTemplate="""
4 import FWCore.ParameterSet.Config as cms
5 
6 process = cms.Process("ValidationIntoNTuples")
7 
8 # global tag
9 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
10 process.GlobalTag.globaltag = ".oO[GlobalTag]Oo."
11 
12 process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi")
13 process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi")
14 process.load("Geometry.TrackerGeometryBuilder.trackerGeometry_cfi")
15 
16 #process.load("Alignment.CommonAlignmentProducer.GlobalPosition_Frontier_cff")
17 process.load("CondCore.DBCommon.CondDBSetup_cfi")
18 
19 process.MessageLogger = cms.Service("MessageLogger",
20  destinations = cms.untracked.vstring('detailedInfo',
21  'cout')
22 )
23 
24 .oO[condLoad]Oo.
25 
26 process.source = cms.Source("EmptySource",
27  firstRun=cms.untracked.uint32(.oO[runGeomComp]Oo.)
28  )
29 
30 process.maxEvents = cms.untracked.PSet(
31  input = cms.untracked.int32(1)
32 )
33 process.dump = cms.EDAnalyzer("TrackerGeometryIntoNtuples",
34  # outputFile = cms.untracked.string('.oO[workdir]Oo./.oO[alignmentName]Oo.ROOTGeometry.root'),
35  outputFile = cms.untracked.string('.oO[alignmentName]Oo.ROOTGeometry.root'),
36  outputTreename = cms.untracked.string('alignTree')
37 )
38 
39 process.p = cms.Path(process.dump)
40 """
41 
42 
43 ######################################################################
44 ######################################################################
45 compareTemplate="""
46 import FWCore.ParameterSet.Config as cms
47 
48 process = cms.Process("validation")
49 
50 # global tag
51 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
52 process.GlobalTag.globaltag = ".oO[GlobalTag]Oo."
53 process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cff")
54 
55 process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi")
56 
57 process.load("Geometry.TrackerGeometryBuilder.trackerGeometry_cfi")
58 
59 #process.load("Alignment.CommonAlignmentProducer.GlobalPosition_Frontier_cff")
60 # the input .GlobalPosition_Frontier_cff is providing the frontier://FrontierProd/CMS_COND_31X_ALIGNMENT in the release which does not provide the ideal geometry
61 #process.GlobalPosition.connect = 'frontier://FrontierProd/CMS_COND_31X_FROM21X'
62 
63 process.load("CondCore.DBCommon.CondDBSetup_cfi")
64 
65 process.MessageLogger = cms.Service("MessageLogger",
66  destinations = cms.untracked.vstring('detailedInfo',
67  'cout')
68 )
69 
70 process.source = cms.Source("EmptySource")
71 
72 process.maxEvents = cms.untracked.PSet(
73  input = cms.untracked.int32(1)
74 )
75 
76 process.load("DQM.SiStripCommon.TkHistoMap_cfi")
77 
78 process.DQMStore=cms.Service("DQMStore")
79 #process.TkDetMap = cms.Service("TkDetMap")
80 #process.SiStripDetInfoFileReader = cms.Service("SiStripDetInfoFileReader")
81 
82 process.load("DQMServices.Core.DQMStore_cfg")
83 #process.DQMStore=cms.Service("DQMStore")
84 
85  # configuration of the Tracker Geometry Comparison Tool
86  # Tracker Geometry Comparison
87 process.load("Alignment.OfflineValidation.TrackerGeometryCompare_cfi")
88  # the input "IDEAL" is special indicating to use the ideal geometry of the release
89 
90 process.TrackerGeometryCompare.inputROOTFile1 = '.oO[comparedGeometry]Oo.'
91 process.TrackerGeometryCompare.inputROOTFile2 = '.oO[referenceGeometry]Oo.'
92 # process.TrackerGeometryCompare.outputFile = ".oO[workdir]Oo./.oO[name]Oo..Comparison_common.oO[common]Oo..root"
93 process.TrackerGeometryCompare.outputFile = ".oO[name]Oo..Comparison_common.oO[common]Oo..root"
94 
95 process.load("CommonTools.UtilAlgos.TFileService_cfi")
96 #process.TFileService = cms.Service("TFileService",
97 # fileName = cms.string('TkSurfDeform.root')
98 # )
99 process.TFileService.fileName = cms.string("TkSurfDeform_.oO[name]Oo..Comparison_common.oO[common]Oo..root")
100 
101 process.TrackerGeometryCompare.levels = [ .oO[levels]Oo. ]
102 
103  ##FIXME!!!!!!!!!
104  ##replace TrackerGeometryCompare.writeToDB = .oO[dbOutput]Oo.
105  ##removed: dbOutputService
106 
107 process.p = cms.Path(process.TrackerGeometryCompare)
108 """
109 
110 
111 ######################################################################
112 ######################################################################
113 dbOutputTemplate= """
114 //_________________________ db Output ____________________________
115  # setup for writing out to DB
116  include "CondCore/DBCommon/data/CondDBSetup.cfi"
117 # include "CondCore/DBCommon/data/CondDBCommon.cfi"
118 
119  service = PoolDBOutputService {
120  using CondDBSetup
121  VPSet toPut = {
122  { string record = "TrackerAlignmentRcd" string tag = ".oO[tag]Oo." },
123  { string record = "TrackerAlignmentErrorRcd" string tag = ".oO[errortag]Oo." }
124  }
125  # string connect = "sqlite_file:.oO[workdir]Oo./.oO[name]Oo.Common.oO[common]Oo..db"
126  string connect = "sqlite_file:.oO[name]Oo.Common.oO[common]Oo..db"
127  # untracked string catalog = "file:alignments.xml"
128  untracked string timetype = "runnumber"
129  }
130 """
131