Main Page
Namespaces
Classes
Package Documentation
Alignment
OfflineValidation
python
TkAlAllInOneTool
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
.oO[LoadGlobalTagTemplate]Oo.
9
10
process.load("Configuration.Geometry.GeometryRecoDB_cff")
11
12
process.load("CondCore.CondDB.CondDB_cfi")
13
14
process.MessageLogger = cms.Service("MessageLogger",
15
destinations = cms.untracked.vstring('detailedInfo',
16
'cout')
17
)
18
19
.oO[condLoad]Oo.
20
21
process.source = cms.Source("EmptySource",
22
firstRun=cms.untracked.uint32(.oO[runGeomComp]Oo.)
23
)
24
25
process.maxEvents = cms.untracked.PSet(
26
input = cms.untracked.int32(1)
27
)
28
process.dump = cms.EDAnalyzer("TrackerGeometryIntoNtuples",
29
outputFile = cms.untracked.string('.oO[alignmentName]Oo.ROOTGeometry.root'),
30
outputTreename = cms.untracked.string('alignTree')
31
)
32
33
process.p = cms.Path(process.dump)
34
"""
35
36
37
######################################################################
38
######################################################################
39
compareTemplate=
"""
40
import FWCore.ParameterSet.Config as cms
41
42
process = cms.Process("validation")
43
44
.oO[LoadGlobalTagTemplate]Oo.
45
46
process.load("Configuration.Geometry.GeometryRecoDB_cff")
47
48
process.load("CondCore.CondDB.CondDB_cfi")
49
50
process.MessageLogger = cms.Service("MessageLogger",
51
destinations = cms.untracked.vstring('detailedInfo',
52
'cout')
53
)
54
55
process.source = cms.Source("EmptySource",
56
firstRun=cms.untracked.uint32(.oO[runGeomComp]Oo.)
57
)
58
59
process.maxEvents = cms.untracked.PSet(
60
input = cms.untracked.int32(1)
61
)
62
63
process.siStripQualityESProducer.ListOfRecordToMerge=cms.VPSet(
64
cms.PSet(record = cms.string('SiStripDetCablingRcd'),
65
tag = cms.string('')),
66
cms.PSet(record = cms.string('RunInfoRcd'),
67
tag = cms.string('')),
68
cms.PSet(record = cms.string('SiStripBadChannelRcd'),
69
tag = cms.string('')),
70
cms.PSet(record = cms.string('SiStripBadFiberRcd'),
71
tag = cms.string('')),
72
cms.PSet(record = cms.string('SiStripBadModuleRcd'),
73
tag = cms.string('')),
74
cms.PSet(record = cms.string('SiStripBadStripRcd'),
75
tag = cms.string(''))
76
)
77
78
process.load("DQM.SiStripCommon.TkHistoMap_cfi")
79
80
process.DQMStore=cms.Service("DQMStore")
81
82
process.load("DQMServices.Core.DQMStore_cfg")
83
84
# configuration of the Tracker Geometry Comparison Tool
85
# Tracker Geometry Comparison
86
process.load("Alignment.OfflineValidation.TrackerGeometryCompare_cfi")
87
# the input "IDEAL" is special indicating to use the ideal geometry of the release
88
89
process.TrackerGeometryCompare.inputROOTFile1 = '.oO[comparedGeometry]Oo.'
90
process.TrackerGeometryCompare.inputROOTFile2 = '.oO[referenceGeometry]Oo.'
91
process.TrackerGeometryCompare.moduleList = '.oO[moduleListBase]Oo.'
92
process.TrackerGeometryCompare.outputFile = ".oO[name]Oo..Comparison_common.oO[common]Oo..root"
93
94
process.load("CommonTools.UtilAlgos.TFileService_cfi")
95
process.TFileService.fileName = cms.string("TkSurfDeform_.oO[name]Oo..Comparison_common.oO[common]Oo..root")
96
97
process.TrackerGeometryCompare.levels = [ .oO[levels]Oo. ]
98
99
##FIXME!!!!!!!!!
100
##replace TrackerGeometryCompare.writeToDB = .oO[dbOutput]Oo.
101
##removed: dbOutputService
102
103
process.p = cms.Path(process.TrackerGeometryCompare)
104
"""
105
106
107
######################################################################
108
######################################################################
109
dbOutputTemplate=
"""
110
//_________________________ db Output ____________________________
111
# setup for writing out to DB
112
include "CondCore/DBCommon/CondDBSetup.cfi"
113
# include "CondCore/DBCommon/data/CondDBCommon.cfi"
114
115
service = PoolDBOutputService {
116
using CondDBSetup
117
VPSet toPut = {
118
{ string record = "TrackerAlignmentRcd" string tag = ".oO[tag]Oo." },
119
{ string record = "TrackerAlignmentErrorExtendedRcd" string tag = ".oO[errortag]Oo." }
120
}
121
# string connect = "sqlite_file:.oO[workdir]Oo./.oO[name]Oo.Common.oO[common]Oo..db"
122
string connect = "sqlite_file:.oO[name]Oo.Common.oO[common]Oo..db"
123
# untracked string catalog = "file:alignments.xml"
124
untracked string timetype = "runnumber"
125
}
126
"""
127
128
######################################################################
129
######################################################################
130
visualizationTrackerTemplate=
"""
131
#include "Alignment/OfflineValidation/scripts/visualizationTracker.C"
132
void TkAl3DVisualization_.oO[common]Oo._.oO[name]Oo.(){
133
//------------------------------ONLY NEEDED INPUTS-------------------------------//
134
//------Tree Read In--------
135
TString inputFileName = ".oO[outputFile]Oo.";
136
//output file name
137
string outputFileName = ".oO[common]Oo._.oO[name]Oo..Visualization";
138
//title
139
string line1 = ".oO[alignmentTitle]Oo.";
140
string line2 = "vs. .oO[referenceTitle]Oo.";
141
//set subdetectors to see
142
int subdetector1 = .oO[3DSubdetector1]Oo.;
143
int subdetector2 = .oO[3DSubdetector2]Oo.;
144
//translation scale factor
145
int sclftr = .oO[3DTranslationalScaleFactor]Oo.;
146
//rotation scale factor
147
int sclfrt = 1;
148
//module size scale factor
149
float sclfmodulesizex = 1;
150
float sclfmodulesizey = 1;
151
float sclfmodulesizez = 1;
152
//beam pipe radius
153
float piperadius = 2.25;
154
//beam pipe xy coordinates
155
float pipexcoord = 0;
156
float pipeycoord = 0;
157
//beam line xy coordinates
158
float linexcoord = 0;
159
float lineycoord = 0;
160
//------------------------------End of ONLY NEEDED INPUTS-------------------------------//
161
cout << "running visualizer" << endl;
162
runVisualizer(inputFileName,
163
outputFileName,
164
line1,
165
line2,
166
subdetector1,
167
subdetector2,
168
sclftr,
169
sclfrt,
170
sclfmodulesizex,
171
sclfmodulesizey,
172
sclfmodulesizez,
173
piperadius,
174
pipexcoord,
175
pipeycoord,
176
linexcoord,
177
lineycoord );
178
}
179
"""
Generated for CMSSW Reference Manual by
1.8.11