1 |
econte |
1.1 |
import FWCore.ParameterSet.Config as cms
|
2 |
|
|
|
3 |
|
|
process = cms.Process("Demo")
|
4 |
|
|
|
5 |
|
|
process.load("FWCore.MessageService.MessageLogger_cfi")
|
6 |
|
|
process.MessageLogger.cerr.FwkReport.reportEvery = 50
|
7 |
|
|
|
8 |
|
|
#name of the output file containing the tree
|
9 |
|
|
process.TFileService = cms.Service("TFileService", fileName = cms.string("analyzerTree.root") )
|
10 |
|
|
|
11 |
|
|
process.load( "RecoTracker.Configuration.RecoTracker_cff" )
|
12 |
|
|
process.load( "Configuration.StandardSequences.Services_cff" )
|
13 |
|
|
process.load( "Configuration.StandardSequences.GeometryPilot2_cff" )
|
14 |
|
|
process.load( "Configuration.StandardSequences.MagneticField_38T_cff" )
|
15 |
|
|
process.load( "Configuration.StandardSequences.FrontierConditions_GlobalTag_cff" )
|
16 |
|
|
process.GlobalTag.globaltag = "START44_V7::All"
|
17 |
|
|
|
18 |
|
|
# process.GlobalTag.toGet = cms.VPSet(
|
19 |
|
|
# cms.PSet( record = cms.string( "TrackerAlignmentRcd" ),
|
20 |
|
|
# tag = cms.string( "TrackerIdealGeometry210_mc" ),
|
21 |
|
|
# connect = cms.untracked.string( "frontier://FrontierProd/CMS_COND_31X_FROM21X" ) ),
|
22 |
|
|
# cms.PSet( record = cms.string( "TrackerAlignmentErrorRcd" ),
|
23 |
|
|
# tag = cms.string( "TrackerIdealGeometryErrors210_mc" ),
|
24 |
|
|
# connect = cms.untracked.string( "frontier://FrontierProd/CMS_COND_31X_FROM21X" ) )
|
25 |
|
|
# )
|
26 |
|
|
|
27 |
|
|
process.source = cms.Source( "PoolSource",
|
28 |
|
|
fileNames = cms.untracked.vstring(
|
29 |
|
|
#"rfio:/castor/cern.ch/cms/store/relval/CMSSW_4_4_0_pre3/RelValZMM/GEN-SIM-RECO/START43_V4-v1/0001/805E5772-15A6-E011-9596-002618943800.root",
|
30 |
|
|
"file:/opt/sbg/data/data1/cms/cgoetzma/Thesis/data/CMSSW_4_4_2/reco/4618D130-7902-E111-9A07-0018F3D0961E.root",
|
31 |
|
|
"file:/opt/sbg/data/data1/cms/cgoetzma/Thesis/data/CMSSW_4_4_2/reco/8646C2B8-6605-E111-87E6-002618943879.root",
|
32 |
|
|
"file:/opt/sbg/data/data1/cms/cgoetzma/Thesis/data/CMSSW_4_4_2/reco/CC0BE8AF-7802-E111-8970-0018F3D0961E.root"
|
33 |
|
|
#"/castor/cern.ch/cms/store/relval/CMSSW_4_4_0_pre3/RelValZMM/GEN-SIM-RECO/START43_V4-v1/0000/E6064D98-01A4-E011-AAA0-002618943956.root",
|
34 |
|
|
#"rfio:/castor/cern.ch/cms/store/relval/CMSSW_4_4_0_pre3/RelValZMM/GEN-SIM-RECO/START43_V4-v1/0000/7C358E88-10A4-E011-BCDA-00304866C398.root",
|
35 |
|
|
#"rfio:/castor/cern.ch/cms/store/relval/CMSSW_4_4_0_pre3/RelValZMM/GEN-SIM-RECO/START43_V4-v1/0000/5AF156B6-FDA3-E011-BDB7-0026189438C1.root"
|
36 |
|
|
)
|
37 |
|
|
)
|
38 |
|
|
|
39 |
|
|
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
|
40 |
|
|
|
41 |
|
|
process.out = cms.OutputModule( "PoolOutputModule",
|
42 |
|
|
fileName = cms.untracked.string( "output.root" ),
|
43 |
|
|
outputCommands = cms.untracked.vstring("keep *Track*_*_*_*")
|
44 |
|
|
)
|
45 |
|
|
|
46 |
|
|
# ------------------------------------------------------------------------------
|
47 |
|
|
# 0) Change geometry
|
48 |
|
|
# ------------------------------------------------------------------------------
|
49 |
|
|
#from CondCore.DBCommon.CondDBSetup_cfi import *
|
50 |
|
|
#process.trackerAlignment = cms.ESSource("PoolDBESSource",
|
51 |
|
|
# CondDBSetup,
|
52 |
|
|
# timetype = cms.string('runnumber'),
|
53 |
|
|
# toGet = cms.VPSet( cms.PSet(
|
54 |
|
|
# record = cms.string('TrackerAlignmentRcd'),
|
55 |
|
|
# tag = cms.string('Alignments') )),
|
56 |
|
|
# connect =
|
57 |
|
|
#cms.string('sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/PayLoads/SystematicMisalignmentsMoriond/mcScenarioMoriond/misalignment_on_ideal39X/IDEALplusDelta_ichepVrealignedTwist.db')
|
58 |
|
|
#cms.string('sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/PayLoads/SystematicMisalignmentsMoriond/mcScenarioMoriond/misalignment_on_ideal39X/IDEALplusDelta_ichepVrealignedSagitta.db')
|
59 |
|
|
|
60 |
|
|
# )
|
61 |
|
|
|
62 |
|
|
#process.es_prefer_trackerAlignment = cms.ESPrefer("PoolDBESSource","trackerAlignment")
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
# ------------------------------------------------------------------------------
|
66 |
|
|
# 1) Configure alignment track selector
|
67 |
|
|
# ------------------------------------------------------------------------------
|
68 |
|
|
process.load( "Alignment.CommonAlignmentProducer.AlignmentTrackSelector_cfi" )
|
69 |
|
|
process.AlignmentTrackSelector.src = cms.InputTag( "generalTracks" ) # for RelValZMM
|
70 |
|
|
#process.AlignmentTrackSelector.src = cms.InputTag( "ALCARECOTkAlZMuMu" ) # for ALCARECO
|
71 |
|
|
process.AlignmentTrackSelector.filter = cms.bool( True )
|
72 |
|
|
process.AlignmentTrackSelector.applyBasicCuts = cms.bool( True )
|
73 |
|
|
process.AlignmentTrackSelector.applyNHighestPt = cms.bool( True )
|
74 |
|
|
process.AlignmentTrackSelector.TwoBodyDecaySelector.applyMassrangeFilter = cms.bool( True )
|
75 |
|
|
process.AlignmentTrackSelector.TwoBodyDecaySelector.minXMass = cms.double( 80. )
|
76 |
|
|
process.AlignmentTrackSelector.TwoBodyDecaySelector.maxXMass = cms.double( 100. )
|
77 |
|
|
|
78 |
|
|
# ------------------------------------------------------------------------------
|
79 |
|
|
# 2) Constructs transient tracks and trajectories from persistent tracks
|
80 |
|
|
# ------------------------------------------------------------------------------
|
81 |
|
|
from RecoTracker.TrackProducer.TrackRefitter_cfi import TrackRefitter
|
82 |
jandrea |
1.2 |
process.GeomRefitter = TrackRefitter.clone(
|
83 |
econte |
1.1 |
src = "AlignmentTrackSelector",
|
84 |
|
|
TrajectoryInEvent = True )
|
85 |
|
|
|
86 |
|
|
# ------------------------------------------------------------------------------
|
87 |
|
|
# 3) Initialize KFFittingSmoother without outlier rejection
|
88 |
|
|
# ------------------------------------------------------------------------------
|
89 |
|
|
from TrackingTools.TrackFitters.KFFittingSmootherESProducer_cfi import KFFittingSmoother
|
90 |
|
|
process.TwoBodyDecayTrackFitter = KFFittingSmoother.clone(
|
91 |
|
|
ComponentName = cms.string( "TwoBodyDecayTrackFitter" ),
|
92 |
|
|
Fitter = cms.string('RKFitter'),
|
93 |
|
|
Smoother = cms.string('RKSmoother'),
|
94 |
|
|
LogPixelProbabilityCut = cms.double(-15.0),
|
95 |
|
|
EstimateCut = cms.double(-1.0),
|
96 |
|
|
)
|
97 |
|
|
|
98 |
|
|
# ------------------------------------------------------------------------------
|
99 |
|
|
# A-4) Refitter tracks without constraint
|
100 |
|
|
# ------------------------------------------------------------------------------
|
101 |
|
|
process.TrackRefitterWithoutConstraint = TrackRefitter.clone(
|
102 |
jandrea |
1.2 |
src = "GeomRefitter",
|
103 |
econte |
1.1 |
Fitter = cms.string('TwoBodyDecayTrackFitter'))
|
104 |
|
|
|
105 |
|
|
# ------------------------------------------------------------------------------
|
106 |
|
|
# A-5) Fill Tree with refit tracks (without constraint)
|
107 |
|
|
# ------------------------------------------------------------------------------
|
108 |
jandrea |
1.2 |
process.treeWithoutConstraints = cms.EDAnalyzer('AlignmentTree',
|
109 |
econte |
1.1 |
trackLabel = cms.InputTag('TrackRefitterWithoutConstraint'),
|
110 |
|
|
tkTraj = cms.InputTag('TrackRefitterWithoutConstraint'),
|
111 |
|
|
labelTrajToTrack = cms.InputTag('TrackRefitterWithoutConstraint'),
|
112 |
|
|
siStripClusters = cms.InputTag('TrackRefitterWithoutConstraint'),
|
113 |
|
|
primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
|
114 |
|
|
isLaserRun = cms.bool(False),
|
115 |
|
|
isMC = cms.bool(True),
|
116 |
|
|
algoName = cms.string("NoAlgo")
|
117 |
|
|
)
|
118 |
|
|
|
119 |
|
|
# ------------------------------------------------------------------------------
|
120 |
|
|
# B-4) Producer for full TwoBodyDecay constraint
|
121 |
|
|
# ------------------------------------------------------------------------------
|
122 |
|
|
process.load("RecoTracker.TrackProducer.TwoBodyDecayConstraintProducer_cff")
|
123 |
jandrea |
1.2 |
process.TwoBodyDecayConstraint.src = "GeomRefitter"
|
124 |
|
|
process.TwoBodyDecayConstraint.chi2Cut = 10
|
125 |
|
|
|
126 |
|
|
|
127 |
econte |
1.1 |
|
128 |
|
|
# ------------------------------------------------------------------------------
|
129 |
|
|
# B-5) Refitter using the full TwoBodyDecay constraint
|
130 |
|
|
# ------------------------------------------------------------------------------
|
131 |
|
|
process.TrackRefitterTBDFullConstraint = TrackRefitter.clone(
|
132 |
jandrea |
1.2 |
src = "GeomRefitter",
|
133 |
econte |
1.1 |
srcConstr = "TwoBodyDecayConstraint",
|
134 |
|
|
Fitter = cms.string('TwoBodyDecayTrackFitter'),
|
135 |
|
|
constraint = "trackParameters",
|
136 |
|
|
TrajectoryInEvent = True)
|
137 |
|
|
|
138 |
|
|
# ------------------------------------------------------------------------------
|
139 |
|
|
# B-6) Fill Tree with full TBD constraint
|
140 |
|
|
# ------------------------------------------------------------------------------
|
141 |
jandrea |
1.2 |
process.treeTBDFullConstraints = cms.EDAnalyzer('AlignmentTree',
|
142 |
econte |
1.1 |
trackLabel = cms.InputTag('TrackRefitterTBDFullConstraint'),
|
143 |
|
|
tkTraj = cms.InputTag('TrackRefitterTBDFullConstraint'),
|
144 |
|
|
labelTrajToTrack = cms.InputTag('TrackRefitterTBDFullConstraint'),
|
145 |
|
|
siStripClusters = cms.InputTag('TrackRefitterTBDFullConstraint'),
|
146 |
|
|
primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
|
147 |
|
|
isLaserRun = cms.bool(False),
|
148 |
|
|
isMC = cms.bool(True),
|
149 |
|
|
algoName = cms.string("FullTBD")
|
150 |
|
|
)
|
151 |
|
|
|
152 |
|
|
# ------------------------------------------------------------------------------
|
153 |
|
|
# C-4) Producer for TwoBodyDecay momentum constraint
|
154 |
|
|
# ------------------------------------------------------------------------------
|
155 |
|
|
process.load("RecoTracker.TrackProducer.TwoBodyDecayMomConstraintProducer_cff")
|
156 |
|
|
process.TwoBodyDecayMomConstraint.isMC = True
|
157 |
jandrea |
1.2 |
process.TwoBodyDecayMomConstraint.src = "GeomRefitter"
|
158 |
|
|
process.TwoBodyDecayMomConstraint.chi2Cut = 10
|
159 |
econte |
1.1 |
|
160 |
|
|
# ------------------------------------------------------------------------------
|
161 |
|
|
# C-5) Refit the tracks with momentum constraint
|
162 |
|
|
# ------------------------------------------------------------------------------
|
163 |
|
|
process.TrackRefitterTBDMomConstraint = TrackRefitter.clone(
|
164 |
jandrea |
1.2 |
src = "GeomRefitter",
|
165 |
econte |
1.1 |
srcConstr = "TwoBodyDecayMomConstraint",
|
166 |
|
|
Fitter = cms.string('TwoBodyDecayTrackFitter'),
|
167 |
|
|
constraint = "momentum",
|
168 |
|
|
TrajectoryInEvent = True)
|
169 |
|
|
|
170 |
|
|
# ------------------------------------------------------------------------------
|
171 |
|
|
# C-6) Fill Tree with mom TBD constraint
|
172 |
|
|
# ------------------------------------------------------------------------------
|
173 |
jandrea |
1.2 |
process.treeTBDMomConstraints = cms.EDAnalyzer('AlignmentTree',
|
174 |
econte |
1.1 |
trackLabel = cms.InputTag('TrackRefitterTBDMomConstraint'),
|
175 |
|
|
tkTraj = cms.InputTag('TrackRefitterTBDMomConstraint'),
|
176 |
|
|
labelTrajToTrack = cms.InputTag('TrackRefitterTBDMomConstraint'),
|
177 |
|
|
siStripClusters = cms.InputTag('TrackRefitterTBDMomConstraint'),
|
178 |
|
|
primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
|
179 |
|
|
isLaserRun = cms.bool(False),
|
180 |
|
|
isMC = cms.bool(True),
|
181 |
|
|
algoName = cms.string("MomTBD")
|
182 |
|
|
)
|
183 |
|
|
|
184 |
|
|
# ------------------------------------------------------------------------------
|
185 |
|
|
# D-4) Producer for KinFit
|
186 |
|
|
# ------------------------------------------------------------------------------
|
187 |
|
|
process.doConstraintKinFit = cms.EDProducer('ZmassConstraintsProd',
|
188 |
|
|
isMC = cms.bool(True),
|
189 |
jandrea |
1.2 |
trackLabel = cms.InputTag('GeomRefitter')
|
190 |
econte |
1.1 |
)
|
191 |
|
|
|
192 |
|
|
# ------------------------------------------------------------------------------
|
193 |
|
|
# D-5) Refitter for KinFit
|
194 |
|
|
# ------------------------------------------------------------------------------
|
195 |
|
|
process.TrackRefitterKinFit = TrackRefitter.clone(
|
196 |
jandrea |
1.2 |
src = "GeomRefitter",
|
197 |
econte |
1.1 |
srcConstr = "doConstraintKinFit",
|
198 |
|
|
Fitter = cms.string('TwoBodyDecayTrackFitter'),
|
199 |
|
|
constraint = "momentum",
|
200 |
|
|
TrajectoryInEvent = True)
|
201 |
|
|
|
202 |
|
|
# ------------------------------------------------------------------------------
|
203 |
|
|
# D-6) Fill Tree with KinFit constraint
|
204 |
|
|
# ------------------------------------------------------------------------------
|
205 |
jandrea |
1.2 |
process.treeKinFitConstraints = cms.EDAnalyzer('AlignmentTree',
|
206 |
econte |
1.1 |
trackLabel = cms.InputTag('TrackRefitterKinFit'),
|
207 |
|
|
tkTraj = cms.InputTag('TrackRefitterKinFit'),
|
208 |
|
|
labelTrajToTrack = cms.InputTag('TrackRefitterKinFit'),
|
209 |
|
|
siStripClusters = cms.InputTag('TrackRefitterKinFit'),
|
210 |
|
|
primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
|
211 |
|
|
isLaserRun = cms.bool(False),
|
212 |
|
|
isMC = cms.bool(True),
|
213 |
|
|
algoName = cms.string("KinFit")
|
214 |
|
|
)
|
215 |
|
|
|
216 |
|
|
# ------------------------------------------------------------------------------
|
217 |
jandrea |
1.2 |
# E-4) Producer for TwoBodyDecay vertex constraints
|
218 |
econte |
1.1 |
# ------------------------------------------------------------------------------
|
219 |
|
|
process.load("RecoTracker.TrackProducer.TwoBodyDecayVertexConstraintProducer_cff")
|
220 |
|
|
process.TwoBodyDecayVertexConstraint.isMC = True
|
221 |
jandrea |
1.2 |
process.TwoBodyDecayVertexConstraint.src = "GeomRefitter"
|
222 |
|
|
process.TwoBodyDecayVertexConstraint.chi2Cut = 10
|
223 |
econte |
1.1 |
|
224 |
|
|
# ------------------------------------------------------------------------------
|
225 |
jandrea |
1.2 |
# E-5) Track refitter with vertex constraints
|
226 |
econte |
1.1 |
# ------------------------------------------------------------------------------
|
227 |
|
|
process.TrackRefitterTBDVertexConstraint = TrackRefitter.clone(
|
228 |
jandrea |
1.2 |
src = "GeomRefitter",
|
229 |
econte |
1.1 |
srcConstr = "TwoBodyDecayVertexConstraint",
|
230 |
|
|
Fitter = cms.string('TwoBodyDecayTrackFitter'),
|
231 |
|
|
constraint = "vertex",
|
232 |
|
|
TrajectoryInEvent = True)
|
233 |
|
|
|
234 |
|
|
# ------------------------------------------------------------------------------
|
235 |
|
|
# E-6) Fill Tree with vertex TBD constraint
|
236 |
|
|
# ------------------------------------------------------------------------------
|
237 |
jandrea |
1.2 |
process.treeTBDVertexConstraints = cms.EDAnalyzer('AlignmentTree',
|
238 |
econte |
1.1 |
trackLabel = cms.InputTag('TrackRefitterTBDVertexConstraint'),
|
239 |
|
|
tkTraj = cms.InputTag('TrackRefitterTBDVertexConstraint'),
|
240 |
|
|
labelTrajToTrack = cms.InputTag('TrackRefitterTBDVertexConstraint'),
|
241 |
|
|
siStripClusters = cms.InputTag('TrackRefitterTBDVertexConstraint'),
|
242 |
|
|
primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
|
243 |
|
|
isLaserRun = cms.bool(False),
|
244 |
|
|
isMC = cms.bool(True),
|
245 |
|
|
algoName = cms.string("VtxTBD")
|
246 |
|
|
)
|
247 |
|
|
|
248 |
|
|
|
249 |
|
|
|
250 |
|
|
|
251 |
|
|
|
252 |
|
|
|
253 |
|
|
process.p = cms.Path( process.AlignmentTrackSelector *
|
254 |
jandrea |
1.2 |
process.GeomRefitter *
|
255 |
econte |
1.1 |
process.TrackRefitterWithoutConstraint *
|
256 |
jandrea |
1.2 |
process.treeWithoutConstraints *
|
257 |
econte |
1.1 |
process.TwoBodyDecayConstraint *
|
258 |
|
|
process.TrackRefitterTBDFullConstraint *
|
259 |
jandrea |
1.2 |
process.treeTBDFullConstraints *
|
260 |
econte |
1.1 |
process.TwoBodyDecayMomConstraint *
|
261 |
|
|
process.TrackRefitterTBDMomConstraint *
|
262 |
jandrea |
1.2 |
process.treeTBDMomConstraints *
|
263 |
econte |
1.1 |
process.doConstraintKinFit *
|
264 |
|
|
process.TrackRefitterKinFit *
|
265 |
jandrea |
1.2 |
process.treeKinFitConstraints*
|
266 |
econte |
1.1 |
process.TwoBodyDecayVertexConstraint *
|
267 |
|
|
process.TrackRefitterTBDVertexConstraint *
|
268 |
jandrea |
1.2 |
process.treeTBDVertexConstraints)
|
269 |
econte |
1.1 |
|
270 |
|
|
process.outpath = cms.EndPath(process.out)
|