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.7 by econte, Thu Dec 8 10:43:30 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=1
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 > if IPHC_GEOM==1:
16 >    IPHC_FILENAME="startup.root"
17 > elif IPHC_GEOM==2:
18 >    IPHC_FILENAME="ideal.root"
19 > elif IPHC_GEOM==3:
20 >    IPHC_FILENAME="sagitta.root"
21 > elif IPHC_GEOM==4:
22 >    IPHC_FILENAME="twist.root"
23 > else:
24 >    IPHC_FILENAME="unknown.root"
25 > process.TFileService = cms.Service("TFileService", fileName = cms.string(IPHC_FILENAME))
26  
27   process.load( "RecoTracker.Configuration.RecoTracker_cff" )
28   process.load( "Configuration.StandardSequences.Services_cff" )
# Line 15 | Line 31 | process.load( "Configuration.StandardSeq
31   process.load( "Configuration.StandardSequences.FrontierConditions_GlobalTag_cff" )
32   process.GlobalTag.globaltag = "START44_V7::All"
33  
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 # )
34  
35   process.source = cms.Source( "PoolSource",
36      fileNames = cms.untracked.vstring(
# Line 46 | Line 54 | process.out = cms.OutputModule( "PoolOut
54   # ------------------------------------------------------------------------------
55   # 0) Change geometry
56   # ------------------------------------------------------------------------------
57 < #from CondCore.DBCommon.CondDBSetup_cfi import *
58 < #process.trackerAlignment = cms.ESSource("PoolDBESSource",
59 < #                  CondDBSetup,
60 < #                  timetype = cms.string('runnumber'),
61 < #                  toGet = cms.VPSet( cms.PSet(
62 < #                     record = cms.string('TrackerAlignmentRcd'),
63 < #                     tag = cms.string('Alignments')   )),
64 < #                  connect =
65 < #cms.string('sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/PayLoads/SystematicMisalignmentsMoriond/mcScenarioMoriond/misalignment_on_ideal39X/IDEALplusDelta_ichepVrealignedTwist.db')
66 < #cms.string('sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/PayLoads/SystematicMisalignmentsMoriond/mcScenarioMoriond/misalignment_on_ideal39X/IDEALplusDelta_ichepVrealignedSagitta.db')
67 <
68 < #                                        )
57 > if IPHC_GEOM==1:
58 >    print "\x1b[31mIPHC config : STARTUP geometry !!!\x1b[0m"
59 >    pass
60 > elif IPHC_GEOM==2:
61 >    print "\x1b[31mIPHC config : IDEAL geometry !!!\x1b[0m"
62 >    process.GlobalTag.toGet = cms.VPSet(
63 >        cms.PSet( record = cms.string( "TrackerAlignmentRcd" ),
64 >                  tag = cms.string( "TrackerIdealGeometry210_mc" ),
65 >                  connect = cms.untracked.string( "frontier://FrontierProd/CMS_COND_31X_FROM21X" ) ),
66 >        cms.PSet( record = cms.string( "TrackerAlignmentErrorRcd" ),
67 >                  tag = cms.string( "TrackerIdealGeometryErrors210_mc" ),
68 >                  connect = cms.untracked.string( "frontier://FrontierProd/CMS_COND_31X_FROM21X" ) )
69 >        )
70 > elif IPHC_GEOM==3 or IPHC_GEOM==4:
71 >    if IPHC_GEOM==4:
72 >        print "\x1b[31mIPHC config : TWIST geometry !!!\x1b[0m"
73 >        IPHC_STRING = 'sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/PayLoads/SystematicMisalignmentsMoriond/mcScenarioMoriond/misalignment_on_ideal39X/IDEALplusDelta_ichepVrealignedTwist.db'
74 >    elif IPHC_GEOM==3:
75 >        print "\x1b[31mIPHC config : SAGITTA geometry !!!\x1b[0m"
76 >        IPHC_STRING = 'sqlite_file:/afs/cern.ch/cms/CAF/CMSALCA/ALCA_TRACKERALIGN/PayLoads/SystematicMisalignmentsMoriond/mcScenarioMoriond/misalignment_on_ideal39X/IDEALplusDelta_ichepVrealignedSagitta.db'
77 >
78 >    
79 >    from CondCore.DBCommon.CondDBSetup_cfi import *
80 >    process.trackerAlignment = cms.ESSource("PoolDBESSource",
81 >                  CondDBSetup,
82 >                  timetype = cms.string('runnumber'),
83 >                  toGet = cms.VPSet( cms.PSet(
84 >                     record = cms.string('TrackerAlignmentRcd'),
85 >                     tag = cms.string('Alignments')   )),
86 >                  connect = cms.string(IPHC_STRING)
87 >                                        )
88                                          
89 < #process.es_prefer_trackerAlignment = cms.ESPrefer("PoolDBESSource","trackerAlignment")
89 >    process.es_prefer_trackerAlignment = cms.ESPrefer("PoolDBESSource","trackerAlignment")
90 >
91 > else:
92 >    print "\x1b[31mIPHC config : UNKNOWN geometry !!!\x1b[0m"
93 >    exit
94 >    
95  
96  
97   # ------------------------------------------------------------------------------
# Line 111 | Line 143 | process.treeWithoutConstraints = cms.EDA
143      labelTrajToTrack = cms.InputTag('TrackRefitterWithoutConstraint'),
144      siStripClusters  = cms.InputTag('TrackRefitterWithoutConstraint'),
145      primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
146 +    offlineBeamSpot  = cms.InputTag('offlineBeamSpot'),
147      isLaserRun       = cms.bool(False),
148      isMC             = cms.bool(True),
149 <    algoName         = cms.string("NoAlgo")
149 >    algoName         = cms.string("NoAlgo"),
150 >    trkVertexconstrcoll  = cms.InputTag(''),
151 >    trkMomconstrcoll     = cms.InputTag(''),
152 >    trkFullconstrcoll    = cms.InputTag('')
153   )
154  
155   # ------------------------------------------------------------------------------
# Line 144 | Line 180 | process.treeTBDFullConstraints = cms.EDA
180      labelTrajToTrack = cms.InputTag('TrackRefitterTBDFullConstraint'),
181      siStripClusters  = cms.InputTag('TrackRefitterTBDFullConstraint'),
182      primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
183 +    offlineBeamSpot  = cms.InputTag('offlineBeamSpot'),
184      isLaserRun       = cms.bool(False),
185      isMC             = cms.bool(True),
186 <    algoName         = cms.string("FullTBD")
186 >    algoName         = cms.string("FullTBD"),
187 >    trkVertexconstrcoll  = cms.InputTag('TwoBodyDecayConstraint'),
188 >    trkMomconstrcoll     = cms.InputTag('TwoBodyDecayConstraint'),
189 >    trkFullconstrcoll    = cms.InputTag('TwoBodyDecayConstraint')
190   )
191  
192   # ------------------------------------------------------------------------------
# Line 176 | Line 216 | process.treeTBDMomConstraints = cms.EDAn
216      labelTrajToTrack = cms.InputTag('TrackRefitterTBDMomConstraint'),
217      siStripClusters  = cms.InputTag('TrackRefitterTBDMomConstraint'),
218      primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
219 +    offlineBeamSpot  = cms.InputTag('offlineBeamSpot'),
220      isLaserRun       = cms.bool(False),
221      isMC             = cms.bool(True),
222 <    algoName         = cms.string("MomTBD")
222 >    algoName         = cms.string("MomTBD"),
223 >    trkVertexconstrcoll  = cms.InputTag('TwoBodyDecayMomConstraint'),
224 >    trkMomconstrcoll     = cms.InputTag('TwoBodyDecayMomConstraint'),
225 >    trkFullconstrcoll    = cms.InputTag('TwoBodyDecayMomConstraint')
226   )
227  
228   # ------------------------------------------------------------------------------
# Line 208 | Line 252 | process.treeKinFitConstraints = cms.EDAn
252      labelTrajToTrack = cms.InputTag('TrackRefitterKinFit'),
253      siStripClusters  = cms.InputTag('TrackRefitterKinFit'),
254      primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
255 +    offlineBeamSpot  = cms.InputTag('offlineBeamSpot'),
256      isLaserRun       = cms.bool(False),
257      isMC             = cms.bool(True),
258 <    algoName         = cms.string("KinFit")
258 >    algoName         = cms.string("KinFit"),
259 >    trkVertexconstrcoll  = cms.InputTag(''),
260 >    trkMomconstrcoll     = cms.InputTag(''),
261 >    trkFullconstrcoll    = cms.InputTag('')
262   )
263  
264   # ------------------------------------------------------------------------------
# Line 240 | Line 288 | process.treeTBDVertexConstraints = cms.E
288      labelTrajToTrack = cms.InputTag('TrackRefitterTBDVertexConstraint'),
289      siStripClusters  = cms.InputTag('TrackRefitterTBDVertexConstraint'),
290      primaryVertexColl= cms.InputTag('offlinePrimaryVertices'),
291 +    offlineBeamSpot  = cms.InputTag('offlineBeamSpot'),
292      isLaserRun       = cms.bool(False),
293      isMC             = cms.bool(True),
294 <    algoName         = cms.string("VtxTBD")
294 >    algoName         = cms.string("VtxTBD"),
295 >    trkVertexconstrcoll  = cms.InputTag('TwoBodyDecayVertexConstraint'),
296 >    trkMomconstrcoll     = cms.InputTag('TwoBodyDecayVertexConstraint'),
297 >    trkFullconstrcoll    = cms.InputTag('TwoBodyDecayVertexConstraint')
298   )
299  
300  
# Line 265 | Line 317 | process.p = cms.Path( process.AlignmentT
317                        process.treeKinFitConstraints*
318                        process.TwoBodyDecayVertexConstraint *
319                        process.TrackRefitterTBDVertexConstraint *
320 <                      process.treeTBDVertexConstraints)
320 >                      process.treeTBDVertexConstraints
321 >                      )
322  
323   process.outpath = cms.EndPath(process.out)
324 +
325 +
326 +

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines