ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/IPHCalignment2/scripts/testTwoBodyDecayConstraints.py
(Generate patch)

Comparing UserCode/IPHCalignment2/scripts/testTwoBodyDecayConstraints.py (file contents):
Revision 1.2 by jandrea, Wed Nov 30 17:40:02 2011 UTC vs.
Revision 1.5 by cgoetzma, Wed Dec 7 18:33:35 2011 UTC

# Line 1 | Line 1
1   import FWCore.ParameterSet.Config as cms
2  
3 + # IPHC variable for specifying geometry alignment scenario :
4 + # 1 -> STARTUP
5 + # 2 -> IDEAL
6 + # 3 -> SAGITTA
7 + # 4 -> TWIST
8 + IPHC_GEOM=1
9 +
10   process = cms.Process("Demo")
11  
12   process.load("FWCore.MessageService.MessageLogger_cfi")
13   process.MessageLogger.cerr.FwkReport.reportEvery = 50
14  
15   #name of the output file containing the tree
16 < process.TFileService = cms.Service("TFileService", fileName = cms.string("analyzerTree.root") )
16 > process.TFileService = cms.Service("TFileService", fileName = cms.string("startup.root") )
17  
18   process.load( "RecoTracker.Configuration.RecoTracker_cff" )
19   process.load( "Configuration.StandardSequences.Services_cff" )
# Line 15 | Line 22 | process.load( "Configuration.StandardSeq
22   process.load( "Configuration.StandardSequences.FrontierConditions_GlobalTag_cff" )
23   process.GlobalTag.globaltag = "START44_V7::All"
24  
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 # )
25  
26   process.source = cms.Source( "PoolSource",
27      fileNames = cms.untracked.vstring(
# Line 46 | Line 45 | process.out = cms.OutputModule( "PoolOut
45   # ------------------------------------------------------------------------------
46   # 0) Change geometry
47   # ------------------------------------------------------------------------------
48 < #from CondCore.DBCommon.CondDBSetup_cfi import *
49 < #process.trackerAlignment = cms.ESSource("PoolDBESSource",
50 < #                  CondDBSetup,
51 < #                  timetype = cms.string('runnumber'),
52 < #                  toGet = cms.VPSet( cms.PSet(
53 < #                     record = cms.string('TrackerAlignmentRcd'),
54 < #                     tag = cms.string('Alignments')   )),
55 < #                  connect =
56 < #cms.string('sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/PayLoads/SystematicMisalignmentsMoriond/mcScenarioMoriond/misalignment_on_ideal39X/IDEALplusDelta_ichepVrealignedTwist.db')
57 < #cms.string('sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/PayLoads/SystematicMisalignmentsMoriond/mcScenarioMoriond/misalignment_on_ideal39X/IDEALplusDelta_ichepVrealignedSagitta.db')
58 <
59 < #                                        )
48 > if IPHC_GEOM==1:
49 >    print "\x1b[31mIPHC config : STARTUP geometry !!!\x1b[0m"
50 >    pass
51 > elif IPHC_GEOM==2:
52 >    print "\x1b[31mIPHC config : IDEAL geometry !!!\x1b[0m"
53 >    process.GlobalTag.toGet = cms.VPSet(
54 >        cms.PSet( record = cms.string( "TrackerAlignmentRcd" ),
55 >                  tag = cms.string( "TrackerIdealGeometry210_mc" ),
56 >                  connect = cms.untracked.string( "frontier://FrontierProd/CMS_COND_31X_FROM21X" ) ),
57 >        cms.PSet( record = cms.string( "TrackerAlignmentErrorRcd" ),
58 >                  tag = cms.string( "TrackerIdealGeometryErrors210_mc" ),
59 >                  connect = cms.untracked.string( "frontier://FrontierProd/CMS_COND_31X_FROM21X" ) )
60 >        )
61 > elif IPHC_GEOM==3 or IPHC_GEOM==4:
62 >    if IPHC_GEOM==4:
63 >        print "\x1b[31mIPHC config : TWIST geometry !!!\x1b[0m"
64 >        IPHC_STRING = 'sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/PayLoads/SystematicMisalignmentsMoriond/mcScenarioMoriond/misalignment_on_ideal39X/IDEALplusDelta_ichepVrealignedTwist.db'
65 >    elif IPHC_GEOM==3:
66 >        print "\x1b[31mIPHC config : SAGITTA geometry !!!\x1b[0m"
67 >        IPHC_STRING = 'sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/PayLoads/SystematicMisalignmentsMoriond/mcScenarioMoriond/misalignment_on_ideal39X/IDEALplusDelta_ichepVrealignedSagitta.db'
68 >
69 >    
70 >    from CondCore.DBCommon.CondDBSetup_cfi import *
71 >    process.trackerAlignment = cms.ESSource("PoolDBESSource",
72 >                  CondDBSetup,
73 >                  timetype = cms.string('runnumber'),
74 >                  toGet = cms.VPSet( cms.PSet(
75 >                     record = cms.string('TrackerAlignmentRcd'),
76 >                     tag = cms.string('Alignments')   )),
77 >                  connect = cms.string(IPHC_STRING)
78 >                                        )
79                                          
80 < #process.es_prefer_trackerAlignment = cms.ESPrefer("PoolDBESSource","trackerAlignment")
80 >    process.es_prefer_trackerAlignment = cms.ESPrefer("PoolDBESSource","trackerAlignment")
81 >
82 > else:
83 >    print "\x1b[31mIPHC config : UNKNOWN geometry !!!\x1b[0m"
84 >    exit
85 >    
86  
87  
88   # ------------------------------------------------------------------------------
# Line 111 | Line 134 | process.treeWithoutConstraints = cms.EDA
134      labelTrajToTrack = cms.InputTag('TrackRefitterWithoutConstraint'),
135      siStripClusters  = cms.InputTag('TrackRefitterWithoutConstraint'),
136      primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
137 +    offlineBeamSpot  = cms.InputTag('offlineBeamSpot'),
138      isLaserRun       = cms.bool(False),
139      isMC             = cms.bool(True),
140 <    algoName         = cms.string("NoAlgo")
140 >    algoName         = cms.string("NoAlgo"),
141 >    trkVertexconstrcoll  = cms.InputTag(''),
142 >    trkMomconstrcoll     = cms.InputTag(''),
143 >    trkFullconstrcoll    = cms.InputTag('')
144   )
145  
146   # ------------------------------------------------------------------------------
# Line 144 | Line 171 | process.treeTBDFullConstraints = cms.EDA
171      labelTrajToTrack = cms.InputTag('TrackRefitterTBDFullConstraint'),
172      siStripClusters  = cms.InputTag('TrackRefitterTBDFullConstraint'),
173      primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
174 +    offlineBeamSpot  = cms.InputTag('offlineBeamSpot'),
175      isLaserRun       = cms.bool(False),
176      isMC             = cms.bool(True),
177 <    algoName         = cms.string("FullTBD")
177 >    algoName         = cms.string("FullTBD"),
178 >    trkVertexconstrcoll  = cms.InputTag('TwoBodyDecayConstraint'),
179 >    trkMomconstrcoll     = cms.InputTag('TwoBodyDecayConstraint'),
180 >    trkFullconstrcoll    = cms.InputTag('TwoBodyDecayConstraint')
181   )
182  
183   # ------------------------------------------------------------------------------
# Line 176 | Line 207 | process.treeTBDMomConstraints = cms.EDAn
207      labelTrajToTrack = cms.InputTag('TrackRefitterTBDMomConstraint'),
208      siStripClusters  = cms.InputTag('TrackRefitterTBDMomConstraint'),
209      primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
210 +    offlineBeamSpot  = cms.InputTag('offlineBeamSpot'),
211      isLaserRun       = cms.bool(False),
212      isMC             = cms.bool(True),
213 <    algoName         = cms.string("MomTBD")
213 >    algoName         = cms.string("MomTBD"),
214 >    trkVertexconstrcoll  = cms.InputTag('TwoBodyDecayMomConstraint'),
215 >    trkMomconstrcoll     = cms.InputTag('TwoBodyDecayMomConstraint'),
216 >    trkFullconstrcoll    = cms.InputTag('TwoBodyDecayMomConstraint')
217   )
218  
219   # ------------------------------------------------------------------------------
# Line 208 | Line 243 | process.treeKinFitConstraints = cms.EDAn
243      labelTrajToTrack = cms.InputTag('TrackRefitterKinFit'),
244      siStripClusters  = cms.InputTag('TrackRefitterKinFit'),
245      primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
246 +    offlineBeamSpot  = cms.InputTag('offlineBeamSpot'),
247      isLaserRun       = cms.bool(False),
248      isMC             = cms.bool(True),
249 <    algoName         = cms.string("KinFit")
249 >    algoName         = cms.string("KinFit"),
250 >    trkVertexconstrcoll  = cms.InputTag(''),
251 >    trkMomconstrcoll     = cms.InputTag(''),
252 >    trkFullconstrcoll    = cms.InputTag('')
253   )
254  
255   # ------------------------------------------------------------------------------
# Line 240 | Line 279 | process.treeTBDVertexConstraints = cms.E
279      labelTrajToTrack = cms.InputTag('TrackRefitterTBDVertexConstraint'),
280      siStripClusters  = cms.InputTag('TrackRefitterTBDVertexConstraint'),
281      primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
282 +    offlineBeamSpot  = cms.InputTag('offlineBeamSpot'),
283      isLaserRun       = cms.bool(False),
284      isMC             = cms.bool(True),
285 <    algoName         = cms.string("VtxTBD")
285 >    algoName         = cms.string("VtxTBD"),
286 >    trkVertexconstrcoll  = cms.InputTag('TwoBodyDecayVertexConstraint'),
287 >    trkMomconstrcoll     = cms.InputTag('TwoBodyDecayVertexConstraint'),
288 >    trkFullconstrcoll    = cms.InputTag('TwoBodyDecayVertexConstraint')
289   )
290  
291  
# Line 265 | Line 308 | process.p = cms.Path( process.AlignmentT
308                        process.treeKinFitConstraints*
309                        process.TwoBodyDecayVertexConstraint *
310                        process.TrackRefitterTBDVertexConstraint *
311 <                      process.treeTBDVertexConstraints)
311 >                      process.treeTBDVertexConstraints
312 >                      )
313  
314   process.outpath = cms.EndPath(process.out)
315 +
316 +
317 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines