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.6 by cgoetzma, Wed Dec 7 18:44:38 2011 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines