test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
# global tag
9
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
10
process.GlobalTag.globaltag = ".oO[GlobalTag]Oo."
11
12
process.load("Configuration.Geometry.GeometryRecoDB_cff")
13
14
process.load("CondCore.CondDB.CondDB_cfi")
15
16
process.MessageLogger = cms.Service("MessageLogger",
17
destinations = cms.untracked.vstring('detailedInfo',
18
'cout')
19
)
20
21
.oO[condLoad]Oo.
22
23
process.source = cms.Source("EmptySource",
24
firstRun=cms.untracked.uint32(.oO[runGeomComp]Oo.)
25
)
26
27
process.maxEvents = cms.untracked.PSet(
28
input = cms.untracked.int32(1)
29
)
30
process.dump = cms.EDAnalyzer("TrackerGeometryIntoNtuples",
31
outputFile = cms.untracked.string('.oO[alignmentName]Oo.ROOTGeometry.root'),
32
outputTreename = cms.untracked.string('alignTree')
33
)
34
35
process.p = cms.Path(process.dump)
36
"""
37
38
39
######################################################################
40
######################################################################
41
compareTemplate=
"""
42
import FWCore.ParameterSet.Config as cms
43
44
process = cms.Process("validation")
45
46
# global tag
47
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
48
process.GlobalTag.globaltag = ".oO[GlobalTag]Oo."
49
50
process.load("Configuration.Geometry.GeometryRecoDB_cff")
51
52
process.load("CondCore.CondDB.CondDB_cfi")
53
54
process.MessageLogger = cms.Service("MessageLogger",
55
destinations = cms.untracked.vstring('detailedInfo',
56
'cout')
57
)
58
59
process.source = cms.Source("EmptySource",
60
firstRun=cms.untracked.uint32(.oO[runGeomComp]Oo.)
61
)
62
63
process.maxEvents = cms.untracked.PSet(
64
input = cms.untracked.int32(1)
65
)
66
67
process.siStripQualityESProducer.ListOfRecordToMerge=cms.VPSet(
68
cms.PSet(record = cms.string('SiStripDetCablingRcd'),
69
tag = cms.string('')),
70
cms.PSet(record = cms.string('RunInfoRcd'),
71
tag = cms.string('')),
72
cms.PSet(record = cms.string('SiStripBadChannelRcd'),
73
tag = cms.string('')),
74
cms.PSet(record = cms.string('SiStripBadFiberRcd'),
75
tag = cms.string('')),
76
cms.PSet(record = cms.string('SiStripBadModuleRcd'),
77
tag = cms.string('')),
78
cms.PSet(record = cms.string('SiStripBadStripRcd'),
79
tag = cms.string(''))
80
)
81
82
process.load("DQM.SiStripCommon.TkHistoMap_cfi")
83
84
process.DQMStore=cms.Service("DQMStore")
85
86
process.load("DQMServices.Core.DQMStore_cfg")
87
88
# configuration of the Tracker Geometry Comparison Tool
89
# Tracker Geometry Comparison
90
process.load("Alignment.OfflineValidation.TrackerGeometryCompare_cfi")
91
# the input "IDEAL" is special indicating to use the ideal geometry of the release
92
93
process.TrackerGeometryCompare.inputROOTFile1 = '.oO[comparedGeometry]Oo.'
94
process.TrackerGeometryCompare.inputROOTFile2 = '.oO[referenceGeometry]Oo.'
95
process.TrackerGeometryCompare.moduleList = '.oO[moduleListBase]Oo.'
96
process.TrackerGeometryCompare.outputFile = ".oO[name]Oo..Comparison_common.oO[common]Oo..root"
97
98
process.load("CommonTools.UtilAlgos.TFileService_cfi")
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/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 = "TrackerAlignmentErrorExtendedRcd" 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
132
######################################################################
133
######################################################################
134
visualizationTrackerTemplate=
"""
135
#include ".oO[CMSSW_BASE]Oo./src/Alignment/OfflineValidation/scripts/visualizationTracker.C"
136
void TkAl3DVisualization_.oO[common]Oo._.oO[name]Oo.(){
137
//------------------------------ONLY NEEDED INPUTS-------------------------------//
138
//------Tree Read In--------
139
TString inputFileName = ".oO[outputFile]Oo.";
140
//output file name
141
string outputFileName = ".oO[common]Oo._.oO[name]Oo..Visualization";
142
//title
143
string line1 = ".oO[alignmentTitle]Oo.";
144
string line2 = "vs. .oO[referenceTitle]Oo.";
145
//set subdetectors to see
146
int subdetector1 = .oO[3DSubdetector1]Oo.;
147
int subdetector2 = .oO[3DSubdetector2]Oo.;
148
//translation scale factor
149
int sclftr = .oO[3DTranslationalScaleFactor]Oo.;
150
//rotation scale factor
151
int sclfrt = 1;
152
//module size scale factor
153
float sclfmodulesizex = 1;
154
float sclfmodulesizey = 1;
155
float sclfmodulesizez = 1;
156
//beam pipe radius
157
float piperadius = 2.25;
158
//beam pipe xy coordinates
159
float pipexcoord = 0;
160
float pipeycoord = 0;
161
//beam line xy coordinates
162
float linexcoord = 0;
163
float lineycoord = 0;
164
//------------------------------End of ONLY NEEDED INPUTS-------------------------------//
165
cout << "running visualizer" << endl;
166
runVisualizer(inputFileName,
167
outputFileName,
168
line1,
169
line2,
170
subdetector1,
171
subdetector2,
172
sclftr,
173
sclfrt,
174
sclfmodulesizex,
175
sclfmodulesizey,
176
sclfmodulesizez,
177
piperadius,
178
pipexcoord,
179
pipeycoord,
180
linexcoord,
181
lineycoord );
182
}
183
"""
Generated for CMSSW Reference Manual by
1.8.5