1 |
import FWCore.ParameterSet.Config as cms
|
2 |
|
3 |
process = cms.Process("Refitting")
|
4 |
process.load("RecoTracker.TrackProducer.TrackRefitters_cff")
|
5 |
process.load("RecoVertex.BeamSpotProducer.BeamSpot_cff")
|
6 |
|
7 |
# "including" common configuration
|
8 |
from CondCore.DBCommon.CondDBSetup_cfi import *
|
9 |
|
10 |
# loading magnetic field and geometry
|
11 |
# process.load("MagneticField.Engine.uniformMagneticField_cfi")
|
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 = 'START311_V2A::All'
|
17 |
process.GlobalTag.connect="frontier://FrontierProd/CMS_COND_31X_GLOBALTAG"
|
18 |
|
19 |
|
20 |
##################################
|
21 |
# to change geometry :
|
22 |
##################################
|
23 |
#from CondCore.DBCommon.CondDBSetup_cfi import *
|
24 |
#process.trackerAlignment = cms.ESSource("PoolDBESSource",
|
25 |
# CondDBSetup,
|
26 |
# timetype = cms.string('runnumber'),
|
27 |
# toGet = cms.VPSet(cms.PSet(
|
28 |
# record =
|
29 |
#cms.string('TrackerAlignmentRcd'),
|
30 |
# tag =
|
31 |
#cms.string('Alignments')
|
32 |
# )),
|
33 |
# connect =
|
34 |
#cms.string('sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/PayLoads/SystematicMisalignmentsMoriond/mcScenarioMoriond/IDEALplusDelta_twistFreeVcosMintIOV.db')
|
35 |
#cms.string('sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/PayLoads/SystematicMisalignmentsMoriond/mcScenarioMoriond/IDEALplusDelta_ichepVrealignedSagitta.db')
|
36 |
# )
|
37 |
#process.es_prefer_trackerAlignment = cms.ESPrefer("PoolDBESSource",
|
38 |
#"trackerAlignment")
|
39 |
|
40 |
##################################
|
41 |
|
42 |
|
43 |
#input sources
|
44 |
process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring("file:/tmp/jandrea/TkAlZMuMu.root"))
|
45 |
|
46 |
#all events
|
47 |
process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1))
|
48 |
|
49 |
#name of the output file containing the tree
|
50 |
process.TFileService = cms.Service("TFileService", fileName = cms.string("analyzerTree.root") )
|
51 |
|
52 |
#TRACK REFITTER 1
|
53 |
import RecoTracker.TrackProducer.TrackRefitters_cff
|
54 |
process.TrackRefitter1 = RecoTracker.TrackProducer.TrackRefitter_cfi.TrackRefitter.clone()
|
55 |
process.TrackRefitter1.src = 'ALCARECOTkAlZMuMu'
|
56 |
|
57 |
#process.doConstraint=cms.EDProducer("TwoBodyDecayVertexConstraintProducer",
|
58 |
# srcTrk = cms.InputTag('TrackRefitter1'),
|
59 |
# srcBs = cms.InputTag('offlineBeamSpot'),
|
60 |
# primaryMass = cms.double(91.1876),
|
61 |
# primaryWidth = cms.double(2.4952),
|
62 |
# secondaryMass=cms.double(0.105658),
|
63 |
# EstimatorParameters = cms.PSet(
|
64 |
# MaxIterationDifference = cms.untracked.double(0.01),
|
65 |
# RobustificationConstant = cms.untracked.double(1.0),
|
66 |
# MaxIterations = cms.untracked.int32(100),
|
67 |
# UseInvariantMass = cms.untracked.bool(True)
|
68 |
# )
|
69 |
# )
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
process.doConstraint=cms.EDProducer("TwoBodyDecayMomentumConstraintProducer",
|
81 |
srcTrk = cms.InputTag('TrackRefitter1'),
|
82 |
srcBs = cms.InputTag('offlineBeamSpot'),
|
83 |
primaryMass = cms.double(91.1876),
|
84 |
primaryWidth = cms.double(2.4952),
|
85 |
secondaryMass=cms.double(0.105658),
|
86 |
EstimatorParameters = cms.PSet(
|
87 |
MaxIterationDifference = cms.untracked.double(0.01),
|
88 |
RobustificationConstant = cms.untracked.double(1.0),
|
89 |
MaxIterations = cms.untracked.int32(100),
|
90 |
UseInvariantMass = cms.untracked.bool(True),
|
91 |
UseBeamProfile = cms.untracked.bool(True)
|
92 |
)
|
93 |
)
|
94 |
|
95 |
process.TrackRefitter2 = process.TrackRefitter1.clone()
|
96 |
process.TrackRefitter2.src = 'AlignmentTrackSelector'
|
97 |
process.TrackRefitter2.constraint = cms.string('momentum')
|
98 |
#process.TrackRefitter2.constraint = cms.string('vertex')
|
99 |
|
100 |
process.TrackRefitter2.srcConstr = cms.InputTag('doConstraint')
|
101 |
#process.TrackRefitter2.TrajectoryInEvent = True
|
102 |
#process.TrackRefitter2.TTRHBuilder = "WithAngleAndTemplate"
|
103 |
|
104 |
process.treeproducer1 = cms.EDAnalyzer('AlignmentTree',
|
105 |
trackLabel = cms.InputTag('TrackRefitter1'),
|
106 |
tkTraj = cms.InputTag('TrackRefitter1'),
|
107 |
labelTrajToTrack = cms.InputTag('TrackRefitter1'),
|
108 |
siStripClusters = cms.InputTag('TrackRefitter1'),
|
109 |
primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
|
110 |
isLaserRun = cms.bool(False),
|
111 |
isMC = cms.bool(True)
|
112 |
)
|
113 |
|
114 |
process.treeproducer2 = cms.EDAnalyzer('AlignmentTree',
|
115 |
trackLabel = cms.InputTag('TrackRefitter2'),
|
116 |
tkTraj = cms.InputTag('TrackRefitter2'),
|
117 |
labelTrajToTrack = cms.InputTag('TrackRefitter2'),
|
118 |
siStripClusters = cms.InputTag('TrackRefitter2'),
|
119 |
primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
|
120 |
isLaserRun = cms.bool(False),
|
121 |
isMC = cms.bool(True)
|
122 |
)
|
123 |
|
124 |
process.TRACKS = cms.OutputModule("PoolOutputModule",
|
125 |
outputCommands = cms.untracked.vstring(
|
126 |
'keep *_*_*_*',
|
127 |
'keep recoTracks_*_*_*',
|
128 |
'keep recoTrackExtras_*_*_*',
|
129 |
'keep TrackingRecHitsOwned_*_*_*'
|
130 |
),
|
131 |
|
132 |
fileName = cms.untracked.string('/tmp/jandrea/refitterMomentum.root')
|
133 |
)
|
134 |
|
135 |
process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
|
136 |
|
137 |
process.p = cms.Path(process.offlineBeamSpot
|
138 |
*process.TrackRefitter1
|
139 |
*process.treeproducer1
|
140 |
*process.doConstraint
|
141 |
*process.TrackRefitter2
|
142 |
*process.treeproducer2
|
143 |
)
|
144 |
|
145 |
process.outpath = cms.EndPath(process.TRACKS)
|